Description
A simple validation test case for rebasing to other versions of an rpm-ostree-based Fedora install.
Setup
This testcase can be run on either an image or installation, on hardware or in virtualization. Just ensure you have an rpm-ostree-based Fedora system installed (e.g. IoT, CoreOS, Silverblue or Kinoite).
How to test
List available branches. On IoT, it will look something like this:
$ sudo ostree remote refs fedora-iot fedora-iot:fedora/devel/aarch64/iot fedora-iot:fedora/devel/armhfp/iot fedora-iot:fedora/devel/x86_64/iot fedora-iot:fedora/rawhide/aarch64/iot fedora-iot:fedora/rawhide/armhfp/iot fedora-iot:fedora/rawhide/x86_64/iot fedora-iot:fedora/stable/aarch64/iot fedora-iot:fedora/stable/armhfp/iot fedora-iot:fedora/stable/x86_64/iot
On other flavors, do sudo ostree remote refs fedora
instead. The list will be much longer. Now, pick a target to rebase to. For IoT, if you currently on fedora/devel/(arch)/iot, you might want to rebase to fedora/stable/(arch)/iot; if you are on stable, you might test rebasing to devel. For CoreOS, if you are currently on fedora/(arch)/coreos/stable, you might want to rebase to fedora/(arch)/coreos/testing, and vice versa. For Silverblue or Kinoite, you will be on fedora/(version)/(arch)/silverblue or fedora/(version)/(arch)/kinoite; rebase to a different version number. We will use the IoT "rebase-to-stable" case as an example; adjust the instructions as appropriate for other cases. The instructions use $(uname -m) to determine the correct architecture - put that text whereever the architecture should appear, or just enter the correct architecture manually instead.
$ sudo rpm-ostree rebase fedora/stable/$(uname -m)/iot
Once completed, reboot into the branch:
$ sudo systemctl reboot
Verify that the rebase was successful - the first listed deployment should be fedora/stable:
$ rpm-ostree status State: idle AutomaticUpdates: disabled Deployments: ● ostree://fedora-iot:fedora/stable/x86_64/iot Version: 30.20190921.0 (2019-09-21T18:44:54Z) Commit: ff81204a37c34999f9e19c05e29a23c076fb3c1dc394cc2b6a3a3f0f32af158e GPGSignature: Valid signature by C2A3FA9DC67F68B98BB543F47BB90722DBBDCF7C ostree://fedora-iot:fedora/devel/x86_64/iot Version: 31.20190925.0 (2019-09-25T14:30:38Z) Commit: 8f28d65fa990add14ccf56c00c458e9d6a4af478bbeb4cc566903ad0c14a443f GPGSignature: Valid signature by 7D22D5867F2A4236474BF7B850CB390B3C3359C4
Rollback to the previous branch:
$ sudo rpm-ostree rollback Moving '8f28d65fa990add14ccf56c00c458e9d6a4af478bbeb4cc566903ad0c14a443f.0' to be first deployment ... systemctl reboot
Verify rollback was successful - now the first listed deployment should be what you started with, in this case fedora/devel:
$ sudo rpm-ostree status ... State: idle AutomaticUpdates: disabled Deployments: ● ostree://fedora-iot:fedora/devel/x86_64/iot Version: 31.20190925.0 (2019-09-25T14:30:38Z) Commit: 8f28d65fa990add14ccf56c00c458e9d6a4af478bbeb4cc566903ad0c14a443f GPGSignature: Valid signature by 7D22D5867F2A4236474BF7B850CB390B3C3359C4 ostree://fedora-iot:fedora/stable/x86_64/iot Version: 30.20190921.0 (2019-09-21T18:44:54Z) Commit: ff81204a37c34999f9e19c05e29a23c076fb3c1dc394cc2b6a3a3f0f32af158e GPGSignature: Valid signature by C2A3FA9DC67F68B98BB543F47BB90722DBBDCF7C
Results
- Rebase to target branch successful.
- Rollback to original branch successful.