Ansible's package builtin [1] uses dnf's Python API. This fails by
default with "Could not import the libdnf5 python module". This is
awkward and laborious to work around in Containerfiles, as you can't use
the normal `package:` to install, so it would require
distribution/release specific code, and replicating this to all
playbooks.
In particular this fixes linux-system-roles for running during bootc
container builds.
[1] https://docs.ansible.com/ansible/latest/collections/ansible/builtin/package_module.html
This works around two issues:
- First, rpm switched to reading users/groups directly for
its implementation of systemd-sysusers, which meant
it no longer reads via nss, which breaks nss-altfiles.
xref: https://github.com/rpm-software-management/rpm/pull/2503#issuecomment-1536435351
and below.
- Second, even if that was fixed, `keylime` wants to add
its user to the group, which can't be done when it's a system
uid.
Since nothing in the OS content is owned by this group, we can
move underneath `/etc` by default.
Signed-off-by: Colin Walters <walters@verbum.org>
When we renamed tier-0 → minimal and tier-1 → standard, the
naming of tier-x became obsolete. Complete the nomenclature
update.
Closes: https://gitlab.com/fedora/bootc/base-images/-/issues/24
Signed-off-by: Colin Walters <walters@verbum.org>
The versioning here was originally inherited from the Fedora CoreOS
configuration. However...the version numbering was always
overridden by coreos-assembler, so it wasn't actually used there!
Conceptually there are two things here:
- OS version
- Arbitrary date stamp
For the "OS version"...well, the closest thing we have actually
to "version of set of RPMs" is a compose today, which is expressed
in a distinct label already - at least for CentOS and RHEL.
For Fedora of course post-branching there are no "composes"
as such but just a set of floating RPMs post-release.
We have the "arbitrary date stamp" in the container image build
time already - and tooling like bootc and rpm-ostree show
both the version and the build time.
Let's significantly simplify our version numbers by just going
to "OS version".
This especially fixes the bug that we weren't setting
`releasever` anymore which just broke the version anyways.
Closes: https://gitlab.com/fedora/bootc/base-images/-/issues/40
Signed-off-by: Colin Walters <walters@verbum.org>
https://dnf.readthedocs.io/en/latest/conf_ref.html#protect-running-kernel-label
uses uname to protect the running kernel, when both the
container and the host shared the same kernel version this
blocks removing the kernel or replacing it, since on ostree
systems we only support one kernel this prevents us from
installing kernel-rt for example.
For the use case of updating Konflux lockfiles we want
to be able to easily render the manifests to a tempdir without
installing to `/`.
Move the install of the build script to the main container
build so `install-manifests` only touches manifests.
Signed-off-by: Colin Walters <walters@verbum.org>
Make it possible to set the repos image with a build argument, e.g.:
--build-arg=REPOS_IMAGE=quay.io/fedora/fedora:42
Currently it's only possible use the --from argument, e.g.:
--from=quay.io/fedora/fedora:42
Signed-off-by: Miguel Martín <mmartinv@redhat.com>
There's a crazy history around this; what we really want is
to have this reliably generated by tmpfiles.d, the handling
for which I want to move to bootc. For now let's wedge this
into finalize.d alongside the few others here.
Signed-off-by: Colin Walters <walters@verbum.org>
This fronts the functionality currently implemented in rpm-ostree,
for the same reason as we have `build-rootfs`; the functionality
may move elsewhere in the future.
Signed-off-by: Colin Walters <walters@verbum.org>
Motivated by trimming the package set of minimal to be smaller
to match its name.
But more generally, I think the solution most of the time we hit a
"multiple things have a provides" isn't to hardcode what we want,
but to exclude what we don't want.
Ideally of course...there'd be something like
`ProvidesDisfavored: iptables` that `iptables-legacy` could
use.
Signed-off-by: Colin Walters <walters@verbum.org>
I just saw the sqlite-shm corruption in
https://gitlab.com/redhat/centos-stream/containers/bootc/-/merge_requests/437#note_2372766792
so let's just go ahead and turn on rpmdb_normalize which
also aids the reproducibility of the rpmdb.
While we're here let's also add a long overdue "unit test" for
the rootfs. This operates as a container build that mounts
the container-under-test as part of a multi-stage build.
Signed-off-by: Colin Walters <walters@verbum.org>