diff options
author | V3n3RiX <venerix@redcorelinux.org> | 2021-09-03 20:56:28 +0100 |
---|---|---|
committer | V3n3RiX <venerix@redcorelinux.org> | 2021-09-03 20:56:28 +0100 |
commit | fbda87924e6faa7a1919f1a2b4182490bde5ec5c (patch) | |
tree | f3114a4ed212a754756adce027aeef3a4a1a2e2a /sys-kernel/vanilla-kernel | |
parent | 3b08f674e3f771b49370edb144dab0958c8cf721 (diff) |
gentoo resync : 03.09.2021
Diffstat (limited to 'sys-kernel/vanilla-kernel')
-rw-r--r-- | sys-kernel/vanilla-kernel/Manifest | 9 | ||||
-rw-r--r-- | sys-kernel/vanilla-kernel/vanilla-kernel-5.10.62.ebuild | 102 | ||||
-rw-r--r-- | sys-kernel/vanilla-kernel/vanilla-kernel-5.13.14.ebuild | 102 | ||||
-rw-r--r-- | sys-kernel/vanilla-kernel/vanilla-kernel-5.4.144.ebuild | 108 |
4 files changed, 321 insertions, 0 deletions
diff --git a/sys-kernel/vanilla-kernel/Manifest b/sys-kernel/vanilla-kernel/Manifest index dbdbb20e0192..ad88254e1412 100644 --- a/sys-kernel/vanilla-kernel/Manifest +++ b/sys-kernel/vanilla-kernel/Manifest @@ -21,18 +21,27 @@ DIST linux-5.10.60.tar.sign 991 BLAKE2B 9c29c9d981e5f8ca8381a3953ed430117380a155 DIST linux-5.10.60.tar.xz 116406216 BLAKE2B 4b7d3cee0055c03ebbd7c79b1d6a6098f25c2205ab8daa1dd8ac416ff8c16f6026099cb906b61bd93ca5ef2b9fcd958a54c76265f61c439cbe5b75c6e3953345 SHA512 d0cc61498eb762e4f1d7408f721b946e0dccf4748905ba7ec320ad6b91a9042fd2e08a4742a3b3766bc1730152eb7e02a71ce64f935ec32384bd0cc1dade6f93 DIST linux-5.10.61.tar.sign 991 BLAKE2B a5ff9fd5fe3831ae30cd92aa8f92232643fea3b6474e204493af1ace4de910255e8a94988a05274ca7b1342735160dc9ce41a71ce6b168924069f2e7eff843e9 SHA512 0fbf1b1b15ee4d981f0a05d39a3f67a3dcf4d32d61b7bf83d92423bea0ce95e34680130f71f8c12ab738867dc67d7a1f995b79044f0d5fcf87657ae7f2720496 DIST linux-5.10.61.tar.xz 116400968 BLAKE2B 7513b33472fb0f3cbdaea6fbfd094f325303c407ae15f20f724b0ef07d24a82a1931b5f109dd2a8db9bd3fcbd8103535113693a83dada9420671abafd38b9a12 SHA512 1b3123288b82afe9f760fa5fa19c518c6e7c5ac5640659136a0a3277375ae891ebe85fc52f75acc5cec8be5596adc5adc421aa5445eedca485f0ab24f4abfd8e +DIST linux-5.10.62.tar.sign 991 BLAKE2B 2acd78cc1f4c11fa9a0a43f53b75c45ffd9650acb8797f438dff316803ce8b2d5d0fbf98960d9dd21aeac7719ea731e0b598413415abe79d4fd7fdc83ce5b0ea SHA512 8d5384269a82eb2e15dc3cd99bfda2216a318a4bb3e4e4c0c0ff6839f08d8e00c24e63b7869cde2f561d595e9a69f30b2c328b1dd34b678e0ed56a9e12b374a9 +DIST linux-5.10.62.tar.xz 116410608 BLAKE2B 9e01b07ed580e61870f8fa95399a01e8ecd0295173d9b6ebb41f9fef5938d78ff9be572a1ef3590498c8589a9b9a68240208d157d11840e7ba81f4e957ffc83f SHA512 8e0405c183b51e6140c46058bda26da4d31859a9c14b178717c8644fda7172ecdc076b1f82fdcf5b4935e4f33bf266714090a36b73086fae96112d611044e69f DIST linux-5.12.19.tar.sign 991 BLAKE2B 881e8f5df1f9503e7ba58b84351b2e4f0e90b63df2b14577bc65cca76f72c6a97f8ba2bef87c46a9d88a714bcf010f7b706c1bf57a68896390126c5902710a1f SHA512 fafe83c82fb1c7f67bcf8402fe4eb3363087324c7ab11ff15892021737685d945fc2ccefa78088f2645570bd763a6d7d846d7c1ff4f998d9af92f5f3e35cba48 DIST linux-5.12.19.tar.xz 118204168 BLAKE2B 88e4c32cf196662a6a24e72b978019d6f8881a8523918029f4229a995c5fd957a5e01f42de9f53c7980df7e3de5ea6b069cc2c5f93852e615fe8fe78a1b131c6 SHA512 2d010d6d75052083300b1a629dbec25a39f6314a1871ed355133bb59946453915a2265f4ba26e60119ee0d05abb9859c5ee7d8fb8dd816c476ebfdb76d3399ef DIST linux-5.13.13.tar.sign 991 BLAKE2B a5f1e6ccba62297a46d60f8c33539aa04737c131dc98b72d7594597464ef6ae85adbe9a408febb9513413b293bb9601ddf864e8aa8eab34b2183f53216deb6b3 SHA512 c6d7d3e2a35f4d753f9898300cbfe5e250790dc7a12cbcf6968be15d372565a0c2952ebda82ff2870520d6e682a3e7354d726f2ade59549d3b2129857629a67d DIST linux-5.13.13.tar.xz 119340816 BLAKE2B c763adef68a11c42a6e9435522300c5327a9dd3c8b25f1c41e0fdc536e224aac83dbb13d86bb52973304520f1cc28c4c9158baddf6087af54b1e5fbe010be485 SHA512 67c3d0ef8fc378616a318a0d6796acf839dcda4accee3dc815c0f0697694cf178474fe15d98fa9bb7871dfa353aee416212430be5af85bf74647e3968b5c1b71 +DIST linux-5.13.14.tar.sign 991 BLAKE2B 77de1420003ee4102a2efbcde4721ff4c8ac99d6d232590b48ef1ca2feb09f2908bf2610e1dec1b0aa20acb83d0f6d333875c2cba1cfa540df7180fc4164a681 SHA512 9e5b45fba9ebed21de7d12f89925ebf2ded99da2267b08006e03ee714cdb7e3687745bc62a39cf8e0c00d5c2d55b7603192f3d44ca9f892d11962c4cc8b945c2 +DIST linux-5.13.14.tar.xz 119356380 BLAKE2B 5def9187bca9597fbb8097d69f5dad3cf6aa446d6fb86c0e56cfd241fc56175412d5e8f326918368cb62a98f7af6b0f7c2e75f90ab5d84708880cd097baae48b SHA512 1e35c9f9a62f873f12f642596290483e40193fd8926be83b2878b7b29527d19485596334cfef6ef901da5de817407767a5fdcde3a87e7b1178c0a21e7932f9f0 DIST linux-5.4.142.tar.sign 991 BLAKE2B 2d441365323df4e0ed023917a5d9eeff671e29d1afef32813d6ff4cf554a191237e27acc1c1192817007a262bc8e5d8f42d7aa14ff0add7cdbd656fb20cecdcb SHA512 728a40e0cee11d6300ee3b1f13b329496de0d5e31872dc8335169396b077678c8bde4361c5fbdad3e54f8761dca507cea71bf8cbf5ea675c9c8d7b055c073e2c DIST linux-5.4.142.tar.xz 109145144 BLAKE2B 680d4a81fb20005d39dd6d1b512b0e744cc7d6fcdb45e6d67c166d7ca7dff83acd49cb14fa4a38369d77bc91cac0b36190a5b1f042495c40fee9b5e7ecfb2dd2 SHA512 fb9b9f345bb1d46e48adbaac7b12ace50f279451793ac3671b007447d3e38a59d9b9ecbc55866fa2a6850babfcd1ef7528234f2ad73e68845a858b3b7a1d573c DIST linux-5.4.143.tar.sign 991 BLAKE2B 4d2d5f6cd7c78234e074d59a004b1a96f86746a9b692d7acfa8afe6ce5bd40a02c86c7e53d2749c71956b7a5862bb0d4f46b79b1a6211e93028b53728db4b477 SHA512 f8fde6c2b06c3a7ab9b375f90177e1809460514a95bb78c1533bc55df00b80e09c87145b67d5ea336dc3d25fb9406d7b6818695de1ce0ed1ead60fd3df3173a5 DIST linux-5.4.143.tar.xz 109155216 BLAKE2B 721fb9d8fc238c51ce901412187ac33edf7f1aff0b33d9a0d1bf1a706d0bf4f9f07313f5024970b50c42a51f5d24e41ea1f9d729f411ec45970d3d8daf0dbba2 SHA512 f1452d403ab037c665550b68eb74031a88e9039daf0f941b98bdb3fd485110f08248a2a558725238c31aaf384016af8fd26dbd0893f12e3d33602c821ad12ce2 +DIST linux-5.4.144.tar.sign 991 BLAKE2B a577a538c56f1edc19b827bf1030a7f81c60c4f66dbc7834a321187f798b7824bf0b05ba791bfba357672fad2da8df3bf25f590f63e215ae87c2f46620d42de8 SHA512 1b520deb9db27c198b8bb99fc966f7c469ea4ccc667da0b1dbf65af4bb345761075df03ba5c6acbcae71c76285b8d7b6f119fa2f327471d5d141e97090deff4e +DIST linux-5.4.144.tar.xz 109137836 BLAKE2B 2a07e5aededa64ea6db7e2e2c5dc12c86f6b8780444a5f81e744391d17d1f9ea5b1e625cb662c143f307848466a832d1b96c15f598e9395bdf47167914ac8866 SHA512 6dfee1ba2917d602c589fbf23878acecd4daa2b7f078cfb60c110b9c1e41c0a2c2ea5071d76701350abd1674e44cd751abbe4aecbe6022a422aa626c92077f24 EBUILD vanilla-kernel-5.10.60.ebuild 2913 BLAKE2B 73f4bfbc33d65cabaf34762e6512d92a67735abecccebd91170ac7e9d3e925b2c3b127f8d27cb45a729e424c87ca0646668a9566f4f7a9a44724dc53142174b6 SHA512 2628599f32bed1adfc1e5d37883f0601c941ad2757bfd9c5eff839f5f9e0c7b5f3946213ac574f317be0fa8e5f4f17ae519d0ea33cd1680389c907485553e6c2 EBUILD vanilla-kernel-5.10.61.ebuild 2913 BLAKE2B 73f4bfbc33d65cabaf34762e6512d92a67735abecccebd91170ac7e9d3e925b2c3b127f8d27cb45a729e424c87ca0646668a9566f4f7a9a44724dc53142174b6 SHA512 2628599f32bed1adfc1e5d37883f0601c941ad2757bfd9c5eff839f5f9e0c7b5f3946213ac574f317be0fa8e5f4f17ae519d0ea33cd1680389c907485553e6c2 +EBUILD vanilla-kernel-5.10.62.ebuild 2913 BLAKE2B 73f4bfbc33d65cabaf34762e6512d92a67735abecccebd91170ac7e9d3e925b2c3b127f8d27cb45a729e424c87ca0646668a9566f4f7a9a44724dc53142174b6 SHA512 2628599f32bed1adfc1e5d37883f0601c941ad2757bfd9c5eff839f5f9e0c7b5f3946213ac574f317be0fa8e5f4f17ae519d0ea33cd1680389c907485553e6c2 EBUILD vanilla-kernel-5.12.19.ebuild 2912 BLAKE2B d1606ffc26790b5bd830d4e43bd873a6bfe974203474136ef5a61ccdeece3a312af4517e4c06f59597f986dff1d4560727d09f1e2d135e14a27978216ba8ed32 SHA512 a8071db701fd3454c62d2643378d9686026b0b43abcee339493cb5f8c3c7fa2f79d39de573b881d24434e804eda0d5d74ac7f7f5e7402b3cd17883f7557b94f2 EBUILD vanilla-kernel-5.13.13.ebuild 2911 BLAKE2B 3bd4c0c39d864d5f47bb3c1982678cafce6582f058499d37759cf0a7c6b3d9801dba32919336c32e09ae304e2d518471cf8d250c0b5c25e2b02603f8ac9b7f9c SHA512 1771f396d100988ffa05ea691cc1013c185bf75742f9b41aa114a23258855147693bcf383ab382582d6a8976883e887f11be64bf9c273c369c12eac467c6cc24 +EBUILD vanilla-kernel-5.13.14.ebuild 2911 BLAKE2B 3bd4c0c39d864d5f47bb3c1982678cafce6582f058499d37759cf0a7c6b3d9801dba32919336c32e09ae304e2d518471cf8d250c0b5c25e2b02603f8ac9b7f9c SHA512 1771f396d100988ffa05ea691cc1013c185bf75742f9b41aa114a23258855147693bcf383ab382582d6a8976883e887f11be64bf9c273c369c12eac467c6cc24 EBUILD vanilla-kernel-5.4.142.ebuild 3073 BLAKE2B 6038d04284e4343059e7664c466935a0a022da16a8da1c65e0a3077f87374f6aa61b38e1d5af8ab33f3c4c7e9ea5d9d2272f80348e05574d84f7edac1d7fb865 SHA512 8497553ccc9b2961a0b8f4ccf082106d40ebb6bee06658489523eb7670f313cb3a4ee0ad27a99ca113578f784c6d7ec9c63b39ddbc414c74ae2c12a088889e9e EBUILD vanilla-kernel-5.4.143.ebuild 3073 BLAKE2B 6038d04284e4343059e7664c466935a0a022da16a8da1c65e0a3077f87374f6aa61b38e1d5af8ab33f3c4c7e9ea5d9d2272f80348e05574d84f7edac1d7fb865 SHA512 8497553ccc9b2961a0b8f4ccf082106d40ebb6bee06658489523eb7670f313cb3a4ee0ad27a99ca113578f784c6d7ec9c63b39ddbc414c74ae2c12a088889e9e +EBUILD vanilla-kernel-5.4.144.ebuild 3073 BLAKE2B 6038d04284e4343059e7664c466935a0a022da16a8da1c65e0a3077f87374f6aa61b38e1d5af8ab33f3c4c7e9ea5d9d2272f80348e05574d84f7edac1d7fb865 SHA512 8497553ccc9b2961a0b8f4ccf082106d40ebb6bee06658489523eb7670f313cb3a4ee0ad27a99ca113578f784c6d7ec9c63b39ddbc414c74ae2c12a088889e9e MISC metadata.xml 352 BLAKE2B d14768a94b44290d052fa5b86553dc09bdc609c629fc96da7d5314510091484d7f22f2f4b4244fb033046eb949da8fdf6b9535d698ea3323f2da79400454b8d2 SHA512 a7b17e6764a339943b587985b95d828e84a076ceb3c372181794c905f6ce1a5554be69cb55560d823d71d8ea66666bcd5474fec1ead721633477eba31cf1cc8a diff --git a/sys-kernel/vanilla-kernel/vanilla-kernel-5.10.62.ebuild b/sys-kernel/vanilla-kernel/vanilla-kernel-5.10.62.ebuild new file mode 100644 index 000000000000..12c958a4bb2d --- /dev/null +++ b/sys-kernel/vanilla-kernel/vanilla-kernel-5.10.62.ebuild @@ -0,0 +1,102 @@ +# Copyright 2020-2021 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +inherit kernel-build verify-sig + +MY_P=linux-${PV} +# https://koji.fedoraproject.org/koji/packageinfo?packageID=8 +CONFIG_VER=5.10.12 +CONFIG_HASH=836165dd2dff34e4f2c47ca8f9c803002c1e6530 +GENTOO_CONFIG_VER=5.10.32 + +DESCRIPTION="Linux kernel built from vanilla upstream sources" +HOMEPAGE="https://www.kernel.org/" +SRC_URI+=" https://cdn.kernel.org/pub/linux/kernel/v$(ver_cut 1).x/${MY_P}.tar.xz + https://github.com/mgorny/gentoo-kernel-config/archive/v${GENTOO_CONFIG_VER}.tar.gz + -> gentoo-kernel-config-${GENTOO_CONFIG_VER}.tar.gz + verify-sig? ( + https://cdn.kernel.org/pub/linux/kernel/v$(ver_cut 1).x/${MY_P}.tar.sign + ) + amd64? ( + https://src.fedoraproject.org/rpms/kernel/raw/${CONFIG_HASH}/f/kernel-x86_64-fedora.config + -> kernel-x86_64-fedora.config.${CONFIG_VER} + ) + arm64? ( + https://src.fedoraproject.org/rpms/kernel/raw/${CONFIG_HASH}/f/kernel-aarch64-fedora.config + -> kernel-aarch64-fedora.config.${CONFIG_VER} + ) + ppc64? ( + https://src.fedoraproject.org/rpms/kernel/raw/${CONFIG_HASH}/f/kernel-ppc64le-fedora.config + -> kernel-ppc64le-fedora.config.${CONFIG_VER} + ) + x86? ( + https://src.fedoraproject.org/rpms/kernel/raw/${CONFIG_HASH}/f/kernel-i686-fedora.config + -> kernel-i686-fedora.config.${CONFIG_VER} + )" +S=${WORKDIR}/${MY_P} + +LICENSE="GPL-2" +KEYWORDS="~amd64 ~arm ~arm64 ~ppc64 ~x86" +IUSE="debug" +REQUIRED_USE=" + arm? ( savedconfig )" + +RDEPEND=" + !sys-kernel/vanilla-kernel-bin:${SLOT}" +BDEPEND=" + debug? ( dev-util/pahole ) + verify-sig? ( app-crypt/openpgp-keys-kernel )" +PDEPEND=" + >=virtual/dist-kernel-${PV}" + +VERIFY_SIG_OPENPGP_KEY_PATH=${BROOT}/usr/share/openpgp-keys/kernel.org.asc + +src_unpack() { + if use verify-sig; then + einfo "Unpacking linux-${PV}.tar.xz ..." + verify-sig_verify_detached - "${DISTDIR}"/linux-${PV}.tar.sign \ + < <(xz -cd "${DISTDIR}"/linux-${PV}.tar.xz | tee >(tar -x)) + assert "Unpack failed" + unpack "gentoo-kernel-config-${GENTOO_CONFIG_VER}.tar.gz" + else + default + fi +} + +src_prepare() { + default + + # prepare the default config + case ${ARCH} in + amd64) + cp "${DISTDIR}/kernel-x86_64-fedora.config.${CONFIG_VER}" .config || die + ;; + arm) + return + ;; + arm64) + cp "${DISTDIR}/kernel-aarch64-fedora.config.${CONFIG_VER}" .config || die + ;; + ppc64) + cp "${DISTDIR}/kernel-ppc64le-fedora.config.${CONFIG_VER}" .config || die + ;; + x86) + cp "${DISTDIR}/kernel-i686-fedora.config.${CONFIG_VER}" .config || die + ;; + *) + die "Unsupported arch ${ARCH}" + ;; + esac + + echo 'CONFIG_LOCALVERSION="-dist"' > "${T}"/version.config || die + local merge_configs=( + "${T}"/version.config + "${WORKDIR}/gentoo-kernel-config-${GENTOO_CONFIG_VER}"/base.config + ) + use debug || merge_configs+=( + "${WORKDIR}/gentoo-kernel-config-${GENTOO_CONFIG_VER}"/no-debug.config + ) + kernel-build_merge_configs "${merge_configs[@]}" +} diff --git a/sys-kernel/vanilla-kernel/vanilla-kernel-5.13.14.ebuild b/sys-kernel/vanilla-kernel/vanilla-kernel-5.13.14.ebuild new file mode 100644 index 000000000000..c39db41a95ba --- /dev/null +++ b/sys-kernel/vanilla-kernel/vanilla-kernel-5.13.14.ebuild @@ -0,0 +1,102 @@ +# Copyright 2020-2021 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +inherit kernel-build verify-sig + +MY_P=linux-${PV} +# https://koji.fedoraproject.org/koji/packageinfo?packageID=8 +CONFIG_VER=5.13.9 +CONFIG_HASH=eb52b35e8cb097413357b578903bd18eb76051c0 +GENTOO_CONFIG_VER=5.13.4 + +DESCRIPTION="Linux kernel built from vanilla upstream sources" +HOMEPAGE="https://www.kernel.org/" +SRC_URI+=" https://cdn.kernel.org/pub/linux/kernel/v$(ver_cut 1).x/${MY_P}.tar.xz + https://github.com/mgorny/gentoo-kernel-config/archive/v${GENTOO_CONFIG_VER}.tar.gz + -> gentoo-kernel-config-${GENTOO_CONFIG_VER}.tar.gz + verify-sig? ( + https://cdn.kernel.org/pub/linux/kernel/v$(ver_cut 1).x/${MY_P}.tar.sign + ) + amd64? ( + https://src.fedoraproject.org/rpms/kernel/raw/${CONFIG_HASH}/f/kernel-x86_64-fedora.config + -> kernel-x86_64-fedora.config.${CONFIG_VER} + ) + arm64? ( + https://src.fedoraproject.org/rpms/kernel/raw/${CONFIG_HASH}/f/kernel-aarch64-fedora.config + -> kernel-aarch64-fedora.config.${CONFIG_VER} + ) + ppc64? ( + https://src.fedoraproject.org/rpms/kernel/raw/${CONFIG_HASH}/f/kernel-ppc64le-fedora.config + -> kernel-ppc64le-fedora.config.${CONFIG_VER} + ) + x86? ( + https://src.fedoraproject.org/rpms/kernel/raw/${CONFIG_HASH}/f/kernel-i686-fedora.config + -> kernel-i686-fedora.config.${CONFIG_VER} + )" +S=${WORKDIR}/${MY_P} + +LICENSE="GPL-2" +KEYWORDS="~amd64 ~arm ~arm64 ~ppc64 ~x86" +IUSE="debug" +REQUIRED_USE=" + arm? ( savedconfig )" + +RDEPEND=" + !sys-kernel/vanilla-kernel-bin:${SLOT}" +BDEPEND=" + debug? ( dev-util/pahole ) + verify-sig? ( app-crypt/openpgp-keys-kernel )" +PDEPEND=" + >=virtual/dist-kernel-${PV}" + +VERIFY_SIG_OPENPGP_KEY_PATH=${BROOT}/usr/share/openpgp-keys/kernel.org.asc + +src_unpack() { + if use verify-sig; then + einfo "Unpacking linux-${PV}.tar.xz ..." + verify-sig_verify_detached - "${DISTDIR}"/linux-${PV}.tar.sign \ + < <(xz -cd "${DISTDIR}"/linux-${PV}.tar.xz | tee >(tar -x)) + assert "Unpack failed" + unpack "gentoo-kernel-config-${GENTOO_CONFIG_VER}.tar.gz" + else + default + fi +} + +src_prepare() { + default + + # prepare the default config + case ${ARCH} in + amd64) + cp "${DISTDIR}/kernel-x86_64-fedora.config.${CONFIG_VER}" .config || die + ;; + arm) + return + ;; + arm64) + cp "${DISTDIR}/kernel-aarch64-fedora.config.${CONFIG_VER}" .config || die + ;; + ppc64) + cp "${DISTDIR}/kernel-ppc64le-fedora.config.${CONFIG_VER}" .config || die + ;; + x86) + cp "${DISTDIR}/kernel-i686-fedora.config.${CONFIG_VER}" .config || die + ;; + *) + die "Unsupported arch ${ARCH}" + ;; + esac + + echo 'CONFIG_LOCALVERSION="-dist"' > "${T}"/version.config || die + local merge_configs=( + "${T}"/version.config + "${WORKDIR}/gentoo-kernel-config-${GENTOO_CONFIG_VER}"/base.config + ) + use debug || merge_configs+=( + "${WORKDIR}/gentoo-kernel-config-${GENTOO_CONFIG_VER}"/no-debug.config + ) + kernel-build_merge_configs "${merge_configs[@]}" +} diff --git a/sys-kernel/vanilla-kernel/vanilla-kernel-5.4.144.ebuild b/sys-kernel/vanilla-kernel/vanilla-kernel-5.4.144.ebuild new file mode 100644 index 000000000000..dc33930084ad --- /dev/null +++ b/sys-kernel/vanilla-kernel/vanilla-kernel-5.4.144.ebuild @@ -0,0 +1,108 @@ +# Copyright 2020-2021 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +inherit kernel-build verify-sig + +MY_P=linux-${PV} +# https://koji.fedoraproject.org/koji/packageinfo?packageID=8 +CONFIG_VER=5.4.21 +CONFIG_HASH=2809b7faa6a8cb232cd825096c146b7bdc1e08ea +GENTOO_CONFIG_VER=5.4.114 + +DESCRIPTION="Linux kernel built from vanilla upstream sources" +HOMEPAGE="https://www.kernel.org/" +SRC_URI+=" https://cdn.kernel.org/pub/linux/kernel/v$(ver_cut 1).x/${MY_P}.tar.xz + https://github.com/mgorny/gentoo-kernel-config/archive/v${GENTOO_CONFIG_VER}.tar.gz + -> gentoo-kernel-config-${GENTOO_CONFIG_VER}.tar.gz + verify-sig? ( + https://cdn.kernel.org/pub/linux/kernel/v$(ver_cut 1).x/${MY_P}.tar.sign + ) + amd64? ( + https://src.fedoraproject.org/rpms/kernel/raw/${CONFIG_HASH}/f/kernel-x86_64.config + -> kernel-x86_64.config.${CONFIG_VER} + ) + arm64? ( + https://src.fedoraproject.org/rpms/kernel/raw/${CONFIG_HASH}/f/kernel-aarch64.config + -> kernel-aarch64.config.${CONFIG_VER} + ) + ppc64? ( + https://src.fedoraproject.org/rpms/kernel/raw/${CONFIG_HASH}/f/kernel-ppc64le.config + -> kernel-ppc64le.config.${CONFIG_VER} + ) + x86? ( + https://src.fedoraproject.org/rpms/kernel/raw/${CONFIG_HASH}/f/kernel-i686.config + -> kernel-i686.config.${CONFIG_VER} + )" +S=${WORKDIR}/${MY_P} + +LICENSE="GPL-2" +KEYWORDS="~amd64 ~arm64 ~x86" +IUSE="debug" + +RDEPEND=" + !sys-kernel/vanilla-kernel-bin:${SLOT}" +BDEPEND=" + debug? ( dev-util/pahole ) + verify-sig? ( app-crypt/openpgp-keys-kernel )" +PDEPEND=" + >=virtual/dist-kernel-${PV}" + +VERIFY_SIG_OPENPGP_KEY_PATH=${BROOT}/usr/share/openpgp-keys/kernel.org.asc + +pkg_pretend() { + ewarn "Starting with 5.4.52, Distribution Kernels are switching from Arch" + ewarn "Linux configs to Fedora. Please keep a backup kernel just in case." + + kernel-install_pkg_pretend +} + +src_unpack() { + if use verify-sig; then + einfo "Unpacking linux-${PV}.tar.xz ..." + verify-sig_verify_detached - "${DISTDIR}"/linux-${PV}.tar.sign \ + < <(xz -cd "${DISTDIR}"/linux-${PV}.tar.xz | tee >(tar -x)) + assert "Unpack failed" + unpack "gentoo-kernel-config-${GENTOO_CONFIG_VER}.tar.gz" + else + default + fi +} + +src_prepare() { + default + + # prepare the default config + case ${ARCH} in + amd64) + cp "${DISTDIR}/kernel-x86_64.config.${CONFIG_VER}" .config || die + ;; + arm64) + cp "${DISTDIR}/kernel-aarch64.config.${CONFIG_VER}" .config || die + ;; + ppc64) + cp "${DISTDIR}/kernel-ppc64le.config.${CONFIG_VER}" .config || die + ;; + x86) + cp "${DISTDIR}/kernel-i686.config.${CONFIG_VER}" .config || die + ;; + *) + die "Unsupported arch ${ARCH}" + ;; + esac + + echo 'CONFIG_LOCALVERSION="-dist"' > "${T}"/version.config || die + local merge_configs=( + "${T}"/version.config + "${WORKDIR}/gentoo-kernel-config-${GENTOO_CONFIG_VER}"/base.config + ) + use debug || merge_configs+=( + "${WORKDIR}/gentoo-kernel-config-${GENTOO_CONFIG_VER}"/no-debug.config + ) + [[ ${ARCH} == x86 ]] && merge_configs+=( + "${WORKDIR}/gentoo-kernel-config-${GENTOO_CONFIG_VER}"/32-bit.config + ) + + kernel-build_merge_configs "${merge_configs[@]}" +} |