From dabfcb697a33407bd04536534556f5871c744fdd Mon Sep 17 00:00:00 2001 From: Jiri Kortus Date: Thu, 21 Mar 2024 16:10:46 +0100 Subject: [PATCH 1/6] Enable test execution in ostree environment The ostree environments have most of the filesystem read-only (including /usr), but this can be overcome via an overlay. In such case the test script intended for run in the system resides in /var/lib/extensions/kickstart-tests/usr/libexec instead of the usual location (/usr/libexec). --- .../validation/success_on_first_boot.ks | 23 +++++++++++++++---- 1 file changed, 19 insertions(+), 4 deletions(-) diff --git a/fragments/shared/validation/success_on_first_boot.ks b/fragments/shared/validation/success_on_first_boot.ks index eaab708a..03cee8e5 100644 --- a/fragments/shared/validation/success_on_first_boot.ks +++ b/fragments/shared/validation/success_on_first_boot.ks @@ -3,7 +3,22 @@ # by the kickstart test that includes this fragment. This file is empty # by default. +# A somewhat different approach via systemd-sysext/overlayfs is needed +# in ostree systems with read-only /usr + %post +# detect if the system uses ostree and change path prefix if needed +if ostree admin status &> /dev/null; then + # based on info from https://www.reddit.com/r/Fedora/comments/wir3cq/comment/ijhjfah + mkdir -p /var/lib/extensions/kickstart-tests/usr/lib/extension-release.d \ + /var/lib/extensions/kickstart-tests/usr/libexec + cp /etc/os-release /var/lib/extensions/kickstart-tests/usr/lib/extension-release.d/extension-release.kickstart-tests + script_prefix="/var/lib/extensions/kickstart-tests" + systemd-sysext merge + systemctl enable systemd-sysext +else + script_prefix="" +fi # Create a systemd service. cat > /etc/systemd/system/kickstart-test.service << EOF @@ -16,7 +31,7 @@ After=graphical.target [Service] Type=oneshot -ExecStart=/bin/sh /usr/libexec/kickstart-service.sh +ExecStart=/bin/sh ${script_prefix}/usr/libexec/kickstart-service.sh [Install] WantedBy=graphical.target @@ -26,13 +41,13 @@ EOF # Create a script with the actual test. Print errors to stdout. # IMPORTANT: This file should be rewritten in tests! -touch /usr/libexec/kickstart-test.sh +touch ${script_prefix}/usr/libexec/kickstart-test.sh # Create a script for the service -cat > /usr/libexec/kickstart-service.sh << 'EOF' +cat > ${script_prefix}/usr/libexec/kickstart-service.sh << 'EOF' # Check error messages in the syslog. -error_messages="$(/bin/sh /usr/libexec/kickstart-test.sh)" +error_messages="$(/bin/sh ${script_prefix}/usr/libexec/kickstart-test.sh)" if [[ ! -z "${error_messages}" ]]; then echo "*** System has started with errors:" >> /root/RESULT From c960efe541060dd5c7a39ec7fefb833b4ac13fa4 Mon Sep 17 00:00:00 2001 From: Jiri Kortus Date: Thu, 21 Mar 2024 17:10:58 +0100 Subject: [PATCH 2/6] New test: rpm-ostree-container-bootc It tests installation of a bootable container image (with bootc/bootupd) and boot of the installed system, as well as --remote and --stateroot parameters of ostreecontainer kickstart command. It's based on previous work from Vladimir Slavik. --- rpm-ostree-container-bootc.ks.in | 42 ++++++++++++ rpm-ostree-container-bootc.sh | 106 +++++++++++++++++++++++++++++++ 2 files changed, 148 insertions(+) create mode 100644 rpm-ostree-container-bootc.ks.in create mode 100755 rpm-ostree-container-bootc.sh diff --git a/rpm-ostree-container-bootc.ks.in b/rpm-ostree-container-bootc.ks.in new file mode 100644 index 00000000..71109adb --- /dev/null +++ b/rpm-ostree-container-bootc.ks.in @@ -0,0 +1,42 @@ +#test name: rpm-ostree-container-bootc +# for bootc/bootupd, remote and stateroot ostreecontainer options +# depends on the referenced ostree container being bootable + +# Use the default settings. +%ksappend common/common_no_payload.ks + +# The RPM OSTree source is set up by the test script + +# Reboot the installed system. +reboot + +# Validate on the first boot. +%ksappend validation/success_on_first_boot.ks + +%post +# Checks in %post +# Check of the remote URL is appended by the test script + +# Checks after boot +cat >> /opt/kickstart-tests/kickstart-test.sh << 'EOF' + +# propagate any errors from %post validations +if [ -e /root/RESULT ]; then + cat /root/RESULT +fi + +# Check that state root 'test-stateroot' exists +if [ ! -d /ostree/deploy/test-stateroot ]; then + echo "Couldn't find 'test-stateroot' stateroot" +fi + +# Check that bootupd information is present +if [ ! -e /boot/bootupd-state.json ]; then + echo "/boot/bootupd-state.json not found on installed system after booting" +fi + +bootupctl --help &> /dev/null || echo "bootupctl command not available after booting" +bootc --help &> /dev/null || echo "bootc command not available after booting" + +EOF +%end diff --git a/rpm-ostree-container-bootc.sh b/rpm-ostree-container-bootc.sh new file mode 100755 index 00000000..b3bb79a6 --- /dev/null +++ b/rpm-ostree-container-bootc.sh @@ -0,0 +1,106 @@ +# +# Copyright (C) 2023 Red Hat, Inc. +# +# This copyrighted material is made available to anyone wishing to use, +# modify, copy, or redistribute it subject to the terms and conditions of +# the GNU General Public License v.2, or (at your option) any later version. +# This program is distributed in the hope that it will be useful, but WITHOUT +# ANY WARRANTY expressed or implied, including the implied warranties of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General +# Public License for more details. You should have received a copy of the +# GNU General Public License along with this program; if not, write to the +# Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA +# 02110-1301, USA. Any Red Hat trademarks that are incorporated in the +# source code or documentation are not subject to the GNU General Public +# License and may only be used or replicated with the express permission of +# Red Hat, Inc. +# + +# Ignore unused variable parsed out by tooling scripts as test tags metadata +# shellcheck disable=SC2034 +TESTTYPE="payload ostree bootc reboot skip-on-rhel-8 skip-on-rhel-10" +# skip-on-rhel" + +. ${KSTESTDIR}/functions.sh + +os_major=${KSTEST_OS_VERSION%%.*} +if [ "${KSTEST_OS_NAME}" == "rhel" ]; then + container_url="quay.io/centos-bootc/centos-bootc:stream${os_major}" +else + container_url="quay.io/centos-bootc/fedora-bootc:eln" +fi + +copy_interesting_files_from_system() { + local disksdir + disksdir="${1}" + + # Find disks. + local args + args=$(for d in ${disksdir}/disk-*img; do echo -a ${d}; done) + + # Use also iscsi disk if there is any. + if [[ -n ${iscsi_disk_img} ]]; then + args="${args} -a ${disksdir}/${iscsi_disk_img}" + fi + + # Grab files out of the installed system while it still exists. + # Grab these files: + # + # logs from Anaconda - whole /var/log/anaconda/ directory is copied out, + # this can be used for saving specific test output + # original-ks.cfg - the kickstart used for the test + # anaconda-ks.cfg - the kickstart saved after installation, useful for + # debugging + # RESULT - file from the test + # + # The location of aforementioned files is different in an ostree system + + root_device=$(guestfish ${args} <<< " + launch + lvs" | \ + grep root) + + for item in /ostree/deploy/test-stateroot/var/roothome/original-ks.cfg \ + /ostree/deploy/test-stateroot/var/roothome/anaconda-ks.cfg \ + /ostree/deploy/test-stateroot/var/roothome/anabot.log \ + /ostree/deploy/test-stateroot/var/log/anaconda/ \ + /ostree/deploy/test-stateroot/var/roothome/RESULT + do + guestfish ${args} <<< " + launch + mount ${root_device} / + copy-out '${item}' '${disksdir}' + " 2>/dev/null + done +} + +prepare() { + ks=${1} + cat >> ${ks} << EOF1 +ostreecontainer --no-signature-verification --remote=test-remote --stateroot=test-stateroot --url=${container_url} + +%post +cat >> /var/lib/extensions/kickstart-tests/usr/libexec/kickstart-test.sh << EOF2 +remote_url="\\\$(ostree remote show-url test-remote)" +if [ \\\${?} -ne 0 ]; then + echo "Couldn't list remote URL for 'test-remote'" >> /root/RESULT +fi + +if [ "\\\${remote_url}" != "${container_url}" ]; then + echo "Unexpected URL: \\\${remote_url}, expected ${container_url}" >> /root/RESULT +fi +EOF2 +%end +EOF1 + echo ${ks} +} + +get_timeout() { + echo "80" +} + +additional_runner_args() { + # Wait for reboot and shutdown of the VM, + # but exit after the specified timeout. + echo "--wait $(get_timeout)" +} From aa25d11dae4ec690576197843e0f367c9cd72a48 Mon Sep 17 00:00:00 2001 From: Radek Vykydal Date: Wed, 27 Mar 2024 13:29:23 +0100 Subject: [PATCH 3/6] rpm-ostree-container-bootc: do the os substitutions only in .ks.in --- .../payload/ostreecontainer-bootc.ks | 2 ++ .../rhel10/payload/ostreecontainer-bootc.ks | 1 + .../rhel9/payload/ostreecontainer-bootc.ks | 2 ++ rpm-ostree-container-bootc.ks.in | 22 ++++++++++--- rpm-ostree-container-bootc.sh | 31 +------------------ 5 files changed, 24 insertions(+), 34 deletions(-) create mode 100644 fragments/platform/fedora_rawhide/payload/ostreecontainer-bootc.ks create mode 100644 fragments/platform/rhel10/payload/ostreecontainer-bootc.ks create mode 100644 fragments/platform/rhel9/payload/ostreecontainer-bootc.ks diff --git a/fragments/platform/fedora_rawhide/payload/ostreecontainer-bootc.ks b/fragments/platform/fedora_rawhide/payload/ostreecontainer-bootc.ks new file mode 100644 index 00000000..c8486f88 --- /dev/null +++ b/fragments/platform/fedora_rawhide/payload/ostreecontainer-bootc.ks @@ -0,0 +1,2 @@ +ostreecontainer --no-signature-verification --remote=test-remote --stateroot=test-stateroot --url=quay.io/centos-bootc/fedora-bootc:eln + diff --git a/fragments/platform/rhel10/payload/ostreecontainer-bootc.ks b/fragments/platform/rhel10/payload/ostreecontainer-bootc.ks new file mode 100644 index 00000000..957dcd40 --- /dev/null +++ b/fragments/platform/rhel10/payload/ostreecontainer-bootc.ks @@ -0,0 +1 @@ +ostreecontainer --no-signature-verification --remote=test-remote --stateroot=test-stateroot --url=quay.io/centos-bootc/centos-bootc:stream10 diff --git a/fragments/platform/rhel9/payload/ostreecontainer-bootc.ks b/fragments/platform/rhel9/payload/ostreecontainer-bootc.ks new file mode 100644 index 00000000..1fdd6ec8 --- /dev/null +++ b/fragments/platform/rhel9/payload/ostreecontainer-bootc.ks @@ -0,0 +1,2 @@ +ostreecontainer --no-signature-verification --remote=test-remote --stateroot=test-stateroot --url=quay.io/centos-bootc/centos-bootc:stream9 + diff --git a/rpm-ostree-container-bootc.ks.in b/rpm-ostree-container-bootc.ks.in index 71109adb..6f59ae3f 100644 --- a/rpm-ostree-container-bootc.ks.in +++ b/rpm-ostree-container-bootc.ks.in @@ -5,7 +5,7 @@ # Use the default settings. %ksappend common/common_no_payload.ks -# The RPM OSTree source is set up by the test script +%ksappend payload/ostreecontainer-bootc.ks # Reboot the installed system. reboot @@ -14,11 +14,9 @@ reboot %ksappend validation/success_on_first_boot.ks %post -# Checks in %post -# Check of the remote URL is appended by the test script # Checks after boot -cat >> /opt/kickstart-tests/kickstart-test.sh << 'EOF' +cat >> /var/lib/extensions/kickstart-tests/usr/libexec/kickstart-test.sh << 'EOF' # propagate any errors from %post validations if [ -e /root/RESULT ]; then @@ -38,5 +36,21 @@ fi bootupctl --help &> /dev/null || echo "bootupctl command not available after booting" bootc --help &> /dev/null || echo "bootc command not available after booting" +if [[ "@KSTEST_OS_NAME@" == "rhel" ]]; then + expected_url="quay.io/centos-bootc/centos-bootc:stream9" +else + expected_url="quay.io/centos-bootc/fedora-bootc:eln" +fi + +remote_url="$(ostree remote show-url test-remote)" +if [ ${?} -ne 0 ]; then + echo "Couldn't list remote URL for 'test-remote'" >> /root/RESULT +fi + +if [ "${remote_url}" != "${expected_url}" ]; then + echo "Unexpected URL: ${remote_url}, expected ${expected_url}"" >> /root/RESULT +fi + + EOF %end diff --git a/rpm-ostree-container-bootc.sh b/rpm-ostree-container-bootc.sh index b3bb79a6..f955cf67 100755 --- a/rpm-ostree-container-bootc.sh +++ b/rpm-ostree-container-bootc.sh @@ -19,17 +19,9 @@ # Ignore unused variable parsed out by tooling scripts as test tags metadata # shellcheck disable=SC2034 TESTTYPE="payload ostree bootc reboot skip-on-rhel-8 skip-on-rhel-10" -# skip-on-rhel" . ${KSTESTDIR}/functions.sh -os_major=${KSTEST_OS_VERSION%%.*} -if [ "${KSTEST_OS_NAME}" == "rhel" ]; then - container_url="quay.io/centos-bootc/centos-bootc:stream${os_major}" -else - container_url="quay.io/centos-bootc/fedora-bootc:eln" -fi - copy_interesting_files_from_system() { local disksdir disksdir="${1}" @@ -59,7 +51,7 @@ copy_interesting_files_from_system() { launch lvs" | \ grep root) - + for item in /ostree/deploy/test-stateroot/var/roothome/original-ks.cfg \ /ostree/deploy/test-stateroot/var/roothome/anaconda-ks.cfg \ /ostree/deploy/test-stateroot/var/roothome/anabot.log \ @@ -74,27 +66,6 @@ copy_interesting_files_from_system() { done } -prepare() { - ks=${1} - cat >> ${ks} << EOF1 -ostreecontainer --no-signature-verification --remote=test-remote --stateroot=test-stateroot --url=${container_url} - -%post -cat >> /var/lib/extensions/kickstart-tests/usr/libexec/kickstart-test.sh << EOF2 -remote_url="\\\$(ostree remote show-url test-remote)" -if [ \\\${?} -ne 0 ]; then - echo "Couldn't list remote URL for 'test-remote'" >> /root/RESULT -fi - -if [ "\\\${remote_url}" != "${container_url}" ]; then - echo "Unexpected URL: \\\${remote_url}, expected ${container_url}" >> /root/RESULT -fi -EOF2 -%end -EOF1 - echo ${ks} -} - get_timeout() { echo "80" } From 4a9ba352ee7a95fb9edc2044c86f4b622a50f5a8 Mon Sep 17 00:00:00 2001 From: Radek Vykydal Date: Wed, 27 Mar 2024 14:12:40 +0100 Subject: [PATCH 4/6] Define per-platform ostreecontainer image in the single spot The same place as is used for rpm payload --- .../fedora_rawhide/payload/ostreecontainer-bootc.ks | 2 -- .../fedora_rawhide/payload/ostreecontainer.ks | 1 - .../platform/rhel10/payload/ostreecontainer-bootc.ks | 1 - fragments/platform/rhel10/payload/ostreecontainer.ks | 1 - .../platform/rhel9/payload/ostreecontainer-bootc.ks | 2 -- fragments/platform/rhel9/payload/ostreecontainer.ks | 1 - rpm-ostree-container-bootc.ks.in | 9 ++------- rpm-ostree-container.ks.in | 11 ++--------- scripts/defaults-rhel10.sh | 1 + scripts/defaults-rhel9.sh | 1 + scripts/defaults.sh | 1 + 11 files changed, 7 insertions(+), 24 deletions(-) delete mode 100644 fragments/platform/fedora_rawhide/payload/ostreecontainer-bootc.ks delete mode 100644 fragments/platform/fedora_rawhide/payload/ostreecontainer.ks delete mode 100644 fragments/platform/rhel10/payload/ostreecontainer-bootc.ks delete mode 100644 fragments/platform/rhel10/payload/ostreecontainer.ks delete mode 100644 fragments/platform/rhel9/payload/ostreecontainer-bootc.ks delete mode 100644 fragments/platform/rhel9/payload/ostreecontainer.ks diff --git a/fragments/platform/fedora_rawhide/payload/ostreecontainer-bootc.ks b/fragments/platform/fedora_rawhide/payload/ostreecontainer-bootc.ks deleted file mode 100644 index c8486f88..00000000 --- a/fragments/platform/fedora_rawhide/payload/ostreecontainer-bootc.ks +++ /dev/null @@ -1,2 +0,0 @@ -ostreecontainer --no-signature-verification --remote=test-remote --stateroot=test-stateroot --url=quay.io/centos-bootc/fedora-bootc:eln - diff --git a/fragments/platform/fedora_rawhide/payload/ostreecontainer.ks b/fragments/platform/fedora_rawhide/payload/ostreecontainer.ks deleted file mode 100644 index 7b175a55..00000000 --- a/fragments/platform/fedora_rawhide/payload/ostreecontainer.ks +++ /dev/null @@ -1 +0,0 @@ -ostreecontainer --no-signature-verification --transport=registry --url=quay.io/centos-bootc/fedora-bootc:eln diff --git a/fragments/platform/rhel10/payload/ostreecontainer-bootc.ks b/fragments/platform/rhel10/payload/ostreecontainer-bootc.ks deleted file mode 100644 index 957dcd40..00000000 --- a/fragments/platform/rhel10/payload/ostreecontainer-bootc.ks +++ /dev/null @@ -1 +0,0 @@ -ostreecontainer --no-signature-verification --remote=test-remote --stateroot=test-stateroot --url=quay.io/centos-bootc/centos-bootc:stream10 diff --git a/fragments/platform/rhel10/payload/ostreecontainer.ks b/fragments/platform/rhel10/payload/ostreecontainer.ks deleted file mode 100644 index 3869cff0..00000000 --- a/fragments/platform/rhel10/payload/ostreecontainer.ks +++ /dev/null @@ -1 +0,0 @@ -ostreecontainer --no-signature-verification --transport=registry --url=quay.io/centos-bootc/centos-bootc:stream10 diff --git a/fragments/platform/rhel9/payload/ostreecontainer-bootc.ks b/fragments/platform/rhel9/payload/ostreecontainer-bootc.ks deleted file mode 100644 index 1fdd6ec8..00000000 --- a/fragments/platform/rhel9/payload/ostreecontainer-bootc.ks +++ /dev/null @@ -1,2 +0,0 @@ -ostreecontainer --no-signature-verification --remote=test-remote --stateroot=test-stateroot --url=quay.io/centos-bootc/centos-bootc:stream9 - diff --git a/fragments/platform/rhel9/payload/ostreecontainer.ks b/fragments/platform/rhel9/payload/ostreecontainer.ks deleted file mode 100644 index 0036cca0..00000000 --- a/fragments/platform/rhel9/payload/ostreecontainer.ks +++ /dev/null @@ -1 +0,0 @@ -ostreecontainer --no-signature-verification --transport=registry --url=quay.io/centos-bootc/centos-bootc:stream9 diff --git a/rpm-ostree-container-bootc.ks.in b/rpm-ostree-container-bootc.ks.in index 6f59ae3f..54c22d2f 100644 --- a/rpm-ostree-container-bootc.ks.in +++ b/rpm-ostree-container-bootc.ks.in @@ -5,7 +5,7 @@ # Use the default settings. %ksappend common/common_no_payload.ks -%ksappend payload/ostreecontainer-bootc.ks +ostreecontainer --no-signature-verification --remote=test-remote --stateroot=test-stateroot --url=@KSTEST_OSTREECONTAINER_URL@ # Reboot the installed system. reboot @@ -36,12 +36,7 @@ fi bootupctl --help &> /dev/null || echo "bootupctl command not available after booting" bootc --help &> /dev/null || echo "bootc command not available after booting" -if [[ "@KSTEST_OS_NAME@" == "rhel" ]]; then - expected_url="quay.io/centos-bootc/centos-bootc:stream9" -else - expected_url="quay.io/centos-bootc/fedora-bootc:eln" -fi - +expected_url="@KSTEST_OSTREECONTAINER_URL@" remote_url="$(ostree remote show-url test-remote)" if [ ${?} -ne 0 ]; then echo "Couldn't list remote URL for 'test-remote'" >> /root/RESULT diff --git a/rpm-ostree-container.ks.in b/rpm-ostree-container.ks.in index d1963ab5..f2ae2db2 100644 --- a/rpm-ostree-container.ks.in +++ b/rpm-ostree-container.ks.in @@ -7,20 +7,13 @@ %ksappend common/common_no_payload.ks -# Set up the RPM OSTree source. -%ksappend payload/ostreecontainer.ks +ostreecontainer --no-signature-verification --transport=registry --url=@KSTEST_OSTREECONTAINER_URL@ %post -if [[ "@KSTEST_OS_NAME@" == "rhel" ]]; then - EXPECTED_URL="quay.io/centos-bootc/centos-bootc:stream9" -else - EXPECTED_URL="quay.io/centos-bootc/fedora-bootc:eln" -fi - # Check the url of the remote. url="$(ostree remote show-url default)" -if [ "${url}" != "${EXPECTED_URL}" ]; then +if [ "${url}" != "@KSTEST_OSTREECONTAINER_URL@" ]; then echo "Unexpected URL: ${url}" >> /root/RESULT fi diff --git a/scripts/defaults-rhel10.sh b/scripts/defaults-rhel10.sh index d5b47568..31d6fe1a 100644 --- a/scripts/defaults-rhel10.sh +++ b/scripts/defaults-rhel10.sh @@ -6,3 +6,4 @@ source network-device-names.cfg export KSTEST_URL='http://download.eng.bos.redhat.com/rhel-10/nightly/RHEL-10-Public-Beta/latest-RHEL-10.0/compose/BaseOS/x86_64/os/' export KSTEST_MODULAR_URL='http://download.eng.bos.redhat.com/rhel-10/nightly/RHEL-10-Public-Beta/latest-RHEL-10.0/compose/AppStream/x86_64/os/' export KSTEST_FTP_URL='ftp://ftp.tu-chemnitz.de/pub/linux/fedora/linux/development/rawhide/Everything/$basearch/os/' +export KSTEST_OSTREECONTAINER_URL='quay.io/centos-bootc/centos-bootc:stream10' diff --git a/scripts/defaults-rhel9.sh b/scripts/defaults-rhel9.sh index 2229f74a..a4d88d41 100644 --- a/scripts/defaults-rhel9.sh +++ b/scripts/defaults-rhel9.sh @@ -4,3 +4,4 @@ source network-device-names.cfg export KSTEST_URL='http://download.eng.bos.redhat.com/rhel-9/nightly/RHEL-9/latest-RHEL-9.4.0/compose/BaseOS/x86_64/os/' export KSTEST_MODULAR_URL='http://download.eng.bos.redhat.com/rhel-9/nightly/RHEL-9/latest-RHEL-9.4.0/compose/AppStream/x86_64/os/' export KSTEST_FTP_URL='ftp://ftp.tu-chemnitz.de/pub/linux/fedora/linux/development/rawhide/Everything/$basearch/os/' +export KSTEST_OSTREECONTAINER_URL='quay.io/centos-bootc/centos-bootc:stream9' diff --git a/scripts/defaults.sh b/scripts/defaults.sh index 1174b050..8b1abeba 100644 --- a/scripts/defaults.sh +++ b/scripts/defaults.sh @@ -12,3 +12,4 @@ export KSTEST_METALINK='https://mirrors.fedoraproject.org/metalink?repo=fedora-$ export KSTEST_MIRRORLIST='https://mirrors.fedoraproject.org/mirrorlist?repo=fedora-$releasever&arch=$basearch' export KSTEST_MODULAR_URL='http://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Modular/$basearch/os/' export KSTEST_FTP_URL='ftp://ftp.tu-chemnitz.de/pub/linux/fedora/linux/development/rawhide/Everything/$basearch/os/' +export KSTEST_OSTREECONTAINER_URL='quay.io/centos-bootc/fedora-bootc:eln' From c927cb7d86dd95a1f200614f8670da0c06b87a70 Mon Sep 17 00:00:00 2001 From: Radek Vykydal Date: Wed, 3 Apr 2024 10:52:51 +0200 Subject: [PATCH 5/6] Enforce non-btrfs autopart scheme on Fedora for ostreecontainer-bootc test Patch created based on hints by jikortus. --- .../fedora_rawhide/storage/ostreecontainer_autopart.ks | 4 ++++ fragments/shared/storage/ostreecontainer_autopart.ks | 4 ++++ rpm-ostree-container-bootc.ks.in | 4 +++- 3 files changed, 11 insertions(+), 1 deletion(-) create mode 100644 fragments/platform/fedora_rawhide/storage/ostreecontainer_autopart.ks create mode 100644 fragments/shared/storage/ostreecontainer_autopart.ks diff --git a/fragments/platform/fedora_rawhide/storage/ostreecontainer_autopart.ks b/fragments/platform/fedora_rawhide/storage/ostreecontainer_autopart.ks new file mode 100644 index 00000000..c82b8849 --- /dev/null +++ b/fragments/platform/fedora_rawhide/storage/ostreecontainer_autopart.ks @@ -0,0 +1,4 @@ +# Default storage configuration with lvm type enforced for Fedora +zerombr +clearpart --all +autopart --type=lvm diff --git a/fragments/shared/storage/ostreecontainer_autopart.ks b/fragments/shared/storage/ostreecontainer_autopart.ks new file mode 100644 index 00000000..233a3fe6 --- /dev/null +++ b/fragments/shared/storage/ostreecontainer_autopart.ks @@ -0,0 +1,4 @@ +# Default storage configuration +zerombr +clearpart --all +autopart diff --git a/rpm-ostree-container-bootc.ks.in b/rpm-ostree-container-bootc.ks.in index 54c22d2f..e0954b43 100644 --- a/rpm-ostree-container-bootc.ks.in +++ b/rpm-ostree-container-bootc.ks.in @@ -3,7 +3,9 @@ # depends on the referenced ostree container being bootable # Use the default settings. -%ksappend common/common_no_payload.ks +%ksappend common/common_no_storage_and_payload.ks +# On Fedora enforce lvm scheme (overriding btrfs default) +%ksappend storage/ostreecontainer_autopart.ks ostreecontainer --no-signature-verification --remote=test-remote --stateroot=test-stateroot --url=@KSTEST_OSTREECONTAINER_URL@ From d7e66d17eba3872e7177e8d3e7fc99efebdd4084 Mon Sep 17 00:00:00 2001 From: Radek Vykydal Date: Thu, 4 Apr 2024 10:15:38 +0200 Subject: [PATCH 6/6] Use default timeout for rpm-ostree-container-bootc The test is actually pretty fast (not generating initramfs) so there is no need to bigger timeout. --- rpm-ostree-container-bootc.sh | 4 ---- 1 file changed, 4 deletions(-) diff --git a/rpm-ostree-container-bootc.sh b/rpm-ostree-container-bootc.sh index f955cf67..336cd157 100755 --- a/rpm-ostree-container-bootc.sh +++ b/rpm-ostree-container-bootc.sh @@ -66,10 +66,6 @@ copy_interesting_files_from_system() { done } -get_timeout() { - echo "80" -} - additional_runner_args() { # Wait for reboot and shutdown of the VM, # but exit after the specified timeout.