-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathupgrade_ubuntu_podman_to_testing.sh
executable file
·54 lines (42 loc) · 2.6 KB
/
upgrade_ubuntu_podman_to_testing.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
#!/bin/bash
# Define list of packages to remove & reinstall
#list="podman-compose podman conmon crun runc golang-github-containers-common containers-storage docker-compose aardvark-dns buildah fuse-overlayfs libfuse3-3 passt"
list="podman-compose podman conmon crun runc golang-github-containers-common containers-storage aardvark-dns buildah fuse-overlayfs fuse3 libfuse3-3 passt containernetworking-plugins"
# Remove packages
apt-get remove ${list}
# Setup ubuntu-testing reposistories
tee /etc/apt/sources.list.d/ubuntu-testing.list << EOF
# MAIN SOURCES
deb [arch=amd64 signed-by=/usr/share/keyrings/ubuntu-archive-keyring.gpg] http://archive.ubuntu.com/ubuntu/ noble main restricted universe multiverse
deb-src [arch=amd64 signed-by=/usr/share/keyrings/ubuntu-archive-keyring.gpg] http://archive.ubuntu.com/ubuntu/ noble main restricted universe multiverse
# UPDATES
deb [arch=amd64 signed-by=/usr/share/keyrings/ubuntu-archive-keyring.gpg] http://archive.ubuntu.com/ubuntu/ noble-updates main restricted universe multiverse
deb-src [arch=amd64 signed-by=/usr/share/keyrings/ubuntu-archive-keyring.gpg] http://archive.ubuntu.com/ubuntu/ noble-updates main restricted universe multiverse
# SECURITY
deb [arch=amd64 signed-by=/usr/share/keyrings/ubuntu-archive-keyring.gpg] http://archive.ubuntu.com/ubuntu/ noble-security main restricted universe multiverse
deb-src [arch=amd64 signed-by=/usr/share/keyrings/ubuntu-archive-keyring.gpg] http://archive.ubuntu.com/ubuntu/ noble-security main restricted universe multiverse
# BACKPORTS
deb [arch=amd64 signed-by=/usr/share/keyrings/ubuntu-archive-keyring.gpg] http://archive.ubuntu.com/ubuntu/ noble-backports main restricted universe multiverse
deb-src [arch=amd64 signed-by=/usr/share/keyrings/ubuntu-archive-keyring.gpg] http://archive.ubuntu.com/ubuntu/ noble-backports main restricted universe multiverse
EOF
# Setup ubuntu-testing pinning to never-install by default
tee /etc/apt/preferences.d/ubuntu-testing << EOF
# Never prefer packages from the testing release
Package: *
Pin: release a=testing
Pin-Priority: 1
EOF
# Setup podman to install from ubuntu-testing
tee /etc/apt/preferences.d/podman << EOF
# Allow upgrading only my-specific-software from the testing release
Package: podman-compose podman conmon crun runc golang-github-containers-common containers-storage docker-compose aardvark-dns buildah fuse-overlayfs fuse3 libfuse3-3 libglib2.0-0 containernetworking-plugins
# Might also be useful: slirp4netns passt
Pin: release a=testing
Pin-Priority: 600
EOF
# Update sources
apt-get update
# Reinstall packages
apt-get install ${list}
# Perform dist-upgrade
apt-get dist-upgrade