summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSerge Schneider <serge@raspberrypi.com>2025-06-05 22:04:34 +0100
committerSerge Schneider <serge@raspberrypi.com>2025-08-19 15:23:07 +0100
commit56d7e30356aad8adc72d4cc45d4bd565bf065ceb (patch)
treeb43f50118d32af885ca2a96d4952e2d89efda713
parentd8ff34585ce42e188ca6f6274807879891a33352 (diff)
stage0: modernise apt sources
-rwxr-xr-xstage0/00-configure-apt/00-run.sh12
-rw-r--r--stage0/00-configure-apt/files/raspberrypi-archive-keyring.pgpbin0 -> 1229 bytes
-rw-r--r--stage0/00-configure-apt/files/raspberrypi.gpg.key30
-rw-r--r--stage0/00-configure-apt/files/raspbian.sources6
-rw-r--r--stage0/00-configure-apt/files/raspi.list3
-rw-r--r--stage0/00-configure-apt/files/raspi.sources5
-rw-r--r--stage0/00-configure-apt/files/sources.list3
7 files changed, 17 insertions, 42 deletions
diff --git a/stage0/00-configure-apt/00-run.sh b/stage0/00-configure-apt/00-run.sh
index 1b7e03f..8e47893 100755
--- a/stage0/00-configure-apt/00-run.sh
+++ b/stage0/00-configure-apt/00-run.sh
@@ -1,9 +1,10 @@
#!/bin/bash -e
-install -m 644 files/sources.list "${ROOTFS_DIR}/etc/apt/"
-install -m 644 files/raspi.list "${ROOTFS_DIR}/etc/apt/sources.list.d/"
-sed -i "s/RELEASE/${RELEASE}/g" "${ROOTFS_DIR}/etc/apt/sources.list"
-sed -i "s/RELEASE/${RELEASE}/g" "${ROOTFS_DIR}/etc/apt/sources.list.d/raspi.list"
+true > "${ROOTFS_DIR}/etc/apt/sources.list"
+install -m 644 files/raspbian.sources "${ROOTFS_DIR}/etc/apt/sources.list.d/"
+install -m 644 files/raspi.sources "${ROOTFS_DIR}/etc/apt/sources.list.d/"
+sed -i "s/RELEASE/${RELEASE}/g" "${ROOTFS_DIR}/etc/apt/sources.list.d/raspbian.sources"
+sed -i "s/RELEASE/${RELEASE}/g" "${ROOTFS_DIR}/etc/apt/sources.list.d/raspi.sources"
if [ -n "$APT_PROXY" ]; then
install -m 644 files/51cache "${ROOTFS_DIR}/etc/apt/apt.conf.d/51cache"
@@ -19,8 +20,7 @@ else
rm -f "${ROOTFS_DIR}/etc/apt/sources.list.d/00-temp.list"
fi
-cat files/raspberrypi.gpg.key | gpg --dearmor > "${STAGE_WORK_DIR}/raspberrypi-archive-stable.gpg"
-install -m 644 "${STAGE_WORK_DIR}/raspberrypi-archive-stable.gpg" "${ROOTFS_DIR}/etc/apt/trusted.gpg.d/"
+install -m 644 files/raspberrypi-archive-keyring.pgp "${ROOTFS_DIR}/usr/share/keyrings/"
on_chroot <<- \EOF
ARCH="$(dpkg --print-architecture)"
if [ "$ARCH" = "armhf" ]; then
diff --git a/stage0/00-configure-apt/files/raspberrypi-archive-keyring.pgp b/stage0/00-configure-apt/files/raspberrypi-archive-keyring.pgp
new file mode 100644
index 0000000..e0ada06
--- /dev/null
+++ b/stage0/00-configure-apt/files/raspberrypi-archive-keyring.pgp
Binary files differ
diff --git a/stage0/00-configure-apt/files/raspberrypi.gpg.key b/stage0/00-configure-apt/files/raspberrypi.gpg.key
deleted file mode 100644
index 60b5f65..0000000
--- a/stage0/00-configure-apt/files/raspberrypi.gpg.key
+++ /dev/null
@@ -1,30 +0,0 @@
------BEGIN PGP PUBLIC KEY BLOCK-----
-Version: GnuPG v1.4.12 (GNU/Linux)
-
-mQENBE/d7o8BCACrwqQacGJfn3tnMzGui6mv2lLxYbsOuy/+U4rqMmGEuo3h9m92
-30E2EtypsoWczkBretzLUCFv+VUOxaA6sV9+puTqYGhhQZFuKUWcG7orf7QbZRuu
-TxsEUepW5lg7MExmAu1JJzqM0kMQX8fVyWVDkjchZ/is4q3BPOUCJbUJOsE+kK/6
-8kW6nWdhwSAjfDh06bA5wvoXNjYoDdnSZyVdcYCPEJXEg5jfF/+nmiFKMZBraHwn
-eQsepr7rBXxNcEvDlSOPal11fg90KXpy7Umre1UcAZYJdQeWcHu7X5uoJx/MG5J8
-ic6CwYmDaShI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ULCohlGkwBOkRo10T+Ld4vCCnBftCh5x2OtZ
-TOWRULxP36y2PLGVNF+q9pho98qx+RIxvpofQM/842ZycjPJvzgVQsW4LT91KYAE
-4TVf6JjwUM6HZDoiNcX6d7zOhNfQihXTsniZZ6rky287htsWVDNkqOi5T3oTxWUo
-m++/7s3K3L0zWopdhMVcgg6Nt9gcjzqN1c0gy55L/g==
-=mNSj
------END PGP PUBLIC KEY BLOCK-----
diff --git a/stage0/00-configure-apt/files/raspbian.sources b/stage0/00-configure-apt/files/raspbian.sources
new file mode 100644
index 0000000..0f2e26f
--- /dev/null
+++ b/stage0/00-configure-apt/files/raspbian.sources
@@ -0,0 +1,6 @@
+Types: deb
+URIs: http://raspbian.raspberrypi.com/raspbian/
+Arch: armhf
+Suites: RELEASE
+Components: main contrib non-free rpi
+Signed-By: /usr/share/keyrings/raspbian-archive-keyring.gpg
diff --git a/stage0/00-configure-apt/files/raspi.list b/stage0/00-configure-apt/files/raspi.list
deleted file mode 100644
index 5f889b1..0000000
--- a/stage0/00-configure-apt/files/raspi.list
+++ /dev/null
@@ -1,3 +0,0 @@
-deb http://archive.raspberrypi.com/debian/ RELEASE main
-# Uncomment line below then 'apt-get update' to enable 'apt-get source'
-#deb-src http://archive.raspberrypi.com/debian/ RELEASE main
diff --git a/stage0/00-configure-apt/files/raspi.sources b/stage0/00-configure-apt/files/raspi.sources
new file mode 100644
index 0000000..1ec8b97
--- /dev/null
+++ b/stage0/00-configure-apt/files/raspi.sources
@@ -0,0 +1,5 @@
+Types: deb
+URIs: http://archive.raspberrypi.com/debian/
+Suites: RELEASE
+Components: main
+Signed-By: /usr/share/keyrings/raspberrypi-archive-keyring.pgp
diff --git a/stage0/00-configure-apt/files/sources.list b/stage0/00-configure-apt/files/sources.list
deleted file mode 100644
index 3ef0699..0000000
--- a/stage0/00-configure-apt/files/sources.list
+++ /dev/null
@@ -1,3 +0,0 @@
-deb [ arch=armhf ] http://raspbian.raspberrypi.com/raspbian/ RELEASE main contrib non-free rpi
-# Uncomment line below then 'apt-get update' to enable 'apt-get source'
-#deb-src http://raspbian.raspberrypi.com/raspbian/ RELEASE main contrib non-free rpi