Skip to content

Commit

Permalink
WIP: Script to upgrade from focal to noble
Browse files Browse the repository at this point in the history
The script is split into various stages where progress is tracked
on-disk. The script is able to resume where it was at any point, and
needs to, given multiple reboots in the middle.

Given that we want to invoke the check script during the upgrade path,
most of the code is moved into a common lib.rs that can be imported by
both check.rs and upgrade.rs.

The new noble-upgrade.json file shipped in the securedrop-config package
is used to control the upgrade process.

A systemd timer runs every 3 minutes to trigger the upgrade script,
which in most cases will do nothing. We need to run it so frequently
since this is how the script will be restarted after it pauses for a
reboot.

Fixes #7332.
  • Loading branch information
legoktm committed Jan 8, 2025
1 parent 10ba51b commit ce32f1e
Show file tree
Hide file tree
Showing 14 changed files with 1,055 additions and 312 deletions.
99 changes: 97 additions & 2 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions noble-migration/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ edition = "2021"

[dependencies]
anyhow = "1.0.93"
env_logger = { version = "0.11.5", features = ["humantime"] , default-features = false }
log = "0.4.22"
rand = "0.8.5"
rustix = { version = "0.38.40", features = ["process"] }
serde = { version = "1.0.215", features = ["derive"] }
serde_json = "1.0.132"
Expand Down
1 change: 1 addition & 0 deletions noble-migration/files/apt_freedom_press.list
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
deb [arch=amd64] https://apt.freedom.press noble main
13 changes: 13 additions & 0 deletions noble-migration/files/sources.list
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
## newer versions of the distribution.
deb http://archive.ubuntu.com/ubuntu/ noble main

## newer versions of the distribution.
deb http://archive.ubuntu.com/ubuntu/ noble universe

## Major bug fix updates produced after the final release of the
## distribution.
deb http://archive.ubuntu.com/ubuntu/ noble-updates main

### Security fixes for distribution packages
deb http://security.ubuntu.com/ubuntu noble-security main
deb http://security.ubuntu.com/ubuntu noble-security universe
11 changes: 11 additions & 0 deletions noble-migration/files/ubuntu.sources
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
Types: deb
URIs: http://archive.ubuntu.com/ubuntu/
Suites: noble noble-updates
Components: main universe restricted multiverse
Signed-By: /usr/share/keyrings/ubuntu-archive-keyring.gpg

Types: deb
URIs: http://security.ubuntu.com/ubuntu/
Suites: noble-security
Components: main universe restricted multiverse
Signed-By: /usr/share/keyrings/ubuntu-archive-keyring.gpg
Loading

0 comments on commit ce32f1e

Please sign in to comment.