mirror of
https://github.com/gentoo-mirror/gentoo.git
synced 2025-12-09 00:07:57 +03:00
sys-kernel/gentoo-kernel: Remove old
Signed-off-by: Michał Górny <mgorny@gentoo.org>
This commit is contained in:
parent
054db0b8dd
commit
d2a7060a50
@ -23,38 +23,26 @@ DIST kernel-x86_64-fedora.config.6.17.3-gentoo 267029 BLAKE2B 8640bdbaac5658542c
|
||||
DIST kernel-x86_64-fedora.config.6.6.12-gentoo 243607 BLAKE2B 7e670d37c6471e50aa0ba395570cd0173af0210afe63faa48d7a147327110652e3aab5c339cf10ed22a6a20e81e505aee84311beb21fda3eb577e06ea55ecac8 SHA512 c484403a60670dd006ecbe65240cb00d97e8b3fe22d1169c5b6ccb92bcdbddb3ecd474d2b57880b30baf6a38bcef11fc8d56b8b0b02fcddd859833c3640cdc9c
|
||||
DIST linux-5.10.tar.xz 116606704 BLAKE2B b923d7b66309224f42f35f8a5fa219421b0a9362d2adacdadd8d96251f61f7230878ea297a269a7f3b3c56830f0b177e068691e1d7f88501a05653b0a13274d1 SHA512 95bc137d0cf9148da6a9d1f1a878698dc27b40f68e22c597544010a6c591ce1b256f083489d3ff45ff77753289b535135590194d88ef9f007d0ddab3d74de70e
|
||||
DIST linux-5.15.tar.xz 121913744 BLAKE2B 3921274b23f7938abdf3ed9334534b4581e13d7484303d3a5280eddb038999aaa8b836666a487472d9c4a219af0f06b9fecccaf348fb5510ab8762f4ef4b7e83 SHA512 d25ad40b5bcd6a4c6042fd0fd84e196e7a58024734c3e9a484fd0d5d54a0c1d87db8a3c784eff55e43b6f021709dc685eb0efa18d2aec327e4f88a79f405705a
|
||||
DIST linux-5.x-sha256sums-20251002.asc 369409 BLAKE2B 62c1f9ac1772cd3890d9afef5a2f7da95fb34441396db435c4969e7a268e01bc72b82dba8f5fdd77d9f895dc8d6ff62d236bc6960db41156ca68a15aa3f66ecc SHA512 3a2f452d03ef1c2bfb60ba12021bed5942d9d8d96944e38eff905724e1dd2aeceeda133fe2c4e4d77d5caebae1b8e8d06dab0c8f18d44ed10659306c43cb9ef4
|
||||
DIST linux-5.x-sha256sums-20251019.asc 369754 BLAKE2B 43d79e2fa32a32f489bf4022f455012dbb1f60b6a961f75da96266b29ca552cc6d9480b0cbc3edd2460287431722c959b2e65c8e1e201414475f9df98fd97476 SHA512 1f39d7a6cc109cedb9d593c8db6f21513a3337650e993f39a2f44c9286cf49a076fefb2fd793b094196cef804062d54434b15bd30f1d6e69e18040e01277e171
|
||||
DIST linux-5.x-sha256sums-20251029.asc 370785 BLAKE2B 74fb714578959a8354e296e0c3c633b220f9ff9ca144177cdaee44ea10568d8b4666b917bb57a94b7384ba37b7fdd0d6b4b59ef059886a68c8fba7cf4905c23e SHA512 df71b92fdb5f47bf7d24c228faa567f3a3186aba6b5e31b287578d9d94240aadee60fd37e6d70a17813fa514c481eec6cae71beaddbd71492f9841812ded9765
|
||||
DIST linux-6.1.tar.xz 134728520 BLAKE2B ae60257860b2bd1bd708d183f0443afc60ebbd2b3d535c45e44c2e541bd0928530a3b62de6385dd4e4726ebbedcc0a871d4f3ffb4105b9f1f6d8ed7467f5688e SHA512 6ed2a73c2699d0810e54753715635736fc370288ad5ce95c594f2379959b0e418665cd71bc512a0273fe226fe90074d8b10d14c209080a6466498417a4fdda68
|
||||
DIST linux-6.12.tar.xz 147906904 BLAKE2B b2ec2fc69218cacabbbe49f78384a5d259ca581b717617c12b000b16f4a4c59ee348ea886b37147f5f70fb9a7a01c1e2c8f19021078f6b23f5bc62d1c48d5e5e SHA512 a37b1823df7b4f72542f689b65882634740ba0401a42fdcf6601d9efd2e132e5a7650e70450ba76f6cd1f13ca31180f2ccee9d54fe4df89bc0000ade4380a548
|
||||
DIST linux-6.17.tar.xz 153382068 BLAKE2B 0edb2324be5638aa75984128aafdba3e50824187d2fcdff8794eab99d85c10c3a17d1e840053c2c83df5ee11fdf69f1c9452c57ecc9dae01c4af38180fe7821a SHA512 063999d7b819970657f6b7713fdb4173da2065ffdeed7cae197026dbb1edfd7f1d50374f073a1e19ef9686539594824ff6ecb8a930d97c4f272cb12f1c6d8355
|
||||
DIST linux-6.6.tar.xz 140064536 BLAKE2B 5f02fd8696d42f7ec8c5fbadec8e7270bdcfcb1f9844a6c4db3e1fd461c93ce1ccda650ca72dceb4890ebcbbf768ba8fba0bce91efc49fbd2c307b04e95665f2 SHA512 458b2c34d46206f9b4ccbac54cc57aeca1eaecaf831bc441e59701bac6eadffc17f6ce24af6eadd0454964e843186539ac0d63295ad2cc32d112b60360c39a35
|
||||
DIST linux-6.x-sha256sums-20251019.asc 179487 BLAKE2B 51ef5573677dadd88d0e221035b98234a09fe70fef44d4827264c73d91f64fded9cc288fa07c2cc0cd1abcf41adb2a99f2f2291130418299ca2649654cb9db8e SHA512 8dba06afc30f76c6ac896271c5092c263a30b10a2aeee890659f26cca64f178e12514c55d105cbdb797846c9adb9c9aea91bd28ba97960d2a44701e1b1dbd4af
|
||||
DIST linux-6.x-sha256sums-20251029.asc 181866 BLAKE2B 41be11114bd93ba05c9f283a777987f57fa83286eb7b3d947dae846af9f13566bcb4aaa2a378f37be8b08bf1e5111070208dc440855af9cb0d6044c729cbbf1b SHA512 d13ad4dd28128b0bd5b8b82d597948b78f6cc1c46b1e5092015cdb45431fd94ed6bd4c75307c1eb3c6b0b759a7eb80d5f39b232822925c00d1c3d57beafdce02
|
||||
DIST linux-6.x-sha256sums-20251102.asc 182885 BLAKE2B b68fd39a212bc82676cc3bf552170aec347b02a9201ba653fe902fce7d455176ff1b25e8dfaaf16a80ef8939bd94200d30db4ad2d899b47d9891598a20533bf4 SHA512 0401c17568aae8ac9220f8074831cd0b1d390863f158fa2b08a3b0cb78c796ab83ac18f5236e52ac63da9090f00c9d54f3967a3d52b34449613e382ba976fe2a
|
||||
DIST linux-6.x-sha256sums-20251114.asc 183563 BLAKE2B 9ad7236123c2b68b490b355f64f35ed2c13f77a0c93fc4a7a0b8402e5975e48541816ce02f8fc7155eb97f3ab8bd1596389a8a091a9e2b8b840cbef8d716fa2b SHA512 b477ffa9c91ff03a4c705e1a80ad20b71cc8f6566ad2d6d7d87b9b1404e292a0c913020463abc7b1d2c7c83909324e1e779e67b674fdca7661601fd0dd3c1535
|
||||
DIST linux-6.x-sha256sums-20251124.asc 184582 BLAKE2B da9114953874df49abaebf346521e5c91967f2b1ac5481b5b9b79dea76f25ac9658e3b4fc167dacad58362a56140ac41dfb832a610ae644d5397f09cd713339e SHA512 f98942036fd70768f732cb4718b24ed5cb55c2e7aa21e5a4d12206be03b36309e66594140c3f678ed03c1c9ae6efd13da980fc7c13d0d0cf836fd80fcc68792e
|
||||
DIST linux-gentoo-patches-5.10.241.tar.xz 21004 BLAKE2B 80efb313e1581e8a086bb20d1f30f59ea7982dc0fc3140974182a3802a49a00fae266222c08d3cb34eda7e315ef429bed25f145959c084843c58fdddfa68a2e9 SHA512 3a1b24d2fe5f3130e88abda428638d31adf6617332fe3baa7dfe6425d146e7607e5f8b571f406f0370acaf779cdd45f57af964bd955a3b5d5622d792527a5de0
|
||||
DIST linux-gentoo-patches-5.10.246.tar.xz 23580 BLAKE2B 1184fd10a1321cfde67d276426103c73993fbe93e81047b494d358c433daa10a3c141349d01daa7147a05eeaccaa0eb87256b4f523e66f2f7f7022385982776b SHA512 31dd105101372b569c98bc72d6d8fd15fe95ece08ec9f48de10f91112f1526ccfbb349a67913ef1f8c798dd3dceeecc6312eeefc097d9ccd3b55edc70d3dcf10
|
||||
DIST linux-gentoo-patches-5.15.195.tar.xz 12876 BLAKE2B d675d4150c8292c4f4b9846a26c53099910905e04e3015cfb3cb60e53dea99028b2e6fcbc345255246103699910aecf916054a09598e931d110b31db59a0b517 SHA512 e86691215cdab56a1a4fbe9aa3de44bda93db5659c39b04bfce53ed6ad8ed6923853431abb9444471b227421619c40e8841dab582b8007216e3c22e2b348a549
|
||||
DIST linux-gentoo-patches-6.1.156.tar.xz 31604 BLAKE2B 09ede2987691e372c41567d975070451d243662b9f86dcd35489b63b732583e34431e1ad93ade3f9ea77dddae06e71e5752c0d12b3b6d0765106e19fe30876a4 SHA512 2f4a7960956c3aa7bbb46b20d14051ad58f07f45f8c4a6115100aaf6a46ddeaf414e1247d6034e4f71bdd7fd9479cb1b1bffab5e480a0422ad9af3b23e2bf95c
|
||||
DIST linux-gentoo-patches-6.12.52.tar.xz 21836 BLAKE2B 7b39c3a97fdcfe76e12f2e481ae1c9d6c339ffe133cac956ba485bb82d8766d26d88295c8672eac07162c2968c42cfa12d7705b37dbb8f2f6b09c499ce2b4ac2 SHA512 8005072e872b78e364b15e1f32c8b6bfc0d1f96c8c051b01d4ae60e33250e842cc7ddef602a1caeba2e3914100fe3f319f3e8b171c2079967565efd169d8c558
|
||||
DIST linux-gentoo-patches-6.17.2.tar.xz 99184 BLAKE2B 867bbf3a8cce987dba3381a874985e614187649e5341bc8c43f97e0b501ed4cfc4bce2ee7d8114ce54d75605151c7dbfdea51e9e5da7af3a834b169bb6998eb1 SHA512 149946fd38c22ef5a8b198011f4a044d3c00a93635f85b3c0d0f1f4d74faead20355acf3ff0ee55df89361fd48e8270219f52feeae0688b92d090a1c59a20ba8
|
||||
DIST linux-gentoo-patches-6.6.111.tar.xz 45328 BLAKE2B d940d418295c07fcf55614fe415b8124bb9e6abdd2cdb992f9b06ceb3f752503bf17df4224f781cef85170928a76013227340235d50b514899d3893d2f94efcf SHA512 4555fad79908133b0fd0ac0ec03ef4f5b6345974e4243b35255e1ee24182f1091366bb39f8d0cf40f67dde04eb688e95e2902c048b8a3b7aebae64fcc7c2847e
|
||||
DIST patch-5.10.245.xz 6907208 BLAKE2B 1015edea300289cab5c8e4017920419035c74bb5e589747fe1711aa82e9cacfda38e2bce2f14b02aee8ecb66e876066be8bb8db4c186aadaf72ea92da8dc0c20 SHA512 c29d28bb920d73153b5f6ce88d7e9c4f6888fad9ec04bd196bde33778d3a0bebb41f1c2f396780e1b2b2972144102cf4ac7c4479ad25b1182cab330518560033
|
||||
DIST patch-5.10.246.xz 6964592 BLAKE2B b893135670cd9068a8af6f05607ef680d38c4bdd121e1bd3289007df7f0cbc22987c810fe697b939885e20346fb759b4c907870000a5c64f8cad23568ed10a55 SHA512 52e6f9bf483c3a588f934eeafdb40bcf0d39ad4c32f3e176ff1ed6f8485c1705ff1e5fc268352772e7aba3a93736653211baaa90df64a6c3d7494fa631c1eb5e
|
||||
DIST patch-5.15.195.xz 7158088 BLAKE2B 63a662a495ea38091a522671ce876c976a7b4405f2d333f1edbc7522443d2783a363e03a09edfb33d044efe82e8547f824a6ea322908cd00b6e35305b3e54b7f SHA512 564924cd372abac65ef87ec797be82310cd224fb74c976415adc3e40b73cc102c78498be309a0c670509f45664897c897bccf3a920634a0315da158348adc23a
|
||||
DIST patch-5.15.196.xz 7179588 BLAKE2B 0b56f80db1c0aff2dfbda176a42daf6efa603ab1424601f938b4bf1611481df27a8412461fe6f4f273520da08627f51c2097b8a3199ba4e34491c9b7e044ed26 SHA512 dd29cc79aa3f9b339d57b1bff19761316b5893be3244e97cde95d80f3c9d608f6a4343a0ab3f25febc658a5962713403bbf7d488c121f68105d3ad2f73427b9c
|
||||
DIST patch-6.1.157.xz 6579568 BLAKE2B 57556c1ebd47576a12155d3b00a5c238d3667a18f9d16f260ca3c2638239f5ec983d77df1ad8e7d161977c7197d3f7e0df54d6d4f695a60052975b3cc11f93c8 SHA512 0b4b7d14a47cae3f62812ee17b9de7224d0b678249148729639fa2f3563208237ec047f6a52f7c904f49f0442f630dd7e5a09f1c445dd8912d98df7f10c2d409
|
||||
DIST patch-6.1.158.xz 6613684 BLAKE2B 51ff33497e42b9803545b0d848abc125dfdc439ba152c2c573419a564501890345fa0f958bc8a8433557e605a82707fa8d71410d9390856e13f08677ee9d2329 SHA512 7a43f6d1a601a890e5df90f9ad791292dd3bfb7e8e0baab90b9a0fa84be7c20075cac4738e3fb3ecaecb575952432c04c83a9eecafa2c1f02fab830777c8b24a
|
||||
DIST patch-6.12.54.xz 3096864 BLAKE2B f5bff8166a5a45535092614ef9ed1d9e39064fd2762f0d71e852a87437326892c9d25a095ad51eb3b7fdfe266ba5f16d271303b98c4c1c6ed1716cfa09b669bb SHA512 744143218b5258a67f4b00126c72d7630b6e563dd0cc0a9cf685bc38cb48dc217d717053117e72a52fba061b2171a99ef64d992288f75500f069c617d1663b5b
|
||||
DIST patch-6.12.57.xz 3166572 BLAKE2B d3de49aef49104485236672f0d932a790f81f43d10d3178c4d22dbdc42f2f0bf5e58f74455b1a2f96ff4edb28a68ade510400025eb5da0e3e9d0d0fedb1c0f3e SHA512 32c056e4bdc5ccdaa6d74517f841b5e051197337a3c22a9e1324a7c5ab23ccfa1842403ad4887a31a6a68beee73a5800c92c7fb043a22d49ddc316d6ad909ea5
|
||||
DIST patch-6.12.58.xz 3286180 BLAKE2B 6a96368f7c0db35442897ef811f2601c985e61d87928be77c84dd460dd935cfc0562239ab88341877535a25e84d571fd50641560b2f9b496905c1f22403af183 SHA512 dcbe11090c4c2020b05ad3930cad292191608b953676158255679f56075639baf666eed7421f775218d06798dbc99a9816ccf31cdaf6ab09cdc9b022527ed79c
|
||||
DIST patch-6.12.59.xz 3325064 BLAKE2B 9bd2f598b2884592a47fc021966c3c4bf2310d3cf2ccd6c730d4f4186d51676ae7a4363a48f0a0f59bb163ae374de620a0c0a7bfe0fd016f7a5774f7c9d44e19 SHA512 a97bba0f85260aedba917b43be968a36e594f9d9b8fea6b6eb7d72f0349e1329f0d9b18ba46d6f183f28d0f644040e1f82f78c3f5fe22b8e15aa49f22046b01d
|
||||
DIST patch-6.17.7.xz 443556 BLAKE2B 732800a96e7be442d190a70ff7476a3f21116741338895f24f2f24e5fd8cc7073ef7606cec8b878d9103395ed7a7b0692bdfcbe5f03b978f3c5508b0fa48e758 SHA512 8388e1271e03d99a6edd05169bb44037fa20cd585f632f50da1aa677a5a466feb716dffaa6482bce35d22699abdb3ba9901443869683b520cc84e5ea3f9bfd6f
|
||||
DIST patch-6.17.8.xz 697436 BLAKE2B 663b9970d6039e00c8e33c8a01696e0d7d3613b4b235c20aa8443e328b262154a5babcd7be8a37eabe2584b40e4360cccec12416d12ea1f34525a684dc8bf190 SHA512 a457f9bb4ec031a3bc4a4286a85794e16e16e81935cf6b69d37f0c48d40a6d138a8ebeb449d5dc27cb4ae57c39a145bedc1a3281da21e4b33e11e81fdf5d3e9c
|
||||
DIST patch-6.17.9.xz 764968 BLAKE2B a0ce8311be7c251ad21b7cc11be4f30ec5125e3763f97a750afef855be385a3ceae24df3b65b5dd751729575aa0cd254a95cbae0f2e8cc8f95539dcfa2d9d3a1 SHA512 35593bc973cc7f626aa7a41cf8b7dea1b46fe8922bd57194db363d26e8854af514d103e39d02c642c26748bd933d5e402ff89d2a20d2da5f8d901e4713eafc46
|
||||
DIST patch-6.6.113.xz 5000480 BLAKE2B 6f9b360db1f92e80a5faae98ab399aba43f307df6fbc37d106b768aff02b0abea69dd4d20cb3db82ecb7b778ecf769bd49998c0b3a0e00f7e81af4fff49a39c5 SHA512 37622c883ae85ada9ec01852b1b8b40ab8e6533ee1f59b6dc080599cf03eddc77901043ef25dcd3872698fa59029297727c31f83e1891332896c2b597fa2fcb9
|
||||
DIST patch-6.6.116.xz 5054680 BLAKE2B 0ff38d6f77204767a2a2f79080405634a53ee304754156fc1c5f0c8aa339b39b2382d3d4e33132a2a5c02d0c2c81ae07e20eb55ef76b62788411321399c49569 SHA512 60d1d70b217a4908d3b67b61596013b3ecc06d44ab095ad50accb21a71bb9b3d20128d38cb73790b9999e0e922092c06a414cad0efaab4c1739accc7cf8b5510
|
||||
DIST patch-6.6.117.xz 5149968 BLAKE2B 5557cb9181cb2885ebf7bda52e37c69b91f6be11b8338b8ab5d691d3786a0d1ceac432062a2954256203a63c19277725a915284c520cfd7d1ef72df82ba41ccf SHA512 387d134e42416f90a32b349a5c941ad99d135cd57388fbd90ca0479b0521bb1aff0f3b8f6b8af6f9d73ed0f0f83ded8728300bd99c63473cf62a0f700d03de25
|
||||
|
||||
@ -1,173 +0,0 @@
|
||||
# Copyright 2020-2025 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=8
|
||||
|
||||
KERNEL_IUSE_MODULES_SIGN=1
|
||||
|
||||
inherit kernel-build toolchain-funcs verify-sig
|
||||
|
||||
BASE_P=linux-${PV%.*}
|
||||
PATCH_PV=${PV%_p*}
|
||||
PATCHSET=linux-gentoo-patches-5.10.241
|
||||
# https://koji.fedoraproject.org/koji/packageinfo?packageID=8
|
||||
CONFIG_VER=5.10.12
|
||||
CONFIG_HASH=836165dd2dff34e4f2c47ca8f9c803002c1e6530
|
||||
GENTOO_CONFIG_VER=g17
|
||||
SHA256SUM_DATE=20251002
|
||||
|
||||
DESCRIPTION="Linux kernel built with Gentoo patches"
|
||||
HOMEPAGE="
|
||||
https://wiki.gentoo.org/wiki/Project:Distribution_Kernel
|
||||
https://www.kernel.org/
|
||||
"
|
||||
SRC_URI+="
|
||||
https://cdn.kernel.org/pub/linux/kernel/v$(ver_cut 1).x/${BASE_P}.tar.xz
|
||||
https://cdn.kernel.org/pub/linux/kernel/v$(ver_cut 1).x/patch-${PATCH_PV}.xz
|
||||
https://dev.gentoo.org/~mgorny/dist/linux/${PATCHSET}.tar.xz
|
||||
https://github.com/projg2/gentoo-kernel-config/archive/${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/sha256sums.asc
|
||||
-> linux-$(ver_cut 1).x-sha256sums-${SHA256SUM_DATE}.asc
|
||||
)
|
||||
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}/${BASE_P}
|
||||
|
||||
KEYWORDS="amd64 ~arm arm64 ~hppa ~ppc ppc64 ~sparc x86"
|
||||
IUSE="debug experimental hardened"
|
||||
REQUIRED_USE="
|
||||
arm? ( savedconfig )
|
||||
hppa? ( savedconfig )
|
||||
sparc? ( savedconfig )
|
||||
"
|
||||
|
||||
RDEPEND="
|
||||
!sys-kernel/gentoo-kernel-bin:${SLOT}
|
||||
"
|
||||
BDEPEND="
|
||||
debug? ( dev-util/pahole )
|
||||
verify-sig? ( >=sec-keys/openpgp-keys-kernel-20250702 )
|
||||
"
|
||||
PDEPEND="
|
||||
>=virtual/dist-kernel-${PV}
|
||||
"
|
||||
|
||||
QA_FLAGS_IGNORED="
|
||||
usr/src/linux-.*/scripts/gcc-plugins/.*.so
|
||||
usr/src/linux-.*/vmlinux
|
||||
usr/src/linux-.*/arch/powerpc/kernel/vdso.*/vdso.*.so.dbg
|
||||
"
|
||||
|
||||
VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/kernel.org.asc
|
||||
|
||||
src_unpack() {
|
||||
if use verify-sig; then
|
||||
cd "${DISTDIR}" || die
|
||||
verify-sig_verify_signed_checksums \
|
||||
"linux-$(ver_cut 1).x-sha256sums-${SHA256SUM_DATE}.asc" \
|
||||
sha256 "${BASE_P}.tar.xz patch-${PATCH_PV}.xz"
|
||||
cd "${WORKDIR}" || die
|
||||
fi
|
||||
|
||||
default
|
||||
}
|
||||
|
||||
src_prepare() {
|
||||
local patch
|
||||
eapply "${WORKDIR}/patch-${PATCH_PV}"
|
||||
for patch in "${WORKDIR}/${PATCHSET}"/*.patch; do
|
||||
eapply "${patch}"
|
||||
# non-experimental patches always finish with Gentoo Kconfig
|
||||
# when ! use experimental, stop applying after it
|
||||
if [[ ${patch} == *Add-Gentoo-Linux-support-config-settings* ]] &&
|
||||
! use experimental
|
||||
then
|
||||
break
|
||||
fi
|
||||
done
|
||||
|
||||
default
|
||||
|
||||
# add Gentoo patchset version
|
||||
local extraversion=${PV#${PATCH_PV}}
|
||||
sed -i -e "s:^\(EXTRAVERSION =\).*:\1 ${extraversion/_/-}:" Makefile || die
|
||||
|
||||
local biendian=false
|
||||
|
||||
# prepare the default config
|
||||
case ${ARCH} in
|
||||
arm | hppa | sparc)
|
||||
> .config || die
|
||||
;;
|
||||
amd64)
|
||||
cp "${DISTDIR}/kernel-x86_64-fedora.config.${CONFIG_VER}" .config || die
|
||||
;;
|
||||
arm64)
|
||||
cp "${DISTDIR}/kernel-aarch64-fedora.config.${CONFIG_VER}" .config || die
|
||||
biendian=true
|
||||
;;
|
||||
ppc)
|
||||
# assume powermac/powerbook defconfig
|
||||
# we still package.use.force savedconfig
|
||||
cp "${WORKDIR}/${BASE_P}/arch/powerpc/configs/pmac32_defconfig" .config || die
|
||||
;;
|
||||
ppc64)
|
||||
cp "${DISTDIR}/kernel-ppc64le-fedora.config.${CONFIG_VER}" .config || die
|
||||
biendian=true
|
||||
;;
|
||||
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
|
||||
|
||||
# this covers ppc64 and aarch64_be only for now
|
||||
if [[ ${biendian} == true && $(tc-endian) == big ]]; then
|
||||
merge_configs+=( "${dist_conf_path}/big-endian.config" )
|
||||
fi
|
||||
|
||||
use secureboot && merge_configs+=( "${dist_conf_path}/secureboot.config" )
|
||||
|
||||
kernel-build_merge_configs "${merge_configs[@]}"
|
||||
}
|
||||
@ -1,173 +0,0 @@
|
||||
# Copyright 2020-2025 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=8
|
||||
|
||||
KERNEL_IUSE_MODULES_SIGN=1
|
||||
|
||||
inherit kernel-build toolchain-funcs verify-sig
|
||||
|
||||
BASE_P=linux-${PV%.*}
|
||||
PATCH_PV=${PV%_p*}
|
||||
PATCHSET=linux-gentoo-patches-5.15.195
|
||||
# https://koji.fedoraproject.org/koji/packageinfo?packageID=8
|
||||
# forked to https://github.com/projg2/fedora-kernel-config-for-gentoo
|
||||
CONFIG_VER=6.1.102-gentoo
|
||||
GENTOO_CONFIG_VER=g17
|
||||
SHA256SUM_DATE=20251019
|
||||
|
||||
DESCRIPTION="Linux kernel built with Gentoo patches"
|
||||
HOMEPAGE="
|
||||
https://wiki.gentoo.org/wiki/Project:Distribution_Kernel
|
||||
https://www.kernel.org/
|
||||
"
|
||||
SRC_URI+="
|
||||
https://cdn.kernel.org/pub/linux/kernel/v$(ver_cut 1).x/${BASE_P}.tar.xz
|
||||
https://cdn.kernel.org/pub/linux/kernel/v$(ver_cut 1).x/patch-${PATCH_PV}.xz
|
||||
https://dev.gentoo.org/~mgorny/dist/linux/${PATCHSET}.tar.xz
|
||||
https://github.com/projg2/gentoo-kernel-config/archive/${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/sha256sums.asc
|
||||
-> linux-$(ver_cut 1).x-sha256sums-${SHA256SUM_DATE}.asc
|
||||
)
|
||||
amd64? (
|
||||
https://raw.githubusercontent.com/projg2/fedora-kernel-config-for-gentoo/${CONFIG_VER}/kernel-x86_64-fedora.config
|
||||
-> kernel-x86_64-fedora.config.${CONFIG_VER}
|
||||
)
|
||||
arm64? (
|
||||
https://raw.githubusercontent.com/projg2/fedora-kernel-config-for-gentoo/${CONFIG_VER}/kernel-aarch64-fedora.config
|
||||
-> kernel-aarch64-fedora.config.${CONFIG_VER}
|
||||
)
|
||||
ppc64? (
|
||||
https://raw.githubusercontent.com/projg2/fedora-kernel-config-for-gentoo/${CONFIG_VER}/kernel-ppc64le-fedora.config
|
||||
-> kernel-ppc64le-fedora.config.${CONFIG_VER}
|
||||
)
|
||||
x86? (
|
||||
https://raw.githubusercontent.com/projg2/fedora-kernel-config-for-gentoo/${CONFIG_VER}/kernel-i686-fedora.config
|
||||
-> kernel-i686-fedora.config.${CONFIG_VER}
|
||||
)
|
||||
"
|
||||
S=${WORKDIR}/${BASE_P}
|
||||
|
||||
KEYWORDS="amd64 ~arm arm64 ~hppa ~ppc ppc64 ~sparc x86"
|
||||
IUSE="debug experimental hardened"
|
||||
REQUIRED_USE="
|
||||
arm? ( savedconfig )
|
||||
hppa? ( savedconfig )
|
||||
sparc? ( savedconfig )
|
||||
"
|
||||
|
||||
RDEPEND="
|
||||
!sys-kernel/gentoo-kernel-bin:${SLOT}
|
||||
"
|
||||
BDEPEND="
|
||||
debug? ( dev-util/pahole )
|
||||
verify-sig? ( >=sec-keys/openpgp-keys-kernel-20250702 )
|
||||
"
|
||||
PDEPEND="
|
||||
>=virtual/dist-kernel-${PV}
|
||||
"
|
||||
|
||||
QA_FLAGS_IGNORED="
|
||||
usr/src/linux-.*/scripts/gcc-plugins/.*.so
|
||||
usr/src/linux-.*/vmlinux
|
||||
usr/src/linux-.*/arch/powerpc/kernel/vdso.*/vdso.*.so.dbg
|
||||
"
|
||||
|
||||
VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/kernel.org.asc
|
||||
|
||||
src_unpack() {
|
||||
if use verify-sig; then
|
||||
cd "${DISTDIR}" || die
|
||||
verify-sig_verify_signed_checksums \
|
||||
"linux-$(ver_cut 1).x-sha256sums-${SHA256SUM_DATE}.asc" \
|
||||
sha256 "${BASE_P}.tar.xz patch-${PATCH_PV}.xz"
|
||||
cd "${WORKDIR}" || die
|
||||
fi
|
||||
|
||||
default
|
||||
}
|
||||
|
||||
src_prepare() {
|
||||
local patch
|
||||
eapply "${WORKDIR}/patch-${PATCH_PV}"
|
||||
for patch in "${WORKDIR}/${PATCHSET}"/*.patch; do
|
||||
eapply "${patch}"
|
||||
# non-experimental patches always finish with Gentoo Kconfig
|
||||
# when ! use experimental, stop applying after it
|
||||
if [[ ${patch} == *Add-Gentoo-Linux-support-config-settings* ]] &&
|
||||
! use experimental
|
||||
then
|
||||
break
|
||||
fi
|
||||
done
|
||||
|
||||
default
|
||||
|
||||
# add Gentoo patchset version
|
||||
local extraversion=${PV#${PATCH_PV}}
|
||||
sed -i -e "s:^\(EXTRAVERSION =\).*:\1 ${extraversion/_/-}:" Makefile || die
|
||||
|
||||
local biendian=false
|
||||
|
||||
# prepare the default config
|
||||
case ${ARCH} in
|
||||
arm | hppa | sparc)
|
||||
> .config || die
|
||||
;;
|
||||
amd64)
|
||||
cp "${DISTDIR}/kernel-x86_64-fedora.config.${CONFIG_VER}" .config || die
|
||||
;;
|
||||
arm64)
|
||||
cp "${DISTDIR}/kernel-aarch64-fedora.config.${CONFIG_VER}" .config || die
|
||||
biendian=true
|
||||
;;
|
||||
ppc)
|
||||
# assume powermac/powerbook defconfig
|
||||
# we still package.use.force savedconfig
|
||||
cp "${WORKDIR}/${BASE_P}/arch/powerpc/configs/pmac32_defconfig" .config || die
|
||||
;;
|
||||
ppc64)
|
||||
cp "${DISTDIR}/kernel-ppc64le-fedora.config.${CONFIG_VER}" .config || die
|
||||
biendian=true
|
||||
;;
|
||||
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
|
||||
|
||||
# this covers ppc64 and aarch64_be only for now
|
||||
if [[ ${biendian} == true && $(tc-endian) == big ]]; then
|
||||
merge_configs+=( "${dist_conf_path}/big-endian.config" )
|
||||
fi
|
||||
|
||||
use secureboot && merge_configs+=( "${dist_conf_path}/secureboot.config" )
|
||||
|
||||
kernel-build_merge_configs "${merge_configs[@]}"
|
||||
}
|
||||
@ -1,174 +0,0 @@
|
||||
# Copyright 2020-2025 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=8
|
||||
|
||||
KERNEL_IUSE_MODULES_SIGN=1
|
||||
|
||||
inherit kernel-build toolchain-funcs verify-sig
|
||||
|
||||
BASE_P=linux-${PV%.*}
|
||||
PATCH_PV=${PV%_p*}
|
||||
PATCHSET=linux-gentoo-patches-6.1.156
|
||||
# https://koji.fedoraproject.org/koji/packageinfo?packageID=8
|
||||
# forked to https://github.com/projg2/fedora-kernel-config-for-gentoo
|
||||
CONFIG_VER=6.1.102-gentoo
|
||||
GENTOO_CONFIG_VER=g17
|
||||
SHA256SUM_DATE=20251019
|
||||
|
||||
DESCRIPTION="Linux kernel built with Gentoo patches"
|
||||
HOMEPAGE="
|
||||
https://wiki.gentoo.org/wiki/Project:Distribution_Kernel
|
||||
https://www.kernel.org/
|
||||
"
|
||||
SRC_URI+="
|
||||
https://cdn.kernel.org/pub/linux/kernel/v$(ver_cut 1).x/${BASE_P}.tar.xz
|
||||
https://cdn.kernel.org/pub/linux/kernel/v$(ver_cut 1).x/patch-${PATCH_PV}.xz
|
||||
https://dev.gentoo.org/~mgorny/dist/linux/${PATCHSET}.tar.xz
|
||||
https://github.com/projg2/gentoo-kernel-config/archive/${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/sha256sums.asc
|
||||
-> linux-$(ver_cut 1).x-sha256sums-${SHA256SUM_DATE}.asc
|
||||
)
|
||||
amd64? (
|
||||
https://raw.githubusercontent.com/projg2/fedora-kernel-config-for-gentoo/${CONFIG_VER}/kernel-x86_64-fedora.config
|
||||
-> kernel-x86_64-fedora.config.${CONFIG_VER}
|
||||
)
|
||||
arm64? (
|
||||
https://raw.githubusercontent.com/projg2/fedora-kernel-config-for-gentoo/${CONFIG_VER}/kernel-aarch64-fedora.config
|
||||
-> kernel-aarch64-fedora.config.${CONFIG_VER}
|
||||
)
|
||||
ppc64? (
|
||||
https://raw.githubusercontent.com/projg2/fedora-kernel-config-for-gentoo/${CONFIG_VER}/kernel-ppc64le-fedora.config
|
||||
-> kernel-ppc64le-fedora.config.${CONFIG_VER}
|
||||
)
|
||||
x86? (
|
||||
https://raw.githubusercontent.com/projg2/fedora-kernel-config-for-gentoo/${CONFIG_VER}/kernel-i686-fedora.config
|
||||
-> kernel-i686-fedora.config.${CONFIG_VER}
|
||||
)
|
||||
"
|
||||
S=${WORKDIR}/${BASE_P}
|
||||
|
||||
KEYWORDS="amd64 ~arm arm64 ~hppa ~loong ~ppc ppc64 ~riscv ~sparc x86"
|
||||
IUSE="debug experimental hardened"
|
||||
REQUIRED_USE="
|
||||
arm? ( savedconfig )
|
||||
hppa? ( savedconfig )
|
||||
riscv? ( savedconfig )
|
||||
sparc? ( savedconfig )
|
||||
"
|
||||
|
||||
RDEPEND="
|
||||
!sys-kernel/gentoo-kernel-bin:${SLOT}
|
||||
"
|
||||
BDEPEND="
|
||||
debug? ( dev-util/pahole )
|
||||
verify-sig? ( >=sec-keys/openpgp-keys-kernel-20250702 )
|
||||
"
|
||||
PDEPEND="
|
||||
>=virtual/dist-kernel-${PV}
|
||||
"
|
||||
|
||||
QA_FLAGS_IGNORED="
|
||||
usr/src/linux-.*/scripts/gcc-plugins/.*.so
|
||||
usr/src/linux-.*/vmlinux
|
||||
usr/src/linux-.*/arch/powerpc/kernel/vdso.*/vdso.*.so.dbg
|
||||
"
|
||||
|
||||
VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/kernel.org.asc
|
||||
|
||||
src_unpack() {
|
||||
if use verify-sig; then
|
||||
cd "${DISTDIR}" || die
|
||||
verify-sig_verify_signed_checksums \
|
||||
"linux-$(ver_cut 1).x-sha256sums-${SHA256SUM_DATE}.asc" \
|
||||
sha256 "${BASE_P}.tar.xz patch-${PATCH_PV}.xz"
|
||||
cd "${WORKDIR}" || die
|
||||
fi
|
||||
|
||||
default
|
||||
}
|
||||
|
||||
src_prepare() {
|
||||
local patch
|
||||
eapply "${WORKDIR}/patch-${PATCH_PV}"
|
||||
for patch in "${WORKDIR}/${PATCHSET}"/*.patch; do
|
||||
eapply "${patch}"
|
||||
# non-experimental patches always finish with Gentoo Kconfig
|
||||
# when ! use experimental, stop applying after it
|
||||
if [[ ${patch} == *Add-Gentoo-Linux-support-config-settings* ]] &&
|
||||
! use experimental
|
||||
then
|
||||
break
|
||||
fi
|
||||
done
|
||||
|
||||
default
|
||||
|
||||
# add Gentoo patchset version
|
||||
local extraversion=${PV#${PATCH_PV}}
|
||||
sed -i -e "s:^\(EXTRAVERSION =\).*:\1 ${extraversion/_/-}:" Makefile || die
|
||||
|
||||
local biendian=false
|
||||
|
||||
# prepare the default config
|
||||
case ${ARCH} in
|
||||
arm | hppa | loong | riscv | sparc)
|
||||
> .config || die
|
||||
;;
|
||||
amd64)
|
||||
cp "${DISTDIR}/kernel-x86_64-fedora.config.${CONFIG_VER}" .config || die
|
||||
;;
|
||||
arm64)
|
||||
cp "${DISTDIR}/kernel-aarch64-fedora.config.${CONFIG_VER}" .config || die
|
||||
biendian=true
|
||||
;;
|
||||
ppc)
|
||||
# assume powermac/powerbook defconfig
|
||||
# we still package.use.force savedconfig
|
||||
cp "${WORKDIR}/${BASE_P}/arch/powerpc/configs/pmac32_defconfig" .config || die
|
||||
;;
|
||||
ppc64)
|
||||
cp "${DISTDIR}/kernel-ppc64le-fedora.config.${CONFIG_VER}" .config || die
|
||||
biendian=true
|
||||
;;
|
||||
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
|
||||
|
||||
# this covers ppc64 and aarch64_be only for now
|
||||
if [[ ${biendian} == true && $(tc-endian) == big ]]; then
|
||||
merge_configs+=( "${dist_conf_path}/big-endian.config" )
|
||||
fi
|
||||
|
||||
use secureboot && merge_configs+=( "${dist_conf_path}/secureboot.config" )
|
||||
|
||||
kernel-build_merge_configs "${merge_configs[@]}"
|
||||
}
|
||||
@ -1,185 +0,0 @@
|
||||
# Copyright 2020-2025 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=8
|
||||
|
||||
KERNEL_IUSE_GENERIC_UKI=1
|
||||
KERNEL_IUSE_MODULES_SIGN=1
|
||||
|
||||
inherit kernel-build toolchain-funcs verify-sig
|
||||
|
||||
BASE_P=linux-${PV%.*}
|
||||
PATCH_PV=${PV%_p*}
|
||||
PATCHSET=linux-gentoo-patches-6.12.52
|
||||
# https://koji.fedoraproject.org/koji/packageinfo?packageID=8
|
||||
# forked to https://github.com/projg2/fedora-kernel-config-for-gentoo
|
||||
CONFIG_VER=6.12.41-gentoo
|
||||
GENTOO_CONFIG_VER=g17
|
||||
SHA256SUM_DATE=20251019
|
||||
|
||||
DESCRIPTION="Linux kernel built with Gentoo patches"
|
||||
HOMEPAGE="
|
||||
https://wiki.gentoo.org/wiki/Project:Distribution_Kernel
|
||||
https://www.kernel.org/
|
||||
"
|
||||
SRC_URI+="
|
||||
https://cdn.kernel.org/pub/linux/kernel/v$(ver_cut 1).x/${BASE_P}.tar.xz
|
||||
https://cdn.kernel.org/pub/linux/kernel/v$(ver_cut 1).x/patch-${PATCH_PV}.xz
|
||||
https://dev.gentoo.org/~mgorny/dist/linux/${PATCHSET}.tar.xz
|
||||
https://github.com/projg2/gentoo-kernel-config/archive/${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/sha256sums.asc
|
||||
-> linux-$(ver_cut 1).x-sha256sums-${SHA256SUM_DATE}.asc
|
||||
)
|
||||
amd64? (
|
||||
https://raw.githubusercontent.com/projg2/fedora-kernel-config-for-gentoo/${CONFIG_VER}/kernel-x86_64-fedora.config
|
||||
-> kernel-x86_64-fedora.config.${CONFIG_VER}
|
||||
)
|
||||
arm64? (
|
||||
https://raw.githubusercontent.com/projg2/fedora-kernel-config-for-gentoo/${CONFIG_VER}/kernel-aarch64-fedora.config
|
||||
-> kernel-aarch64-fedora.config.${CONFIG_VER}
|
||||
)
|
||||
ppc64? (
|
||||
https://raw.githubusercontent.com/projg2/fedora-kernel-config-for-gentoo/${CONFIG_VER}/kernel-ppc64le-fedora.config
|
||||
-> kernel-ppc64le-fedora.config.${CONFIG_VER}
|
||||
)
|
||||
riscv? (
|
||||
https://raw.githubusercontent.com/projg2/fedora-kernel-config-for-gentoo/${CONFIG_VER}/kernel-riscv64-fedora.config
|
||||
-> kernel-riscv64-fedora.config.${CONFIG_VER}
|
||||
)
|
||||
x86? (
|
||||
https://raw.githubusercontent.com/projg2/fedora-kernel-config-for-gentoo/${CONFIG_VER}/kernel-i686-fedora.config
|
||||
-> kernel-i686-fedora.config.${CONFIG_VER}
|
||||
)
|
||||
"
|
||||
S=${WORKDIR}/${BASE_P}
|
||||
|
||||
KEYWORDS="amd64 ~arm arm64 ~hppa ~loong ~ppc ppc64 ~riscv ~sparc x86"
|
||||
IUSE="debug experimental hardened"
|
||||
REQUIRED_USE="
|
||||
arm? ( savedconfig )
|
||||
hppa? ( savedconfig )
|
||||
sparc? ( savedconfig )
|
||||
"
|
||||
|
||||
RDEPEND="
|
||||
!sys-kernel/gentoo-kernel-bin:${SLOT}
|
||||
"
|
||||
BDEPEND="
|
||||
debug? ( dev-util/pahole )
|
||||
verify-sig? ( >=sec-keys/openpgp-keys-kernel-20250702 )
|
||||
"
|
||||
PDEPEND="
|
||||
>=virtual/dist-kernel-${PV}
|
||||
"
|
||||
|
||||
QA_FLAGS_IGNORED="
|
||||
usr/src/linux-.*/scripts/gcc-plugins/.*.so
|
||||
usr/src/linux-.*/vmlinux
|
||||
usr/src/linux-.*/arch/powerpc/kernel/vdso.*/vdso.*.so.dbg
|
||||
"
|
||||
|
||||
VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/kernel.org.asc
|
||||
|
||||
src_unpack() {
|
||||
if use verify-sig; then
|
||||
cd "${DISTDIR}" || die
|
||||
verify-sig_verify_signed_checksums \
|
||||
"linux-$(ver_cut 1).x-sha256sums-${SHA256SUM_DATE}.asc" \
|
||||
sha256 "${BASE_P}.tar.xz patch-${PATCH_PV}.xz"
|
||||
cd "${WORKDIR}" || die
|
||||
fi
|
||||
|
||||
default
|
||||
}
|
||||
|
||||
src_prepare() {
|
||||
local patch
|
||||
eapply "${WORKDIR}/patch-${PATCH_PV}"
|
||||
for patch in "${WORKDIR}/${PATCHSET}"/*.patch; do
|
||||
eapply "${patch}"
|
||||
# non-experimental patches always finish with Gentoo Kconfig
|
||||
# when ! use experimental, stop applying after it
|
||||
if [[ ${patch} == *Add-Gentoo-Linux-support-config-settings* ]] &&
|
||||
! use experimental
|
||||
then
|
||||
break
|
||||
fi
|
||||
done
|
||||
|
||||
default
|
||||
|
||||
# add Gentoo patchset version
|
||||
local extraversion=${PV#${PATCH_PV}}
|
||||
sed -i -e "s:^\(EXTRAVERSION =\).*:\1 ${extraversion/_/-}:" Makefile || die
|
||||
|
||||
local biendian=false
|
||||
|
||||
# prepare the default config
|
||||
case ${ARCH} in
|
||||
arm | hppa | loong | sparc)
|
||||
> .config || die
|
||||
;;
|
||||
amd64)
|
||||
cp "${DISTDIR}/kernel-x86_64-fedora.config.${CONFIG_VER}" .config || die
|
||||
;;
|
||||
arm64)
|
||||
cp "${DISTDIR}/kernel-aarch64-fedora.config.${CONFIG_VER}" .config || die
|
||||
biendian=true
|
||||
;;
|
||||
ppc)
|
||||
# assume powermac/powerbook defconfig
|
||||
# we still package.use.force savedconfig
|
||||
cp "${WORKDIR}/${BASE_P}/arch/powerpc/configs/pmac32_defconfig" .config || die
|
||||
;;
|
||||
ppc64)
|
||||
cp "${DISTDIR}/kernel-ppc64le-fedora.config.${CONFIG_VER}" .config || die
|
||||
biendian=true
|
||||
;;
|
||||
riscv)
|
||||
cp "${DISTDIR}/kernel-riscv64-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
|
||||
"${dist_conf_path}"/6.12+.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
|
||||
|
||||
# this covers ppc64 and aarch64_be only for now
|
||||
if [[ ${biendian} == true && $(tc-endian) == big ]]; then
|
||||
merge_configs+=( "${dist_conf_path}/big-endian.config" )
|
||||
fi
|
||||
|
||||
use secureboot && merge_configs+=(
|
||||
"${dist_conf_path}/secureboot.config"
|
||||
"${dist_conf_path}/zboot.config"
|
||||
)
|
||||
|
||||
kernel-build_merge_configs "${merge_configs[@]}"
|
||||
}
|
||||
@ -1,185 +0,0 @@
|
||||
# Copyright 2020-2025 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=8
|
||||
|
||||
KERNEL_IUSE_GENERIC_UKI=1
|
||||
KERNEL_IUSE_MODULES_SIGN=1
|
||||
|
||||
inherit kernel-build toolchain-funcs verify-sig
|
||||
|
||||
BASE_P=linux-${PV%.*}
|
||||
PATCH_PV=${PV%_p*}
|
||||
PATCHSET=linux-gentoo-patches-6.12.52
|
||||
# https://koji.fedoraproject.org/koji/packageinfo?packageID=8
|
||||
# forked to https://github.com/projg2/fedora-kernel-config-for-gentoo
|
||||
CONFIG_VER=6.12.41-gentoo
|
||||
GENTOO_CONFIG_VER=g17
|
||||
SHA256SUM_DATE=20251102
|
||||
|
||||
DESCRIPTION="Linux kernel built with Gentoo patches"
|
||||
HOMEPAGE="
|
||||
https://wiki.gentoo.org/wiki/Project:Distribution_Kernel
|
||||
https://www.kernel.org/
|
||||
"
|
||||
SRC_URI+="
|
||||
https://cdn.kernel.org/pub/linux/kernel/v$(ver_cut 1).x/${BASE_P}.tar.xz
|
||||
https://cdn.kernel.org/pub/linux/kernel/v$(ver_cut 1).x/patch-${PATCH_PV}.xz
|
||||
https://dev.gentoo.org/~mgorny/dist/linux/${PATCHSET}.tar.xz
|
||||
https://github.com/projg2/gentoo-kernel-config/archive/${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/sha256sums.asc
|
||||
-> linux-$(ver_cut 1).x-sha256sums-${SHA256SUM_DATE}.asc
|
||||
)
|
||||
amd64? (
|
||||
https://raw.githubusercontent.com/projg2/fedora-kernel-config-for-gentoo/${CONFIG_VER}/kernel-x86_64-fedora.config
|
||||
-> kernel-x86_64-fedora.config.${CONFIG_VER}
|
||||
)
|
||||
arm64? (
|
||||
https://raw.githubusercontent.com/projg2/fedora-kernel-config-for-gentoo/${CONFIG_VER}/kernel-aarch64-fedora.config
|
||||
-> kernel-aarch64-fedora.config.${CONFIG_VER}
|
||||
)
|
||||
ppc64? (
|
||||
https://raw.githubusercontent.com/projg2/fedora-kernel-config-for-gentoo/${CONFIG_VER}/kernel-ppc64le-fedora.config
|
||||
-> kernel-ppc64le-fedora.config.${CONFIG_VER}
|
||||
)
|
||||
riscv? (
|
||||
https://raw.githubusercontent.com/projg2/fedora-kernel-config-for-gentoo/${CONFIG_VER}/kernel-riscv64-fedora.config
|
||||
-> kernel-riscv64-fedora.config.${CONFIG_VER}
|
||||
)
|
||||
x86? (
|
||||
https://raw.githubusercontent.com/projg2/fedora-kernel-config-for-gentoo/${CONFIG_VER}/kernel-i686-fedora.config
|
||||
-> kernel-i686-fedora.config.${CONFIG_VER}
|
||||
)
|
||||
"
|
||||
S=${WORKDIR}/${BASE_P}
|
||||
|
||||
KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~loong ~ppc ~ppc64 ~riscv ~sparc ~x86"
|
||||
IUSE="debug experimental hardened"
|
||||
REQUIRED_USE="
|
||||
arm? ( savedconfig )
|
||||
hppa? ( savedconfig )
|
||||
sparc? ( savedconfig )
|
||||
"
|
||||
|
||||
RDEPEND="
|
||||
!sys-kernel/gentoo-kernel-bin:${SLOT}
|
||||
"
|
||||
BDEPEND="
|
||||
debug? ( dev-util/pahole )
|
||||
verify-sig? ( >=sec-keys/openpgp-keys-kernel-20250702 )
|
||||
"
|
||||
PDEPEND="
|
||||
>=virtual/dist-kernel-${PV}
|
||||
"
|
||||
|
||||
QA_FLAGS_IGNORED="
|
||||
usr/src/linux-.*/scripts/gcc-plugins/.*.so
|
||||
usr/src/linux-.*/vmlinux
|
||||
usr/src/linux-.*/arch/powerpc/kernel/vdso.*/vdso.*.so.dbg
|
||||
"
|
||||
|
||||
VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/kernel.org.asc
|
||||
|
||||
src_unpack() {
|
||||
if use verify-sig; then
|
||||
cd "${DISTDIR}" || die
|
||||
verify-sig_verify_signed_checksums \
|
||||
"linux-$(ver_cut 1).x-sha256sums-${SHA256SUM_DATE}.asc" \
|
||||
sha256 "${BASE_P}.tar.xz patch-${PATCH_PV}.xz"
|
||||
cd "${WORKDIR}" || die
|
||||
fi
|
||||
|
||||
default
|
||||
}
|
||||
|
||||
src_prepare() {
|
||||
local patch
|
||||
eapply "${WORKDIR}/patch-${PATCH_PV}"
|
||||
for patch in "${WORKDIR}/${PATCHSET}"/*.patch; do
|
||||
eapply "${patch}"
|
||||
# non-experimental patches always finish with Gentoo Kconfig
|
||||
# when ! use experimental, stop applying after it
|
||||
if [[ ${patch} == *Add-Gentoo-Linux-support-config-settings* ]] &&
|
||||
! use experimental
|
||||
then
|
||||
break
|
||||
fi
|
||||
done
|
||||
|
||||
default
|
||||
|
||||
# add Gentoo patchset version
|
||||
local extraversion=${PV#${PATCH_PV}}
|
||||
sed -i -e "s:^\(EXTRAVERSION =\).*:\1 ${extraversion/_/-}:" Makefile || die
|
||||
|
||||
local biendian=false
|
||||
|
||||
# prepare the default config
|
||||
case ${ARCH} in
|
||||
arm | hppa | loong | sparc)
|
||||
> .config || die
|
||||
;;
|
||||
amd64)
|
||||
cp "${DISTDIR}/kernel-x86_64-fedora.config.${CONFIG_VER}" .config || die
|
||||
;;
|
||||
arm64)
|
||||
cp "${DISTDIR}/kernel-aarch64-fedora.config.${CONFIG_VER}" .config || die
|
||||
biendian=true
|
||||
;;
|
||||
ppc)
|
||||
# assume powermac/powerbook defconfig
|
||||
# we still package.use.force savedconfig
|
||||
cp "${WORKDIR}/${BASE_P}/arch/powerpc/configs/pmac32_defconfig" .config || die
|
||||
;;
|
||||
ppc64)
|
||||
cp "${DISTDIR}/kernel-ppc64le-fedora.config.${CONFIG_VER}" .config || die
|
||||
biendian=true
|
||||
;;
|
||||
riscv)
|
||||
cp "${DISTDIR}/kernel-riscv64-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
|
||||
"${dist_conf_path}"/6.12+.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
|
||||
|
||||
# this covers ppc64 and aarch64_be only for now
|
||||
if [[ ${biendian} == true && $(tc-endian) == big ]]; then
|
||||
merge_configs+=( "${dist_conf_path}/big-endian.config" )
|
||||
fi
|
||||
|
||||
use secureboot && merge_configs+=(
|
||||
"${dist_conf_path}/secureboot.config"
|
||||
"${dist_conf_path}/zboot.config"
|
||||
)
|
||||
|
||||
kernel-build_merge_configs "${merge_configs[@]}"
|
||||
}
|
||||
@ -1,185 +0,0 @@
|
||||
# Copyright 2020-2025 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=8
|
||||
|
||||
KERNEL_IUSE_GENERIC_UKI=1
|
||||
KERNEL_IUSE_MODULES_SIGN=1
|
||||
|
||||
inherit kernel-build toolchain-funcs verify-sig
|
||||
|
||||
BASE_P=linux-${PV%.*}
|
||||
PATCH_PV=${PV%_p*}
|
||||
PATCHSET=linux-gentoo-patches-6.17.2
|
||||
# https://koji.fedoraproject.org/koji/packageinfo?packageID=8
|
||||
# forked to https://github.com/projg2/fedora-kernel-config-for-gentoo
|
||||
CONFIG_VER=6.17.3-gentoo
|
||||
GENTOO_CONFIG_VER=g17
|
||||
SHA256SUM_DATE=20251102
|
||||
|
||||
DESCRIPTION="Linux kernel built with Gentoo patches"
|
||||
HOMEPAGE="
|
||||
https://wiki.gentoo.org/wiki/Project:Distribution_Kernel
|
||||
https://www.kernel.org/
|
||||
"
|
||||
SRC_URI+="
|
||||
https://cdn.kernel.org/pub/linux/kernel/v$(ver_cut 1).x/${BASE_P}.tar.xz
|
||||
https://cdn.kernel.org/pub/linux/kernel/v$(ver_cut 1).x/patch-${PATCH_PV}.xz
|
||||
https://dev.gentoo.org/~mgorny/dist/linux/${PATCHSET}.tar.xz
|
||||
https://github.com/projg2/gentoo-kernel-config/archive/${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/sha256sums.asc
|
||||
-> linux-$(ver_cut 1).x-sha256sums-${SHA256SUM_DATE}.asc
|
||||
)
|
||||
amd64? (
|
||||
https://raw.githubusercontent.com/projg2/fedora-kernel-config-for-gentoo/${CONFIG_VER}/kernel-x86_64-fedora.config
|
||||
-> kernel-x86_64-fedora.config.${CONFIG_VER}
|
||||
)
|
||||
arm64? (
|
||||
https://raw.githubusercontent.com/projg2/fedora-kernel-config-for-gentoo/${CONFIG_VER}/kernel-aarch64-fedora.config
|
||||
-> kernel-aarch64-fedora.config.${CONFIG_VER}
|
||||
)
|
||||
ppc64? (
|
||||
https://raw.githubusercontent.com/projg2/fedora-kernel-config-for-gentoo/${CONFIG_VER}/kernel-ppc64le-fedora.config
|
||||
-> kernel-ppc64le-fedora.config.${CONFIG_VER}
|
||||
)
|
||||
riscv? (
|
||||
https://raw.githubusercontent.com/projg2/fedora-kernel-config-for-gentoo/${CONFIG_VER}/kernel-riscv64-fedora.config
|
||||
-> kernel-riscv64-fedora.config.${CONFIG_VER}
|
||||
)
|
||||
x86? (
|
||||
https://raw.githubusercontent.com/projg2/fedora-kernel-config-for-gentoo/${CONFIG_VER}/kernel-i686-fedora.config
|
||||
-> kernel-i686-fedora.config.${CONFIG_VER}
|
||||
)
|
||||
"
|
||||
S=${WORKDIR}/${BASE_P}
|
||||
|
||||
KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~loong ~ppc ~ppc64 ~riscv ~sparc ~x86"
|
||||
IUSE="debug experimental hardened"
|
||||
REQUIRED_USE="
|
||||
arm? ( savedconfig )
|
||||
hppa? ( savedconfig )
|
||||
sparc? ( savedconfig )
|
||||
"
|
||||
|
||||
RDEPEND="
|
||||
!sys-kernel/gentoo-kernel-bin:${SLOT}
|
||||
"
|
||||
BDEPEND="
|
||||
debug? ( dev-util/pahole )
|
||||
verify-sig? ( >=sec-keys/openpgp-keys-kernel-20250702 )
|
||||
"
|
||||
PDEPEND="
|
||||
>=virtual/dist-kernel-${PV}
|
||||
"
|
||||
|
||||
QA_FLAGS_IGNORED="
|
||||
usr/src/linux-.*/scripts/gcc-plugins/.*.so
|
||||
usr/src/linux-.*/vmlinux
|
||||
usr/src/linux-.*/arch/powerpc/kernel/vdso.*/vdso.*.so.dbg
|
||||
"
|
||||
|
||||
VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/kernel.org.asc
|
||||
|
||||
src_unpack() {
|
||||
if use verify-sig; then
|
||||
cd "${DISTDIR}" || die
|
||||
verify-sig_verify_signed_checksums \
|
||||
"linux-$(ver_cut 1).x-sha256sums-${SHA256SUM_DATE}.asc" \
|
||||
sha256 "${BASE_P}.tar.xz patch-${PATCH_PV}.xz"
|
||||
cd "${WORKDIR}" || die
|
||||
fi
|
||||
|
||||
default
|
||||
}
|
||||
|
||||
src_prepare() {
|
||||
local patch
|
||||
eapply "${WORKDIR}/patch-${PATCH_PV}"
|
||||
for patch in "${WORKDIR}/${PATCHSET}"/*.patch; do
|
||||
eapply "${patch}"
|
||||
# non-experimental patches always finish with Gentoo Kconfig
|
||||
# when ! use experimental, stop applying after it
|
||||
if [[ ${patch} == *Add-Gentoo-Linux-support-config-settings* ]] &&
|
||||
! use experimental
|
||||
then
|
||||
break
|
||||
fi
|
||||
done
|
||||
|
||||
default
|
||||
|
||||
# add Gentoo patchset version
|
||||
local extraversion=${PV#${PATCH_PV}}
|
||||
sed -i -e "s:^\(EXTRAVERSION =\).*:\1 ${extraversion/_/-}:" Makefile || die
|
||||
|
||||
local biendian=false
|
||||
|
||||
# prepare the default config
|
||||
case ${ARCH} in
|
||||
arm | hppa | loong | sparc)
|
||||
> .config || die
|
||||
;;
|
||||
amd64)
|
||||
cp "${DISTDIR}/kernel-x86_64-fedora.config.${CONFIG_VER}" .config || die
|
||||
;;
|
||||
arm64)
|
||||
cp "${DISTDIR}/kernel-aarch64-fedora.config.${CONFIG_VER}" .config || die
|
||||
biendian=true
|
||||
;;
|
||||
ppc)
|
||||
# assume powermac/powerbook defconfig
|
||||
# we still package.use.force savedconfig
|
||||
cp "${WORKDIR}/${BASE_P}/arch/powerpc/configs/pmac32_defconfig" .config || die
|
||||
;;
|
||||
ppc64)
|
||||
cp "${DISTDIR}/kernel-ppc64le-fedora.config.${CONFIG_VER}" .config || die
|
||||
biendian=true
|
||||
;;
|
||||
riscv)
|
||||
cp "${DISTDIR}/kernel-riscv64-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
|
||||
"${dist_conf_path}"/6.12+.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
|
||||
|
||||
# this covers ppc64 and aarch64_be only for now
|
||||
if [[ ${biendian} == true && $(tc-endian) == big ]]; then
|
||||
merge_configs+=( "${dist_conf_path}/big-endian.config" )
|
||||
fi
|
||||
|
||||
use secureboot && merge_configs+=(
|
||||
"${dist_conf_path}/secureboot.config"
|
||||
"${dist_conf_path}/zboot.config"
|
||||
)
|
||||
|
||||
kernel-build_merge_configs "${merge_configs[@]}"
|
||||
}
|
||||
@ -1,185 +0,0 @@
|
||||
# Copyright 2020-2025 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=8
|
||||
|
||||
KERNEL_IUSE_GENERIC_UKI=1
|
||||
KERNEL_IUSE_MODULES_SIGN=1
|
||||
|
||||
inherit kernel-build toolchain-funcs verify-sig
|
||||
|
||||
BASE_P=linux-${PV%.*}
|
||||
PATCH_PV=${PV%_p*}
|
||||
PATCHSET=linux-gentoo-patches-6.17.2
|
||||
# https://koji.fedoraproject.org/koji/packageinfo?packageID=8
|
||||
# forked to https://github.com/projg2/fedora-kernel-config-for-gentoo
|
||||
CONFIG_VER=6.17.3-gentoo
|
||||
GENTOO_CONFIG_VER=g17
|
||||
SHA256SUM_DATE=20251114
|
||||
|
||||
DESCRIPTION="Linux kernel built with Gentoo patches"
|
||||
HOMEPAGE="
|
||||
https://wiki.gentoo.org/wiki/Project:Distribution_Kernel
|
||||
https://www.kernel.org/
|
||||
"
|
||||
SRC_URI+="
|
||||
https://cdn.kernel.org/pub/linux/kernel/v$(ver_cut 1).x/${BASE_P}.tar.xz
|
||||
https://cdn.kernel.org/pub/linux/kernel/v$(ver_cut 1).x/patch-${PATCH_PV}.xz
|
||||
https://dev.gentoo.org/~mgorny/dist/linux/${PATCHSET}.tar.xz
|
||||
https://github.com/projg2/gentoo-kernel-config/archive/${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/sha256sums.asc
|
||||
-> linux-$(ver_cut 1).x-sha256sums-${SHA256SUM_DATE}.asc
|
||||
)
|
||||
amd64? (
|
||||
https://raw.githubusercontent.com/projg2/fedora-kernel-config-for-gentoo/${CONFIG_VER}/kernel-x86_64-fedora.config
|
||||
-> kernel-x86_64-fedora.config.${CONFIG_VER}
|
||||
)
|
||||
arm64? (
|
||||
https://raw.githubusercontent.com/projg2/fedora-kernel-config-for-gentoo/${CONFIG_VER}/kernel-aarch64-fedora.config
|
||||
-> kernel-aarch64-fedora.config.${CONFIG_VER}
|
||||
)
|
||||
ppc64? (
|
||||
https://raw.githubusercontent.com/projg2/fedora-kernel-config-for-gentoo/${CONFIG_VER}/kernel-ppc64le-fedora.config
|
||||
-> kernel-ppc64le-fedora.config.${CONFIG_VER}
|
||||
)
|
||||
riscv? (
|
||||
https://raw.githubusercontent.com/projg2/fedora-kernel-config-for-gentoo/${CONFIG_VER}/kernel-riscv64-fedora.config
|
||||
-> kernel-riscv64-fedora.config.${CONFIG_VER}
|
||||
)
|
||||
x86? (
|
||||
https://raw.githubusercontent.com/projg2/fedora-kernel-config-for-gentoo/${CONFIG_VER}/kernel-i686-fedora.config
|
||||
-> kernel-i686-fedora.config.${CONFIG_VER}
|
||||
)
|
||||
"
|
||||
S=${WORKDIR}/${BASE_P}
|
||||
|
||||
KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~loong ~ppc ~ppc64 ~riscv ~sparc ~x86"
|
||||
IUSE="debug experimental hardened"
|
||||
REQUIRED_USE="
|
||||
arm? ( savedconfig )
|
||||
hppa? ( savedconfig )
|
||||
sparc? ( savedconfig )
|
||||
"
|
||||
|
||||
RDEPEND="
|
||||
!sys-kernel/gentoo-kernel-bin:${SLOT}
|
||||
"
|
||||
BDEPEND="
|
||||
debug? ( dev-util/pahole )
|
||||
verify-sig? ( >=sec-keys/openpgp-keys-kernel-20250702 )
|
||||
"
|
||||
PDEPEND="
|
||||
>=virtual/dist-kernel-${PV}
|
||||
"
|
||||
|
||||
QA_FLAGS_IGNORED="
|
||||
usr/src/linux-.*/scripts/gcc-plugins/.*.so
|
||||
usr/src/linux-.*/vmlinux
|
||||
usr/src/linux-.*/arch/powerpc/kernel/vdso.*/vdso.*.so.dbg
|
||||
"
|
||||
|
||||
VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/kernel.org.asc
|
||||
|
||||
src_unpack() {
|
||||
if use verify-sig; then
|
||||
cd "${DISTDIR}" || die
|
||||
verify-sig_verify_signed_checksums \
|
||||
"linux-$(ver_cut 1).x-sha256sums-${SHA256SUM_DATE}.asc" \
|
||||
sha256 "${BASE_P}.tar.xz patch-${PATCH_PV}.xz"
|
||||
cd "${WORKDIR}" || die
|
||||
fi
|
||||
|
||||
default
|
||||
}
|
||||
|
||||
src_prepare() {
|
||||
local patch
|
||||
eapply "${WORKDIR}/patch-${PATCH_PV}"
|
||||
for patch in "${WORKDIR}/${PATCHSET}"/*.patch; do
|
||||
eapply "${patch}"
|
||||
# non-experimental patches always finish with Gentoo Kconfig
|
||||
# when ! use experimental, stop applying after it
|
||||
if [[ ${patch} == *Add-Gentoo-Linux-support-config-settings* ]] &&
|
||||
! use experimental
|
||||
then
|
||||
break
|
||||
fi
|
||||
done
|
||||
|
||||
default
|
||||
|
||||
# add Gentoo patchset version
|
||||
local extraversion=${PV#${PATCH_PV}}
|
||||
sed -i -e "s:^\(EXTRAVERSION =\).*:\1 ${extraversion/_/-}:" Makefile || die
|
||||
|
||||
local biendian=false
|
||||
|
||||
# prepare the default config
|
||||
case ${ARCH} in
|
||||
arm | hppa | loong | sparc)
|
||||
> .config || die
|
||||
;;
|
||||
amd64)
|
||||
cp "${DISTDIR}/kernel-x86_64-fedora.config.${CONFIG_VER}" .config || die
|
||||
;;
|
||||
arm64)
|
||||
cp "${DISTDIR}/kernel-aarch64-fedora.config.${CONFIG_VER}" .config || die
|
||||
biendian=true
|
||||
;;
|
||||
ppc)
|
||||
# assume powermac/powerbook defconfig
|
||||
# we still package.use.force savedconfig
|
||||
cp "${WORKDIR}/${BASE_P}/arch/powerpc/configs/pmac32_defconfig" .config || die
|
||||
;;
|
||||
ppc64)
|
||||
cp "${DISTDIR}/kernel-ppc64le-fedora.config.${CONFIG_VER}" .config || die
|
||||
biendian=true
|
||||
;;
|
||||
riscv)
|
||||
cp "${DISTDIR}/kernel-riscv64-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
|
||||
"${dist_conf_path}"/6.12+.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
|
||||
|
||||
# this covers ppc64 and aarch64_be only for now
|
||||
if [[ ${biendian} == true && $(tc-endian) == big ]]; then
|
||||
merge_configs+=( "${dist_conf_path}/big-endian.config" )
|
||||
fi
|
||||
|
||||
use secureboot && merge_configs+=(
|
||||
"${dist_conf_path}/secureboot.config"
|
||||
"${dist_conf_path}/zboot.config"
|
||||
)
|
||||
|
||||
kernel-build_merge_configs "${merge_configs[@]}"
|
||||
}
|
||||
@ -1,178 +0,0 @@
|
||||
# Copyright 2020-2025 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=8
|
||||
|
||||
KERNEL_IUSE_GENERIC_UKI=1
|
||||
KERNEL_IUSE_MODULES_SIGN=1
|
||||
|
||||
inherit kernel-build toolchain-funcs verify-sig
|
||||
|
||||
BASE_P=linux-${PV%.*}
|
||||
PATCH_PV=${PV%_p*}
|
||||
PATCHSET=linux-gentoo-patches-6.6.111
|
||||
# https://koji.fedoraproject.org/koji/packageinfo?packageID=8
|
||||
# forked to https://github.com/projg2/fedora-kernel-config-for-gentoo
|
||||
CONFIG_VER=6.6.12-gentoo
|
||||
GENTOO_CONFIG_VER=g17
|
||||
SHA256SUM_DATE=20251019
|
||||
|
||||
DESCRIPTION="Linux kernel built with Gentoo patches"
|
||||
HOMEPAGE="
|
||||
https://wiki.gentoo.org/wiki/Project:Distribution_Kernel
|
||||
https://www.kernel.org/
|
||||
"
|
||||
SRC_URI+="
|
||||
https://cdn.kernel.org/pub/linux/kernel/v$(ver_cut 1).x/${BASE_P}.tar.xz
|
||||
https://cdn.kernel.org/pub/linux/kernel/v$(ver_cut 1).x/patch-${PATCH_PV}.xz
|
||||
https://dev.gentoo.org/~mgorny/dist/linux/${PATCHSET}.tar.xz
|
||||
https://github.com/projg2/gentoo-kernel-config/archive/${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/sha256sums.asc
|
||||
-> linux-$(ver_cut 1).x-sha256sums-${SHA256SUM_DATE}.asc
|
||||
)
|
||||
amd64? (
|
||||
https://raw.githubusercontent.com/projg2/fedora-kernel-config-for-gentoo/${CONFIG_VER}/kernel-x86_64-fedora.config
|
||||
-> kernel-x86_64-fedora.config.${CONFIG_VER}
|
||||
)
|
||||
arm64? (
|
||||
https://raw.githubusercontent.com/projg2/fedora-kernel-config-for-gentoo/${CONFIG_VER}/kernel-aarch64-fedora.config
|
||||
-> kernel-aarch64-fedora.config.${CONFIG_VER}
|
||||
)
|
||||
ppc64? (
|
||||
https://raw.githubusercontent.com/projg2/fedora-kernel-config-for-gentoo/${CONFIG_VER}/kernel-ppc64le-fedora.config
|
||||
-> kernel-ppc64le-fedora.config.${CONFIG_VER}
|
||||
)
|
||||
x86? (
|
||||
https://raw.githubusercontent.com/projg2/fedora-kernel-config-for-gentoo/${CONFIG_VER}/kernel-i686-fedora.config
|
||||
-> kernel-i686-fedora.config.${CONFIG_VER}
|
||||
)
|
||||
"
|
||||
S=${WORKDIR}/${BASE_P}
|
||||
|
||||
KEYWORDS="amd64 ~arm arm64 ~hppa ~loong ~ppc ppc64 ~riscv ~sparc x86"
|
||||
IUSE="debug experimental hardened"
|
||||
REQUIRED_USE="
|
||||
arm? ( savedconfig )
|
||||
hppa? ( savedconfig )
|
||||
riscv? ( savedconfig )
|
||||
sparc? ( savedconfig )
|
||||
"
|
||||
|
||||
RDEPEND="
|
||||
!sys-kernel/gentoo-kernel-bin:${SLOT}
|
||||
"
|
||||
BDEPEND="
|
||||
debug? ( dev-util/pahole )
|
||||
verify-sig? ( >=sec-keys/openpgp-keys-kernel-20250702 )
|
||||
"
|
||||
PDEPEND="
|
||||
>=virtual/dist-kernel-${PV}
|
||||
"
|
||||
|
||||
QA_FLAGS_IGNORED="
|
||||
usr/src/linux-.*/scripts/gcc-plugins/.*.so
|
||||
usr/src/linux-.*/vmlinux
|
||||
usr/src/linux-.*/arch/powerpc/kernel/vdso.*/vdso.*.so.dbg
|
||||
"
|
||||
|
||||
VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/kernel.org.asc
|
||||
|
||||
src_unpack() {
|
||||
if use verify-sig; then
|
||||
cd "${DISTDIR}" || die
|
||||
verify-sig_verify_signed_checksums \
|
||||
"linux-$(ver_cut 1).x-sha256sums-${SHA256SUM_DATE}.asc" \
|
||||
sha256 "${BASE_P}.tar.xz patch-${PATCH_PV}.xz"
|
||||
cd "${WORKDIR}" || die
|
||||
fi
|
||||
|
||||
default
|
||||
}
|
||||
|
||||
src_prepare() {
|
||||
local patch
|
||||
eapply "${WORKDIR}/patch-${PATCH_PV}"
|
||||
for patch in "${WORKDIR}/${PATCHSET}"/*.patch; do
|
||||
eapply "${patch}"
|
||||
# non-experimental patches always finish with Gentoo Kconfig
|
||||
# when ! use experimental, stop applying after it
|
||||
if [[ ${patch} == *Add-Gentoo-Linux-support-config-settings* ]] &&
|
||||
! use experimental
|
||||
then
|
||||
break
|
||||
fi
|
||||
done
|
||||
|
||||
default
|
||||
|
||||
# add Gentoo patchset version
|
||||
local extraversion=${PV#${PATCH_PV}}
|
||||
sed -i -e "s:^\(EXTRAVERSION =\).*:\1 ${extraversion/_/-}:" Makefile || die
|
||||
|
||||
local biendian=false
|
||||
|
||||
# prepare the default config
|
||||
case ${ARCH} in
|
||||
arm | hppa | loong | riscv | sparc)
|
||||
> .config || die
|
||||
;;
|
||||
amd64)
|
||||
cp "${DISTDIR}/kernel-x86_64-fedora.config.${CONFIG_VER}" .config || die
|
||||
;;
|
||||
arm64)
|
||||
cp "${DISTDIR}/kernel-aarch64-fedora.config.${CONFIG_VER}" .config || die
|
||||
biendian=true
|
||||
;;
|
||||
ppc)
|
||||
# assume powermac/powerbook defconfig
|
||||
# we still package.use.force savedconfig
|
||||
cp "${WORKDIR}/${BASE_P}/arch/powerpc/configs/pmac32_defconfig" .config || die
|
||||
;;
|
||||
ppc64)
|
||||
cp "${DISTDIR}/kernel-ppc64le-fedora.config.${CONFIG_VER}" .config || die
|
||||
biendian=true
|
||||
;;
|
||||
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
|
||||
|
||||
# this covers ppc64 and aarch64_be only for now
|
||||
if [[ ${biendian} == true && $(tc-endian) == big ]]; then
|
||||
merge_configs+=( "${dist_conf_path}/big-endian.config" )
|
||||
fi
|
||||
|
||||
use secureboot && merge_configs+=(
|
||||
"${dist_conf_path}/secureboot.config"
|
||||
"${dist_conf_path}/zboot.config"
|
||||
)
|
||||
|
||||
kernel-build_merge_configs "${merge_configs[@]}"
|
||||
}
|
||||
Loading…
x
Reference in New Issue
Block a user