summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGunnar Wolf <gwolf@gwolf.org>2022-10-12 10:25:53 -0500
committerGunnar Wolf <gwolf@gwolf.org>2022-10-12 10:25:53 -0500
commit1ffce8e6bb75dd8f2fff33d5e760184956502d10 (patch)
tree92d144cfc3b51fcb1c7ddf268fb67253d55aa861
parent1211f8af04999e59cdc52083d6f9fb5a448cb5e3 (diff)
For Bookworm, use the new non-free-firmware section instead of non-free
-rwxr-xr-xgenerate-recipe.py23
-rw-r--r--raspi_master.yaml7
2 files changed, 22 insertions, 8 deletions
diff --git a/generate-recipe.py b/generate-recipe.py
index fd536f6..18c7d71 100755
--- a/generate-recipe.py
+++ b/generate-recipe.py
@@ -50,6 +50,19 @@ else:
raspi_firmware = 'raspi-firmware'
fix_firmware = False
+# Bookworm introduced the 'non-free-firmware' component¹; before that,
+# raspi-firmware was in 'non-free'
+#
+# ¹ https://www.debian.org/vote/2022/vote_003
+if suite == 'bookworm':
+ firmware_component = 'non-free-firmware'
+else:
+ # We only need "non-free". "Contrib" was before included as well,
+ # as they are usually enabled together, but adding a second YAML
+ # element... makes the resulting code ugly and brittle. Besides,
+ # we don't use anything from contrib!
+ firmware_component = 'non-free'
+
# Extra wireless firmware:
if version != '2':
wireless_firmware = 'firmware-brcm80211'
@@ -108,14 +121,15 @@ else:
if backports_enable:
backports_stanza = """
%s
-deb http://deb.debian.org/debian/ %s main contrib non-free
-""" % (backports_enable, backports_suite)
+deb http://deb.debian.org/debian/ %s main %s
+""" % (backports_enable, backports_suite, firmware_component)
else:
+ # ugh
backports_stanza = """
# Backports are _not_ enabled by default.
# Enable them by uncommenting the following line:
-# deb http://deb.debian.org/debian %s main contrib non-free
-""" % backports_suite
+# deb http://deb.debian.org/debian %s main %s
+""" % (backports_suite, firmware_component)
# Buster requires an existing, empty /etc/machine-id file:
if suite == 'buster':
@@ -159,6 +173,7 @@ with open('raspi_master.yaml', 'r') as in_file:
out_text = in_text \
.replace('__RELEASE__', suite) \
.replace('__ARCH__', arch) \
+ .replace('__FIRMWARE_COMPONENT__', firmware_component) \
.replace('__LINUX_IMAGE__', linux) \
.replace('__DTB__', dtb) \
.replace('__SECURITY_SUITE__', security_suite) \
diff --git a/raspi_master.yaml b/raspi_master.yaml
index cefe1de..290a476 100644
--- a/raspi_master.yaml
+++ b/raspi_master.yaml
@@ -45,14 +45,13 @@ steps:
arch: __ARCH__
components:
- main
- - contrib
- - non-free
+ - __FIRMWARE_COMPONENT__
unless: rootfs_unpacked
- create-file: /etc/apt/sources.list
contents: |+
- deb http://deb.debian.org/debian __RELEASE__ main contrib non-free
- deb http://security.debian.org/debian-security __SECURITY_SUITE__ main contrib non-free
+ deb http://deb.debian.org/debian __RELEASE__ main __FIRMWARE_COMPONENT__
+ deb http://security.debian.org/debian-security __SECURITY_SUITE__ main __FIRMWARE_COMPONENT__
__BACKPORTS__
unless: rootfs_unpacked