From 6f8038813c460b4f0572d5ef595cdfa94af3a94d Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Tue, 21 May 2019 10:20:03 +0100 Subject: gentoo resync : 21.05.2019 --- sys-kernel/linux-firmware/Manifest | 6 +- .../linux-firmware/linux-firmware-20190514.ebuild | 312 +++++++++++++++++++++ .../linux-firmware/linux-firmware-99999999.ebuild | 308 +++++++++++++++----- sys-kernel/linux-firmware/metadata.xml | 4 + 4 files changed, 557 insertions(+), 73 deletions(-) create mode 100644 sys-kernel/linux-firmware/linux-firmware-20190514.ebuild (limited to 'sys-kernel/linux-firmware') diff --git a/sys-kernel/linux-firmware/Manifest b/sys-kernel/linux-firmware/Manifest index 8cdb9b810f52..8280137b8817 100644 --- a/sys-kernel/linux-firmware/Manifest +++ b/sys-kernel/linux-firmware/Manifest @@ -1,4 +1,6 @@ DIST linux-firmware-20190502.tar.gz 185125493 BLAKE2B 48e60d08893688ab546d3d834490f5633c890c523890dedda75154fa041db8a4ae6663ce29485d32cf65556c91906aa8eb4f58ebbc95c34b5aeffb15c8737a98 SHA512 4dbc6548a66b5fcf4af47422004123b42f4c62088c5d97c8f24e03403d7acf729d9335addd68b383ecd9e8dc602b301534842c032a58ef920fad74f2c61d29ae +DIST linux-firmware-20190514.tar.gz 186854834 BLAKE2B cc4feeb4627fa402e445b8176557d67107701c6c0db44f5e5398b4040a0b80d40e32731ca3a31ca67de1e134e6b05f7e43ad29f5793c69e23fa220562624d53f SHA512 eff7a5b7c65b254949443b9d2943332f486c73a69baaaa8398c1298cfe1c06c9fdafa2dcfb2f9d1c02adad8b5e205f25bd61001fee99814e12e5d524179bc3e2 EBUILD linux-firmware-20190502.ebuild 3685 BLAKE2B ecada45062fb52c8263217072cdb73a91b61834e97353bd27ce8d511d1e78a9141c4534e868313027783f5912eae43871f8c5b34a458f81d2b161607f100ecbb SHA512 d4cccfcd3443d304301bfff5e213336bc8d644785a716f03bfdb5988872b4e8fc76c25afb65c192b1bcedd44ab242c90bee66b05c18aa7f4036527d2771c9f93 -EBUILD linux-firmware-99999999.ebuild 3658 BLAKE2B fd08ee9d29ff91a161693cdfd6b493bf8c898d4596e19ce5633b60f5bf06a07ba6217587f5737edcee36e0bb03cde69dd3a68d6083b0f63cdf3e177dad2367d3 SHA512 64c453294857b99cf7373cb1fe5e8451efbc0ba62d1660dbe49d91670270468a468dfadbcedd3cc03df5ea8d25eed3235f7b82fa21a36f7234fbb2d6e3d1ce9f -MISC metadata.xml 570 BLAKE2B 16be542cd3a809097b54d505c5a4d93d5728e326d025f6c303404919832014868afb7cbb19e51052083d01d212ebb39f4a3d400bd1d2bd1bc676a5de9a9ddda8 SHA512 55b3274fb2d43a015620bdfa759c554a2e966b8a83b8fd72a6ef1c08dd0f3b8b0b6afba00fc846fa39b631e100d4df059aed44c98111a6a260d1a3f5048916c9 +EBUILD linux-firmware-20190514.ebuild 8390 BLAKE2B 704519ac691e676cdf9bddf23aadde3a69e881c80c364ad19214b1e5c0fcbf9eda6c7ce929ae66de66ab3dd542b920396042793726739ced3bc342659b8b52b5 SHA512 d3d557762026f1b3ed067bcf574a84eb26dc5b44dc08f02062a51bab966ed141054f35638c8dba385fc32adf19b27d06aabe95f799a897b977f134e87eafb42a +EBUILD linux-firmware-99999999.ebuild 8032 BLAKE2B 9f79a1d1ac8ef0e1f1049278c523e2a71aecac87e719f24565bff2aa09ff2be9d117f5c9f1945fdc045e8dd0e7f474ff17522ac409ce2c661234891bf1369be8 SHA512 f2b32b76a7f1ade6bf7064b7b72df5a00c94928502ce36b106103542443f88d83e626cdab8d0f3a8ab17ceeb5d06c8c8082c3839bd0b388b4617da6a5e5de702 +MISC metadata.xml 753 BLAKE2B b4751e5c4684a226666a406121dee19bf4a0ca53e1c895dcc8dde72e4be6885d94ed34c094f94aac063267c019e4802d21ef5b87755701b3d58f99a5e4d1bb90 SHA512 a32de22c6c7bb84459eb2aec03f72cbd4913bd1d7077cb89ed4ad6e3652c024c974ecf307939d602e457b98b89d7b93dce2a6c510a577c9d12844df6235a210d diff --git a/sys-kernel/linux-firmware/linux-firmware-20190514.ebuild b/sys-kernel/linux-firmware/linux-firmware-20190514.ebuild new file mode 100644 index 000000000000..ef067f814223 --- /dev/null +++ b/sys-kernel/linux-firmware/linux-firmware-20190514.ebuild @@ -0,0 +1,312 @@ +# Copyright 1999-2019 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 +inherit 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="711d3297bac870af42088a467459a0634c1970ca" + 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="+redistributable savedconfig unknown-license" +RESTRICT="binchecks strip + unknown-license? ( bindist )" + +RDEPEND="!savedconfig? ( + redistributable? ( + !sys-firmware/alsa-firmware[alsa_cards_ca0132] + !media-tv/cx18-firmware + ! ${PN}.conf + find * ! -type d ! -name ${PN}.conf >> ${PN}.conf + + if use savedconfig; then + restore_config ${PN}.conf + + local file preserved_files=() remove=() + + ebegin "Removing all files not listed in config" + while IFS= read -r file; do + # Ignore comments. + if [[ ${file} != "#"* ]]; then + preserved_files+=("${file}") + fi + done < ${PN}.conf || die + + while IFS= read -d "" -r file; do + has "${file}" "${preserved_files[@]}" || remove+=("${file}") + done < <(find * ! -type d ! -name ${PN}.conf -print0 || die) + if [[ ${#remove[@]} -gt 0 ]]; then + printf "%s\0" "${remove[@]}" | xargs -0 rm || die + fi + eend 0 + fi + + # remove empty directories, bug #396073 + find -type d -empty -delete || die +} + +src_install() { + if use !savedconfig; then + save_config ${PN}.conf + fi + rm ${PN}.conf || die + + 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 +} + +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 +} diff --git a/sys-kernel/linux-firmware/linux-firmware-99999999.ebuild b/sys-kernel/linux-firmware/linux-firmware-99999999.ebuild index b96ea0707494..f439b40eab43 100644 --- a/sys-kernel/linux-firmware/linux-firmware-99999999.ebuild +++ b/sys-kernel/linux-firmware/linux-firmware-99999999.ebuild @@ -1,12 +1,11 @@ # Copyright 1999-2019 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 -EAPI="6" +EAPI=7 inherit savedconfig if [[ ${PV} == 99999999* ]]; then inherit git-r3 - SRC_URI="" EGIT_REPO_URI="https://git.kernel.org/pub/scm/linux/kernel/git/firmware/${PN}.git" else GIT_COMMIT="" @@ -17,53 +16,60 @@ fi DESCRIPTION="Linux firmware files" HOMEPAGE="https://git.kernel.org/?p=linux/kernel/git/firmware/linux-firmware.git" -LICENSE="linux-firmware ( BSD ISC MIT no-source-code ) GPL-2 GPL-2+" +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="savedconfig" +IUSE="+redistributable savedconfig unknown-license" +RESTRICT="binchecks strip + unknown-license? ( bindist )" -DEPEND="" RDEPEND="!savedconfig? ( - !sys-firmware/alsa-firmware[alsa_cards_ca0132] - !sys-firmware/alsa-firmware[alsa_cards_korg1212] - !sys-firmware/alsa-firmware[alsa_cards_maestro3] - !sys-firmware/alsa-firmware[alsa_cards_sb16] - !sys-firmware/alsa-firmware[alsa_cards_ymfpci] - !media-tv/cx18-firmware - ! ${PN}.conf - find * \( \! -type d -and \! -name ${PN}.conf \) >> ${PN}.conf + # whitelist of images with a free software license + local free_software=( + # keyspan_pda (GPL-2+) + keyspan_pda/keyspan_pda.fw + keyspan_pda/xircom_pgs.fw + # dsp56k (GPL-2+) + dsp56k/bootstrap.bin + # ath9k_htc (BSD GPL-2+ MIT) + ath9k_htc/htc_7010-1.4.0.fw + ath9k_htc/htc_9271-1.4.0.fw + # pcnet_cs, 3c589_cs, 3c574_cs, serial_cs (dual GPL-2/MPL-1.1) + cis/LA-PCM.cis + cis/PCMLM28.cis + cis/DP83903.cis + cis/NE2K.cis + cis/tamarack.cis + cis/PE-200.cis + cis/PE520.cis + cis/3CXEM556.cis + cis/3CCFEM556.cis + cis/MT5634ZLX.cis + cis/RS-COM-2P.cis + cis/COMpad2.cis + cis/COMpad4.cis + # serial_cs (GPL-3) + cis/SW_555_SER.cis + cis/SW_7xx_SER.cis + cis/SW_8xx_SER.cis + # dvb-ttpci (GPL-2+) + av7110/bootcode.bin + # usbdux, usbduxfast, usbduxsigma (GPL-2+) + usbdux_firmware.bin + usbduxfast_firmware.bin + usbduxsigma_firmware.bin + # brcmfmac (GPL-2+) + brcm/brcmfmac4330-sdio.Prowise-PT301.txt + brcm/brcmfmac43340-sdio.meegopad-t08.txt + brcm/brcmfmac43362-sdio.cubietech,cubietruck.txt + brcm/brcmfmac43362-sdio.lemaker,bananapro.txt + brcm/brcmfmac43430a0-sdio.jumper-ezpad-mini3.txt + "brcm/brcmfmac43430a0-sdio.ONDA-V80 PLUS.txt" + brcm/brcmfmac43430-sdio.AP6212.txt + brcm/brcmfmac43430-sdio.Hampoo-D2D3_Vi8A1.txt + brcm/brcmfmac43430-sdio.MUR1DX.txt + brcm/brcmfmac43430-sdio.raspberrypi,3-model-b.txt + brcm/brcmfmac43455-sdio.raspberrypi,3-model-b-plus.txt + brcm/brcmfmac4356-pcie.gpd-win-pocket.txt + # isci (GPL-2) + isci/isci_firmware.bin + # carl9170 (GPL-2+) + carl9170-1.fw + # atusb (GPL-2+) + atusb/atusb-0.2.dfu + atusb/atusb-0.3.dfu + atusb/rzusb-0.3.bin + # mlxsw_spectrum (dual BSD/GPL-2) + mellanox/mlxsw_spectrum-13.1420.122.mfa2 + mellanox/mlxsw_spectrum-13.1530.152.mfa2 + mellanox/mlxsw_spectrum-13.1620.192.mfa2 + mellanox/mlxsw_spectrum-13.1702.6.mfa2 + mellanox/mlxsw_spectrum-13.1703.4.mfa2 + mellanox/mlxsw_spectrum-13.1910.622.mfa2 + mellanox/mlxsw_spectrum-13.2000.1122.mfa2 + ) - if use savedconfig; then - restore_config ${PN}.conf - ebegin "Removing all files not listed in config" + # blacklist of images with unknown license + local unknown_license=( + atmsar11.fw + korg/k1212.dsp + ess/maestro3_assp_kernel.fw + ess/maestro3_assp_minisrc.fw + yamaha/ds1_ctrl.fw + yamaha/ds1_dsp.fw + yamaha/ds1e_ctrl.fw + tr_smctr.bin + ttusb-budget/dspbootcode.bin + emi62/bitstream.fw + emi62/loader.fw + emi62/midi.fw + emi62/spdif.fw + ti_3410.fw + ti_5052.fw + mts_mt9234mu.fw + mts_mt9234zba.fw + whiteheat.fw + whiteheat_loader.fw + intelliport2.bin + cpia2/stv0672_vp4.bin + vicam/firmware.fw + edgeport/boot.fw + edgeport/boot2.fw + edgeport/down.fw + edgeport/down2.fw + edgeport/down3.bin + sb16/mulaw_main.csp + sb16/alaw_main.csp + sb16/ima_adpcm_init.csp + sb16/ima_adpcm_playback.csp + sb16/ima_adpcm_capture.csp + sun/cassini.bin + acenic/tg1.bin + acenic/tg2.bin + adaptec/starfire_rx.bin + adaptec/starfire_tx.bin + yam/1200.bin + yam/9600.bin + 3com/3C359.bin + ositech/Xilinx7OD.bin + qlogic/isp1000.bin + myricom/lanai.bin + yamaha/yss225_registers.bin + lgs8g75.fw + ) - local file delete_file preserved_file preserved_files=() + default - while IFS= read -r file; do - # Ignore comments. - if [[ ${file} != "#"* ]]; then - preserved_files+=("${file}") - fi - done < ${PN}.conf || die + # remove sources and documentation (wildcards are expanded) + rm -r ${source_files[@]} || die + rm -rf .git + + if use !unknown-license; then + # remove files in unknown_license + rm "${unknown_license[@]}" || die + fi - while IFS= read -d "" -r file; do - delete_file=true - for preserved_file in "${preserved_files[@]}"; do - if [[ "${file}" == "${preserved_file}" ]]; then - delete_file=false - fi - done + 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 + local IFS=$'\n' + find ! -type d -printf "%P\n" \ + | grep -Fvx -e "${free_software[*]}" -e "${unknown_license[*]}" \ + | xargs -d '\n' rm || die + IFS=$' \t\n' + fi - if ${delete_file}; then - rm "${file}" || die - fi - done < <(find * \( \! -type d -and \! -name ${PN}.conf \) -print0 || die) + echo "# Remove files that shall not be installed from this list." > ${PN}.conf + find * ! -type d ! -name ${PN}.conf >> ${PN}.conf - eend || die + if use savedconfig; then + restore_config ${PN}.conf - # remove empty directories, bug #396073 - find -type d -empty -delete || die + ebegin "Removing all files not listed in config" + find ! -type d ! -name ${PN}.conf -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() { @@ -119,6 +267,13 @@ src_install() { save_config ${PN}.conf fi rm ${PN}.conf || die + + 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 * } @@ -132,4 +287,15 @@ 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 } diff --git a/sys-kernel/linux-firmware/metadata.xml b/sys-kernel/linux-firmware/metadata.xml index c662ac904b9d..7370ea010ccd 100644 --- a/sys-kernel/linux-firmware/metadata.xml +++ b/sys-kernel/linux-firmware/metadata.xml @@ -14,6 +14,10 @@ Gentoo Kernel Project + Install also non-free (but redistributable) + firmware files Allows individual selection of firmware files + Install firmware files whose license is + unknown -- cgit v1.2.3