Skip to content

Commit 9944fd5

Browse files
authored
OL8U7 & OL9U1 updates (#74)
* feat(olss): ✨ bump /boot to 1GB for ol8/x86 Signed-off-by: Philippe Vanhaesendonck <philippe.vanhaesendonck@oracle.com> * feat(olss): ✨ support for OL8U7 Signed-off-by: Philippe Vanhaesendonck <philippe.vanhaesendonck@oracle.com> * fix(olss): 🐛 set cloud-init defaults. cloud-init 22.1 package does not provide sensible defaults for OL. system_info section from 21.1 copied to etc/cloud/cloud.cfg.d/90_ol.cfg. Signed-off-by: Philippe Vanhaesendonck <philippe.vanhaesendonck@oracle.com> * feat(olss): ✨ updates for OL9U1 Signed-off-by: Philippe Vanhaesendonck <philippe.vanhaesendonck@oracle.com> * fix(olss): 🐛 vagrant virtualbox uses virtio nic. Fixes oracle/vagrant-projects#442 Signed-off-by: Philippe Vanhaesendonck <philippe.vanhaesendonck@oracle.com> Signed-off-by: Philippe Vanhaesendonck <philippe.vanhaesendonck@oracle.com>
1 parent fa18118 commit 9944fd5

File tree

11 files changed

+80
-26
lines changed

11 files changed

+80
-26
lines changed

oracle-linux-image-tools/cloud/oci/provision.sh

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,8 +75,24 @@ cloud::cloud_init()
7575
touch /etc/cloud/cloud-init.disabled
7676
yum install -y "${YUM_VERBOSE}" cloud-init
7777
rm /etc/cloud/cloud-init.disabled
78+
cat > /etc/cloud/cloud.cfg.d/90_ol.cfg <<-EOF
79+
# Provide sensible defaults for OL - see Orabug 34821447
80+
system_info:
81+
default_user:
82+
name: cloud-user
83+
lock_passwd: true
84+
gecos: Cloud User
85+
groups: [adm, systemd-journal]
86+
sudo: ["ALL=(ALL) NOPASSWD:ALL"]
87+
shell: /bin/bash
88+
distro: rhel
89+
paths:
90+
cloud_dir: /var/lib/cloud
91+
templates_dir: /etc/cloud/templates
92+
ssh_svcname: sshd
93+
EOF
7894
if [[ -n "${CLOUD_USER}" ]]; then
79-
sed -i -e "s/\(^\s\+name:\).*/\1 ${CLOUD_USER}/" /etc/cloud/cloud.cfg
95+
sed -i -e "s/\(^\s\+name:\).*/\1 ${CLOUD_USER}/" /etc/cloud/cloud.cfg.d/90_ol.cfg
8096
fi
8197
fi
8298
}

oracle-linux-image-tools/cloud/olvm/provision.sh

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,8 +75,24 @@ cloud::cloud_init()
7575
touch /etc/cloud/cloud-init.disabled
7676
yum install -y "${YUM_VERBOSE}" cloud-init
7777
rm /etc/cloud/cloud-init.disabled
78+
cat > /etc/cloud/cloud.cfg.d/90_ol.cfg <<-EOF
79+
# Provide sensible defaults for OL - see Orabug 34821447
80+
system_info:
81+
default_user:
82+
name: cloud-user
83+
lock_passwd: true
84+
gecos: Cloud User
85+
groups: [adm, systemd-journal]
86+
sudo: ["ALL=(ALL) NOPASSWD:ALL"]
87+
shell: /bin/bash
88+
distro: rhel
89+
paths:
90+
cloud_dir: /var/lib/cloud
91+
templates_dir: /etc/cloud/templates
92+
ssh_svcname: sshd
93+
EOF
7894
if [[ -n "${CLOUD_USER}" ]]; then
79-
sed -i -e "s/\(^\s\+name:\).*/\1 ${CLOUD_USER}/" /etc/cloud/cloud.cfg
95+
sed -i -e "s/\(^\s\+name:\).*/\1 ${CLOUD_USER}/" /etc/cloud/cloud.cfg.d/90_ol.cfg
8096
fi
8197
fi
8298
}

oracle-linux-image-tools/cloud/vagrant-virtualbox/files/vagrant-common.sh

Lines changed: 8 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
#######################################
1313
# Configure Vagrant instance
1414
# Globals:
15-
# None
15+
# ORACLE_RELEASE, UEK_RELEASE
1616
# Arguments:
1717
# None
1818
# Returns:
@@ -93,7 +93,7 @@ EOF
9393
chcon -u system_u -r object_r -t modules_conf_t /etc/modprobe.d/nofloppy.conf
9494

9595
# Customize the initramfs
96-
if [[ "${ORACLE_RELEASE}" != "9" ]]; then
96+
if [[ "${ORACLE_RELEASE}" != "9" && "${UEK_RELEASE}" != "7" ]]; then
9797
# Enable VMware PVSCSI support for VMware Fusion guests.
9898
echo 'add_drivers+=" mptspi "' > /etc/dracut.conf.d/vmware-fusion-drivers.conf
9999
restorecon /etc/dracut.conf.d/vmware-fusion-drivers.conf
@@ -169,16 +169,11 @@ For additional packages, updates, documentation and community help, see:
169169
#######################################
170170
vagrant::cleanup()
171171
{
172-
if [[ "${ORACLE_RELEASE}" != "6" ]]; then
173-
# On OL6 we need to keep psmisc and checkpolicy for dependencies; other
174-
# packages are not installed.
175-
distr::remove_rpms usermode \
176-
rhn\* \
177-
m2crypto \
178-
checkpolicy \
179-
iptables-services
180-
if [[ -z "${RESCUE_KERNEL}" || "${RESCUE_KERNEL,,}" = "no" ]]; then
181-
distr::remove_rpms dracut-config-rescue
182-
fi
172+
distr::remove_rpms usermode \
173+
rhn\* \
174+
m2crypto \
175+
iptables-services
176+
if [[ -z "${RESCUE_KERNEL}" || "${RESCUE_KERNEL,,}" = "no" ]]; then
177+
distr::remove_rpms dracut-config-rescue
183178
fi
184179
}

oracle-linux-image-tools/cloud/vagrant-virtualbox/image-scripts.sh

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,19 @@ cloud::image_package() {
110110
vboxmanage storageattach "${VM_NAME}" --storagectl "SATA Controller" --port 1 --device 0 --type hdd --medium ./extra_disk.vdi
111111
fi
112112
# Create the box
113-
vagrant package --base "${VM_NAME}" --output "${VM_NAME}.box"
113+
if [[ "${ORACLE_RELEASE}" =~ ^[89]$ ]]; then
114+
# For the latest uek kernels (UEK7) we install kernel-uek-core which only has virtio drivers...
115+
cat > Vagrantfile <<-EOF
116+
Vagrant.configure("2") do |config|
117+
config.vm.provider :virtualbox do |v|
118+
v.default_nic_type = "virtio"
119+
end
120+
end
121+
EOF
122+
vagrant package --base "${VM_NAME}" --output "${VM_NAME}.box" --vagrantfile Vagrantfile
123+
rm -rf Vagrantfile .vagrant
124+
else
125+
vagrant package --base "${VM_NAME}" --output "${VM_NAME}.box"
126+
fi
114127
vboxmanage unregistervm "${VM_NAME}" --delete
115128
}

oracle-linux-image-tools/cloud/vagrant-virtualbox/provision.sh

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ cloud::config()
3535
#######################################
3636
# Install Virtualbox guest agent
3737
# Globals:
38-
# YUM_VERBOSE
38+
# KERNEL, YUM_VERBOSE
3939
# Arguments:
4040
# None
4141
# Returns:
@@ -53,6 +53,12 @@ cloud::install_agent()
5353
yum install -y "${YUM_VERBOSE}" kernel-devel
5454
fi
5555

56+
# Orabug 34811820 for OL8 UEK7 -- for the current install
57+
case $(uname -r) in
58+
5.15.0-*.el8uek*)
59+
export PATH="/opt/rh/gcc-toolset-11/root/usr/bin:$PATH"
60+
esac
61+
5662
# Search for guest additions on cd devices
5763
for cdrom in /dev/sr*; do
5864
if mount -o ro "${cdrom}" /mnt; then
@@ -71,6 +77,14 @@ cloud::install_agent()
7177

7278
sh "${additions}" || :
7379
umount /mnt
80+
81+
# Orabug 34811820 for OL8 UEK7 -- for subsequent rebuilds
82+
case $(uname -r) in
83+
5.15.0-*.el8uek*)
84+
# shellcheck disable=SC2016
85+
sed -i '/PATH=$PATH/a PATH="/opt/rh/gcc-toolset-11/root/usr/bin:$PATH"' /usr/sbin/rcvboxadd
86+
esac
87+
7488
}
7589

7690
#######################################

oracle-linux-image-tools/distr/ol8-aarch64/env.properties

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
# env file.
44

55
# Distribution name
6-
DISTR_NAME="OL8U6_aarch64"
6+
DISTR_NAME="OL8U7_aarch64"
77

88
# Distribution release
99
readonly ORACLE_RELEASE=8
@@ -15,7 +15,7 @@ SETUP_SWAP="yes"
1515
ROOT_FS="xfs"
1616

1717
# Label of the ISO image
18-
ISO_LABEL="OL-8-6-0-BaseOS-aarch64"
18+
ISO_LABEL="OL-8-7-0-BaseOS-aarch64"
1919

2020
# Boot command
2121
# Variables MUST be escaped as they are evaluated at build time.

oracle-linux-image-tools/distr/ol8-slim/env.properties

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
# env file.
44

55
# Distribution name
6-
DISTR_NAME="OL8U6_x86_64"
6+
DISTR_NAME="OL8U7_x86_64"
77

88
# Distribution release
99
readonly ORACLE_RELEASE=8
@@ -22,7 +22,7 @@ BOOT_COMMAND=( '<up><tab>${CONSOLE} inst.text inst.ks=${KS_CONFIG} setup_swap=${
2222
KERNEL="uek"
2323

2424
# UEK release: 6, 7
25-
UEK_RELEASE=6
25+
UEK_RELEASE=7
2626

2727
# Keep rescue kernel: yes, no
2828
# Keeping rescue kernel will increase the image size and is most propbalbly

oracle-linux-image-tools/distr/ol8-slim/ol8-ks.cfg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ zerombr
4848
clearpart --all --initlabel
4949

5050
# Disk partitioning information
51-
part /boot --fstype="xfs" --ondisk=sda --size=500 --label=/boot
51+
part /boot --fstype="xfs" --ondisk=sda --size=1024 --label=/boot
5252
part swap --fstype="swap" --ondisk=sda --size=4096 --label=swap
5353
part / --fstype="xfs" --ondisk=sda --size=4096 --label=root --grow
5454

oracle-linux-image-tools/distr/ol9-aarch64/env.properties

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
# env file.
44

55
# Distribution name
6-
DISTR_NAME="OL9U0_aarch64"
6+
DISTR_NAME="OL9U1_aarch64"
77

88
# Distribution release
99
readonly ORACLE_RELEASE=9
@@ -15,7 +15,7 @@ SETUP_SWAP="yes"
1515
ROOT_FS="xfs"
1616

1717
# Label of the ISO image
18-
ISO_LABEL="OL-9-0-0-BaseOS-aarch64"
18+
ISO_LABEL="OL-9-1-0-BaseOS-aarch64"
1919

2020
# Boot command
2121
# Variables MUST be escaped as they are evaluated at build time.

oracle-linux-image-tools/distr/ol9-slim/env.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
# env file.
44

55
# Distribution name
6-
DISTR_NAME="OL9U0_x86_64"
6+
DISTR_NAME="OL9U1_x86_64"
77

88
# Distribution release
99
readonly ORACLE_RELEASE=9

0 commit comments

Comments
 (0)