Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,7 @@ RUN --network=none --mount=type=tmpfs,target=/run --mount=type=tmpfs,target=/tmp
FROM base as base-penultimate
ARG variant
ARG bootloader
ARG SKIP_CONFIGS
# Switch to a signed systemd-boot, if configured
RUN --network=none --mount=type=tmpfs,target=/run --mount=type=tmpfs,target=/tmp \
--mount=type=bind,from=packaging,src=/,target=/run/packaging \
Expand All @@ -183,7 +184,7 @@ RUN --network=none --mount=type=tmpfs,target=/run --mount=type=tmpfs,target=/tmp
RUN --network=none --mount=type=tmpfs,target=/run --mount=type=tmpfs,target=/tmp \
--mount=type=bind,from=packaging,src=/,target=/run/packaging \
--mount=type=bind,from=packages,src=/,target=/run/packages \
/run/packaging/install-rpm-and-setup /run/packages
SKIP_CONFIGS="${SKIP_CONFIGS}" /run/packaging/install-rpm-and-setup /run/packages
# Inject some other configuration
COPY --from=packaging /usr-extras/ /usr/
# Clean up package manager caches
Expand Down
10 changes: 7 additions & 3 deletions contrib/packaging/install-rpm-and-setup
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,16 @@ touch /usr/lib/.bootc-dev-stamp
# Fedora 43+ ships a GRUB with the BLI module, so enable DPS
# auto-discovery for root. This must run after our RPM is installed
# since older bootc doesn't recognize the discoverable-partitions key.
. /usr/lib/os-release
if [ "${ID}" = "fedora" ] && [ "${VERSION_ID}" -ge 43 ] 2>/dev/null; then
cat > /usr/lib/bootc/install/20-discoverable-partitions.toml <<'EOF'
# Skip this when SKIP_CONFIGS is set (e.g. for CoreOS testing, where the
# target system uses its own partitioning scheme without DPS type GUIDs).
if [ -z "${SKIP_CONFIGS:-}" ]; then
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

Skipping the creation of 20-discoverable-partitions.toml when SKIP_CONFIGS is set will cause the integration test tmt/tests/booted/readonly/052-test-bli-detection.nu to fail on Fedora 43+ images (including CoreOS derivatives). That test explicitly asserts the absence of root= in the kernel command line, which depends on this configuration being present. You should consider updating the test (e.g., by checking VARIANT_ID) to skip that specific assertion when SKIP_CONFIGS is used or when running on CoreOS.

. /usr/lib/os-release
if [ "${ID}" = "fedora" ] && [ "${VERSION_ID}" -ge 43 ] 2>/dev/null; then
cat > /usr/lib/bootc/install/20-discoverable-partitions.toml <<'EOF'
[install]
discoverable-partitions = true
EOF
fi
fi

# Workaround for https://github.com/bootc-dev/bootc/issues/1546
Expand Down
Loading