From 6419fa917eee978c299f0bce948ffb9480643b1a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Sch=C3=A4r?= Date: Fri, 21 Jun 2024 18:16:12 +0200 Subject: [PATCH] Insert distribution into packages sources --- os/build.py | 3 +++ .../usr/local/share/target-sources/debian.sources | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/os/build.py b/os/build.py index 8bae320..c84070d 100755 --- a/os/build.py +++ b/os/build.py @@ -165,6 +165,9 @@ def main(): # so we need to copy them somewhere else and restore them after the install. for listpath in pathlib.Path('config/archives').glob('*.list.chroot'): run(["cp", str(listpath), f"config/includes.chroot/usr/local/share/target-sources/{listpath.name.removesuffix('.chroot')}"]) + # Insert distribution into source configs. + for sourcepath in pathlib.Path('config/includes.chroot/usr/local/share/target-sources').glob('*'): + edit_file(sourcepath, lambda s: s.replace("@DISTRIBUTION@", DISTRIBUTION)) elif args.variant == "contestant": # Insert root password into hook script. edit_file("config/hooks/live/2010-contestant.hook.chroot", diff --git a/os/layers/training-installer/includes.chroot/usr/local/share/target-sources/debian.sources b/os/layers/training-installer/includes.chroot/usr/local/share/target-sources/debian.sources index a7c1e88..fd89bcb 100644 --- a/os/layers/training-installer/includes.chroot/usr/local/share/target-sources/debian.sources +++ b/os/layers/training-installer/includes.chroot/usr/local/share/target-sources/debian.sources @@ -1,11 +1,11 @@ Types: deb deb-src URIs: http://deb.debian.org/debian -Suites: bookworm bookworm-updates +Suites: @DISTRIBUTION@ @DISTRIBUTION@-updates Components: main contrib non-free non-free-firmware Signed-By: /usr/share/keyrings/debian-archive-keyring.gpg Types: deb deb-src URIs: http://deb.debian.org/debian-security -Suites: bookworm-security +Suites: @DISTRIBUTION@-security Components: main contrib non-free non-free-firmware Signed-By: /usr/share/keyrings/debian-archive-keyring.gpg