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

rhel-9.6: Transient support #2205

Merged

Conversation

ppisar
Copy link
Contributor

@ppisar ppisar commented Feb 6, 2025

This is a backport of #2203 to RHEL-9. It intentionally excludes copr scripts. This patchset requires rpm-software-management/libdnf#1694.

Resolves: https://issues.redhat.com/browse/RHEL-70917
@evan-goode, please review it.

Upstream commit: 6091f3f

Adds support for the --transient option on all transactions. Passing
--transient on a bootc system will call `bootc usr-overlay` to create a
transient writeable /usr and continue the transaction.

Specifying --transient on a non-bootc system will throw an error; we
don't want to mislead users to thinking this feature works on non-bootc
systems.

If --transient is not specified and the bootc system is in a locked
state, the operation will be aborted and a message will be printed
suggesting to try again with --transient.

Resolves: https://issues.redhat.com/browse/RHEL-70917
Upstream commit: 80a62d8

Documents the new `--transient` command-line argument and `persistence`
configuration option. I tried to use a table for listing the valid
options for `persistence`, but RST does not automatically wrap table
cells containing long lines, so a list was much easier.

Resolves: https://issues.redhat.com/browse/RHEL-70917
Upstream commit: f3abee5

Using libostree gives us more detail about the current state of the
deployment than only checking whether /usr is writable.

Resolves: https://issues.redhat.com/browse/RHEL-70917
Upstream commit: fa47a25

To keep /usr read-only after DNF is finished with a transient
transaction, we call `ostree admin unlock --transient` to mount the /usr
overlay as read-only by default. Then, we create a private mount
namespace for DNF and its child processes and remount the /usr overlayfs
as read/write in the private mountns.

os.unshare is unfortunately only available in Python >= 3.12, so we have
to call libc.unshare via Python ctypes here and hardcode the CLONE_NEWNS
flag that we need to pass.

Resolves: https://issues.redhat.com/browse/RHEL-70917
Upstream commit: 76a0c33

dnf-bootc's only job is to Require python3-gobject-base, ostree,
ostree-libs, and util-linux-core, which are needed to interact with
bootc systems. We don't want to add these dependencies on `python3-dnf`
because we don't want them on non-bootc systems, so we use a subpackage.

Resolves: https://issues.redhat.com/browse/RHEL-70917
Upstream commit: 5a4f6c4

This backport actually uses RHEL-9 libdnf version.

Resolves: https://issues.redhat.com/browse/RHEL-70917
Copy link
Member

@evan-goode evan-goode left a comment

Choose a reason for hiding this comment

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

LGTM

@evan-goode evan-goode merged commit 19754a7 into rpm-software-management:rhel-9.6 Feb 6, 2025
2 of 3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants