Skip to content

Commit d339134

Browse files
committed
install: Skip discoverable-partitions config for FCOS builds
Currently Fedora CoreOS derivatives don't yet work with systemd-gpt-auto-generator, see coreos/fedora-coreos-tracker#2137 It was briefly in an image which let our CI change to depend on it pass. Fix this by passing the existing `SKIP_CONFIGS` variable into the coreos image build. Closes: #2160 Assisted-by: OpenCode (Claude Opus 4) Signed-off-by: Colin Walters <walters@verbum.org>
1 parent 8ef2ae9 commit d339134

2 files changed

Lines changed: 9 additions & 4 deletions

File tree

Dockerfile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -165,6 +165,7 @@ RUN --network=none --mount=type=tmpfs,target=/run --mount=type=tmpfs,target=/tmp
165165
FROM base as base-penultimate
166166
ARG variant
167167
ARG bootloader
168+
ARG SKIP_CONFIGS
168169
# Switch to a signed systemd-boot, if configured
169170
RUN --network=none --mount=type=tmpfs,target=/run --mount=type=tmpfs,target=/tmp \
170171
--mount=type=bind,from=packaging,src=/,target=/run/packaging \
@@ -183,7 +184,7 @@ RUN --network=none --mount=type=tmpfs,target=/run --mount=type=tmpfs,target=/tmp
183184
RUN --network=none --mount=type=tmpfs,target=/run --mount=type=tmpfs,target=/tmp \
184185
--mount=type=bind,from=packaging,src=/,target=/run/packaging \
185186
--mount=type=bind,from=packages,src=/,target=/run/packages \
186-
/run/packaging/install-rpm-and-setup /run/packages
187+
SKIP_CONFIGS="${SKIP_CONFIGS}" /run/packaging/install-rpm-and-setup /run/packages
187188
# Inject some other configuration
188189
COPY --from=packaging /usr-extras/ /usr/
189190
# Clean up package manager caches

contrib/packaging/install-rpm-and-setup

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,12 +24,16 @@ touch /usr/lib/.bootc-dev-stamp
2424
# Fedora 43+ ships a GRUB with the BLI module, so enable DPS
2525
# auto-discovery for root. This must run after our RPM is installed
2626
# since older bootc doesn't recognize the discoverable-partitions key.
27-
. /usr/lib/os-release
28-
if [ "${ID}" = "fedora" ] && [ "${VERSION_ID}" -ge 43 ] 2>/dev/null; then
29-
cat > /usr/lib/bootc/install/20-discoverable-partitions.toml <<'EOF'
27+
# Skip this when SKIP_CONFIGS is set (e.g. for CoreOS testing, where the
28+
# target system uses its own partitioning scheme without DPS type GUIDs).
29+
if [ -z "${SKIP_CONFIGS:-}" ]; then
30+
. /usr/lib/os-release
31+
if [ "${ID}" = "fedora" ] && [ "${VERSION_ID}" -ge 43 ] 2>/dev/null; then
32+
cat > /usr/lib/bootc/install/20-discoverable-partitions.toml <<'EOF'
3033
[install]
3134
discoverable-partitions = true
3235
EOF
36+
fi
3337
fi
3438

3539
# Workaround for https://github.com/bootc-dev/bootc/issues/1546

0 commit comments

Comments
 (0)