Better handle components for bookworm

This commit is contained in:
Joshua Boniface 2023-09-01 15:42:00 -04:00
parent afbe330155
commit 268b8824df
1 changed files with 19 additions and 6 deletions

View File

@ -872,16 +872,29 @@ echo "Command: debootstrap --include=${basepkglist} ${debrelease} ${target}/ ${d
debootstrap --include=${basepkglist} ${debrelease} ${target}/ ${debmirror} >&2 debootstrap --include=${basepkglist} ${debrelease} ${target}/ ${debmirror} >&2
echo "done." echo "done."
echo -n "Adding non-free repository (firmware, etc.)... " case ${debrelease} in
buster)
non_free="non-free"
;;
bullseye)
non_free="non-free"
# python-is-python3 is critical for bullsye
suppkglist="python-is-python3,${suppkglist}"
;;
bookworm)
# Use non-free-firmware component instead of non-free
non_free="non-free-firmware"
# python-is-python3 is critical for bullsye
suppkglist="python-is-python3,${suppkglist}"
;;
esac
echo -n "Adding ${non_free} APT component (firmware, etc.)... "
mkdir -p ${target}/etc/apt/sources.list.d/ >&2 mkdir -p ${target}/etc/apt/sources.list.d/ >&2
echo "deb ${debmirror} ${debrelease} contrib non-free" | tee -a ${target}/etc/apt/sources.list >&2 echo "deb ${debmirror} ${debrelease} contrib ${non_free}" | tee -a ${target}/etc/apt/sources.list >&2
chroot ${target} apt-get update >&2 chroot ${target} apt-get update >&2
echo "done." echo "done."
# python-is-python3 is critical for bullsye
if [[ ${debrelease} != "buster" ]]; then
suppkglist="python-is-python3,${suppkglist}"
fi
echo -n "Installing supplemental packages... " echo -n "Installing supplemental packages... "
chroot ${target} apt-get install -y --no-install-recommends $( sed 's/,/ /g' <<<"${suppkglist}" ) >&2 chroot ${target} apt-get install -y --no-install-recommends $( sed 's/,/ /g' <<<"${suppkglist}" ) >&2