coreos / rpm-ostree

⚛📦 Hybrid image/package system with atomic upgrades and package layering
https://coreos.github.io/rpm-ostree
Other
862 stars 195 forks source link

RFE: add option to create just transient change for rpm-ostree install --apply-live #3993

Open djasa opened 2 years ago

djasa commented 2 years ago

Host system details

# rpm-ostree status
State: idle
AutomaticUpdates: check; rpm-ostreed-automatic.timer: inactive
Deployments:
● fedora:fedora/37/x86_64/silverblue
                  Version: 37.20220906.n.0 (2022-09-06T08:36:28Z)
         BootedBaseCommit: 2cfef8552499fe6106828b6ae0047cf9e56308cc68e0a4210fa8218cc822cc9b
                   Commit: 5310d1f7ae41264cb59f2c1b79a9d2ce08640d1cd69ee1bf997017c5298db238
               LiveCommit: 0bc79658904c0a36b00c0d89854eb77ae4c539287ca7bdab0619ebef7ebf1fa5
                 LiveDiff: 1 upgraded
             GPGSignature: Valid signature by ACB5EE4E831C74BB7C168D27F55AD3FB5323552A
           LocalOverrides: NetworkManager-wwan NetworkManager-libnm NetworkManager-adsl NetworkManager NetworkManager-config-connectivity-fedora NetworkManager-ppp NetworkManager-wifi NetworkManager-bluetooth 1:1.39.90-1.fc37 -> 1:1.40.0-1.fc37
                           wireplumber wireplumber-libs 0.4.11-3.fc37 -> 0.4.11-4.fc37
          LayeredPackages: ansible git gnome-tweak-tool guestfs-tools htop ipa-client krb5-workstation libguestfs libguestfs-xfs libvirt-client libvirt-daemon openssl perl-Git qemu-system-x86 tlp vim-enhanced virt-viewer
                 Unlocked: transient
# rpm-ostree --version
rpm-ostree:
 Version: '2022.12'
 Git: 711661acda4ca51a1f26810c29ccb8d9ca53f12f
 Features:
  - rust
  - compose
  - fedora-integration

Expected vs actual behavior

I'm not aware of current possibility to achieve this

Expected:

rpm-ostree install --apply-live --transient PKG # 
rpm-ostree override replace --apply-live --transient [PKG/URI] # if override replace also gains --apply-live support
rpm-ostree reset --transient # to reset transient changes without need to reboot

Steps to reproduce it

Sometimes, for testing updates or to try various alternatives for doing one task, it'd be quite handy to be able to use --apply-live to do just transient update without touching the deployments on disk - and then option to reset the changes to state if they never were there (well there may be side effects in /etc or other writable system directories but let's ignore that here). For simplicity, it could be sufficient for reset to reset all the transient changes at once to the booted deployment state.

Would you like to work on the issue?

just testing

chrisawi commented 1 year ago

This is sort of possible already, with an extra step. You can use rpm-ostree cleanup -p to cancel the pending deployment and sudo rpm-ostree apply-live --reset --allow-replacement to reset the live overlay.