From 97308cda86705fa3006f38a6eda2edfdf9b9e30e Mon Sep 17 00:00:00 2001 From: Michael Prokop Date: Mon, 6 Feb 2023 16:43:40 +0100 Subject: [PATCH] Support new non-free repository component for Debian bookworm and newer If the --non-free option gets enabled packages like 'firmware-linux', 'firmware-linux-nonfree', 'firmware-misc-nonfree' should be available. Starting with Debian/bookworm the firmware related packages got moved from "non-free" to the new "non-free-firmware" component/repository though (related to https://www.debian.org/vote/2022/vote_003). --- grml-debootstrap | 12 ++++++++++-- grml-debootstrap.8.txt | 5 +++-- 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/grml-debootstrap b/grml-debootstrap index e331a2c..71a0942 100755 --- a/grml-debootstrap +++ b/grml-debootstrap @@ -153,7 +153,7 @@ Configuration options: --backportrepos Enable Debian's backports repository (backports.debian.org). --keep_src_list Do not overwrite user provided apt sources.list. --contrib Enable 'contrib' in COMPONENTS (defaults to 'main' only). - --non-free Enable non-free in COMPONENTS (defaults to 'main' only). + --non-free Enable non-free / non-free-firmware in COMPONENTS (defaults to 'main' only). --hostname Hostname of Debian system. --nopassword Do not prompt for the root password. --password Use specified password as password for user root. @@ -589,7 +589,15 @@ done # make sure main is always included [ -z "$COMPONENTS" ] && COMPONENTS="main" [ "$_opt_contrib" ] && COMPONENTS="$COMPONENTS contrib" -[ "$_opt_non_free" ] && COMPONENTS="$COMPONENTS non-free" + +case "${RELEASE}" in + lenny|squeeze|wheezy|jessie|stretch|buster|bullseye) + [ "$_opt_non_free" ] && COMPONENTS="$COMPONENTS non-free" + ;; + *) + [ "$_opt_non_free" ] && COMPONENTS="$COMPONENTS non-free-firmware non-free" + ;; +esac # command line option checks if [ "$_opt_scripts_set" ] ; then diff --git a/grml-debootstrap.8.txt b/grml-debootstrap.8.txt index b572f5c..9bd28ec 100644 --- a/grml-debootstrap.8.txt +++ b/grml-debootstrap.8.txt @@ -168,8 +168,9 @@ Options and environment variables *--non-free*:: - Enable the 'non-free' repository in COMPONENTS. By default only - the 'main' repository is enabled. + Enable the 'non-free' repository in COMPONENTS. + For bookworm and newer Debian releases also the 'non-free-firmware' repository gets enabled. + By default only the 'main' repository is enabled. *--nopackages*:: -- 2.1.4