diff options
author | V3n3RiX <venerix@redcorelinux.org> | 2020-09-23 10:22:15 +0100 |
---|---|---|
committer | V3n3RiX <venerix@redcorelinux.org> | 2020-09-23 10:22:15 +0100 |
commit | 8b4ace9c50842c5b83401ea7b179dcab940387e1 (patch) | |
tree | 230f3135ceaace633cf93e9838b185c4a6664c2e /sys-kernel/gentoo-kernel | |
parent | 9ee6d97c2883d42f204a533a8bc1f4562df778fb (diff) |
gentoo resync : 23.09.2020
Diffstat (limited to 'sys-kernel/gentoo-kernel')
-rw-r--r-- | sys-kernel/gentoo-kernel/Manifest | 8 | ||||
-rw-r--r-- | sys-kernel/gentoo-kernel/gentoo-kernel-5.4.64.ebuild | 2 | ||||
-rw-r--r-- | sys-kernel/gentoo-kernel/gentoo-kernel-5.4.66.ebuild | 137 | ||||
-rw-r--r-- | sys-kernel/gentoo-kernel/gentoo-kernel-5.8.10.ebuild | 134 |
4 files changed, 279 insertions, 2 deletions
diff --git a/sys-kernel/gentoo-kernel/Manifest b/sys-kernel/gentoo-kernel/Manifest index b8880cf29157..c072f3ebe02f 100644 --- a/sys-kernel/gentoo-kernel/Manifest +++ b/sys-kernel/gentoo-kernel/Manifest @@ -10,6 +10,8 @@ DIST genpatches-5.4-65.base.tar.xz 2300512 BLAKE2B 7ed1f7694782a2f2aba5448d4e278 DIST genpatches-5.4-65.extras.tar.xz 1768 BLAKE2B 07e18047c9d88d73325933496d70d645acc6d07bf70d531a4e4602b85c6dacded40d9fae716bfa4654672be78f0d6029700cf4b5b368f3bdbec485218f74abeb SHA512 b3421a90b0e664a64e49b4e87c4392871d425577995cbd15cc420d3f4a1a101706bd19e32aefc077144d6da955c442c7635552f8987f1af707af05868aa61a2c DIST genpatches-5.4-66.base.tar.xz 2303300 BLAKE2B 1107b439bab215b9dc438d40cb69d08353ef9841329151298f91b9191a4f798eab7904cd2acf23fe5d69c4cb224b0f87f972255e54acb46ea162f431e307a134 SHA512 71f4a032dc2dfd71195fe9acaf2e75966515f1ec7fd2f46830080e563916da9504de8ccd9214d49637b8234de9610c4d7ce3bed1b6dfdfcb063c88588bb32c6d DIST genpatches-5.4-66.extras.tar.xz 1768 BLAKE2B 0a81b02b97cbbc7c34d8b8ff13c4f26bce534e92a3f75da169b24c1dcc7b215091f9a2363f9e19cdd3af4febb26d8bf85808eb78cbab6d2e3ab9fda5b1bd346e SHA512 8ef8938c32c46eda7a35cdec9bcb2ffdd3c507a9e2024fae1ebb4684869b6de97ef1d531e71e23d286c49bb4a8b6f2d959b0f874f31aa7f9276ac28fbbcf4422 +DIST genpatches-5.4-67.base.tar.xz 2335352 BLAKE2B ae98701f88da8c3ab823499c6d5683c80adaface3b23d0e5671deb4e8005a6aa8f9ef3c4ff4b0fb1475ca33de7790c59c56571795122ac4bfed6f1c6e4ae8049 SHA512 1d039a98cb29a76f0b5d26cf2ef72cbeef469746e31afc513f6f5f88841e9fa4c96fe34e92748e61a6f6f5a6d8ac68783126e6bcc696bd0106747b8a93a9b940 +DIST genpatches-5.4-67.extras.tar.xz 1768 BLAKE2B 6e6718c80465485c0271d46231d45412e4bb7e713caed3a333b27f1a655048c2ccea871d5331fc4d6413ddbeb2776df02acf00ad1c399a1d86e65615f05d5c69 SHA512 7da85f2ff8f50f43ae1eb814e34402fa8a55629c7b8e9b362ad657974be2ac60489157adf474f91c05587475d89deb1cb1511c5241b80885d695651bfb122af3 DIST genpatches-5.7-18.base.tar.xz 778720 BLAKE2B 384315c8e0e23db1137f73d6d60bc6f681d7b74e23e2b5288ad741ae8f005255164074c08a4ece67667d5eaff15dd0f955fb2eb23d9745c8647ce7761aad3f47 SHA512 8c36cb71a02d9bff7d3257c527c16191a8ba05e08e4cd836047e97264d93cd93343d13e2a550f2b8321d638a00069d8108296240c7d2656023185c80ad640c0d DIST genpatches-5.7-18.extras.tar.xz 1768 BLAKE2B 7312c4b26f1e3aaa51b8a8e67f9fade727b1ec6dbcc256d581061ea6ab878a47dcecfe6d949d677500a49d62928ce4a8c6aae75ce618b9555fcf7fa11fee4ecc SHA512 6b4459fef57765cf67503265ea094ffebbf5f2f9db7c753e1182f524f44981e9b047b6a1661f45b9d99f39e2c2ec57bb1a93e35dfc4a62997d9b629728c2b5c6 DIST genpatches-5.7-19.base.tar.xz 806520 BLAKE2B 1eba96a84e0a75a6dd53cbe24181ee761579f49ab95b2d128dac2bb2780fb0e5b2d5751b95368df70dbe8a9e6ea2ddde960b04e7961d52be02928f17ae2b43c4 SHA512 e654d6444e82e083996f57cb3a8775898e37ec1ab71cd0f639ee0398d6b1f4e875c5bc661db83f46b1d67c5d77a9528182f9ef7980e5c222084d0f016d6e57d5 @@ -22,6 +24,8 @@ DIST genpatches-5.8-11.base.tar.xz 400044 BLAKE2B ffa3cbdd4586e142933833859ff3e7 DIST genpatches-5.8-11.extras.tar.xz 1764 BLAKE2B 3798c0b54dd3056dfd389db8bbcea775462b218d9670c3322240d90d8f894c89bde55a04a80220e76b0d6fd135c32af1d9f5564795f30e9368f3f58d0d45501f SHA512 958d68e317c0140b2540f757dfabc767e28f1878a2b65012599248edd9ab8ac20e7f1736a0f802f01a9f0f22cc743f1a1f9f4665ac287ba6a477521dee323ab1 DIST genpatches-5.8-12.base.tar.xz 405720 BLAKE2B a34d0390f8297c189a0ad67995b3bf0780ce899d0565b87036723dd0b0e86b22daa9437ac942967ef5274713aafe38e628dc51f1622ab9c1df02ac72065ff37e SHA512 47fcf2cf80c80253c71931db0378a5fd04d724fe8dcb8428f56c7f0a5af8ec3c699ae89ef0a15960a8ac14093d348175b31e4debd92de1aa641223dae4b0b345 DIST genpatches-5.8-12.extras.tar.xz 1768 BLAKE2B 232dfb50d4cb331379045b2fc05216c92aa61fc98bd1bd9b697c8cd04f1d1f159f8e2c039d406b540e9b8951494cf7f8ce73db448d0bda2f7c867aabb7bb1190 SHA512 82362b149c0df2acfa584ea17a16205b9e0e48c9754f33c8a13e820eaeb9715ef849d9f9ae1b9d4dcaee43245e7d65f71d59c0d4c7476e373765eed4ec4a7037 +DIST genpatches-5.8-13.base.tar.xz 453844 BLAKE2B 4d6bb86ba3238f969784a2496799f59de039cf6b037cfa81ee5cd6231728289c92d1bd1c12c3341635de64196c13e41d55eea5a6263547d5c31b7e26d4a7fbac SHA512 3338b4fcabb06ff5c89152652f263fb5fd4208e792267755154ddb9b198da245715cee5d7d3d579f69954673889ed10e9b42d11b244ebefd31cad981c832dcac +DIST genpatches-5.8-13.extras.tar.xz 1768 BLAKE2B 7b70ebda93c52dc86d61e8040a48278a4cd61dc4e6a1317afb3bcc33a25fcc63dd3bbeb966244910cc38ef5d5a02be9875b5b1f8b7ed8ae9d1c46d7e00348146 SHA512 a36406969d495057e7685743b74379e88688861a3db1f0bc870ec9d7860a08f61f9dc4840742f69223198bbdf4597f9a96e3b3997b44d5b65cc2dc1afcfb7d71 DIST genpatches-5.8-5.base.tar.xz 216176 BLAKE2B 8c57c2b91b6a395b490fedcee8e0f5ba8c7698903d0e1017fb66bb3d5ced1c6675fcd6e7ecc2405ccd237fd9ef4c641b10a0b4c32403c757ada5ccec3dbf0f26 SHA512 64bf8a331ba97a1d86159dff23c46c94c63f07158e66f9e86b02de6cc1a4476064fb6a924573c93fa117ea88bf6d6bb05f89c82c1883700af9fcdbbfaa5b72bc DIST genpatches-5.8-5.extras.tar.xz 1768 BLAKE2B b49e51d13c594029950911a1c7689b13710b8102330a475edb774f967b6162a036cb830b3cc25187e0ee3ec577d607baae036d136111ae1c64b7bebf1f544fe0 SHA512 a3fa7af02966567b5a2f4caab584ae19d7a1b955d2c8e599355b1ee5f3aed8971c26ecca6ab453280ea7bd8c9c004b53045848934d121f52474046293a2f554d DIST genpatches-5.8-6.base.tar.xz 253496 BLAKE2B 691638688887676a60639683b75a51a281642bb7cdf51439dc2871a72e8e9fbd3121a93767ccd0f17e95627eba5876e3f119905c3fb93292b16393f3736d2a4c SHA512 352c4f32780e24e4e9721e3792377070806cc756dc68f3266ad3140f5508c303c52c6573736915dfc27f92501a5b56f0fcb25e76916f338e5e737bf75fbb939d @@ -55,11 +59,13 @@ EBUILD gentoo-kernel-5.4.60.ebuild 2419 BLAKE2B aa61a010470c10a12a325eaff699963d EBUILD gentoo-kernel-5.4.61.ebuild 2656 BLAKE2B 048c16864806494007ac99f514afe490a29ccf8bdf1d1d679c27682bd25388a76f44c2930194a9cacf3baf024d3de1aebb27a76c7403168a26233d80af7f8a0f SHA512 0d144643c53d4897d53b33e1a19f14c196aabecbbbca5c3519da59d540d87a71c001f32421aa9b79103f5a65f0dc7251733458a18f82b90ba137d954b0bffc1b EBUILD gentoo-kernel-5.4.62.ebuild 2658 BLAKE2B 68d786f0fb1b40f32c92c22ac89571558026e8ddb3c0763ccd09266201e1dc36ec2bbb330294681f42a8953535107bdad7f640f3bd17dbf3b2f5afa9ad5d4fd3 SHA512 c26e6ff38398768b643536c350c0e686ea120bf35f821484a29dccee1026179a286e2f5d4daaa7a928abe732ad44660b590aa42357dcdbdd2e66e3e417d0b823 EBUILD gentoo-kernel-5.4.63.ebuild 2658 BLAKE2B 68d786f0fb1b40f32c92c22ac89571558026e8ddb3c0763ccd09266201e1dc36ec2bbb330294681f42a8953535107bdad7f640f3bd17dbf3b2f5afa9ad5d4fd3 SHA512 c26e6ff38398768b643536c350c0e686ea120bf35f821484a29dccee1026179a286e2f5d4daaa7a928abe732ad44660b590aa42357dcdbdd2e66e3e417d0b823 -EBUILD gentoo-kernel-5.4.64.ebuild 4383 BLAKE2B 8974acdd45d335a3b7dcac2ec08d3d068f441fc94e38347646767323f71b0aadaa2bc6fe18edb2af520bd728586a153c2fcb221e2bcd29b97fa932d4c076f71a SHA512 7ff6dc84c6fbf33117b4d9fc1a0fc548002b474bd5b4f632c0546a18ee28e0c510372bfdae23be026fc42a37eb315fed3da8f325d070aa87215d963e52ea91d4 +EBUILD gentoo-kernel-5.4.64.ebuild 4382 BLAKE2B 7b74305d92ce5e96835fcbeff0d0430d95a6d771981c094ff21e2dce4324ec3d863010f9434d73fe560ca162ba830f956b1f6b62a7f90b8c6f980e5b9e8d2465 SHA512 accf9b40a80ee24c6b2f3fb11f1d784f7a395daae8394cc20269e8f46ac156aede98834039bea0a049696a45faca4284ed62b428d02626c753ab48fa2b651f02 EBUILD gentoo-kernel-5.4.65.ebuild 4385 BLAKE2B 865fc5028592d4408053503b11117b98ced615020e6de40a26cc3cb8357065e28cfa70209d043537e69c23d62d3b9e29c978ea35db14b9f1bc94318a25e564c5 SHA512 1110813549c8a40f29bd0c224f247dc2c9826257f373bcc11961eafbc16ce2da4ccc75bf8c6f0b8805c701b84fac2efba58cce0e651d0cc4b9903b373354111c +EBUILD gentoo-kernel-5.4.66.ebuild 4384 BLAKE2B b363fccc63465a0b47754fddb05f2e1dbdbda1c45b14a64befc6396347930cddc6893fab15e999ee364bb7fbb2a420175f2a8a4c2278eaa8a98ffa1253970a65 SHA512 f42e8a205ece2bc26a81f7a78531dc81703eed827741dd474560eccb363bdc8b7b145bc8d86f836857c5b88bddbf0253b13d7483289758503246bce46d9ec080 EBUILD gentoo-kernel-5.7.17.ebuild 2424 BLAKE2B d123a44cab87a519206d5ee1d510dbcf25a3d7b4b3f1f496e9a4c45493e21de0d1fa842664d87d4ea825d5a91cb6afbb36a792d4c533f65830204b1f0f6f1563 SHA512 bb696f61afa021064fb92ac671bdbf376553819035f1b2bac7592168b4da155ce933357b80bb42dfbe5b89b52552b08f1949280824faafc9c706bdbd5b204a20 EBUILD gentoo-kernel-5.7.18.ebuild 2424 BLAKE2B d123a44cab87a519206d5ee1d510dbcf25a3d7b4b3f1f496e9a4c45493e21de0d1fa842664d87d4ea825d5a91cb6afbb36a792d4c533f65830204b1f0f6f1563 SHA512 bb696f61afa021064fb92ac671bdbf376553819035f1b2bac7592168b4da155ce933357b80bb42dfbe5b89b52552b08f1949280824faafc9c706bdbd5b204a20 EBUILD gentoo-kernel-5.7.19.ebuild 2426 BLAKE2B 53e2b737d78899872901d4c778bb44fda0cfde6f31b273a440a1cba8fcb956faad8e6328166cae12f6957ea65bb0ad8b673bd429d93fc49a815f6b629e65e50e SHA512 f10d44749e720b8ec9002ec7acce8116949a0cca9a5a9a44811f8940ffc1ae2eb8d2e5a3d05919982c40b7a636d3dc63619537cc487db6a4855f59baa84a1798 +EBUILD gentoo-kernel-5.8.10.ebuild 4325 BLAKE2B 2641156befda0f1fe51da073f224cf004685b5518182d004b79017f66cd110d439f05527db851ed66234b1d0fec2f328bacc3f5e47d636f6d28b7e0e64207604 SHA512 afc25fed7b7477c5c12c7aabc243062aba13980b5da068e70e0794997732ad2c995eb77506ccf18467f8971e453ac1909239fd46d61dbdec9c048e0a35b4d6fe EBUILD gentoo-kernel-5.8.3.ebuild 2438 BLAKE2B 80cea563a899eb747a46f4b3599afabfb8b9efc9b7c9304c69db52312d086541985414d49625a77036e802631b980230a5b5a50a1a8f33aa56e6079a0bd1a041 SHA512 b5008448786ec73b061d7df7d5ab282b44a73738a4a319e739704ff6020b61eee7f997b6f3c078caa97cf5239e233c82aba71146efe14dc2a32886e5d21b5ccb EBUILD gentoo-kernel-5.8.4.ebuild 2438 BLAKE2B 80cea563a899eb747a46f4b3599afabfb8b9efc9b7c9304c69db52312d086541985414d49625a77036e802631b980230a5b5a50a1a8f33aa56e6079a0bd1a041 SHA512 b5008448786ec73b061d7df7d5ab282b44a73738a4a319e739704ff6020b61eee7f997b6f3c078caa97cf5239e233c82aba71146efe14dc2a32886e5d21b5ccb EBUILD gentoo-kernel-5.8.5.ebuild 2695 BLAKE2B 1f7098bec24243f5ff6aa78dc612bbac7ed7486c536b3e0cae3b46ec2f6683321b2cca8301c383c66d9507c924e789b80535d178378e25e37a317c4fd2210566 SHA512 62c25a01cbf32104986a9e534874fc1369601c491086baf3ef282add298d44f0f335de36158231f5bb0316f07e462ca3d07d27974b975cb8278ce6742932c267 diff --git a/sys-kernel/gentoo-kernel/gentoo-kernel-5.4.64.ebuild b/sys-kernel/gentoo-kernel/gentoo-kernel-5.4.64.ebuild index b396b023f647..a207c4ae5ece 100644 --- a/sys-kernel/gentoo-kernel/gentoo-kernel-5.4.64.ebuild +++ b/sys-kernel/gentoo-kernel/gentoo-kernel-5.4.64.ebuild @@ -35,7 +35,7 @@ SRC_URI+=" https://cdn.kernel.org/pub/linux/kernel/v$(ver_cut 1).x/${MY_P}.tar.x S=${WORKDIR}/${MY_P} LICENSE="GPL-2" -KEYWORDS="amd64 ~arm64 ~ppc64 x86" +KEYWORDS="amd64 arm64 ~ppc64 x86" IUSE="debug" RDEPEND=" diff --git a/sys-kernel/gentoo-kernel/gentoo-kernel-5.4.66.ebuild b/sys-kernel/gentoo-kernel/gentoo-kernel-5.4.66.ebuild new file mode 100644 index 000000000000..8748c518e3d3 --- /dev/null +++ b/sys-kernel/gentoo-kernel/gentoo-kernel-5.4.66.ebuild @@ -0,0 +1,137 @@ +# Copyright 2020 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##*.} + 1 )) +# https://koji.fedoraproject.org/koji/packageinfo?packageID=8 +CONFIG_VER=5.4.21 +CONFIG_HASH=2809b7faa6a8cb232cd825096c146b7bdc1e08ea + +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 + 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/vanilla-kernel:${SLOT} + !sys-kernel/vanilla-kernel-bin:${SLOT}" +BDEPEND=" + debug? ( dev-util/dwarves )" + +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 + + local config_tweaks=( + # replace (none) with gentoo + -e 's:^CONFIG_DEFAULT_HOSTNAME=:&"gentoo":' + # we do support x32 + -e '/CONFIG_X86_X32/s:.*:CONFIG_X86_X32=y:' + # disable signatures + -e '/CONFIG_MODULE_SIG/d' + -e '/CONFIG_SECURITY_LOCKDOWN/d' + -e '/CONFIG_KEXEC_SIG/d' + -e '/CONFIG_KEXEC_BZIMAGE_VERIFY_SIG/d' + -e '/CONFIG_SYSTEM_EXTRA_CERTIFICATE/d' + -e '/CONFIG_SIGNATURE/d' + # remove massive array of LSMs + -e 's/CONFIG_LSM=.*/CONFIG_LSM="yama"/' + -e 's/CONFIG_DEFAULT_SECURITY_SELINUX=y/CONFIG_DEFAULT_SECURITY_DAC=y/' + # nobody actually wants fips + -e '/CONFIG_CRYPTO_FIPS/d' + # these tests are really not necessary + -e 's/.*CONFIG_CRYPTO_MANAGER_DISABLE_TESTS.*/CONFIG_CRYPTO_MANAGER_DISABLE_TESTS=y/' + # probably not needed by anybody but developers + -e '/CONFIG_CRYPTO_STATS/d' + # 1000hz is excessive for laptops + -e 's/CONFIG_HZ_1000=y/CONFIG_HZ_300=y/' + # nobody is using this kernel on insane super computers + -e 's/CONFIG_NR_CPUS=.*/CONFIG_NR_CPUS=512/' + # we're not actually producing live patches for folks + -e 's/CONFIG_LIVEPATCH=y/CONFIG_LIVEPATCH=n/' + # this slows down networking in general + -e 's/CONFIG_IP_FIB_TRIE_STATS=y/CONFIG_IP_FIB_TRIE_STATS=n/' + # include font for normal and hidpi screens + -e 's/.*CONFIG_FONTS.*/CONFIG_FONTS=y\nCONFIG_FONT_8x16=y\nCONFIG_FONT_TER16x32=y/' + # we don't need to actually install system headers from this ebuild + -e '/CONFIG_HEADERS_INSTALL/d' + # enable /proc/config.gz, used by linux-info.eclass + -e '/CONFIG_IKCONFIG/s:.*:CONFIG_IKCONFIG=y\nCONFIG_IKCONFIG_PROC=y:' + # WireGuard was backported to 5.4 but we use old configs (#739128) + -e '$aCONFIG_WIREGUARD=m' + ) + use debug || config_tweaks+=( + -e '/CONFIG_DEBUG_INFO/d' + -e '/CONFIG_DEBUG_RODATA_TEST/d' + -e '/CONFIG_DEBUG_VM/d' + -e '/CONFIG_DEBUG_SHIRQ/d' + -e '/CONFIG_DEBUG_LIST/d' + -e '/CONFIG_BUG_ON_DATA_CORRUPTION/d' + -e '/CONFIG_TORTURE_TEST/d' + -e '/CONFIG_BOOTTIME_TRACING/d' + -e '/CONFIG_RING_BUFFER_BENCHMARK/d' + -e '/CONFIG_X86_DECODER_SELFTEST/d' + -e '/CONFIG_KGDB/d' + ) + [[ ${ARCH} == x86 ]] && config_tweaks+=( + # fix autoenabling 64bit + -e '2i\ +# CONFIG_64BIT is not set' + ) + sed -i "${config_tweaks[@]}" .config || die +} diff --git a/sys-kernel/gentoo-kernel/gentoo-kernel-5.8.10.ebuild b/sys-kernel/gentoo-kernel/gentoo-kernel-5.8.10.ebuild new file mode 100644 index 000000000000..1527024779c4 --- /dev/null +++ b/sys-kernel/gentoo-kernel/gentoo-kernel-5.8.10.ebuild @@ -0,0 +1,134 @@ +# Copyright 2020 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##*.} + 3 )) +# https://koji.fedoraproject.org/koji/packageinfo?packageID=8 +CONFIG_VER=5.8.5 +CONFIG_HASH=af8da8d54d21231fd8c7b943216bb985f0a4e223 + +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 + 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:${SLOT} + !sys-kernel/vanilla-kernel-bin:${SLOT}" +BDEPEND=" + debug? ( dev-util/dwarves )" + +pkg_pretend() { + ewarn "Starting with 5.7.9, 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-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 config_tweaks=( + # replace (none) with gentoo + -e 's:^CONFIG_DEFAULT_HOSTNAME=:&"gentoo":' + # we do support x32 + -e '/CONFIG_X86_X32/s:.*:CONFIG_X86_X32=y:' + # disable signatures + -e '/CONFIG_MODULE_SIG/d' + -e '/CONFIG_SECURITY_LOCKDOWN/d' + -e '/CONFIG_KEXEC_SIG/d' + -e '/CONFIG_KEXEC_BZIMAGE_VERIFY_SIG/d' + -e '/CONFIG_SYSTEM_EXTRA_CERTIFICATE/d' + -e '/CONFIG_SIGNATURE/d' + # remove massive array of LSMs + -e 's/CONFIG_LSM=.*/CONFIG_LSM="yama"/' + -e 's/CONFIG_DEFAULT_SECURITY_SELINUX=y/CONFIG_DEFAULT_SECURITY_DAC=y/' + # nobody actually wants fips + -e '/CONFIG_CRYPTO_FIPS/d' + # these tests are really not necessary + -e 's/.*CONFIG_CRYPTO_MANAGER_DISABLE_TESTS.*/CONFIG_CRYPTO_MANAGER_DISABLE_TESTS=y/' + # probably not needed by anybody but developers + -e '/CONFIG_CRYPTO_STATS/d' + # 1000hz is excessive for laptops + -e 's/CONFIG_HZ_1000=y/CONFIG_HZ_300=y/' + # nobody is using this kernel on insane super computers + -e 's/CONFIG_NR_CPUS=.*/CONFIG_NR_CPUS=512/' + # we're not actually producing live patches for folks + -e 's/CONFIG_LIVEPATCH=y/CONFIG_LIVEPATCH=n/' + # this slows down networking in general + -e 's/CONFIG_IP_FIB_TRIE_STATS=y/CONFIG_IP_FIB_TRIE_STATS=n/' + # include font for normal and hidpi screens + -e 's/.*CONFIG_FONTS.*/CONFIG_FONTS=y\nCONFIG_FONT_8x16=y\nCONFIG_FONT_TER16x32=y/' + # we don't need to actually install system headers from this ebuild + -e '/CONFIG_HEADERS_INSTALL/d' + # enable /proc/config.gz, used by linux-info.eclass + -e '/CONFIG_IKCONFIG/s:.*:CONFIG_IKCONFIG=y\nCONFIG_IKCONFIG_PROC=y:' + ) + use debug || config_tweaks+=( + -e '/CONFIG_DEBUG_INFO/d' + -e '/CONFIG_DEBUG_RODATA_TEST/d' + -e '/CONFIG_DEBUG_VM/d' + -e '/CONFIG_DEBUG_SHIRQ/d' + -e '/CONFIG_DEBUG_LIST/d' + -e '/CONFIG_BUG_ON_DATA_CORRUPTION/d' + -e '/CONFIG_TORTURE_TEST/d' + -e '/CONFIG_BOOTTIME_TRACING/d' + -e '/CONFIG_RING_BUFFER_BENCHMARK/d' + -e '/CONFIG_X86_DECODER_SELFTEST/d' + -e '/CONFIG_KGDB/d' + ) + sed -i "${config_tweaks[@]}" .config || die +} |