diff --git a/features/orabos/exec.config b/features/orabos/exec.config index a516140..8a5d902 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 @@ -44,4 +41,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.exclude b/features/orabos/file.exclude index 00cd977..dba1d5c 100644 --- a/features/orabos/file.exclude +++ b/features/orabos/file.exclude @@ -1,4 +1,2 @@ /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/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 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/repart.d/10_root_a.conf b/features/orabos/file.include/etc/repart.d/10_root_a.conf deleted file mode 100644 index d539b66..0000000 --- a/features/orabos/file.include/etc/repart.d/10_root_a.conf +++ /dev/null @@ -1,3 +0,0 @@ -[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/25_root_b.conf deleted file mode 100644 index ac4aea2..0000000 --- a/features/orabos/file.include/etc/repart.d/25_root_b.conf +++ /dev/null @@ -1,6 +0,0 @@ -[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 - 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/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/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/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 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/file.include/etc/sysupdate.d/10-root.conf b/features/orabos/file.include/etc/sysupdate.d/10-root.conf deleted file mode 100644 index 0dbe27d..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/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=garden_@v -MatchPartitionType=root -PartitionFlags=0 -ReadOnly=1 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/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 diff --git a/features/orabos/fstab.mod b/features/orabos/fstab.mod deleted file mode 100755 index 5ffbcb7..0000000 --- a/features/orabos/fstab.mod +++ /dev/null @@ -1,13 +0,0 @@ -#!/usr/bin/env bash -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' \ - -e 's/LABEL=ROOT/LABEL=garden_'$BUILDER_VERSION'/' \ - <<< "$currentfstab" -fi 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 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