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

Prepare R4.1 -> R4.2 upgrade tool #7832

Closed
7 tasks done
marmarek opened this issue Oct 25, 2022 · 4 comments
Closed
7 tasks done

Prepare R4.1 -> R4.2 upgrade tool #7832

marmarek opened this issue Oct 25, 2022 · 4 comments
Labels
C: dist upgrade The code and tools that support upgrading in-place from one Qubes OS release to another C: doc P: blocker Priority: blocker. Prevents release or would have prevented release if known prior to release. r4.1-dom0-stable release notes This issue should be mentioned in the release notes. T: enhancement Type: enhancement. A new feature that does not yet exist or improvement of existing functionality.
Milestone

Comments

@marmarek
Copy link
Member

marmarek commented Oct 25, 2022

How to file a helpful issue

The problem you're addressing (if any)

Similar to #5685, we'll need an upgrade tool.

The solution you'd like

For now this issue is a placeholder to collect tasks the tool will need to do.

@marmarek marmarek added T: enhancement Type: enhancement. A new feature that does not yet exist or improvement of existing functionality. P: default Priority: default. Default priority for new issues, to be replaced given sufficient information. labels Oct 25, 2022
@marmarek marmarek added this to the Release 4.2 milestone Oct 25, 2022
@DemiMarie
Copy link

DemiMarie commented Oct 25, 2022

  • take a dom0 snapshot, in case of power failure.

@andrewdavidwong andrewdavidwong added C: doc C: dist upgrade The code and tools that support upgrading in-place from one Qubes OS release to another labels Oct 25, 2022
@andrewdavidwong andrewdavidwong added the release notes This issue should be mentioned in the release notes. label May 29, 2023
marmarek added a commit to QubesOS/qubes-qubes-release that referenced this issue Jul 13, 2023
This is required for in-place upgrade.

QubesOS/qubes-issues#7832
marmarek added a commit to marmarek/qubes-core-agent-linux that referenced this issue Jul 17, 2023
It will ease upgrades, as the key will differ between versions, so
having different names allows shipping new keyring into older releases
without conflicts.

QubesOS/qubes-issues#7832
marmarek added a commit to marmarek/qubes-core-agent-linux that referenced this issue Jul 17, 2023
It will ease upgrades, as the key will differ between versions, so
having different names allows shipping new keyring into older releases
without conflicts.

QubesOS/qubes-issues#7832
marmarek added a commit to QubesOS/qubes-core-agent-linux that referenced this issue Jul 24, 2023
marmarek added a commit to QubesOS/qubes-core-agent-linux that referenced this issue Jul 24, 2023
marmarek added a commit to marmarek/qubes-core-agent-linux that referenced this issue Jul 26, 2023
Fix checking if dom0's (bdb format) rpmdb is newer than converted one
(sqlite format in either /var/lib/rpm or /usr/lib/sysimage/rpm
directory).
The issue was that '-nt' consider existing file always newer than
non-existing one. This means, the logic selected to remove (supposedly)
old /var/lib/rpm/rpmdb.sqlite, instead of
/usr/lib/sysimage/rpm/rpmdb.sqlite when the former doesn't exist.

This fix is necessary for R4.1->R4.2 upgrade and needs to be backported
to release4.1 branch.

QubesOS/qubes-issues#7832
marmarek added a commit to marmarek/qubes-core-admin-linux that referenced this issue Jul 26, 2023
Reboot is necessary after major Xen update, but with --downloadonly it
wasn't performed yet.

QubesOS/qubes-issues#7832
marmarek added a commit to QubesOS/qubes-core-admin-linux that referenced this issue Jul 26, 2023
Reboot is necessary after major Xen update, but with --downloadonly it
wasn't performed yet.

QubesOS/qubes-issues#7832

(cherry picked from commit d651ccc)
marmarek added a commit to QubesOS/qubes-core-agent-linux that referenced this issue Jul 26, 2023
Fix checking if dom0's (bdb format) rpmdb is newer than converted one
(sqlite format in either /var/lib/rpm or /usr/lib/sysimage/rpm
directory).
The issue was that '-nt' consider existing file always newer than
non-existing one. This means, the logic selected to remove (supposedly)
old /var/lib/rpm/rpmdb.sqlite, instead of
/usr/lib/sysimage/rpm/rpmdb.sqlite when the former doesn't exist.

This fix is necessary for R4.1->R4.2 upgrade and needs to be backported
to release4.1 branch.

QubesOS/qubes-issues#7832

(cherry picked from commit 3ab856b)
marmarta added a commit to marmarta/qubes-dist-upgrade that referenced this issue Jul 27, 2023
marmarta added a commit to marmarta/qubes-dist-upgrade that referenced this issue Jul 27, 2023
@andrewdavidwong andrewdavidwong added P: blocker Priority: blocker. Prevents release or would have prevented release if known prior to release. affects-4.1 This issue affects Qubes OS 4.1. affects-4.2 This issue affects Qubes OS 4.2. and removed P: default Priority: default. Default priority for new issues, to be replaced given sufficient information. affects-4.1 This issue affects Qubes OS 4.1. affects-4.2 This issue affects Qubes OS 4.2. labels Aug 13, 2023
marmarek added a commit to QubesOS/qubes-builder that referenced this issue Aug 14, 2023
@marmarek
Copy link
Member Author

Initial version of the upgrade tool is ready, it's available in current-testing repositories. The missing piece is converting qrexec policy to the new format.

How to install:

sudo qubes-dom0-update --enablerepo=qubes-dom0-current-testing qubes-dist-upgrade

Usage:

$ sudo qubes-dist-upgrade --help

This script is used for updating current QubesOS R4.1 to R4.2.

Options:
    --update, -t                       (STAGE 1) Update of dom0, TemplatesVM and StandaloneVM.
    --release-upgrade, -r              (STAGE 2) Update 'qubes-release' for Qubes R4.1.
    --dist-upgrade, -s                 (STAGE 3) Upgrade to Qubes R4.1 and Fedora 32 repositories.
    --template-standalone-upgrade, -l  (STAGE 4) Upgrade templates and standalone VMs to R4.1 repository.
    --finalize, -x                     (STAGE 5) Finalize upgrade. It does:
                                         - resync applications and features
                                         - cleanup salt states
    --all-pre-reboot                   Execute stages 1 do 3
    --all-post-reboot                  Execute stages 4 and 5

    --assumeyes, -y                    Automatically answer yes for all questions.
    --usbvm, -u                        Current UsbVM defined (default 'sys-usb').
    --netvm, -n                        Current NetVM defined (default 'sys-net').
    --updatevm, -f                     Current UpdateVM defined (default 'sys-firewall').
    --skip-template-upgrade, -j        Don't upgrade TemplateVM to R4.2 repositories.
    --skip-standalone-upgrade, -k      Don't upgrade StandaloneVM to R4.2 repositories.
    --only-update                      Apply STAGE 4 and resync appmenus only to
                                       selected qubes (comma separated list).
    --keep-running                     List of extra VMs to keep running during update (comma separated list).
                                       Can be useful if multiple updates proxy VMs are configured.
    --max-concurrency                  How many TemplateVM/StandaloneVM to update in parallel in STAGE 1
                                       (default 4).

@andrewdavidwong andrewdavidwong changed the title Prepare R4.1 -> R4.2 update tool Prepare R4.1 -> R4.2 upgrade tool Sep 16, 2023
marmarek added a commit to marmarek/qubes-dist-upgrade that referenced this issue Oct 6, 2023
When packages are upgrade to a version that no longer include legacy
policy, RPM may decide to move the (user-modified) policy to a separate
file with .rpmsave extension. Such policy file will be ignored, and thus
breaks user's qrexec policy. If that happen to a qubes.InputKeyboard
service, it may render system hard to use.

While removing legacy policy is desired, it should be done with
migration tool that is separate. Stage 3 of release upgrade should not
change policy semantics, so restore those files.

QubesOS/qubes-issues#7832
marmarek added a commit to marmarek/qubes-dist-upgrade that referenced this issue Oct 6, 2023
When packages are upgrade to a version that no longer include legacy
policy, RPM may decide to move the (user-modified) policy to a separate
file with .rpmsave extension. Such policy file will be ignored, and thus
breaks user's qrexec policy. If that happen to a qubes.InputKeyboard
service, it may render system hard to use.

While removing legacy policy is desired, it should be done with
migration tool that is separate. Stage 3 of release upgrade should not
change policy semantics, so restore those files.

QubesOS/qubes-issues#7832
marmarek added a commit to marmarek/qubes-dist-upgrade that referenced this issue Oct 11, 2023
marmarek added a commit to marmarek/qubes-dist-upgrade that referenced this issue Oct 12, 2023
In addition to pure convert to the new format, adjust for a change in
input proxy policy rules (drop user=root, which was ignored anyway).

Fixes QubesOS/qubes-issues#7832
@qubesos-bot
Copy link

Automated announcement from builder-github

The component dist-upgrade (including package qubes-dist-upgrade-4.1.4-1.fc32) has been pushed to the r4.1 testing repository for dom0.
To test this update, please install it with the following command:

sudo qubes-dom0-update --enablerepo=qubes-dom0-current-testing

Changes included in this update

@qubesos-bot
Copy link

Automated announcement from builder-github

The component dist-upgrade (including package qubes-dist-upgrade-4.1.5-1.fc32) has been pushed to the r4.1 stable repository for dom0.
To install this update, please use the standard update command:

sudo qubes-dom0-update

Or update dom0 via Qubes Manager.

Changes included in this update

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C: dist upgrade The code and tools that support upgrading in-place from one Qubes OS release to another C: doc P: blocker Priority: blocker. Prevents release or would have prevented release if known prior to release. r4.1-dom0-stable release notes This issue should be mentioned in the release notes. T: enhancement Type: enhancement. A new feature that does not yet exist or improvement of existing functionality.
Projects
None yet
Development

No branches or pull requests

4 participants