Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WIP: Build via Containerfile and derive from fedora-bootc #3348

Draft
wants to merge 1 commit into
base: rawhide
Choose a base branch
from
Draft
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
6 changes: 6 additions & 0 deletions Containerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# https://gitlab.com/fedora/bootc/base-images/-/issues/25
FROM quay.io/jlebon/fedora-bootc:tier-x-42
# uncomment when using custom rpm-ostree
# COPY rpm-ostree /usr/bin/
COPY . /src
RUN rpm-ostree experimental compose treefile-apply /src/manifest.yaml
1 change: 1 addition & 0 deletions manifest.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
variables:
stream: rawhide
prod: false
deriving: true

releasever: 42

Expand Down
4 changes: 3 additions & 1 deletion manifests/fedora-coreos-base.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,9 @@ include:
conditional-include:
# starting from f42, we inherit from tier-x
# once we're on f42, we can move this up to the default list of includes above
- if: releasever >= 42
- if:
- releasever >= 42
- deriving == false
include: tier-x.yaml
# all these are inherited from tier-x in f42+, but we carry them here to
# enforce that there's really no coupling until f42
Expand Down
14 changes: 12 additions & 2 deletions manifests/fedora-coreos.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@ metadata:
add-commit-metadata:
fedora-coreos.stream: ${stream}

variables:
# upper manifests can override this when deriving from tier-x instead of doing
# a base compose
deriving: false

include: fedora-coreos-base.yaml
conditional-include:
Expand Down Expand Up @@ -101,8 +105,14 @@ postprocess:
# information.

EOF
cat /usr/etc/rpm-ostreed.conf >> /tmp/rpm-ostreed.conf
cp /tmp/rpm-ostreed.conf /usr/etc/rpm-ostreed.conf
conf_file=/usr/etc/rpm-ostreed.conf
# if we're deriving, then the config is in /etc already
if [ -f /run/.containerenv ]; then
conf_file=/etc/rpm-ostreed.conf
fi

cat "${conf_file}" >> /tmp/rpm-ostreed.conf
cp /tmp/rpm-ostreed.conf "${conf_file}"
rm /tmp/rpm-ostreed.conf
# Make sure that we do not ship broken symlinks:
# https://github.com/coreos/fedora-coreos-config/issues/1782
Expand Down