diff --git a/sdk_container/src/third_party/coreos-overlay/sys-kernel/coreos-firmware/Manifest b/sdk_container/src/third_party/coreos-overlay/sys-kernel/coreos-firmware/Manifest index 2a0708e10f..f0a611ac19 100644 --- a/sdk_container/src/third_party/coreos-overlay/sys-kernel/coreos-firmware/Manifest +++ b/sdk_container/src/third_party/coreos-overlay/sys-kernel/coreos-firmware/Manifest @@ -1 +1 @@ -DIST linux-firmware-20181001.tar.gz 158397569 BLAKE2B 2694014f847fb60f5f0c208a479f4cdf0b422ef249735f22f0ef72e0fd385e8ba6737da1b1cf24daf74fd5f28c3c69b96e14850520f16b8a556c7ca734a3557e SHA512 f20b65122381423597cebd5a3018bbe55f0f8697a03b5ae3e7c1c6dd1cddcb1da4f3fddc8e4accb2d780faf1c0e66bed7dda6b1ab1c48d2e0b2435a5a7eb03f7 +DIST linux-firmware-20191022.tar.gz 198935619 BLAKE2B 94d90a8e85af7104f08c398d3df20a88dc4d6f86d638565ab6e45e7fc5dff53e4e56a62a859585438812a1438ea7f7c4e4e47ce4adb22b0adf69439feb5803b4 SHA512 2cc99664c8d0275b670373581d7c6e29699f8b84cd6403949182cc1970c3241e5d9c388c34643630a237d87962b7c8e891445969ca9817ac92a4bbbe74e0dc0d diff --git a/sdk_container/src/third_party/coreos-overlay/sys-kernel/coreos-firmware/coreos-firmware-20181001.ebuild b/sdk_container/src/third_party/coreos-overlay/sys-kernel/coreos-firmware/coreos-firmware-20191022.ebuild similarity index 100% rename from sdk_container/src/third_party/coreos-overlay/sys-kernel/coreos-firmware/coreos-firmware-20181001.ebuild rename to sdk_container/src/third_party/coreos-overlay/sys-kernel/coreos-firmware/coreos-firmware-20191022.ebuild diff --git a/sdk_container/src/third_party/coreos-overlay/sys-kernel/coreos-firmware/coreos-firmware-99999999.ebuild b/sdk_container/src/third_party/coreos-overlay/sys-kernel/coreos-firmware/coreos-firmware-99999999.ebuild index db62bbb2b8..f64c6fd2a8 100644 --- a/sdk_container/src/third_party/coreos-overlay/sys-kernel/coreos-firmware/coreos-firmware-99999999.ebuild +++ b/sdk_container/src/third_party/coreos-overlay/sys-kernel/coreos-firmware/coreos-firmware-99999999.ebuild @@ -1,71 +1,72 @@ -# Copyright 1999-2016 Gentoo Foundation +# Copyright 1999-2019 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/sys-kernel/linux-firmware/linux-firmware-99999999.ebuild,v 1.30 2013/09/05 05:46:37 vapier Exp $ -EAPI=5 +EAPI="6" # Tell linux-info where to find the kernel source/build KERNEL_DIR="${SYSROOT}/usr/src/linux" KBUILD_OUTPUT="${SYSROOT}/var/cache/portage/sys-kernel/coreos-kernel" -inherit linux-info +inherit linux-info savedconfig if [[ ${PV} == 99999999* ]]; then - inherit git-2 + inherit git-r3 SRC_URI="" - EGIT_REPO_URI="git://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git" - KEYWORDS="" + EGIT_REPO_URI="https://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git" else - GIT_COMMIT="7c81f23ad903f72e87e2102d8f52408305c0f7a2" + GIT_COMMIT="03dcc2219a339ca826f8966a9005d74dd88c8b26" SRC_URI="https://git.kernel.org/cgit/linux/kernel/git/firmware/linux-firmware.git/snapshot/linux-firmware-${GIT_COMMIT}.tar.gz -> linux-firmware-${PV}.tar.gz" - KEYWORDS="~alpha amd64 ~arm arm64 hppa ia64 ~mips ppc ppc64 ~s390 ~sh ~sparc x86" + 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-1 GPL-2 GPL-3 BSD freedist" -SLOT="0/${PVR}" -IUSE="" +LICENSE="linux-firmware ( BSD ISC MIT no-source-code ) GPL-2 GPL-2+" +SLOT="0" +IUSE="savedconfig" CDEPEND=">=sys-kernel/coreos-modules-4.6.3-r1:=" DEPEND="${CDEPEND} - sys-kernel/coreos-sources" -RDEPEND="${CDEPEND} - !sys-kernel/linux-firmware - !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 + + if use savedconfig; then + restore_config ${PN}.conf + ebegin "Removing all files not listed in config" + + local file delete_file preserved_file preserved_files=() + + 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 + delete_file=true + for preserved_file in "${preserved_files[@]}"; do + if [[ "${file}" == "${preserved_file}" ]]; then + delete_file=false + fi + done + + if ${delete_file}; then + rm "${file}" || die + fi + done < <(find * \( \! -type d -and \! -name ${PN}.conf \) -print0 || die) + + eend || die + + # remove empty directories, bug #396073 + find -type d -empty -delete || die + fi - # Prune empty directories - find -type d -empty -delete || die } src_install() { - if [[ -z "$(find -type f)" ]]; then - die "No firmware files found to install." + if use !savedconfig; then + save_config ${PN}.conf fi - + rm ${PN}.conf || die insinto /lib/firmware/ - doins -r . + 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." }