From 1f3115a1b8b81718e44a51ed4c3ee01b778e1c7a Mon Sep 17 00:00:00 2001 From: Tobias Jungel <1773291+toanju@users.noreply.github.com> Date: Fri, 7 Feb 2025 10:35:01 +0100 Subject: [PATCH 01/16] Revert "add parametrized systemd-sysupdate@ service for kvm-node-agent" This reverts commit 6306b826cbd9c9138ed77a1d3ff5476184c8bdc1. --- .../systemd/system/systemd-sysupdate@.service | 23 ------------------- 1 file changed, 23 deletions(-) delete mode 100644 features/orabos/file.include/etc/systemd/system/systemd-sysupdate@.service diff --git a/features/orabos/file.include/etc/systemd/system/systemd-sysupdate@.service b/features/orabos/file.include/etc/systemd/system/systemd-sysupdate@.service deleted file mode 100644 index 9307e8e..0000000 --- a/features/orabos/file.include/etc/systemd/system/systemd-sysupdate@.service +++ /dev/null @@ -1,23 +0,0 @@ -[Unit] -Description=System Update specific version -Documentation=man:systemd-sysupdate.service(8) -Wants=network-online.target -After=network-online.target -ConditionVirtualization=!container - -[Service] -Type=simple -NotifyAccess=main -Environment="VERSION=%I" -ExecStart=/usr/lib/systemd/systemd-sysupdate update $VERSION -CapabilityBoundingSet=CAP_CHOWN CAP_FOWNER CAP_FSETID CAP_MKNOD CAP_SETFCAP CAP_SYS_ADMIN CAP_SETPCAP CAP_DAC_OVERRIDE CAP_LINUX_IMMUTABLE -NoNewPrivileges=yes -MemoryDenyWriteExecute=yes -ProtectHostname=yes -RestrictRealtime=yes -RestrictNamespaces=net -RestrictAddressFamilies=AF_UNIX AF_INET AF_INET6 -SystemCallFilter=@system-service @mount -SystemCallErrorNumber=EPERM -SystemCallArchitectures=native -LockPersonality=yes \ No newline at end of file From e7f5013973f6f1f600201a6f5f8d7e9a0e8f1574 Mon Sep 17 00:00:00 2001 From: Tobias Jungel <1773291+toanju@users.noreply.github.com> Date: Fri, 7 Feb 2025 10:35:24 +0100 Subject: [PATCH 02/16] Revert "added systemd-container package: provides sysupdate tooling" This reverts commit 19a788c505e19d67afb746cb5264f0f3d6dc3c3a. --- features/orabos/pkg.include | 1 - 1 file changed, 1 deletion(-) diff --git a/features/orabos/pkg.include b/features/orabos/pkg.include index b7a2232..808cf93 100644 --- a/features/orabos/pkg.include +++ b/features/orabos/pkg.include @@ -4,4 +4,3 @@ open-iscsi openvswitch-switch conntrack parted -systemd-container From 5fc1f86b7856fd25f4da231558ab989a56c79f7a Mon Sep 17 00:00:00 2001 From: Tobias Jungel <1773291+toanju@users.noreply.github.com> Date: Fri, 7 Feb 2025 10:35:45 +0100 Subject: [PATCH 03/16] Revert "Mask systemd-sysupdate-reboot.timer" This reverts commit 9bfe654c3426ea0dc61e04d986b35e1b40cb97d7. --- .../etc/systemd/system/systemd-sysupdate-reboot.timer | 1 - .../systemd/system-preset/50-no-sysupdate-reboot-timer.preset | 2 -- 2 files changed, 3 deletions(-) delete mode 120000 features/orabos/file.include/etc/systemd/system/systemd-sysupdate-reboot.timer delete mode 100644 features/orabos/file.include/usr/local/lib/systemd/system-preset/50-no-sysupdate-reboot-timer.preset diff --git a/features/orabos/file.include/etc/systemd/system/systemd-sysupdate-reboot.timer b/features/orabos/file.include/etc/systemd/system/systemd-sysupdate-reboot.timer deleted file mode 120000 index dc1dc0c..0000000 --- a/features/orabos/file.include/etc/systemd/system/systemd-sysupdate-reboot.timer +++ /dev/null @@ -1 +0,0 @@ -/dev/null \ No newline at end of file diff --git a/features/orabos/file.include/usr/local/lib/systemd/system-preset/50-no-sysupdate-reboot-timer.preset b/features/orabos/file.include/usr/local/lib/systemd/system-preset/50-no-sysupdate-reboot-timer.preset deleted file mode 100644 index 1aba06d..0000000 --- a/features/orabos/file.include/usr/local/lib/systemd/system-preset/50-no-sysupdate-reboot-timer.preset +++ /dev/null @@ -1,2 +0,0 @@ -# The OS reboot needs to be orchestrated -disable systemd-sysupdate-reboot.timer From 4e366bb7b17ded47a03cd138e613fca8d825f9b1 Mon Sep 17 00:00:00 2001 From: Tobias Jungel <1773291+toanju@users.noreply.github.com> Date: Fri, 7 Feb 2025 10:42:34 +0100 Subject: [PATCH 04/16] Revert "adapt dracut root label partition" This reverts commit e97d8dc42187a39a9ce45b279f5d17f1aeba3d8c. --- features/orabos/exec.config | 3 --- .../orabos/file.include/etc/kernel/cmdline.d/00-default.cfg | 1 + 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/features/orabos/exec.config b/features/orabos/exec.config index a516140..14e6060 100755 --- a/features/orabos/exec.config +++ b/features/orabos/exec.config @@ -16,9 +16,6 @@ IMAGE_VERSION=${BUILDER_VERSION} VARIANT_ID=${BUILDER_CNAME%-*} EOF -# Add correct root partition to cmdline -echo "DEVICE=\"LABEL=garden_${BUILDER_VERSION}\"" > /etc/kernel/cmdline.d/000-root.cfg - function create() { NAME=$1 shift diff --git a/features/orabos/file.include/etc/kernel/cmdline.d/00-default.cfg b/features/orabos/file.include/etc/kernel/cmdline.d/00-default.cfg index 9d38c69..5c04fc6 100644 --- a/features/orabos/file.include/etc/kernel/cmdline.d/00-default.cfg +++ b/features/orabos/file.include/etc/kernel/cmdline.d/00-default.cfg @@ -1,4 +1,5 @@ # DO NOT CHANGE THIS FILE! USE /etc/kernel/cmdline.d CMDLINE_LINUX="ro consoleblank=0" +DEVICE="LABEL=ROOT" # WARNING! 0 disables the TIMEOUT TIMEOUT=1 From 2a56a2743d2c2263762c98b5974fb8dfd0ec4493 Mon Sep 17 00:00:00 2001 From: Tobias Jungel <1773291+toanju@users.noreply.github.com> Date: Fri, 7 Feb 2025 10:43:12 +0100 Subject: [PATCH 05/16] Revert "fix fstab modification" This reverts commit 3ed53d9fad2a5b93b8f82958500dda167a83d3a8. --- features/orabos/fstab.mod | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/features/orabos/fstab.mod b/features/orabos/fstab.mod index 5ffbcb7..8e4c3ea 100755 --- a/features/orabos/fstab.mod +++ b/features/orabos/fstab.mod @@ -8,6 +8,8 @@ if [ -n "$currentfstab" ]; then sed \ -e'/type=uefi/ s/$/,size=511M/' \ -e '/^[^[:space:]]\+[[:space:]]\+\/usr[[:space:]]\+/d' \ - -e 's/LABEL=ROOT/LABEL=garden_'$BUILDER_VERSION'/' \ <<< "$currentfstab" fi + +# rename root label to gardenlinux_${GARDENLINUX_VERSION} +sed 's/LABEL=ROOT/LABEL=garden_'$BUILDER_VERSION'/' From 3eaafbe3360d0d1eaf2b090ef6b9a78817dd720f Mon Sep 17 00:00:00 2001 From: Tobias Jungel <1773291+toanju@users.noreply.github.com> Date: Fri, 7 Feb 2025 10:43:36 +0100 Subject: [PATCH 06/16] Revert "just replace the line instead append, shorten to garden_" This reverts commit 44a4fc447739436639b9e3f76189521bdc730fa8. --- features/orabos/file.include/etc/sysupdate.d/10-root.conf | 2 +- features/orabos/fstab.mod | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/features/orabos/file.include/etc/sysupdate.d/10-root.conf b/features/orabos/file.include/etc/sysupdate.d/10-root.conf index 0dbe27d..6f18af0 100644 --- a/features/orabos/file.include/etc/sysupdate.d/10-root.conf +++ b/features/orabos/file.include/etc/sysupdate.d/10-root.conf @@ -14,7 +14,7 @@ MatchPattern=%W-@v.root.xz [Target] Type=partition Path=auto -MatchPattern=garden_@v +MatchPattern=gardenlinux_@v MatchPartitionType=root PartitionFlags=0 ReadOnly=1 diff --git a/features/orabos/fstab.mod b/features/orabos/fstab.mod index 8e4c3ea..8222bf0 100755 --- a/features/orabos/fstab.mod +++ b/features/orabos/fstab.mod @@ -9,7 +9,7 @@ if [ -n "$currentfstab" ]; then -e'/type=uefi/ s/$/,size=511M/' \ -e '/^[^[:space:]]\+[[:space:]]\+\/usr[[:space:]]\+/d' \ <<< "$currentfstab" -fi -# rename root label to gardenlinux_${GARDENLINUX_VERSION} -sed 's/LABEL=ROOT/LABEL=garden_'$BUILDER_VERSION'/' + # systemd-syslinux: rename ROOT label to gardenlinux_${GARDENLINUX_VERSION} + sed -e 's/LABEL=ROOT/LABEL=gardenlinux_'$BUILDER_VERSION'/g' <<< "$currentfstab" +fi From 38d7dbbeabb76655350a49fc0561f468c55a5829 Mon Sep 17 00:00:00 2001 From: Tobias Jungel <1773291+toanju@users.noreply.github.com> Date: Fri, 7 Feb 2025 10:43:49 +0100 Subject: [PATCH 07/16] Revert "re-label the root partition" This reverts commit ff0c1efecf1241dc6e9f36c2360e25a660869f1d. --- features/orabos/exec.config | 2 ++ features/orabos/fstab.mod | 3 --- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/features/orabos/exec.config b/features/orabos/exec.config index 14e6060..0871d75 100755 --- a/features/orabos/exec.config +++ b/features/orabos/exec.config @@ -16,6 +16,8 @@ IMAGE_VERSION=${BUILDER_VERSION} VARIANT_ID=${BUILDER_CNAME%-*} EOF +echo "Label=${BUILDER_VERSION}" >> /etc/repart.d/10_root_a.conf + function create() { NAME=$1 shift diff --git a/features/orabos/fstab.mod b/features/orabos/fstab.mod index 8222bf0..b09bad7 100755 --- a/features/orabos/fstab.mod +++ b/features/orabos/fstab.mod @@ -9,7 +9,4 @@ if [ -n "$currentfstab" ]; then -e'/type=uefi/ s/$/,size=511M/' \ -e '/^[^[:space:]]\+[[:space:]]\+\/usr[[:space:]]\+/d' \ <<< "$currentfstab" - - # systemd-syslinux: rename ROOT label to gardenlinux_${GARDENLINUX_VERSION} - sed -e 's/LABEL=ROOT/LABEL=gardenlinux_'$BUILDER_VERSION'/g' <<< "$currentfstab" fi From fcfb73ed56080a4372dc6ea9fa1e95ac8b33d1ed Mon Sep 17 00:00:00 2001 From: Tobias Jungel <1773291+toanju@users.noreply.github.com> Date: Fri, 7 Feb 2025 10:43:59 +0100 Subject: [PATCH 08/16] Revert "fix Typos (label -> Label)" This reverts commit 2277e206219c6224a32d50e89d1eb0e06704c3de. --- features/orabos/exec.config | 4 ++-- features/orabos/file.include/etc/repart.d/25_root_b.conf | 3 +-- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/features/orabos/exec.config b/features/orabos/exec.config index 0871d75..39d2a0c 100755 --- a/features/orabos/exec.config +++ b/features/orabos/exec.config @@ -16,7 +16,7 @@ IMAGE_VERSION=${BUILDER_VERSION} VARIANT_ID=${BUILDER_CNAME%-*} EOF -echo "Label=${BUILDER_VERSION}" >> /etc/repart.d/10_root_a.conf +echo "label=${BUILDER_VERSION}" >> /etc/repart.d/10_root_a.conf function create() { NAME=$1 @@ -43,4 +43,4 @@ chmod 0600 /var/lib/nova/.ssh # limit vnc port autorange to possible kubernetes nodeports sed -i 's/#remote_display_port_min = 5900/remote_display_port_min = 32200/' /etc/libvirt/qemu.conf -sed -i 's/#remote_display_port_max = 65535/remote_display_port_max = 32299/' /etc/libvirt/qemu.conf +sed -i 's/#remote_display_port_max = 65535/remote_display_port_max = 32299/' /etc/libvirt/qemu.conf \ No newline at end of file diff --git a/features/orabos/file.include/etc/repart.d/25_root_b.conf b/features/orabos/file.include/etc/repart.d/25_root_b.conf index ac4aea2..75492cc 100644 --- a/features/orabos/file.include/etc/repart.d/25_root_b.conf +++ b/features/orabos/file.include/etc/repart.d/25_root_b.conf @@ -2,5 +2,4 @@ Type=root SizeMaxBytes=4G # systemd-sysupdate: A partition whose GPT partition label is set to "_empty" is considered empty, and a candidate to place a newly downloaded resource in. -Label=_empty - +label=_empty \ No newline at end of file From 3491c555ddf5c1c43bb94d8cd9fb3f94d81a46b2 Mon Sep 17 00:00:00 2001 From: Tobias Jungel <1773291+toanju@users.noreply.github.com> Date: Fri, 7 Feb 2025 10:44:19 +0100 Subject: [PATCH 09/16] Revert "use a common directory for sysupdate images" This reverts commit d6adb0f65a87f951ad23e677da2b0b8ce255d320. --- .../file.include/etc/sysupdate.d/10-root.conf | 20 +++++++++++++++++++ .../file.include/etc/sysupdate.d/10-root.conf | 2 +- 2 files changed, 21 insertions(+), 1 deletion(-) create mode 100644 features/metal3/file.include/etc/sysupdate.d/10-root.conf diff --git a/features/metal3/file.include/etc/sysupdate.d/10-root.conf b/features/metal3/file.include/etc/sysupdate.d/10-root.conf new file mode 100644 index 0000000..0fb046d --- /dev/null +++ b/features/metal3/file.include/etc/sysupdate.d/10-root.conf @@ -0,0 +1,20 @@ +# /etc/sysupdate.d/10-root.conf +[Transfer] +# do not verify the signature of the source (TODO: remove this line) +Verify=no +# protect current version (defined by IMAGE_ID in /etc/os-release) +ProtectVersion=%A + +[Source] +Type=url-file +Path=https://objectstore-3.qa-de-1.cloud.sap/v1/AUTH_b206a1900310484f8a9504754c84b067/repo/gardenlinux/gardenlinux-kvm-baremetal-ignite/sysupdate/ +# %W is VARIANT_ID from /etc/os-release, e.g. openstackbaremetal-metal3-orabos-amd64" +MatchPattern=%W-@v.root.xz + +[Target] +Type=partition +Path=auto +MatchPattern=gardenlinux_@v +MatchPartitionType=root +PartitionFlags=0 +ReadOnly=1 diff --git a/features/orabos/file.include/etc/sysupdate.d/10-root.conf b/features/orabos/file.include/etc/sysupdate.d/10-root.conf index 6f18af0..c86f223 100644 --- a/features/orabos/file.include/etc/sysupdate.d/10-root.conf +++ b/features/orabos/file.include/etc/sysupdate.d/10-root.conf @@ -7,7 +7,7 @@ ProtectVersion=%A [Source] Type=url-file -Path=https://objectstore-3.qa-de-1.cloud.sap/v1/AUTH_b206a1900310484f8a9504754c84b067/repo/gardenlinux/sysupdate/ +Path=https://objectstore-3.qa-de-1.cloud.sap/v1/AUTH_b206a1900310484f8a9504754c84b067/repo/gardenlinux/gardenlinux-kvm-baremetal/sysupdate/ # %W is VARIANT_ID from /etc/os-release, e.g. openstackbaremetal-metal3-orabos-amd64" MatchPattern=%W-@v.root.xz From 551bd26983af2473dd599420db5a2c779addee22 Mon Sep 17 00:00:00 2001 From: Tobias Jungel <1773291+toanju@users.noreply.github.com> Date: Fri, 7 Feb 2025 10:46:23 +0100 Subject: [PATCH 10/16] Revert "Use ignite image for metal3, non-ignite otherwise" This reverts commit 2d28067f694c14680f373739f6778d88876eb8da. --- .../file.include/etc/sysupdate.d/10-root.conf | 20 ------------------- .../file.include/etc/sysupdate.d/10-root.conf | 2 +- 2 files changed, 1 insertion(+), 21 deletions(-) delete mode 100644 features/metal3/file.include/etc/sysupdate.d/10-root.conf diff --git a/features/metal3/file.include/etc/sysupdate.d/10-root.conf b/features/metal3/file.include/etc/sysupdate.d/10-root.conf deleted file mode 100644 index 0fb046d..0000000 --- a/features/metal3/file.include/etc/sysupdate.d/10-root.conf +++ /dev/null @@ -1,20 +0,0 @@ -# /etc/sysupdate.d/10-root.conf -[Transfer] -# do not verify the signature of the source (TODO: remove this line) -Verify=no -# protect current version (defined by IMAGE_ID in /etc/os-release) -ProtectVersion=%A - -[Source] -Type=url-file -Path=https://objectstore-3.qa-de-1.cloud.sap/v1/AUTH_b206a1900310484f8a9504754c84b067/repo/gardenlinux/gardenlinux-kvm-baremetal-ignite/sysupdate/ -# %W is VARIANT_ID from /etc/os-release, e.g. openstackbaremetal-metal3-orabos-amd64" -MatchPattern=%W-@v.root.xz - -[Target] -Type=partition -Path=auto -MatchPattern=gardenlinux_@v -MatchPartitionType=root -PartitionFlags=0 -ReadOnly=1 diff --git a/features/orabos/file.include/etc/sysupdate.d/10-root.conf b/features/orabos/file.include/etc/sysupdate.d/10-root.conf index c86f223..0fb046d 100644 --- a/features/orabos/file.include/etc/sysupdate.d/10-root.conf +++ b/features/orabos/file.include/etc/sysupdate.d/10-root.conf @@ -7,7 +7,7 @@ ProtectVersion=%A [Source] Type=url-file -Path=https://objectstore-3.qa-de-1.cloud.sap/v1/AUTH_b206a1900310484f8a9504754c84b067/repo/gardenlinux/gardenlinux-kvm-baremetal/sysupdate/ +Path=https://objectstore-3.qa-de-1.cloud.sap/v1/AUTH_b206a1900310484f8a9504754c84b067/repo/gardenlinux/gardenlinux-kvm-baremetal-ignite/sysupdate/ # %W is VARIANT_ID from /etc/os-release, e.g. openstackbaremetal-metal3-orabos-amd64" MatchPattern=%W-@v.root.xz From bc1c763b0b7909ba2e474748301eeec849a30bce Mon Sep 17 00:00:00 2001 From: Tobias Jungel <1773291+toanju@users.noreply.github.com> Date: Fri, 7 Feb 2025 10:46:34 +0100 Subject: [PATCH 11/16] Revert "add sysupdate.d for root partition a/b upgrades" This reverts commit d094cbce9dee701f5f3b8efeae8042fe831d5aca. --- features/orabos/exec.config | 2 -- .../file.include/etc/repart.d/25_root_b.conf | 2 -- .../file.include/etc/sysupdate.d/10-root.conf | 20 ------------------- 3 files changed, 24 deletions(-) delete mode 100644 features/orabos/file.include/etc/sysupdate.d/10-root.conf diff --git a/features/orabos/exec.config b/features/orabos/exec.config index 39d2a0c..8a5d902 100755 --- a/features/orabos/exec.config +++ b/features/orabos/exec.config @@ -16,8 +16,6 @@ IMAGE_VERSION=${BUILDER_VERSION} VARIANT_ID=${BUILDER_CNAME%-*} EOF -echo "label=${BUILDER_VERSION}" >> /etc/repart.d/10_root_a.conf - function create() { NAME=$1 shift diff --git a/features/orabos/file.include/etc/repart.d/25_root_b.conf b/features/orabos/file.include/etc/repart.d/25_root_b.conf index 75492cc..d539b66 100644 --- a/features/orabos/file.include/etc/repart.d/25_root_b.conf +++ b/features/orabos/file.include/etc/repart.d/25_root_b.conf @@ -1,5 +1,3 @@ [Partition] Type=root SizeMaxBytes=4G -# systemd-sysupdate: A partition whose GPT partition label is set to "_empty" is considered empty, and a candidate to place a newly downloaded resource in. -label=_empty \ No newline at end of file diff --git a/features/orabos/file.include/etc/sysupdate.d/10-root.conf b/features/orabos/file.include/etc/sysupdate.d/10-root.conf deleted file mode 100644 index 0fb046d..0000000 --- a/features/orabos/file.include/etc/sysupdate.d/10-root.conf +++ /dev/null @@ -1,20 +0,0 @@ -# /etc/sysupdate.d/10-root.conf -[Transfer] -# do not verify the signature of the source (TODO: remove this line) -Verify=no -# protect current version (defined by IMAGE_ID in /etc/os-release) -ProtectVersion=%A - -[Source] -Type=url-file -Path=https://objectstore-3.qa-de-1.cloud.sap/v1/AUTH_b206a1900310484f8a9504754c84b067/repo/gardenlinux/gardenlinux-kvm-baremetal-ignite/sysupdate/ -# %W is VARIANT_ID from /etc/os-release, e.g. openstackbaremetal-metal3-orabos-amd64" -MatchPattern=%W-@v.root.xz - -[Target] -Type=partition -Path=auto -MatchPattern=gardenlinux_@v -MatchPartitionType=root -PartitionFlags=0 -ReadOnly=1 From 8b189df6ebb81a8dec9005b8d13cf3baab74198a Mon Sep 17 00:00:00 2001 From: Tobias Jungel <1773291+toanju@users.noreply.github.com> Date: Fri, 7 Feb 2025 11:17:04 +0100 Subject: [PATCH 12/16] Revert "A/B root partitions, Two more for persistence" This reverts commit 5ee74633872a647ac1f2ab7fd39d2e4a552c04e3. --- features/orabos/file.exclude | 1 - .../file.include/etc/repart.d/30_home.conf | 5 ----- .../orabos/file.include/etc/repart.d/40_var.conf | 5 ----- .../etc/repart.d/{10_root_a.conf => root_a.conf} | 1 - .../etc/repart.d/{25_root_b.conf => root_b.conf} | 2 +- .../file.include/etc/systemd/system/home.mount | 16 ---------------- .../system/local-fs.target.wants/home.mount | 1 - .../system/local-fs.target.wants/var.mount | 1 - .../file.include/etc/systemd/system/var.mount | 16 ---------------- features/orabos/fstab.mod | 7 ++----- 10 files changed, 3 insertions(+), 52 deletions(-) delete mode 100644 features/orabos/file.include/etc/repart.d/30_home.conf delete mode 100644 features/orabos/file.include/etc/repart.d/40_var.conf rename features/orabos/file.include/etc/repart.d/{10_root_a.conf => root_a.conf} (57%) rename features/orabos/file.include/etc/repart.d/{25_root_b.conf => root_b.conf} (57%) delete mode 100644 features/orabos/file.include/etc/systemd/system/home.mount delete mode 120000 features/orabos/file.include/etc/systemd/system/local-fs.target.wants/home.mount delete mode 120000 features/orabos/file.include/etc/systemd/system/local-fs.target.wants/var.mount delete mode 100644 features/orabos/file.include/etc/systemd/system/var.mount diff --git a/features/orabos/file.exclude b/features/orabos/file.exclude index 00cd977..9f9728d 100644 --- a/features/orabos/file.exclude +++ b/features/orabos/file.exclude @@ -1,4 +1,3 @@ /etc/systemd/network/99-default.network /etc/systemd/system/systemd-resolved.service.d/wait-for-networkd.conf -/etc/repart.d/root.conf /etc/kernel/cmdline.d/99-no-gpt-auto.cfg diff --git a/features/orabos/file.include/etc/repart.d/30_home.conf b/features/orabos/file.include/etc/repart.d/30_home.conf deleted file mode 100644 index f7b9a43..0000000 --- a/features/orabos/file.include/etc/repart.d/30_home.conf +++ /dev/null @@ -1,5 +0,0 @@ -[Partition] -Type=home -Label=home -CopyFiles=/home:/ -SizeMaxBytes=1G diff --git a/features/orabos/file.include/etc/repart.d/40_var.conf b/features/orabos/file.include/etc/repart.d/40_var.conf deleted file mode 100644 index 27d93db..0000000 --- a/features/orabos/file.include/etc/repart.d/40_var.conf +++ /dev/null @@ -1,5 +0,0 @@ -[Partition] -Type=var -Label=var -CopyFiles=/var:/ -Weight=4000 diff --git a/features/orabos/file.include/etc/repart.d/10_root_a.conf b/features/orabos/file.include/etc/repart.d/root_a.conf similarity index 57% rename from features/orabos/file.include/etc/repart.d/10_root_a.conf rename to features/orabos/file.include/etc/repart.d/root_a.conf index d539b66..1aadd2d 100644 --- a/features/orabos/file.include/etc/repart.d/10_root_a.conf +++ b/features/orabos/file.include/etc/repart.d/root_a.conf @@ -1,3 +1,2 @@ [Partition] Type=root -SizeMaxBytes=4G diff --git a/features/orabos/file.include/etc/repart.d/25_root_b.conf b/features/orabos/file.include/etc/repart.d/root_b.conf similarity index 57% rename from features/orabos/file.include/etc/repart.d/25_root_b.conf rename to features/orabos/file.include/etc/repart.d/root_b.conf index d539b66..0a7b2e9 100644 --- a/features/orabos/file.include/etc/repart.d/25_root_b.conf +++ b/features/orabos/file.include/etc/repart.d/root_b.conf @@ -1,3 +1,3 @@ [Partition] Type=root -SizeMaxBytes=4G +NoAuto=on diff --git a/features/orabos/file.include/etc/systemd/system/home.mount b/features/orabos/file.include/etc/systemd/system/home.mount deleted file mode 100644 index 968d5c1..0000000 --- a/features/orabos/file.include/etc/systemd/system/home.mount +++ /dev/null @@ -1,16 +0,0 @@ -[Unit] -Description=Directory (/home) -Documentation=man:file-hierarchy(7) -ConditionPathIsSymbolicLink=!/home -DefaultDependencies=no -Conflicts=umount.target -Before=local-fs.target umount.target -After=-.mount -After=blockdev@dev-disk-by\x2dlabel-home.target - -[Mount] -What=/dev/disk/by-label/home -Where=/home - -[Install] -WantedBy=local-fs.target diff --git a/features/orabos/file.include/etc/systemd/system/local-fs.target.wants/home.mount b/features/orabos/file.include/etc/systemd/system/local-fs.target.wants/home.mount deleted file mode 120000 index 966bd5b..0000000 --- a/features/orabos/file.include/etc/systemd/system/local-fs.target.wants/home.mount +++ /dev/null @@ -1 +0,0 @@ -../home.mount \ No newline at end of file diff --git a/features/orabos/file.include/etc/systemd/system/local-fs.target.wants/var.mount b/features/orabos/file.include/etc/systemd/system/local-fs.target.wants/var.mount deleted file mode 120000 index 985663f..0000000 --- a/features/orabos/file.include/etc/systemd/system/local-fs.target.wants/var.mount +++ /dev/null @@ -1 +0,0 @@ -../var.mount \ No newline at end of file diff --git a/features/orabos/file.include/etc/systemd/system/var.mount b/features/orabos/file.include/etc/systemd/system/var.mount deleted file mode 100644 index b658151..0000000 --- a/features/orabos/file.include/etc/systemd/system/var.mount +++ /dev/null @@ -1,16 +0,0 @@ -[Unit] -Description=Directory (/var) -Documentation=man:file-hierarchy(7) -ConditionPathIsSymbolicLink=!/var -DefaultDependencies=no -Conflicts=umount.target -Before=local-fs.target umount.target -After=-.mount -After=blockdev@dev-disk-by\x2dlabel-var.target - -[Mount] -What=/dev/disk/by-label/var -Where=/var - -[Install] -WantedBy=local-fs.target diff --git a/features/orabos/fstab.mod b/features/orabos/fstab.mod index b09bad7..eee1040 100755 --- a/features/orabos/fstab.mod +++ b/features/orabos/fstab.mod @@ -4,9 +4,6 @@ set -Eeuo pipefail currentfstab="$(cat)" if [ -n "$currentfstab" ]; then - # Expand the UEFI partition and do not create a /usr partition (for now) - sed \ - -e'/type=uefi/ s/$/,size=511M/' \ - -e '/^[^[:space:]]\+[[:space:]]\+\/usr[[:space:]]\+/d' \ - <<< "$currentfstab" + # delete any predefinition of a var partition + sed '/^[^[:space:]]\+[[:space:]]\+\/usr[[:space:]]\+/d' <<< "$currentfstab" fi From db1b2beb0a921cb9577abfadc61dc3dc9b6c999e Mon Sep 17 00:00:00 2001 From: Tobias Jungel <1773291+toanju@users.noreply.github.com> Date: Fri, 7 Feb 2025 11:24:17 +0100 Subject: [PATCH 13/16] Revert "Exclude the secondary partition from auto-mount" This reverts commit 8d026716d1cb1d7bbd6517145dcc9153f5948ee4. --- features/orabos/file.include/etc/repart.d/root_b.conf | 1 - 1 file changed, 1 deletion(-) diff --git a/features/orabos/file.include/etc/repart.d/root_b.conf b/features/orabos/file.include/etc/repart.d/root_b.conf index 0a7b2e9..1aadd2d 100644 --- a/features/orabos/file.include/etc/repart.d/root_b.conf +++ b/features/orabos/file.include/etc/repart.d/root_b.conf @@ -1,3 +1,2 @@ [Partition] Type=root -NoAuto=on From e584ef767bb8bdc7d7bba8a358a393faff99ee1f Mon Sep 17 00:00:00 2001 From: Tobias Jungel <1773291+toanju@users.noreply.github.com> Date: Fri, 7 Feb 2025 11:24:28 +0100 Subject: [PATCH 14/16] Revert "Add B partition for potential A/B setup" This reverts commit b01a8718db5a2d4ac555272b86e4583978741c10. --- features/orabos/file.include/etc/repart.d/root_b.conf | 2 -- 1 file changed, 2 deletions(-) delete mode 100644 features/orabos/file.include/etc/repart.d/root_b.conf diff --git a/features/orabos/file.include/etc/repart.d/root_b.conf b/features/orabos/file.include/etc/repart.d/root_b.conf deleted file mode 100644 index 1aadd2d..0000000 --- a/features/orabos/file.include/etc/repart.d/root_b.conf +++ /dev/null @@ -1,2 +0,0 @@ -[Partition] -Type=root From 8a1eff07258010a9358a8ee82c52c335019df88a Mon Sep 17 00:00:00 2001 From: Tobias Jungel <1773291+toanju@users.noreply.github.com> Date: Fri, 7 Feb 2025 15:54:54 +0100 Subject: [PATCH 15/16] Revert "Undo disabled systemd-repart" This reverts commit d7b9a1661b542824d817dda7e7a6384cdf671632. --- features/orabos/file.exclude | 1 - features/orabos/file.include/etc/repart.d/root_a.conf | 2 -- features/orabos/fstab.mod | 9 --------- 3 files changed, 12 deletions(-) delete mode 100644 features/orabos/file.include/etc/repart.d/root_a.conf delete mode 100755 features/orabos/fstab.mod diff --git a/features/orabos/file.exclude b/features/orabos/file.exclude index 9f9728d..dba1d5c 100644 --- a/features/orabos/file.exclude +++ b/features/orabos/file.exclude @@ -1,3 +1,2 @@ /etc/systemd/network/99-default.network /etc/systemd/system/systemd-resolved.service.d/wait-for-networkd.conf -/etc/kernel/cmdline.d/99-no-gpt-auto.cfg diff --git a/features/orabos/file.include/etc/repart.d/root_a.conf b/features/orabos/file.include/etc/repart.d/root_a.conf deleted file mode 100644 index 1aadd2d..0000000 --- a/features/orabos/file.include/etc/repart.d/root_a.conf +++ /dev/null @@ -1,2 +0,0 @@ -[Partition] -Type=root diff --git a/features/orabos/fstab.mod b/features/orabos/fstab.mod deleted file mode 100755 index eee1040..0000000 --- a/features/orabos/fstab.mod +++ /dev/null @@ -1,9 +0,0 @@ -#!/usr/bin/env bash -set -Eeuo pipefail - -currentfstab="$(cat)" - -if [ -n "$currentfstab" ]; then - # delete any predefinition of a var partition - sed '/^[^[:space:]]\+[[:space:]]\+\/usr[[:space:]]\+/d' <<< "$currentfstab" -fi From fc3d67ea9c2421bc3be65b77964fd51aeb04911d Mon Sep 17 00:00:00 2001 From: Tobias Jungel <1773291+toanju@users.noreply.github.com> Date: Fri, 7 Feb 2025 16:12:48 +0100 Subject: [PATCH 16/16] Revert "support creation of UKI efi executables for sysupdate" This reverts commit b06223b0c1f733f68b06c55d3157fc7e7f2de649. --- features/orabos/file.include/etc/kernel/tries | 1 - .../file.include/etc/sysupdate.d/20-efi.conf | 25 ---------- features/orabos/image.efi | 47 ------------------- 3 files changed, 73 deletions(-) delete mode 100644 features/orabos/file.include/etc/kernel/tries delete mode 100644 features/orabos/file.include/etc/sysupdate.d/20-efi.conf delete mode 100755 features/orabos/image.efi diff --git a/features/orabos/file.include/etc/kernel/tries b/features/orabos/file.include/etc/kernel/tries deleted file mode 100644 index 00750ed..0000000 --- a/features/orabos/file.include/etc/kernel/tries +++ /dev/null @@ -1 +0,0 @@ -3 diff --git a/features/orabos/file.include/etc/sysupdate.d/20-efi.conf b/features/orabos/file.include/etc/sysupdate.d/20-efi.conf deleted file mode 100644 index 1a28305..0000000 --- a/features/orabos/file.include/etc/sysupdate.d/20-efi.conf +++ /dev/null @@ -1,25 +0,0 @@ -# /etc/sysupdate.d/20-efi.conf -[Transfer] -# do not verify the signature of the source (TODO: remove this line) -Verify=no -# protect current version (defined by IMAGE_ID in /etc/os-release) -ProtectVersion=%A - -[Source] -Type=url-file -Path=https://objectstore-3.qa-de-1.cloud.sap/v1/AUTH_b206a1900310484f8a9504754c84b067/repo/gardenlinux/sysupdate/ -# %W is VARIANT_ID from /etc/os-release, e.g. openstackbaremetal-metal3-orabos-amd64" -MatchPattern=%W-@v.efi.xz - -[Target] -Type=regular-file -Path=/EFI/Linux -PathRelativeTo=esp -MatchPattern=garden_@v+@l-@d.efi \ - garden_@v+@l.efi \ - garden_@v.efi -Mode=0444 -TriesLeft=3 -TriesDone=0 -InstancesMax=2 - diff --git a/features/orabos/image.efi b/features/orabos/image.efi deleted file mode 100755 index 320e680..0000000 --- a/features/orabos/image.efi +++ /dev/null @@ -1,47 +0,0 @@ -#!/usr/bin/env bash - -set -eufo pipefail - -# Convert the kernel and initrd into a unified kernel image -# TODO: replace with secureboot feature - -case "$BUILDER_ARCH" in - amd64) - uefi_arch=X64 - ;; - arm64) - uefi_arch=AA64 - ;; -esac - - -input="$(realpath -- "$1")" -output="$(realpath -- "$2")" - -dir="$(mktemp -d)" -pushd "$dir" > /dev/null - -tar --extract --wildcards \ - "boot" \ - "efi/loader/entries" \ - "usr/lib/systemd/boot/efi" \ - "etc/os-release" < "$input" - -kernel_file=$(find ./boot -name "vmlinuz*" -print -quit) -initrd=$(find ./boot -name "initrd.*" -print -quit) -cmdline=$(grep -oP 'options\s+\K.*' "$(find . -name "Default-*.conf" -print -quit)") - -echo "kernel_file: $kernel_file" -echo "initrd: $initrd" -echo "cmdline: $cmdline" - -/usr/lib/systemd/ukify build \ - --stub "usr/lib/systemd/boot/efi/linux$(tr '[:upper:]' '[:lower:]' <<< "$uefi_arch").efi.stub" \ - --linux "$kernel_file" \ - --initrd "$initrd" \ - --cmdline="$cmdline" \ - --output="$output" \ - --os-release "etc/os-release" - -popd > /dev/null -rm -r "$dir" \ No newline at end of file