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 97009138350 for ; Fri, 6 Mar 2020 16:51:41 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id C3825E086A; Fri, 6 Mar 2020 16:51:40 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (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 8DD5DE086A for ; Fri, 6 Mar 2020 16:51:40 +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 D9BE034EF08 for ; Fri, 6 Mar 2020 16:51:38 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 73F5510A for ; Fri, 6 Mar 2020 16:51:36 +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: <1583513489.1907f8ac187bba12769e4b8e4b46b8810eb55d51.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/Manifest sys-kernel/linux-firmware/linux-firmware-20200302.ebuild X-VCS-Directories: sys-kernel/linux-firmware/ X-VCS-Committer: whissi X-VCS-Committer-Name: Thomas Deutschmann X-VCS-Revision: 1907f8ac187bba12769e4b8e4b46b8810eb55d51 X-VCS-Branch: master Date: Fri, 6 Mar 2020 16:51:36 +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: 4e21d65a-7be0-40f4-9d6c-769b3193c9aa X-Archives-Hash: 80c0c6955002c716612babba3748e24f commit: 1907f8ac187bba12769e4b8e4b46b8810eb55d51 Author: Thomas Deutschmann gentoo org> AuthorDate: Fri Mar 6 16:50:27 2020 +0000 Commit: Thomas Deutschmann gentoo org> CommitDate: Fri Mar 6 16:51:29 2020 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1907f8ac sys-kernel/linux-firmware: new snapshot Package-Manager: Portage-2.3.91, Repoman-2.3.20 Signed-off-by: Thomas Deutschmann gentoo.org> sys-kernel/linux-firmware/Manifest | 1 + .../linux-firmware/linux-firmware-20200302.ebuild | 354 +++++++++++++++++++++ 2 files changed, 355 insertions(+) diff --git a/sys-kernel/linux-firmware/Manifest b/sys-kernel/linux-firmware/Manifest index d754824dd94..9784629f884 100644 --- a/sys-kernel/linux-firmware/Manifest +++ b/sys-kernel/linux-firmware/Manifest @@ -7,3 +7,4 @@ DIST linux-firmware-20191022.tar.gz 198935619 BLAKE2B 94d90a8e85af7104f08c398d3d DIST linux-firmware-20191108.tar.gz 203746264 BLAKE2B cd756ac1b1bde9706cd8321133da2e4e620a3236614427ae9836fc5e98fbc62e79060e6cf50717b41391fba9d56e16140f722ffcc5764e4b81ad2e798d1b41ec SHA512 75eb78ef642cc48dc3d8d2cdd7e5312b82ee3c9ebd6ead40a02fdc1d4329c5a9226237fa0ec8e617fc358cc12144dacf4ef6c1441fe444974c1506ef21ea70a0 DIST linux-firmware-20191215.tar.gz 203746264 BLAKE2B cd756ac1b1bde9706cd8321133da2e4e620a3236614427ae9836fc5e98fbc62e79060e6cf50717b41391fba9d56e16140f722ffcc5764e4b81ad2e798d1b41ec SHA512 75eb78ef642cc48dc3d8d2cdd7e5312b82ee3c9ebd6ead40a02fdc1d4329c5a9226237fa0ec8e617fc358cc12144dacf4ef6c1441fe444974c1506ef21ea70a0 DIST linux-firmware-20200122.tar.gz 219807963 BLAKE2B 976cf7f8da61213a1210348cffdda8cae1b3f3a2d46aac05fe331fdff37e954620c2768f8941e0d4b6fff8c7b69d68b86516c9df9b9cf96538a4463b0957d1a2 SHA512 23500cc99d31597fe691341404cbe9375f7995783b4bf055a53a67ace380bdf9db1c247f12ae7e63ac02e4078e5089aa33e5cc6c2622b26dfaab4a65bfab1db3 +DIST linux-firmware-20200302.tar.gz 221566178 BLAKE2B a6fd243dcf4b9e1f0d91136046f1f9df0059c4916debb4108e620f0e587982d61bc9433ca6880dc4451fc60510eff2489ecd1c4979ac2344a0eacb6041da2dd7 SHA512 c694d268c0be20a34dbf4f823458d1ed378ae41dfebd2b4d064207f44b0532fe3b02af58ff4ab58e3d2777ad82cb87c1d11e7906b0f423043007b3b75648b458 diff --git a/sys-kernel/linux-firmware/linux-firmware-20200302.ebuild b/sys-kernel/linux-firmware/linux-firmware-20200302.ebuild new file mode 100644 index 00000000000..c8c50ee8030 --- /dev/null +++ b/sys-kernel/linux-firmware/linux-firmware-20200302.ebuild @@ -0,0 +1,354 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 +inherit mount-boot savedconfig + +if [[ ${PV} == 99999999* ]]; then + inherit git-r3 + EGIT_REPO_URI="https://git.kernel.org/pub/scm/linux/kernel/git/firmware/${PN}.git" +else + GIT_COMMIT="0148cfefcbf98898ca65bb26d9d7d638b30e211d" + SRC_URI="https://git.kernel.org/cgit/linux/kernel/git/firmware/linux-firmware.git/snapshot/linux-firmware-${GIT_COMMIT}.tar.gz -> ${P}.tar.gz" + KEYWORDS="~alpha amd64 arm arm64 hppa ia64 ~mips ppc ppc64 s390 sh sparc x86" +fi + +DESCRIPTION="Linux firmware files" +HOMEPAGE="https://git.kernel.org/?p=linux/kernel/git/firmware/linux-firmware.git" + +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 no-source-code ) ) + unknown-license? ( all-rights-reserved )" +SLOT="0" +IUSE="initramfs +redistributable savedconfig unknown-license" +RESTRICT="binchecks strip + unknown-license? ( bindist )" + +REQUIRED_USE="initramfs? ( redistributable )" + +BDEPEND="initramfs? ( app-arch/cpio )" + +#add anything else that collides to this +RDEPEND="!savedconfig? ( + redistributable? ( + !sys-firmware/alsa-firmware[alsa_cards_ca0132] + !media-tv/cx18-firmware + ! "${UCODETMP}/early_cpio" + + local amd_ucode_file="${UCODEDIR}/AuthenticAMD.bin" + cat "${S}"/amd-ucode/*.bin > "${amd_ucode_file}" || die "Failed to concat amd cpu ucode" + + if [[ ! -s "${amd_ucode_file}" ]]; then + die "Sanity check failed: '${amd_ucode_file}' is empty!" + fi + + pushd "${UCODETMP}" &>/dev/null || die + find . -print0 | cpio --quiet --null -o -H newc -R 0:0 > "${S}"/amd-uc.img + popd &>/dev/null || die + if [[ ! -s "${S}/amd-uc.img" ]]; then + die "Failed to create '${S}/amd-uc.img'!" + fi + else + # If this will ever happen something has changed which + # must be reviewed + die "'${S}/amd-ucode' not found!" + fi + fi + + echo "# Remove files that shall not be installed from this list." > ${PN}.conf + find * ! -type d ! \( -name ${PN}.conf -o -name amd-uc.img \) >> ${PN}.conf + + if use savedconfig; then + restore_config ${PN}.conf + + ebegin "Removing all files not listed in config" + find ! -type d ! \( -name ${PN}.conf -o -name amd-uc.img \) -printf "%P\n" \ + | grep -Fvx -f <(grep -v '^#' ${PN}.conf \ + || die "grep failed, empty config file?") \ + | xargs -d '\n' --no-run-if-empty rm + eend $? || die + fi + + # remove empty directories, bug #396073 + find -type d -empty -delete || die +} + +src_install() { + save_config ${PN}.conf + rm ${PN}.conf || die + + if use initramfs ; then + mkdir "${ED}/boot" || die + mv "${S}"/amd-uc.img "${ED}/boot" || die + fi + + if ! ( shopt -s failglob; : * ) 2>/dev/null; then + eerror "No files to install. Check your USE flag settings" + eerror "and the list of files in your saved configuration." + die "Refusing to install an empty package" + fi + + insinto /lib/firmware/ + doins -r * +} + +pkg_preinst() { + if use savedconfig; then + ewarn "USE=savedconfig is active. You must handle file collisions manually." + fi + + # Make sure /boot is available if needed. + use initramfs && mount-boot_pkg_preinst +} + +pkg_postinst() { + elog "If you are only interested in particular firmware files, edit the saved" + elog "configfile and remove those that you do not want." + + local ver + for ver in ${REPLACING_VERSIONS}; do + if ver_test ${ver} -lt 20190514; then + elog + elog 'Starting with version 20190514, installation of many firmware' + elog 'files is controlled by USE flags. Please review your USE flag' + elog 'and package.license settings if you are missing some files.' + break + fi + done + + # Don't forget to umount /boot if it was previously mounted by us. + use initramfs && mount-boot_pkg_postinst +} + +pkg_prerm() { + # Make sure /boot is mounted so that we can remove /boot/amd-uc.img! + use initramfs && mount-boot_pkg_prerm +} + +pkg_postrm() { + # Don't forget to umount /boot if it was previously mounted by us. + use initramfs && mount-boot_pkg_postrm +}