We're now completely moved over to building via container [1], which
means that we are no longer using the git submodule for manifest
definitions for bootc but rather the manifests delivered with the
build container. Thus we are always "deriving: true" and we can delete
any config that was for the "deriving: false" condition.
[1] https://github.com/coreos/fedora-coreos-tracker/issues/1969
I think the issue that motivated this hack was fixed by
https://github.com/ostreedev/ostree/pull/3316.
However, a new issue happens in our live boots when we do this,
which is that because ostree-prepare-root still remounts `/etc` with
`sysroot.readonly`, systemd sees this and auto-generates a mount unit
from that and that shadows _our_ generated `sysroot-etc.mount` which
mounts from the transient XFS loopback hack.
We should be able to tweak ostree-prepare-root for this, but for now
we still need to neuter `prepare-root.conf` in live boots. I think it's
cleaner though to do this directly in `ostree-cmdline.sh` rather than in
a postprocessing script to limit the hacks to just where it's needed and
also so that it transparently works in the container-native case, where
our postprocessing scripts run _after_ dracut. (We could rerun dracut,
but I'm trying to avoid that.)
Another consequence of doing it this way is that this should also allow
us to stop setting `sysroot.readonly` at osbuild time for the disk
images[[1]], and _unsetting_ it at osbuild time for the live media[[2]].
[1]: 3615165d64/src/osbuild-manifests/coreos.osbuild.x86_64.mpp.yaml (L177)
[2]: 67f344fa52/stages/org.osbuild.coreos.live-artifacts.mono (L587)
In the container-native flow, we don't treat the `opt-usrlocal` key.
Re-implement the same logic as a postprocess script.
Note we still need the key itself for the base compose case because
of how rpm-ostree treats the inherited `opt-usrlocal` key from
minimal-plus (i.e. it does things _after_ postprocessing scripts).
This variable determines whether to include the minimal-plus manifests
at the treefile level. When `deriving` is false, it means that
we're doing a base rpm-ostree compose and we should include it. The
container-native flow will set it to true, so that the flattened
manifest only represents the things we want to add on top.
We always want set -x so we can see more information if things either
fail during a postprocess or if things in the final image somehow don't
turn out how we inpsect. The logs will help us figure out what is going
on.
It will conditionally include it based on if we are Fedora or not.
This allows us to drop systemd-resolved and fedora-repos-archive from
our package lists.