From 948d557b4a61dc14722668b6b11a4cf3cee07b01 Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Fri, 13 Sep 2019 17:56:30 +0100 Subject: gentoo resync : 13.09.2019 --- sys-kernel/linux-firmware/Manifest | 2 + .../linux-firmware/linux-firmware-20190904.ebuild | 354 +++++++++++++++++++++ 2 files changed, 356 insertions(+) create mode 100644 sys-kernel/linux-firmware/linux-firmware-20190904.ebuild (limited to 'sys-kernel/linux-firmware') diff --git a/sys-kernel/linux-firmware/Manifest b/sys-kernel/linux-firmware/Manifest index 6b562ddd3019..16891696a675 100644 --- a/sys-kernel/linux-firmware/Manifest +++ b/sys-kernel/linux-firmware/Manifest @@ -1,6 +1,8 @@ DIST linux-firmware-20190603.tar.gz 186855626 BLAKE2B 66e3bf709ae9a3df1ac9b7b9bd4e1fa556b07696896e7db086c7b60887a8e8854638d86ecead091d32b3d9a83adc1ab88e8b2fde730f8f97a3225492c2229512 SHA512 9027ae7f649b7e1ff15177c1edb23def93d8fe90a63a90e72e7ab98414d557c9f4545ced30363c68eb1715cd74d19c0dd9e395e82320427b4aab2432a173e62b DIST linux-firmware-20190815.tar.gz 195268794 BLAKE2B bc67b4501e1d0c4375000bbcbae754b072a3769703eb214f85468d910f29becbe79f6989d3bf223ffa259326c964cbf153326b64d7756882165d29b576e13703 SHA512 99bcc1372ed51be1692cbc3c7b7c34940ee2f9b89f611afa5266b2b0825ed602cde27ff383edb776c1239eaf37002cd19be7cbb7cdf81e0721c3167d38018e9a +DIST linux-firmware-20190904.tar.gz 196829538 BLAKE2B b45b03b26908fab0602ad7e6ff8b5a2028b56a2d4d200de6fda332e9f589e6fa898cfc5eb7a28b585b1eadefb3bc7a06e5e5685928f2a087ddba39b792ff9ca2 SHA512 5469754181b3ddbe7233958d517d845c1220890758769995f90605e2f70cd34ed29d1904e8b0388293515191795deef8be1f457f9cb196c9cf01a65707534aff EBUILD linux-firmware-20190603.ebuild 8027 BLAKE2B 55e8f8436056b1db693383dc41c93b10601e000a9865b06823ce0c34743f23573f6fbf2743bc7edb9a53ad2e7f206d9e979c441e09163eb26d21d0d535258b8d SHA512 4c0149cd856aaa704f8c241e4e60cf3bbaf245555f7166bca0b65d04a321da8d891c693f11e434328994b1b893c661f8e952babe083ac92b2b8d71928a37d5b8 EBUILD linux-firmware-20190815.ebuild 9648 BLAKE2B 70bee7f6ccc9be4dab18bd71aa480da91bfe3fec0614d272b64cf03a6c413a04f6f01c4995e399c8bc97267631326f05a6930d7395e9bf7c62795e09fa8c12d3 SHA512 2ede9aabf11122cdc0912f8ec07a267329177f19f04fe5b7246f7c9c329c0c900b854a70ac742dc841fc4a6c1100c9a645947d338d73abaeb2e50f8cefe99bb3 +EBUILD linux-firmware-20190904.ebuild 9648 BLAKE2B bd55d616f9e6770df5d18eeb148412bb57c8cf9d6484410b6349bd329c26ea932802161b6c24eaf1e9353cbf9ffa2770cd6dce51188276b254d5e768a6bad5ec SHA512 45b22d4c28ad8a7b33ea2ada5ef305eb7f27e982e975d6ebcaba55730242d088f65466029cfcb37fe618fafd9509f5e62c6db02e15b5f3e4c211da18f3f3eae2 EBUILD linux-firmware-99999999.ebuild 9621 BLAKE2B 1a3ff9ddab3ceee929a91747a1195528405e37eee8a1f9f02a385ab66c5b153c69004dc3d46ca20c0cbeea59006838c50e15b68a63431f9cdafdf721ceba031f SHA512 44e9cef586b7d908ae2c9057827edc25929677fa4d865674524f022dd6b7ea4caad4a9996993deed6629480c89d50e4773596ce2c3e5639a67075ea8adb157d9 MISC metadata.xml 867 BLAKE2B db510434e654367fb0ae439b1a3ca3fc170f558022f07634a534ea982f2445ff656fa618b9dac5ebb6ac2f64d9ee93dcc59525c1f3d429eda4ebce05a678298c SHA512 5429e7424fac663e3448e80dad98365239b855f09522fe7ea3cd2c731bec37fee29209cc8ead46e73ea03cd85a3e9c8fafe18ddf4a35e5bb55513d63ad5ae7ff diff --git a/sys-kernel/linux-firmware/linux-firmware-20190904.ebuild b/sys-kernel/linux-firmware/linux-firmware-20190904.ebuild new file mode 100644 index 000000000000..6cdb10d1681e --- /dev/null +++ b/sys-kernel/linux-firmware/linux-firmware-20190904.ebuild @@ -0,0 +1,354 @@ +# Copyright 1999-2019 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="6ddb9d9704e2171d91439c9c42c5965bf3863de8" + 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 +} -- cgit v1.2.3