Skip to content

Commit cd2bf6f

Browse files
authored
Merge pull request #6159 from mysteriumnetwork/rasp-trixie
Replace Raspbian Buster with Raspios Trixie
2 parents cdbe267 + 9ed4766 commit cd2bf6f

File tree

4 files changed

+27
-25
lines changed

4 files changed

+27
-25
lines changed
Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
#!/bin/bash -ev
22

3-
usermod -l myst pi
4-
usermod -m -d /home/myst myst
5-
echo 'myst:mystberry'|chpasswd
3+
useradd -m -d /home/myst -s /bin/bash myst
4+
usermod --password "$(openssl passwd -6 mystberry)" myst
65

7-
rm /etc/sudoers.d/010_pi-nopasswd
6+
rm -f /etc/sudoers.d/010_pi-nopasswd
87
install -m 644 myst_sudo_nopasswd /etc/sudoers.d/010_myst-nopasswd

bin/package/raspberry/files/1-setup-node.sh

Lines changed: 19 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -10,31 +10,33 @@ add_apt_source() {
1010
grep -qF "$src" "$src_file" || echo "$src" | tee -a "$src_file"
1111
}
1212

13+
apt-get update --allow-releaseinfo-change
14+
15+
# Install myst dependencies
16+
apt-get -y install wireguard openvpn iptables resolvconf wget gpg unattended-upgrades
17+
1318
# Enable SSH access
1419
touch /boot/ssh
1520

16-
# Add APT sources
17-
add_apt_source "deb http://ppa.launchpad.net/mysteriumnetwork/node/ubuntu focal main" "/etc/apt/sources.list.d/mysterium.list"
18-
apt-key adv --keyserver keyserver.ubuntu.com --recv-keys ECCB6A56B22C536D
19-
20-
add_apt_source "deb http://deb.debian.org/debian/ unstable main" "/etc/apt/sources.list.d/unstable.list"
21-
wget -O - https://ftp-master.debian.org/keys/archive-key-$(lsb_release -sr).asc | sudo apt-key add -
22-
printf 'Package: *\nPin: release a=unstable\nPin-Priority: 150\n' | sudo tee --append /etc/apt/preferences.d/limit-unstable
21+
# TODO: remove PPA https://wiki.debian.org/DontBreakDebian
22+
wget -qO- "https://keyserver.ubuntu.com/pks/lookup?op=get&search=0xECCB6A56B22C536D" \
23+
| gpg --dearmor \
24+
| tee /usr/share/keyrings/mysterium-ppa.gpg > /dev/null
2325

24-
# Import missing keys
25-
apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 0E98404D386FA1D9
26-
apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 6ED0E7B82643E131
26+
echo "deb [signed-by=/usr/share/keyrings/mysterium-ppa.gpg] \
27+
http://ppa.launchpad.net/mysteriumnetwork/node/ubuntu focal main" \
28+
| tee /etc/apt/sources.list.d/mysterium-node.list
2729

28-
apt-get update --allow-releaseinfo-change
30+
# Add APT sources
31+
# add_apt_source "deb http://deb.debian.org/debian/ unstable main" "/etc/apt/sources.list.d/unstable.list"
32+
# wget -O - https://ftp-master.debian.org/keys/archive-key-$(lsb_release -sr).asc | sudo apt-key add -
33+
# printf 'Package: *\nPin: release a=unstable\nPin-Priority: 150\n' | sudo tee --append /etc/apt/preferences.d/limit-unstable
2934

30-
# Install myst dependencies
31-
apt-get -y install \
32-
wireguard \
33-
openvpn
35+
# Import missing keys
36+
# apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 0E98404D386FA1D9
37+
# apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 6ED0E7B82643E131
3438

3539
# Setup unattended upgrades
36-
apt-get -y install \
37-
unattended-upgrades
3840
if [[ "${RELEASE_BUILD}" == "true" ]]; then
3941
echo "Release build, setting up auto-update"
4042
install --mode=644 unattended-upgrades /etc/apt/apt.conf.d/50unattended-upgrades

bin/package/raspberry/files/unattended-upgrades

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
Unattended-Upgrade::Origins-Pattern {
2-
"origin=Raspbian,codename=${distro_codename},label=Raspbian";
3-
"origin=Raspbian,codename=${distro_codename},label=Raspbian-Security";
2+
"origin=Debian,codename=${distro_codename}";
3+
"origin=Debian,label=Debian-Security";
4+
"origin=Raspberry Pi Foundation";
45
"o=LP-PPA-mysteriumnetwork-node";
56
};
67

ci/packages/raspberry.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ func configureRaspbianImage(raspbianImagePath string) error {
9999
if err := shell.NewCmd("sudo apt-get update").Run(); err != nil {
100100
return err
101101
}
102-
if err := shell.NewCmd("sudo apt-get install -y qemu-system qemu-user-static binfmt-support systemd-container").RunWith(envs); err != nil {
102+
if err := shell.NewCmd("sudo apt-get install -y openssl qemu-system qemu-user-static binfmt-support systemd-container").RunWith(envs); err != nil {
103103
return err
104104
}
105105
if err := shell.NewCmd("sudo systemctl restart systemd-binfmt").Run(); err != nil {
@@ -172,7 +172,7 @@ func fetchRaspbianImage() (filename string, err error) {
172172

173173
log.Info().Msg("Looking up Raspbian image file")
174174
localRaspbianZip, err := storageClient.GetCacheableFile("raspbian", func(object types.Object) bool {
175-
return strings.Contains(aws.ToString(object.Key), "-raspbian-buster-lite")
175+
return strings.Contains(aws.ToString(object.Key), "-raspios-trixie-armhf-lite.img.zip")
176176
})
177177
if err != nil {
178178
return "", fmt.Errorf("failed to fetch raspbian image: %w", err)

0 commit comments

Comments
 (0)