commit: c4347cf188d764bf63312de39c1eac101755699e
Author: Mike Gilbert <floppym <AT> gentoo <DOT> org>
AuthorDate: Fri Apr 11 21:10:10 2025 +0000
Commit: Mike Gilbert <floppym <AT> gentoo <DOT> org>
CommitDate: Fri Apr 11 21:11:08 2025 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c4347cf1
sys-kernel/linux-firmware: sync live ebuild
Signed-off-by: Mike Gilbert <floppym <AT> gentoo.org>
.../linux-firmware/linux-firmware-20250410.ebuild | 1 +
.../linux-firmware/linux-firmware-99999999.ebuild | 109 +++++++++++----------
2 files changed, 59 insertions(+), 51 deletions(-)
diff --git a/sys-kernel/linux-firmware/linux-firmware-20250410.ebuild
b/sys-kernel/linux-firmware/linux-firmware-20250410.ebuild
index 57282536db36..77c6662719b0 100644
--- a/sys-kernel/linux-firmware/linux-firmware-20250410.ebuild
+++ b/sys-kernel/linux-firmware/linux-firmware-20250410.ebuild
@@ -104,6 +104,7 @@ pkg_setup() {
fi
fi
linux-info_pkg_setup
+ python_setup
}
src_unpack() {
diff --git a/sys-kernel/linux-firmware/linux-firmware-99999999.ebuild
b/sys-kernel/linux-firmware/linux-firmware-99999999.ebuild
index 6c2e381fed9f..77c6662719b0 100644
--- a/sys-kernel/linux-firmware/linux-firmware-99999999.ebuild
+++ b/sys-kernel/linux-firmware/linux-firmware-99999999.ebuild
@@ -30,12 +30,13 @@ LICENSE="GPL-2 GPL-2+ GPL-3 BSD MIT || ( MPL-1.1 GPL-2 )
redistributable? ( linux-fw-redistributable BSD-2 BSD BSD-4 ISC MIT )
unknown-license? ( all-rights-reserved )"
SLOT="0"
-IUSE="compress-xz compress-zstd deduplicate dist-kernel +initramfs
+redistributable savedconfig unknown-license"
+IUSE="bindist compress-xz compress-zstd deduplicate dist-kernel +initramfs
+redistributable unknown-license"
REQUIRED_USE="initramfs? ( redistributable )
?? ( compress-xz compress-zstd )
savedconfig? ( !deduplicate )"
RESTRICT="binchecks strip test
+ !bindist? ( bindist )
unknown-license? ( bindist )"
BDEPEND="initramfs? ( app-alternatives/cpio )
@@ -89,9 +90,6 @@ pkg_pretend() {
}
pkg_setup() {
-
- python_setup
-
if use compress-xz || use compress-zstd ; then
local CONFIG_CHECK
@@ -106,6 +104,7 @@ pkg_setup() {
fi
fi
linux-info_pkg_setup
+ python_setup
}
src_unpack() {
@@ -138,11 +137,16 @@ src_prepare() {
# whitelist of misc files
local misc_files=(
+ build_packages.py
+ carl9170fw/autogen.sh
+ carl9170fw/genapi.sh
+ contrib/process_linux_firmware.py
copy-firmware.sh
- dedup-firmware.sh
check_whence.py
+ dedup-firmware.sh
+ LICEN[CS]E.*
+ README.md
WHENCE
- README
)
# whitelist of images with a free software license
@@ -210,50 +214,6 @@ src_prepare() {
mellanox/mlxsw_spectrum-13.2000.1122.mfa2
)
- if use !redistributable; then
- # remove files _not_ in the free_software or unknown_license
lists
- # everything else is confirmed (or assumed) to be
redistributable
- # based on upstream acceptance policy
- einfo "Removing non-redistributable files ..."
- local OLDIFS="${IFS}"
- local IFS=$'\n'
- set -o pipefail
- find ! -type d -printf "%P\n" \
- | grep -Fvx -e "${misc_files[*]}" -e
"${free_software[*]}" -e "${unknown_license[*]}" \
- | xargs -d '\n' --no-run-if-empty rm -v
-
- [[ ${?} -ne 0 ]] && die "Failed to remove non-redistributable
files"
-
- IFS="${OLDIFS}"
- fi
-
- restore_config ${PN}.conf
-}
-
-src_install() {
-
- local FW_OPTIONS=( "-v" "-j1" )
- git config --global --add safe.directory "${S}" || die
- local files_to_keep=
-
- if use savedconfig; then
- if [[ -s "${S}/${PN}.conf" ]]; then
- files_to_keep="${T}/files_to_keep.lst"
- grep -v '^#' "${S}/${PN}.conf" 2>/dev/null >
"${files_to_keep}" || die
- [[ -s "${files_to_keep}" ]] || die "grep failed, empty
config file?"
- FW_OPTIONS+=( "--firmware-list" "${files_to_keep}" )
- fi
- fi
-
- if use compress-xz; then
- FW_OPTIONS+=( "--xz" )
- elif use compress-zstd; then
- FW_OPTIONS+=( "--zstd" )
- fi
- FW_OPTIONS+=( "${ED}/lib/firmware" )
- ./copy-firmware.sh "${FW_OPTIONS[@]}" || die
- use deduplicate && { ./dedup-firmware.sh "${ED}/lib/firmware" || die; }
-
# blacklist of images with unknown license
local unknown_license=(
korg/k1212.dsp
@@ -303,6 +263,50 @@ src_install() {
einfo "Removing files with unknown license ..."
rm -v "${unknown_license[@]}" || die
fi
+
+ if use !redistributable; then
+ # remove files _not_ in the free_software or unknown_license
lists
+ # everything else is confirmed (or assumed) to be
redistributable
+ # based on upstream acceptance policy
+ einfo "Removing non-redistributable files ..."
+ local OLDIFS="${IFS}"
+ local IFS=$'\n'
+ set -o pipefail
+ find ! -type d -printf "%P\n" \
+ | grep -Fvx -e "${misc_files[*]}" -e
"${free_software[*]}" -e "${unknown_license[*]}" \
+ | xargs -d '\n' --no-run-if-empty rm -v
+
+ [[ ${?} -ne 0 ]] && die "Failed to remove non-redistributable
files"
+
+ IFS="${OLDIFS}"
+ fi
+
+ restore_config ${PN}.conf
+}
+
+src_install() {
+
+ local FW_OPTIONS=( "-v" "-j1" )
+ local files_to_keep=
+
+ if use savedconfig; then
+ if [[ -s "${S}/${PN}.conf" ]]; then
+ files_to_keep="${T}/files_to_keep.lst"
+ grep -v '^#' "${S}/${PN}.conf" 2>/dev/null >
"${files_to_keep}" || die
+ [[ -s "${files_to_keep}" ]] || die "grep failed, empty
config file?"
+ FW_OPTIONS+=( "--firmware-list" "${files_to_keep}" )
+ fi
+ fi
+
+ if use compress-xz; then
+ FW_OPTIONS+=( "--xz" )
+ elif use compress-zstd; then
+ FW_OPTIONS+=( "--zstd" )
+ fi
+ FW_OPTIONS+=( "${ED}/lib/firmware" )
+ ./copy-firmware.sh "${FW_OPTIONS[@]}" || die
+ use deduplicate && { ./dedup-firmware.sh "${ED}/lib/firmware" || die; }
+
pushd "${ED}/lib/firmware" &>/dev/null || die
# especially use !redistributable will cause some broken symlinks
@@ -347,6 +351,10 @@ src_install() {
insinto /boot
doins "${S}"/amd-uc.img
fi
+
+ dodoc README.md
+ # some licenses require copyright and permission notice to be included
+ use bindist && dodoc WHENCE LICEN[CS]E.*
}
pkg_preinst() {
@@ -361,7 +369,6 @@ pkg_preinst() {
# Make sure /boot is available if needed.
use initramfs && ! use dist-kernel && mount-boot_pkg_preinst
-
}
pkg_postinst() {