ublue-os / bluefin

The next generation Linux workstation, designed for reliability, performance, and sustainability.
https://projectbluefin.io
Apache License 2.0
1.25k stars 163 forks source link

feat: automatically use bootc to update system if locklayering is being used #1902

Closed tulilirockz closed 4 days ago

tulilirockz commented 2 weeks ago

This is supposed to be a small step to getting people using bootc more - This PR just implements a partial version of https://github.com/ublue-os/config/issues/279 on Bluefin

karman011 commented 2 weeks ago

I think it would be better if you make it a custom command and disable rpm-ostree upgrade in topgrade.toml.

castrojo commented 2 weeks ago

Here's our topgrade config for reference: https://github.com/ublue-os/bluefin/blob/main/system_files/shared/usr/share/ublue-os/topgrade.toml

I know @bsherman has opinions on streamlining our usage of topgrade better so cc'ing him in.

tulilirockz commented 2 weeks ago

I think it would be better if you make it a custom command and disable rpm-ostree upgrade in topgrade.toml.

Good idea! Ill just copy the topgrade config and remove the rpm_ostree module :p

befanyt commented 2 weeks ago

I think it would be better if you make it a custom command and disable rpm-ostree upgrade in topgrade.toml.

Disabling rpm-ostree in topgrade.toml doesn't seem to help us here. Topgrade identifies us as fedora, which is calling redhat_upgrade. There it will execute dnf upgrade or if rpm_ostree = true, you guessed it, rpm-ostree upgrade. So if you set it to false, it will try to do execute dnf.

https://github.com/topgrade-rs/topgrade/blob/444689c899bc6a26c696fcfbccd0ef574a8f7870/src/steps/os/linux.rs#L227-L256

However you can disable rpm-ostree update, by adding "system" to the array under misc disable in topgrade.toml

Using a custom command will some kind of work, but it is not really liking sudo i believe

[commands]                                                                                                      
"System Upgrade" = "sudo bootc upgrade" 

Good idea! Ill just copy the topgrade config and remove the rpm_ostree module :p

Or just like that :smile: But be sure to keep rpm_ostree = true then

tulilirockz commented 2 weeks ago

image Using the approach you suggested seems to be working fine on my system! Very nice! @befanyt

castrojo commented 1 week ago

Don't merge until these land:

https://bodhi.fedoraproject.org/updates/FEDORA-2024-88b4110a60 https://bodhi.fedoraproject.org/updates/FEDORA-2024-246828877f

castrojo commented 4 days ago

Ok everything is in Fedora, last call!

Malix-Labs commented 4 days ago

sorry about the triple review, for some reason GitHub allows multiple review from the same account even if the code hasn't changed and I have a so poor bandwidth that clicking multiple time on the "approve" button instantly POST multiple approving reviews

tulilirockz commented 4 days ago

PR'd support for this upstream so that we don't need to use this workaround