diff options
author | V3n3RiX <venerix@redcorelinux.org> | 2021-07-28 10:27:13 +0100 |
---|---|---|
committer | V3n3RiX <venerix@redcorelinux.org> | 2021-07-28 10:27:13 +0100 |
commit | f4fc10428424904caf2035cffc442195cb088b2c (patch) | |
tree | 72f320d5963e55586cfdeed2b14c72b8191b6327 /sys-kernel/gentoo-kernel | |
parent | fbd9734cedfe790955100b8e4ab3613457d77b1a (diff) |
gentoo resync : 28.07.2021
Diffstat (limited to 'sys-kernel/gentoo-kernel')
-rw-r--r-- | sys-kernel/gentoo-kernel/Manifest | 10 | ||||
-rw-r--r-- | sys-kernel/gentoo-kernel/files/5.10.47-ppc64-kvm.patch | 56 | ||||
-rw-r--r-- | sys-kernel/gentoo-kernel/gentoo-kernel-5.10.53.ebuild | 105 | ||||
-rw-r--r-- | sys-kernel/gentoo-kernel/gentoo-kernel-5.13.5.ebuild | 105 | ||||
-rw-r--r-- | sys-kernel/gentoo-kernel/gentoo-kernel-5.4.135.ebuild | 97 |
5 files changed, 316 insertions, 57 deletions
diff --git a/sys-kernel/gentoo-kernel/Manifest b/sys-kernel/gentoo-kernel/Manifest index 680ae716a0bd..3f94065a6b8c 100644 --- a/sys-kernel/gentoo-kernel/Manifest +++ b/sys-kernel/gentoo-kernel/Manifest @@ -1,12 +1,17 @@ -AUX 5.10.47-ppc64-kvm.patch 2365 BLAKE2B 4932dc893c372de7059f14ce0e1c0c3b33e21dbfa9f743411e6a5186e430ff75d62610ab0de2c0061dbe0e103609fba2e5c76bf7e7f34b5346db3f12439dd835 SHA512 a8d95435437aade216fe9fcde894fc5e632a0f5089eb73a083e6d3638dda20f746509c0df808f58d4de3ab909a3d5cb349a45ba182e6e62bcbcdc858c60a517a DIST genpatches-5.10-58.base.tar.xz 1910208 BLAKE2B 3f385e4cae808101f092a1ebf72dc9cf1bcc94ed8bdca8a4772afd0c32cb1424f96fee2e59ab7605b588e64d162e46aae2918b7916bded019f97f637292853ee SHA512 be328dd7212c5a0e009ba95d45c716912d96743f3ae5e2e5e1daabc252f1e151043abe21f61ef90fc4f23d4e164b6ebe2d289abfc1470daf1a33a1564dbe7b06 DIST genpatches-5.10-58.extras.tar.xz 3420 BLAKE2B 81c42396369ce4e26d2a1574067d251b9013bd012f052e3e35ecaa1953e3d81cb9e398eb9521d191a4197ad2a81780d49059fd7abb9774e886d6d10b6b6831d3 SHA512 79afef40259c8ab2cfa957bdb56666e9ff691ff68362ad95482129e7037fc0659185923ec87ac97d217f5d2956e2be7189077ddf38844fa6c7ced4f0f6f58870 +DIST genpatches-5.10-59.base.tar.xz 1936172 BLAKE2B 86a6133afb3ebd00dd706cee9b99b6b1547ed3eabf92e43348917c06cabc9d2960b5293d5f414bc4a44e55f03eb40f83b344d65e8824f6f842450bd35a3317d1 SHA512 5c0b7f7ab5c7beb1a868235ae4fcb57726b46e7877018b09f1b025f153605d20a6017f36617bb182e41618e889e4f40e190a514bcdac37ad8811fc6884c4459f +DIST genpatches-5.10-59.extras.tar.xz 3420 BLAKE2B cf603ca226a8edd2254b4c874e6b5a211b2f6071267428a434e5e5f18c884898de396c16b826d9f0eb0ef35fd0dda383126d99e37227b936a13b0900587ff617 SHA512 0398f8468fd61e495fdb7c350e5a35eb1756bd2da9a0967c816f434e639345ceaeb50786a24241f5f1616a401289764174693bdd2c785cc9cdc00e76e598841c DIST genpatches-5.12-22.base.tar.xz 1085632 BLAKE2B 328a25218394a93755d29335f0a827faaad2fc823bb25bf8ef36385eaf8b30427c4075bc0074969fe0923a975d88d7573fda0b8e1288e787f03afc6cc77d25ac SHA512 08a71f09955c92bd92f4c67a018349a9b1d7ac5e1dad7efa3f1cdd2968a4c82042308613069e5bb65a0c38f19d05db5a0ff25d17726809cf12ba018fff5bf564 DIST genpatches-5.12-22.extras.tar.xz 3420 BLAKE2B 61d7d8bf8c88a1f0ee16efd07dca0fcb82a48574dcf545421e5e8302128acd5e28fbcadc4d1a82f0b2049491988691e3f8b85c99d50ec1c81a4a4549c96b9651 SHA512 20a505a8247ba33f8c0c201b809b22073ec589f4d83b1089c6787afbe42760443a964fd12fbe2dc6ec778c6d3067db04d93ec098551ff9ed6e5030d5830fce9e DIST genpatches-5.13-6.base.tar.xz 447968 BLAKE2B afcec75958e44f3ef7da0b2ab3e2a3d9574fbacac23d028335ce241838e36355d813fb89944ab4ed45153f5317997f18e153514f877bee6a490969b75242c043 SHA512 05afae24abbd06771ecc88b8bd93e765e7c41e9ea6826510d291cb8b10387be747ac7738e3df8cbef1d7488c96fd3fcba1138a7cbe9dc7348a76b5df51c95a74 DIST genpatches-5.13-6.extras.tar.xz 3420 BLAKE2B 9ad0d2bf1b2621b328d142cd464b6de2676c8a4f0caef8ee4c5d7fa60db56d73b9056917e07ca421b02e6de1564b3d5f900299721b6b412cb145efa9bea8d60c SHA512 a7906d25d02082217bec37c435b316880e1af9922018b88569cdb4cf8c2cf5fd789bdac946100f2b1a9e0e2125a69222fc853ab1496abdd30ca00497afcb8fd8 +DIST genpatches-5.13-7.base.tar.xz 481660 BLAKE2B 810b5438e39c8928ec2aca11658cba78666e3384deda7f7ae3c21ed9987fc94b8b1d0c1b802ea454978a226fb6ddc13295097a284d84c95afc060fdbad09b9b8 SHA512 237189cd9f09bf1e83f83f27ea47306881f560fca9a96ce58185bd0dde707a0c46103889bbf798742d9eff9e2c0708c08b27698e659ad1b679d07f0ebcecb061 +DIST genpatches-5.13-7.extras.tar.xz 3420 BLAKE2B 431ffe1f40ef695161540131b2abefb5d3bb993d48dbab6224f6e3afcdeb8e618b3b8258dc3ec170a2f53830591f7363bcf8a21b0743f04cee4ba5af294d8cca SHA512 dd7f5488203f98395b0de62772e353907f11bdb23ef92d049ba785e5ab5be23d066bac4dc5763226057f0ce5fa957417c0435220e4702f5bc4d66c412124a04d DIST genpatches-5.4-138.base.tar.xz 3760008 BLAKE2B 085dc9525a78dfea4efa6541332c8cc16bc6c5dfbbdcbf1efe307acfe129ebca80d53bb9063d4c9f052a3909c47a094f31f2e9fb487ffb0e014eb7cd6fa8bcfa SHA512 96ccc0c5a7d223c444f7d5c7990a4a5c14de2eb1e8d44c3edfa8526a3c872ca38d0b3cf87aa65f3cd14cdfbc52573831993f0ad0c9531659108aea36c31f7089 DIST genpatches-5.4-138.extras.tar.xz 1772 BLAKE2B f152fe554bc3a855234d9fccbd7e60003a8933a4ac5d13764d84a2c5a03e93cae7f231e1c7b50a891d9978f3aa151bb8d7c2f4166e3a1ca9feb76614514632c5 SHA512 a2f4bb291f0a4dd061251bcba3ea2fb3f48f84c53c05ab851ac8ec588dcc931a6f0f72447e1ca91950a7881247e396d825176020de0273b35ebf7770b0a07471 +DIST genpatches-5.4-139.base.tar.xz 3773732 BLAKE2B f2eaec4646c9391c5683421d702fd11c4feeac38d37f05d4dfc2b21702c9d768d9df769a8330cddbba609e92baefe62b008a2289cb31e48cac9ca4662a6b761a SHA512 65e3d44fd4ed2d3c97ddde80feee75c19b63f103fd0fd80124a1c2ca95c2655061ef76d2b576e6357cb26a05c452f8f2ffd3303d9cdbdacac89337e736793492 +DIST genpatches-5.4-139.extras.tar.xz 1772 BLAKE2B 9425c6acb177b034c23e119269646ee24c07c5ba89bf641afa3434c50c555b25b936e08f7b6d6513330a7b1cec2a8496243ea79e0f02d6dc47ddd6dbf3e53ddd SHA512 577b9bd1603877024ec30cbd1dbf3283a8292cb3adb4b4cc008dcc373e258a99ed7ce3e5548a8a2e6c4d2412d1b86b578613578102c08ef91af2fb3a1727cac8 DIST gentoo-kernel-config-5.10.42.tar.gz 3992 BLAKE2B b04f585ccc823c25baafea011a5df9e4ed79f5537fb0c47726bb54d3f6197627b078a6f8510707a68edd9308f7ede84ca3f9bff78e64e06c9ea3d53db496c10f SHA512 5d42e1ac694441acb8ea13fa3e80615bd18f0932a37f50c3d34c8c2f95ef4dfa6541407ddcad802b4fb13468e0e85d8cd09ac37d3612260f9a81d081cb4b6713 DIST gentoo-kernel-config-5.13.4.tar.gz 4024 BLAKE2B 9b4e3205c356c791768b9de09057b55499519af5551165040c5ad50bd85b2886e34a9f8dfeea08c6a2113b903341c2bed897bc2615913cdfe3d13434d7be6f48 SHA512 55d9f2c72d164f81aede7ce5b2c703f8a426ad0a1a3323c0a304c9f07ed86aa06949ba2f42da115b977b810886a47a0126eda96ade853970a951c301eee5e12c DIST gentoo-kernel-config-5.4.114.tar.gz 1298 BLAKE2B e494041cd63ba53f055cfd555e359934d5054238bd096addd7965754e6708bada63398c4b315318f73130ed81c1391524388396775632248870721f1ce23f203 SHA512 225600db53532ee131dd83d10cecc97a83f4615975ff32f3f6190a15eace64707cb59490bb42940e4429f9054221b9d9a589ada443922062bb5ee18ecc42c26c @@ -31,7 +36,10 @@ DIST linux-5.12.tar.xz 118112412 BLAKE2B 842d921b9a73d2aaade763dbd2ec67bdfe0275b DIST linux-5.13.tar.xz 119297284 BLAKE2B 9c4c12e2394dec064adff51f7ccdf389192eb27ba7906db5eda543afe3d04afca6b9ea0848a057571bf2534eeb98e1e3a67734deff82c0d3731be205ad995668 SHA512 a8edf97e9d38a49f1be2bde1e29ad96274bb2c6f7e8a2bebaa1161dd4df9cabcbaec4ff644c45bee94f86ae47725087d6deed0cd954209cec717621d137db85e DIST linux-5.4.tar.xz 109441440 BLAKE2B 193bc4a3147e147d5529956164ec4912fad5d5c6fb07f909ff1056e57235834173194afc686993ccd785c1ff15804de0961b625f3008cca0e27493efc8f27b13 SHA512 9f60f77e8ab972b9438ac648bed17551c8491d6585a5e85f694b2eaa4c623fbc61eb18419b2656b6795eac5deec0edaa04547fc6723fbda52256bd7f3486898f EBUILD gentoo-kernel-5.10.52.ebuild 3109 BLAKE2B e15cfaa865253cf75ee6f462e61e15efdd223f3d2d637129120fbf0be1336e036047544a6451ee953c934a0cf51a796ca0483b1ebe67953491848ee19b5f92aa SHA512 7db37241c9919432c31cfe8fa644f48a8aeb16e5e2a04b38c163c7628c8dd85db3e4c2b5afdc8de0ed1a94d77ae31f22ba3a08c1a8fc5e84e74232d26d47e00b +EBUILD gentoo-kernel-5.10.53.ebuild 3115 BLAKE2B 5c1a0b136cbcfa49036153ad7dacbe9d365ed5fcd1d3b481ae48bf0afaa40f9016e5f0fbfd7425aa4a4de0ab4a03cce825669ef878bdaaebb0f6669f445b0ad6 SHA512 6937e12ea7750e73b6e4b8627cc9a06a64dfd02a35bf84ca99c5a0d69acf0c27e322cc4c52345c1b64bf4b6f0390253800936ae012e5b25416a0056658cbe4b2 EBUILD gentoo-kernel-5.12.19.ebuild 3112 BLAKE2B ba1162989a26898748ff8c46f5bd36b6d21de3db498c2017835fc20b874a1ff94171e7917a1f4fa27e20569b05217478a45371224b5e5fb2c0ea88061d1e9533 SHA512 5e2fe2a48dc9c4615e0eddb044bd09b94e29a68afdf36272ab547251649480bf011e9a52a6df4f607c99a4b8eb3af068ef1301a3da26d0bd7cd28e9b45eedcb7 EBUILD gentoo-kernel-5.13.4.ebuild 3111 BLAKE2B 3859cb3c0ec0f218941b11f20e5239715555dd5cba9faff8c8f53608a27c2f727a11df7ef70e0289dbd6dd0cf8ede9b2b3b1f60f81292704b0375c456da7cfee SHA512 81fa1c65dc0a31e03499242e71c74970aa181f86e7ec3701a95841e25b6e4a7f4262b445b39888cb8383e1b2083dddc855e6d29754f80066ac7c983c75f94d7c +EBUILD gentoo-kernel-5.13.5.ebuild 3113 BLAKE2B 08f3fb03832666b3a2f78870d8ea06be028b7c1dc16ae748d2fd8d139a46adcfc94341910704ae6bc2a7c6e281756c12469081023c613c6be1e620aeab017ada SHA512 96b1d119094e62370e57c7b82d9d8c68f239779683fa6837fa68600b7fd981fa83366372416734f91ffdab4d30f93e9fafc1fa5b110725df983420b7c8871e63 EBUILD gentoo-kernel-5.4.134.ebuild 2816 BLAKE2B d309bcad3bdb461a42844e76b61e76b6a2cc935af6e2c2623126b2e121532e84bd28ebc067beac0fc5259f67a9be36869e7e7c1bdbcbff15674f6760d98c153c SHA512 a75e9374a0cb22935c56aa2050a8b8e3f8e30377807e25bf99bf6cd2c28f703caa25dd1b7a132151745f0c910d412b2e6959bead16ccf1051578e4995e1875d9 +EBUILD gentoo-kernel-5.4.135.ebuild 2822 BLAKE2B 76974c004fc0c42ef221117340bd1c0557a695343ad16e396007bc204f84d870ed2d213ea773070c792319f65fdc736341aeaf64166cbda0bc4207060ea52987 SHA512 a15f2991722cf4be0d321bfdce67d84c92d244b509cfd48c6e02cc0bd8722fba3af6a8ad7ca696a856f1e5ec70543b786f0db4a99f3f74db3666509bf1c5324b MISC metadata.xml 464 BLAKE2B 8f1b0ec7ef58c31bba668cd26cb39bdd0e676c22fc9def7802ea02c6fdaa32ca2d129519c51dcf7a6711ff2f5e22b3e8fa10ed5667b129f9be698bf828644c98 SHA512 2b01cf5cd40c16da8bfe767614ec47c8b95ed915a9cf3208276dbd75c9e7c065cc43c036d0e141433b6d19c2cee88fc8ae344ed596d8c1caa31c05e722373a06 diff --git a/sys-kernel/gentoo-kernel/files/5.10.47-ppc64-kvm.patch b/sys-kernel/gentoo-kernel/files/5.10.47-ppc64-kvm.patch deleted file mode 100644 index 59a7c7e75814..000000000000 --- a/sys-kernel/gentoo-kernel/files/5.10.47-ppc64-kvm.patch +++ /dev/null @@ -1,56 +0,0 @@ -From 25edcc50d76c834479d11fcc7de46f3da4d95121 Mon Sep 17 00:00:00 2001 -From: Fabiano Rosas <farosas@linux.ibm.com> -Date: Thu, 4 Feb 2021 17:05:17 -0300 -Subject: [PATCH] KVM: PPC: Book3S HV: Save and restore FSCR in the P9 path - -The Facility Status and Control Register is a privileged SPR that -defines the availability of some features in problem state. Since it -can be written by the guest, we must restore it to the previous host -value after guest exit. - -This restoration is currently done by taking the value from -current->thread.fscr, which in the P9 path is not enough anymore -because the guest could context switch the QEMU thread, causing the -guest-current value to be saved into the thread struct. - -The above situation manifested when running a QEMU linked against a -libc with System Call Vectored support, which causes scv -instructions to be run by QEMU early during the guest boot (during -SLOF), at which point the FSCR is 0 due to guest entry. After a few -scv calls (1 to a couple hundred), the context switching happens and -the QEMU thread runs with the guest value, resulting in a Facility -Unavailable interrupt. - -This patch saves and restores the host value of FSCR in the inner -guest entry loop in a way independent of current->thread.fscr. The old -way of doing it is still kept in place because it works for the old -entry path. - -Signed-off-by: Fabiano Rosas <farosas@linux.ibm.com> -Signed-off-by: Paul Mackerras <paulus@ozlabs.org> ---- - arch/powerpc/kvm/book3s_hv.c | 4 ++++ - 1 file changed, 4 insertions(+) - -diff --git a/arch/powerpc/kvm/book3s_hv.c b/arch/powerpc/kvm/book3s_hv.c -index 89c686c17f0606..f6d470157fcb62 100644 ---- a/arch/powerpc/kvm/book3s_hv.c -+++ b/arch/powerpc/kvm/book3s_hv.c -@@ -3611,6 +3611,7 @@ static int kvmhv_p9_guest_entry(struct kvm_vcpu *vcpu, u64 time_limit, - unsigned long host_tidr = mfspr(SPRN_TIDR); - unsigned long host_iamr = mfspr(SPRN_IAMR); - unsigned long host_amr = mfspr(SPRN_AMR); -+ unsigned long host_fscr = mfspr(SPRN_FSCR); - s64 dec; - u64 tb; - int trap, save_pmu; -@@ -3751,6 +3752,9 @@ static int kvmhv_p9_guest_entry(struct kvm_vcpu *vcpu, u64 time_limit, - if (host_amr != vcpu->arch.amr) - mtspr(SPRN_AMR, host_amr); - -+ if (host_fscr != vcpu->arch.fscr) -+ mtspr(SPRN_FSCR, host_fscr); -+ - msr_check_and_set(MSR_FP | MSR_VEC | MSR_VSX); - store_fp_state(&vcpu->arch.fp); - #ifdef CONFIG_ALTIVEC diff --git a/sys-kernel/gentoo-kernel/gentoo-kernel-5.10.53.ebuild b/sys-kernel/gentoo-kernel/gentoo-kernel-5.10.53.ebuild new file mode 100644 index 000000000000..660215fc8655 --- /dev/null +++ b/sys-kernel/gentoo-kernel/gentoo-kernel-5.10.53.ebuild @@ -0,0 +1,105 @@ +# Copyright 2020-2021 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +inherit kernel-build + +MY_P=linux-${PV%.*} +GENPATCHES_P=genpatches-${PV%.*}-$(( ${PV##*.} + 6 )) +# https://koji.fedoraproject.org/koji/packageinfo?packageID=8 +CONFIG_VER=5.10.12 +CONFIG_HASH=836165dd2dff34e4f2c47ca8f9c803002c1e6530 +GENTOO_CONFIG_VER=5.10.42 + +DESCRIPTION="Linux kernel built with Gentoo patches" +HOMEPAGE="https://www.kernel.org/" +SRC_URI+=" https://cdn.kernel.org/pub/linux/kernel/v$(ver_cut 1).x/${MY_P}.tar.xz + https://dev.gentoo.org/~mpagano/dist/genpatches/${GENPATCHES_P}.base.tar.xz + https://dev.gentoo.org/~mpagano/dist/genpatches/${GENPATCHES_P}.extras.tar.xz + https://github.com/mgorny/gentoo-kernel-config/archive/v${GENTOO_CONFIG_VER}.tar.gz + -> gentoo-kernel-config-${GENTOO_CONFIG_VER}.tar.gz + 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 hardened" +REQUIRED_USE="arm? ( savedconfig )" + +RDEPEND=" + !sys-kernel/gentoo-kernel-bin:${SLOT}" +BDEPEND=" + debug? ( dev-util/pahole )" +PDEPEND=" + >=virtual/dist-kernel-${PV}" + +QA_FLAGS_IGNORED="usr/src/linux-.*/scripts/gcc-plugins/.*.so" + +src_prepare() { + local PATCHES=( + # meh, genpatches have no directory + "${WORKDIR}"/*.patch + ) + 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 + + local myversion="-gentoo-dist" + use hardened && myversion+="-hardened" + echo "CONFIG_LOCALVERSION=\"${myversion}\"" > "${T}"/version.config || die + local dist_conf_path="${WORKDIR}/gentoo-kernel-config-${GENTOO_CONFIG_VER}" + + local merge_configs=( + "${T}"/version.config + "${dist_conf_path}"/base.config + ) + use debug || merge_configs+=( + "${dist_conf_path}"/no-debug.config + ) + if use hardened; then + merge_configs+=( "${dist_conf_path}"/hardened-base.config ) + + tc-is-gcc && merge_configs+=( "${dist_conf_path}"/hardened-gcc-plugins.config ) + + if [[ -f "${dist_conf_path}/hardened-${ARCH}.config" ]]; then + merge_configs+=( "${dist_conf_path}/hardened-${ARCH}.config" ) + fi + fi + kernel-build_merge_configs "${merge_configs[@]}" +} diff --git a/sys-kernel/gentoo-kernel/gentoo-kernel-5.13.5.ebuild b/sys-kernel/gentoo-kernel/gentoo-kernel-5.13.5.ebuild new file mode 100644 index 000000000000..973b0f5eb16b --- /dev/null +++ b/sys-kernel/gentoo-kernel/gentoo-kernel-5.13.5.ebuild @@ -0,0 +1,105 @@ +# Copyright 2020-2021 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +inherit kernel-build + +MY_P=linux-${PV%.*} +GENPATCHES_P=genpatches-${PV%.*}-$(( ${PV##*.} + 2 )) +# https://koji.fedoraproject.org/koji/packageinfo?packageID=8 +CONFIG_VER=5.13.4 +CONFIG_HASH=a219e71ba368d65c1ede4fa6a79a17e70815440c +GENTOO_CONFIG_VER=5.13.4 + +DESCRIPTION="Linux kernel built with Gentoo patches" +HOMEPAGE="https://www.kernel.org/" +SRC_URI+=" https://cdn.kernel.org/pub/linux/kernel/v$(ver_cut 1).x/${MY_P}.tar.xz + https://dev.gentoo.org/~mpagano/dist/genpatches/${GENPATCHES_P}.base.tar.xz + https://dev.gentoo.org/~mpagano/dist/genpatches/${GENPATCHES_P}.extras.tar.xz + https://github.com/mgorny/gentoo-kernel-config/archive/v${GENTOO_CONFIG_VER}.tar.gz + -> gentoo-kernel-config-${GENTOO_CONFIG_VER}.tar.gz + 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 hardened" +REQUIRED_USE="arm? ( savedconfig )" + +RDEPEND=" + !sys-kernel/gentoo-kernel-bin:${SLOT}" +BDEPEND=" + debug? ( dev-util/pahole )" +PDEPEND=" + >=virtual/dist-kernel-${PV}" + +QA_FLAGS_IGNORED="usr/src/linux-.*/scripts/gcc-plugins/.*.so" + +src_prepare() { + local PATCHES=( + # meh, genpatches have no directory + "${WORKDIR}"/*.patch + ) + 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 + + local myversion="-gentoo-dist" + use hardened && myversion+="-hardened" + echo "CONFIG_LOCALVERSION=\"${myversion}\"" > "${T}"/version.config || die + local dist_conf_path="${WORKDIR}/gentoo-kernel-config-${GENTOO_CONFIG_VER}" + + local merge_configs=( + "${T}"/version.config + "${dist_conf_path}"/base.config + ) + use debug || merge_configs+=( + "${dist_conf_path}"/no-debug.config + ) + if use hardened; then + merge_configs+=( "${dist_conf_path}"/hardened-base.config ) + + tc-is-gcc && merge_configs+=( "${dist_conf_path}"/hardened-gcc-plugins.config ) + + if [[ -f "${dist_conf_path}/hardened-${ARCH}.config" ]]; then + merge_configs+=( "${dist_conf_path}/hardened-${ARCH}.config" ) + fi + fi + kernel-build_merge_configs "${merge_configs[@]}" +} diff --git a/sys-kernel/gentoo-kernel/gentoo-kernel-5.4.135.ebuild b/sys-kernel/gentoo-kernel/gentoo-kernel-5.4.135.ebuild new file mode 100644 index 000000000000..1bf22439675a --- /dev/null +++ b/sys-kernel/gentoo-kernel/gentoo-kernel-5.4.135.ebuild @@ -0,0 +1,97 @@ +# Copyright 2020-2021 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +inherit kernel-build + +MY_P=linux-${PV%.*} +GENPATCHES_P=genpatches-${PV%.*}-$(( ${PV##*.} + 4 )) +# 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 with Gentoo patches" +HOMEPAGE="https://www.kernel.org/" +SRC_URI+=" https://cdn.kernel.org/pub/linux/kernel/v$(ver_cut 1).x/${MY_P}.tar.xz + https://dev.gentoo.org/~mpagano/dist/genpatches/${GENPATCHES_P}.base.tar.xz + https://dev.gentoo.org/~mpagano/dist/genpatches/${GENPATCHES_P}.extras.tar.xz + https://github.com/mgorny/gentoo-kernel-config/archive/v${GENTOO_CONFIG_VER}.tar.gz + -> gentoo-kernel-config-${GENTOO_CONFIG_VER}.tar.gz + 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 ~ppc64 ~x86" +IUSE="debug" + +RDEPEND=" + !sys-kernel/gentoo-kernel-bin:${SLOT}" +BDEPEND=" + debug? ( dev-util/pahole )" +PDEPEND=" + >=virtual/dist-kernel-${PV}" + +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_prepare() { + local PATCHES=( + # meh, genpatches have no directory + "${WORKDIR}"/*.patch + ) + 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="-gentoo-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[@]}" +} |