Skip to content

Commit 176c381

Browse files
tests: Install sdboot unsigned for composefs variant
Signed-off-by: Pragyan Poudyal <pragyanpoudyal41999@gmail.com>
1 parent 1033d03 commit 176c381

3 files changed

Lines changed: 18 additions & 2 deletions

File tree

Dockerfile

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,13 +144,15 @@ RUN --network=none --mount=type=tmpfs,target=/run --mount=type=tmpfs,target=/tmp
144144
# Perform all filesystem transformations except generating the sealed UKI (if configured)
145145
FROM base as base-penultimate
146146
ARG variant
147-
# Switch to a signed systemd-boot, if configured
147+
# Switch to systemd-boot (signed or unsigned), if configured
148148
RUN --network=none --mount=type=tmpfs,target=/run --mount=type=tmpfs,target=/tmp \
149149
--mount=type=bind,from=packaging,src=/,target=/run/packaging \
150150
--mount=type=bind,from=sdboot-signed,src=/,target=/run/sdboot-signed <<EORUN
151151
set -xeuo pipefail
152152
if test "${variant}" = "composefs-sealeduki-sdboot"; then
153153
/run/packaging/switch-to-sdboot /run/sdboot-signed
154+
elif test "${variant}" = "composefs"; then
155+
/run/packaging/install-unsigned-sdboot
154156
fi
155157
EORUN
156158
# Configure the rootfs
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
#!/bin/bash
2+
# Install unsigned systemd-boot RPM (already downloaded by tools stage)
3+
set -xeuo pipefail
4+
5+
# Uninstall bootupd if present (we're switching to sd-boot managed differently)
6+
if rpm -q bootupd &>/dev/null; then
7+
rpm -e bootupd
8+
rm -vrf /usr/lib/bootupd/updates
9+
fi
10+
11+
# Install the unsigned systemd-boot RPM that was downloaded by the tools stage
12+
# The RPM is available in /run/sdboot-signed/out (copied from tools stage)
13+
rpm -Uvh /run/sdboot-signed/out/*.rpm

tmt/tests/booted/test-install-to-filesystem-var-mount.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,8 @@ COMPOSEFS_BACKEND=()
119119
is_composefs=$(bootc status --json | jq '.status.booted.composefs')
120120

121121
if [[ $is_composefs != "null" ]]; then
122-
COMPOSEFS_BACKEND=("--composefs-backend")
122+
COMPOSEFS_BACKEND+=("--composefs-backend")
123+
COMPOSEFS_BACKEND+=("--filesystem=ext4")
123124
fi
124125

125126
echo "${COMPOSEFS_BACKEND[@]}"

0 commit comments

Comments
 (0)