diff options
author | V3n3RiX <venerix@koprulu.sector> | 2024-04-12 00:33:29 +0100 |
---|---|---|
committer | V3n3RiX <venerix@koprulu.sector> | 2024-04-12 00:33:29 +0100 |
commit | 3a6d209caa07e3be8e8423251b70c8bbeeedb17f (patch) | |
tree | aa94c255fa1bd982214ca518fb93d674cc253101 /sys-kernel/gentoo-kernel | |
parent | 1f43daba2fbe6f53e67c63944941dc645657c5b3 (diff) |
gentoo auto-resync : 12:04:2024 - 00:33:28
Diffstat (limited to 'sys-kernel/gentoo-kernel')
-rw-r--r-- | sys-kernel/gentoo-kernel/Manifest | 6 | ||||
-rw-r--r-- | sys-kernel/gentoo-kernel/gentoo-kernel-6.6.26-r1.ebuild | 153 | ||||
-rw-r--r-- | sys-kernel/gentoo-kernel/gentoo-kernel-6.8.5.ebuild | 153 |
3 files changed, 312 insertions, 0 deletions
diff --git a/sys-kernel/gentoo-kernel/Manifest b/sys-kernel/gentoo-kernel/Manifest index afa327b6bc90..d7c9fb51b3f8 100644 --- a/sys-kernel/gentoo-kernel/Manifest +++ b/sys-kernel/gentoo-kernel/Manifest @@ -34,6 +34,8 @@ DIST genpatches-6.6-31.base.tar.xz 1700036 BLAKE2B 52497ce73dc1a0eaac0a73b7c9a8b DIST genpatches-6.6-31.extras.tar.xz 3704 BLAKE2B 25bfb920528a71136639dcd536f1b8182ce687d5e8059c29539ed6ea348928cab361867afeb0eef55b040fa3860c44d7510ae9d453a805785567515a7157d009 SHA512 f7e7e6b2407752f2f868afef958e88dcdfd1788bb518f17eb60baaec43e55cc69b9185ae55c515b9bc617dc1aa7d1a958b8980ffafd95228aa3322ca104a8fa3 DIST genpatches-6.6-32.base.tar.xz 1799112 BLAKE2B a9c9af39b7da19c0d3f3a1893de26641b1d5d7ad242de4ceb1659d33573e8df8d173d363f005843149ee21598a2d4f8a6e5fbbdd02926c23cccc01a5c0b8abcc SHA512 2204a3ff6187c349a41f101bddffd39145aa530e6a37792b391db0b3c4150e290ce8909430e87c8deb18400d753a621b90c26d581c08abf104a8bc48197a1fe6 DIST genpatches-6.6-32.extras.tar.xz 3704 BLAKE2B 42d3c81bbd7bb8f062a5f437f8c1c9db1809cea8c0628f8604f7c2c8968fca4c6629bd3dafa2eae1e7b7692ff33a9836e1be96a0e3b45db95752b96b9f76f58b SHA512 35fe52d2ad4b4621d7bb615e0c5888eae83a88d8554abae069d68e801598c2fad360c9cdefdbf3e7c3c083e50eb2317f775f2ce23c26ee7a07446184b7dbbdca +DIST genpatches-6.6-33.base.tar.xz 1799480 BLAKE2B c724ac510c4ffa2494a95268c2c97898f78c54a5ffb48f2fd6b74dc27dcf51d9403e60ff4e10d1f1c673a2d09ec6dd9a00683297631fcebe28d4f3497ff31e4b SHA512 dc253ace1b4d1da549e5039682f4e6987ad48da88c63a94968d3fc817b2a64faffbf3e7024417036df3f645346f02f913e81857b7b261a6b174fa4f9d18b1db1 +DIST genpatches-6.6-33.extras.tar.xz 3704 BLAKE2B c337062a967a4261f48d3a571d4267ac9e0a259013eb9f5f40ed306712d83ac87108c7e60e7479e6e3fec9490c85e6d34bfc0a5c67fd30fe56970b858ef9ccd0 SHA512 fc857243332ef3b7c5e1698c0a4fea7860ddfc2a4f240e6f538b33bf4332d324d180745270fd0787e9d26fca575a72ec5bd0c0983d63304775278a4d51a168c1 DIST genpatches-6.7-14.base.tar.xz 759200 BLAKE2B ab81cb25145e344d43c649a7330804d9fccebd85aa8afed415c8de65d7cbdfea1884447f825b10919543d667127810dc2efae7001e52c506c9bf0598a3f572c6 SHA512 eaec167accc9c27c002262f39cd01d2de897c9629fc226360887b513227104248cdce2d4a2d3d25e86968e74d5f7dd516f599c5e45a77a896b3a482d194b1622 DIST genpatches-6.7-14.extras.tar.xz 3704 BLAKE2B 2dc79c939c1793afba3591758b5a4e51987683c086e688b79c4a6817cf35f1486f06a869e18bf49c5d102c77152b842bf4669e9c77b59e35401ffff2de422477 SHA512 e198bdf7f0d6dbd937f31d0ae4d0de3a9c1091410b5a709ab1606a21372b6d2b58cf1e298ae3b1f25fac1f677a0f618f01755a542493879d876bf296f8fa33e7 DIST genpatches-6.7-15.base.tar.xz 971400 BLAKE2B fc87e6e218c0c26051b83545f82a491a83df9b0e324f1f659329b144a81aa21ac6e90532ab080eafc99b7f87b9d8ac6aca84b043653cd09b8c41b7e34e52a9b7 SHA512 3c62c11bd8de96e86dd7224bab00103fabf5dab58c2d5d6ab2c27302802eb3d5fcd9370ab8c209f4a62a8f2d290107edbba72bf9dd8d78760c15234989aec5d8 @@ -46,6 +48,8 @@ DIST genpatches-6.8-4.base.tar.xz 388904 BLAKE2B 22339e2c3d8b06e98ccac88d877edee DIST genpatches-6.8-4.extras.tar.xz 3704 BLAKE2B 2ac07079b69f3a778464b287924fbb758643fee48c6a02ba36cbd17d401f5761e6f5d4fb82083eb9153c8a1be22480f3b12dc0299b9d605a4d8abac49ae2c7ea SHA512 5ef9d85730999d5cd1a4acbb1b35f54b71012a919440ed763dc0254ad146b3656ab2d3487df39274b1e3042167500a260dc4c620965226c450395066d950af53 DIST genpatches-6.8-6.base.tar.xz 390424 BLAKE2B 247749a8123e2df23e544a36cc2ccb2faa4c419aaee081220c0002f74fab2a0b4395fe6f491a571cf7c497986849391a0ee6adf25aaf0cd43e9d53956ff299e5 SHA512 4d8e757bed34af028e024e7c1456375f7f97d94661b51d392144af8907e4c2ab6ebd37a7f83b01f1df7ba40f7871400d829e3e443d473376b129cac5bdd73118 DIST genpatches-6.8-6.extras.tar.xz 3704 BLAKE2B cf93bc6cb2aa440538d76a4a39869be17297e76d70dfdfa881abbbb0fd63e3862c264f96b834ff6c3bc53e46941d449a61becedb78921c12c49b032874ae0be8 SHA512 6139490d83515ccfd8e6f2ff1f4ee39d4a9488973f38e08699150032847b2bdecb75293d8588765733256fe5028890cc2cd38ef528bf327fe282c812aebb326a +DIST genpatches-6.8-8.base.tar.xz 491508 BLAKE2B 856cbc5f02af4b2c7073e2342a9d8131145fc0e9098557fbafc62cb5f24ce3009bb1ca9332fd1d43368bfca8963fd3f734de646faae1c3f95cf670e7768a6f37 SHA512 0af92f11d273bd5a13e0bc3effa2e6700b1404ae82a8bdcdf8be8279bacc5a45deb504c8df4281bf143698137fbf474337f91eeedfc681c019f4cc3313dd0da8 +DIST genpatches-6.8-8.extras.tar.xz 3704 BLAKE2B 777b8ef344a84e3be85e65f8d0753ca7f2609e80ff80f9d460f9ba3c19f3fa19f975a199c2ea9b36901dcfd7cdeb8432653ff01db5da076336a8885fc4da982d SHA512 3fb1ed8a6b243a8c2f09aed66b5967df441e0ed4fc89dc9cb81b33561f8517f699787caf429bc173a1ee659912926a79d01603515c34fce43238525ef9cd8679 DIST gentoo-kernel-config-g11.tar.gz 5077 BLAKE2B dc17ded74f79baddd703a78084113b85e7130877b300b5fe60453cde515fe37c52ece7877049bb0ef384f74ecfc73d59d7d4a513f8fef7bf4f651599946383e8 SHA512 e91156765ef2a48396370f884fdecd7bb1d600e5167f6bad51130520f886e9198adae375adf3e40fa803abc5d5482057775fb0275ab2589bd8f94d8af4a03c4e DIST kernel-aarch64-fedora.config.5.10.12 223184 BLAKE2B a0246dac2f7a4ad6a55b611538d24382ac87a8960077811a859c9595ac67f961b4bccb7e139a89abc7c0e26e80832da5c94211fc658082f2e7dde984f14dd29d SHA512 7d803b347b136331db1ad6e22e0445fe0224c3e26cd7c034cbe9794915d457b492e05f77664865079874ec001351553652646e2e08d0fee31e30b841b0008f52 DIST kernel-aarch64-fedora.config.5.15.19 242615 BLAKE2B 94e59440681535e38137b71814e1ae53f57a347f62cf31e0c1c8571ae43d9ae9be9957743c8cbc9ec74850c964eaabefe6799a28bc311ea7b99ee31391b47fb1 SHA512 fb77d3b73a215f97d70cd6d8c96ed20e497786b99ed7d7a7f2ed60cc1251289c1a4c7e058c41b5efac62e4a9b4b3d917dbdb11585955bba2b6584981430f4ddb @@ -98,6 +102,7 @@ EBUILD gentoo-kernel-6.6.22.ebuild 4127 BLAKE2B 44bc2171ca67e6be5feac2af9f207f1c EBUILD gentoo-kernel-6.6.23.ebuild 4127 BLAKE2B 44bc2171ca67e6be5feac2af9f207f1c30b7cca48bd9c7b8f25fb46d25c8bf7467efe16d69e632e055cbdd69737d68c8d30f4bfb2bc208c5310f3af63b6c171b SHA512 f74646e81c71472fdf2a4649e0b5f4d4aca8eea3cc0117c3cdde0558b9394a98e07f06fd07ae5fca3f8bfe7cb67501c07bff1dcf6b8919592d52d85311b356cd EBUILD gentoo-kernel-6.6.24.ebuild 4127 BLAKE2B 44bc2171ca67e6be5feac2af9f207f1c30b7cca48bd9c7b8f25fb46d25c8bf7467efe16d69e632e055cbdd69737d68c8d30f4bfb2bc208c5310f3af63b6c171b SHA512 f74646e81c71472fdf2a4649e0b5f4d4aca8eea3cc0117c3cdde0558b9394a98e07f06fd07ae5fca3f8bfe7cb67501c07bff1dcf6b8919592d52d85311b356cd EBUILD gentoo-kernel-6.6.25.ebuild 4127 BLAKE2B 44bc2171ca67e6be5feac2af9f207f1c30b7cca48bd9c7b8f25fb46d25c8bf7467efe16d69e632e055cbdd69737d68c8d30f4bfb2bc208c5310f3af63b6c171b SHA512 f74646e81c71472fdf2a4649e0b5f4d4aca8eea3cc0117c3cdde0558b9394a98e07f06fd07ae5fca3f8bfe7cb67501c07bff1dcf6b8919592d52d85311b356cd +EBUILD gentoo-kernel-6.6.26-r1.ebuild 4127 BLAKE2B 57c5d4f3d42bc486cbf6ccd3471c1eee06312b1465736a1cee807a1f406a7712a9024f44df13b666045a7ee77214b82a1c921e9d786cfcc29d0968dc9cd605a1 SHA512 a2ab926079865593fb06de36317f7b907a68feb76927864841e18ed04d5aaac460e105ea7d29562ffadf4c123c45d8df0f6aee45689f9ae9535b0593a67dc080 EBUILD gentoo-kernel-6.6.26.ebuild 4127 BLAKE2B 44bc2171ca67e6be5feac2af9f207f1c30b7cca48bd9c7b8f25fb46d25c8bf7467efe16d69e632e055cbdd69737d68c8d30f4bfb2bc208c5310f3af63b6c171b SHA512 f74646e81c71472fdf2a4649e0b5f4d4aca8eea3cc0117c3cdde0558b9394a98e07f06fd07ae5fca3f8bfe7cb67501c07bff1dcf6b8919592d52d85311b356cd EBUILD gentoo-kernel-6.7.10.ebuild 4126 BLAKE2B fe1813e59e12bbd47222b2918d34a9f9903ee2b720b67b9eaa1fafc0246733427981d95295adb144dccd4ca67ae17f20fa8af15e690d9effe4fa955602eff39a SHA512 2963b19b4365883095827d4a387390d615d7cc78c34412d058cce4eecab4fa2bf4d0ab46346202a4f09bfe91b1bc1df8580d9c970b8a85f39877043d2603bb51 EBUILD gentoo-kernel-6.7.11.ebuild 4127 BLAKE2B 6c6c2ae222c4f288a4ea2e1a47fe49979a92aade2d85a09a69498ceee6649e9e06c683908d57638b08dee064cd572793f61c53136ddab073d9aca6fbc97838eb SHA512 2a3d549512db7b6b688bfbc95b4327136e4642cf8557b3d07b342ffaa5be85d1c16cac053dc41b6c600987b20325cd4387804b060c617eae4caacf5fa59ea128 @@ -105,4 +110,5 @@ EBUILD gentoo-kernel-6.7.12.ebuild 4127 BLAKE2B 6c6c2ae222c4f288a4ea2e1a47fe4997 EBUILD gentoo-kernel-6.8.2.ebuild 4126 BLAKE2B 5dbb0644663541505de76520125b2e4ccb65e1c432d9e0c864e423da5858991eac63eef0e8daff9b638c2909ab612f87cb1f9a27d3ccd9bab6cac0661201d75d SHA512 9140a9ee40acf64a300566d7e6237c239f78dbec05c2e08b5fe8f9399f55107a96f20d0ee831248f9e28ac3a0b181d8fababeba8bf836a40357a2172963ec4d3 EBUILD gentoo-kernel-6.8.3.ebuild 4126 BLAKE2B 5dbb0644663541505de76520125b2e4ccb65e1c432d9e0c864e423da5858991eac63eef0e8daff9b638c2909ab612f87cb1f9a27d3ccd9bab6cac0661201d75d SHA512 9140a9ee40acf64a300566d7e6237c239f78dbec05c2e08b5fe8f9399f55107a96f20d0ee831248f9e28ac3a0b181d8fababeba8bf836a40357a2172963ec4d3 EBUILD gentoo-kernel-6.8.4.ebuild 4126 BLAKE2B e1244719053d74fdad26a6e7f3189421c7b9043fe225fbe63e08c014aba228438adaeed86f6cdd19be09d65090b317b60b0f18b51ae148936f8e0f947b03c3df SHA512 36c4dce3e369c2c3f6bb844539ac95192c8b2f3e94d882d209ede1a2c99acbd330e2562c4896a61caad187d9ad388622106b9c3310ae93177ef2ca826b60d0cf +EBUILD gentoo-kernel-6.8.5.ebuild 4126 BLAKE2B 99f1993dde90d18a0dab5a4c0096f6d60abec742f3a76746629f643d4a3b306e1bd780b0bb0fb20e217b7c4f5b92d1a51a539aedf21fe316fd38a55d544fcca7 SHA512 2f27c12cac9ff12c339f99f6c284dc1a6fdf21c81d9fe3c9595b58044e71687ee130e26f54509cf60c536b8f8de61d5785fcc9214c4e0801f650e3549e13e974 MISC metadata.xml 681 BLAKE2B c773ebc6132d1c1a2466655e2441e7bfd7be7979e5912d3a27dd1c81b59614fd7a9a9a6f865075071126337eee6435e4c2b57356cec46f47966c4bdbb131ff3f SHA512 caabebdfd4cb3db2a69406cd1dfd9638c828bc1602d3f972350a7e84db1a2caeb563c6750c0998756c66f949953a1508a395b4b4139e88fbe9a20a70ab3a5ad5 diff --git a/sys-kernel/gentoo-kernel/gentoo-kernel-6.6.26-r1.ebuild b/sys-kernel/gentoo-kernel/gentoo-kernel-6.6.26-r1.ebuild new file mode 100644 index 000000000000..ffa83728b344 --- /dev/null +++ b/sys-kernel/gentoo-kernel/gentoo-kernel-6.6.26-r1.ebuild @@ -0,0 +1,153 @@ +# Copyright 2020-2024 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 + +MY_P=linux-${PV%.*} +GENPATCHES_P=genpatches-${PV%.*}-$(( ${PV##*.} + 7 )) +# 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=g11 + +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/${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/projg2/gentoo-kernel-config/archive/${GENTOO_CONFIG_VER}.tar.gz + -> gentoo-kernel-config-${GENTOO_CONFIG_VER}.tar.gz + 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}/${MY_P} + +KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~loong ~ppc ~ppc64 ~riscv ~sparc ~x86" +IUSE="debug hardened" +REQUIRED_USE=" + arm? ( savedconfig ) + hppa? ( savedconfig ) + riscv? ( savedconfig ) + sparc? ( 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 + usr/src/linux-.*/vmlinux + usr/src/linux-.*/arch/powerpc/kernel/vdso.*/vdso.*.so.dbg +" + +src_prepare() { + local PATCHES=( + # meh, genpatches have no directory + "${WORKDIR}"/*.patch + ) + default + + local biendian=false + + # 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 + biendian=true + ;; + hppa) + return + ;; + loong) + return + ;; + ppc) + # assume powermac/powerbook defconfig + # we still package.use.force savedconfig + cp "${WORKDIR}/${MY_P}/arch/powerpc/configs/pmac32_defconfig" .config || die + ;; + ppc64) + cp "${DISTDIR}/kernel-ppc64le-fedora.config.${CONFIG_VER}" .config || die + biendian=true + ;; + riscv) + return + ;; + sparc) + return + ;; + 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[@]}" +} diff --git a/sys-kernel/gentoo-kernel/gentoo-kernel-6.8.5.ebuild b/sys-kernel/gentoo-kernel/gentoo-kernel-6.8.5.ebuild new file mode 100644 index 000000000000..7365828c9f6a --- /dev/null +++ b/sys-kernel/gentoo-kernel/gentoo-kernel-6.8.5.ebuild @@ -0,0 +1,153 @@ +# Copyright 2020-2024 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 + +MY_P=linux-${PV%.*} +GENPATCHES_P=genpatches-${PV%.*}-$(( ${PV##*.} + 3 )) +# https://koji.fedoraproject.org/koji/packageinfo?packageID=8 +# forked to https://github.com/projg2/fedora-kernel-config-for-gentoo +CONFIG_VER=6.8.2-gentoo +GENTOO_CONFIG_VER=g11 + +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/${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/projg2/gentoo-kernel-config/archive/${GENTOO_CONFIG_VER}.tar.gz + -> gentoo-kernel-config-${GENTOO_CONFIG_VER}.tar.gz + 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}/${MY_P} + +KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~loong ~ppc ~ppc64 ~riscv ~sparc ~x86" +IUSE="debug hardened" +REQUIRED_USE=" + arm? ( savedconfig ) + hppa? ( savedconfig ) + riscv? ( savedconfig ) + sparc? ( 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 + usr/src/linux-.*/vmlinux + usr/src/linux-.*/arch/powerpc/kernel/vdso.*/vdso.*.so.dbg +" + +src_prepare() { + local PATCHES=( + # meh, genpatches have no directory + "${WORKDIR}"/*.patch + ) + default + + local biendian=false + + # 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 + biendian=true + ;; + hppa) + return + ;; + loong) + return + ;; + ppc) + # assume powermac/powerbook defconfig + # we still package.use.force savedconfig + cp "${WORKDIR}/${MY_P}/arch/powerpc/configs/pmac32_defconfig" .config || die + ;; + ppc64) + cp "${DISTDIR}/kernel-ppc64le-fedora.config.${CONFIG_VER}" .config || die + biendian=true + ;; + riscv) + return + ;; + sparc) + return + ;; + 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[@]}" +} |