topgrade-rs / topgrade

Upgrade all the things
GNU General Public License v3.0
2.07k stars 141 forks source link

feat: add bootc support to redhat_upgrade #986

Closed tulilirockz closed 6 days ago

tulilirockz commented 1 week ago

What does this PR do

This PR adds Bootc support for redhat_upgrade as they are going to ship this as the default starting with F42 Atomic AFAIK. It takes precedence over rpm-ostree if it is enabled.

Standards checklist

If you developed a feature or a bug fix for someone else and you do not have the means to test it, please tag this person here.

SteveLauC commented 1 week ago

Hi, in what distros, bootc will replace rpm-ostree? Topgrade also has a FedoraImmutable for those Fedora variants, I wonder if bootc will be used there as well๐Ÿค”

tulilirockz commented 1 week ago

Hi, in what distros, bootc will replace rpm-ostree? Topgrade also has a FedoraImmutable for those Fedora variants, I wonder if bootc will be used there as well๐Ÿค”

In Fedora Silverblue/other atomic variants! https://docs.fedoraproject.org/en-US/bootc/getting-started/ (Technically you can already use it too! Pretty exciting right)

tulilirockz commented 1 week ago

Ill be updating the Fedora Immutable part too

tulilirockz commented 1 week ago

Bootc does not support package layering tho, so it should not be the default until DNF supports image-based systems layering

tulilirockz commented 1 week ago

Works fine when using a configuration file like this one:

[misc]
only = ["system"]

[linux]
bootc = true
rpm_ostree = true # supercedes rpm-ostree when bootc is enabled

Output:

~/opt/topgrade> cargo run -- --config ./test.config.toml
   Compiling topgrade v16.0.1 (/var/home/tulili/opt/topgrade)
    Finished `dev` profile [unoptimized + debuginfo] target(s) in 2.04s
     Running `target/debug/topgrade --config ./test.config.toml`

โ”€โ”€ 23:38:12 - System update โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€
No changes in ostree-image-signed:docker://ghcr.io/ublue-os/bluefin-dx:latest => sha256:47f4c91dda60b6cfe90e14b39a5539d9ffbb72304776ac64a919e6186de9c1c5
No update available.

โ”€โ”€ 23:38:15 - Summary โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€
System update: OK