From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 24632138359 for ; Fri, 30 Oct 2020 16:46:09 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id D0CAEE084A; Fri, 30 Oct 2020 16:46:06 +0000 (UTC) Received: from smtp.gentoo.org (dev.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id BBD4FE0844 for ; Fri, 30 Oct 2020 16:46:06 +0000 (UTC) Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 89F2F33FEDE for ; Fri, 30 Oct 2020 16:46:05 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 1421A3CF for ; Fri, 30 Oct 2020 16:46:04 +0000 (UTC) From: "Thomas Deutschmann" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Thomas Deutschmann" Message-ID: <1604076351.ad9f44ef8ff4f98e3cfcfb2505856c39e532dc09.whissi@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: sys-kernel/linux-firmware/ X-VCS-Repository: repo/gentoo X-VCS-Files: sys-kernel/linux-firmware/linux-firmware-20201022-r1.ebuild sys-kernel/linux-firmware/linux-firmware-20201022-r2.ebuild X-VCS-Directories: sys-kernel/linux-firmware/ X-VCS-Committer: whissi X-VCS-Committer-Name: Thomas Deutschmann X-VCS-Revision: ad9f44ef8ff4f98e3cfcfb2505856c39e532dc09 X-VCS-Branch: master Date: Fri, 30 Oct 2020 16:46:04 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: f0246d66-1ff7-4e62-af85-782a151905e7 X-Archives-Hash: c322d24b17cd9d79f927efe95154ddd6 commit: ad9f44ef8ff4f98e3cfcfb2505856c39e532dc09 Author: Thomas Deutschmann gentoo org> AuthorDate: Fri Oct 30 16:43:50 2020 +0000 Commit: Thomas Deutschmann gentoo org> CommitDate: Fri Oct 30 16:45:51 2020 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ad9f44ef sys-kernel/linux-firmware: rev bump to incorporate latest changes See changes for live ebuild for details. Package-Manager: Portage-3.0.8, Repoman-3.0.2 Signed-off-by: Thomas Deutschmann gentoo.org> ...r1.ebuild => linux-firmware-20201022-r2.ebuild} | 33 ++++++++++++++++------ 1 file changed, 25 insertions(+), 8 deletions(-) diff --git a/sys-kernel/linux-firmware/linux-firmware-20201022-r1.ebuild b/sys-kernel/linux-firmware/linux-firmware-20201022-r2.ebuild similarity index 92% rename from sys-kernel/linux-firmware/linux-firmware-20201022-r1.ebuild rename to sys-kernel/linux-firmware/linux-firmware-20201022-r2.ebuild index fcd90451c74..63f85a38567 100644 --- a/sys-kernel/linux-firmware/linux-firmware-20201022-r1.ebuild +++ b/sys-kernel/linux-firmware/linux-firmware-20201022-r2.ebuild @@ -114,6 +114,13 @@ src_prepare() { fi fi + # whitelist of misc files + local misc_files=( + copy-firmware.sh + WHENCE + README + ) + # whitelist of images with a free software license local free_software=( # keyspan_pda (GPL-2+) @@ -238,9 +245,16 @@ src_prepare() { # everything else is confirmed (or assumed) to be redistributable # based on upstream acceptance policy einfo "Removing non-redistributable files ..." - IFS=$'\n' find ! -type d -printf "%P\n" \ - | grep -Fvx -e "${free_software[*]}" -e "${unknown_license[*]}" \ - | xargs -d '\n' rm -v || die + 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 @@ -251,6 +265,10 @@ src_install() { pushd "${ED}/lib/firmware" &>/dev/null || die + # especially use !redistributable will cause some broken symlinks + einfo "Removing broken symlinks ..." + find * -xtype l -print -delete || die + if use savedconfig; then if [[ -s "${S}/${PN}.conf" ]]; then local files_to_keep="${T}/files_to_keep.lst" @@ -277,11 +295,10 @@ src_install() { die "Refusing to install an empty package" fi - if use savedconfig; then - echo "# Remove files that shall not be installed from this list." > "${S}"/${PN}.conf || die - find * ! -type d >> "${S}"/${PN}.conf || die - save_config "${S}"/${PN}.conf - fi + # create config file + echo "# Remove files that shall not be installed from this list." > "${S}"/${PN}.conf || die + find * ! -type d >> "${S}"/${PN}.conf || die + save_config "${S}"/${PN}.conf popd &>/dev/null || die