diff options
Diffstat (limited to 'sys-kernel/gentoo-kernel')
-rw-r--r-- | sys-kernel/gentoo-kernel/Manifest | 3 | ||||
-rw-r--r-- | sys-kernel/gentoo-kernel/gentoo-kernel-5.18.13.ebuild | 137 |
2 files changed, 140 insertions, 0 deletions
diff --git a/sys-kernel/gentoo-kernel/Manifest b/sys-kernel/gentoo-kernel/Manifest index d8f42ba3112c..3e52adbaab13 100644 --- a/sys-kernel/gentoo-kernel/Manifest +++ b/sys-kernel/gentoo-kernel/Manifest @@ -26,6 +26,8 @@ DIST genpatches-5.18-14.base.tar.xz 610104 BLAKE2B 1bb79a0ab1239773023c353305c30 DIST genpatches-5.18-14.extras.tar.xz 3928 BLAKE2B 6daca2ba0f7a1a2f318f3a398a37303bc9e1524bcb9cfb2713642eeafc86f1919f2e16789815780b78a391607d2f6fc34a84682f257360fbb3793e34aa56c84a SHA512 58e6fe384be03255599468c196b89e8f3f266f113a6b7f623494937205892d5f7dd301361ead1569790f05c4bf0a6f3813b4511a11cc77294dfc2d2e69590140 DIST genpatches-5.18-15.base.tar.xz 610660 BLAKE2B d3a1d9a432ffc110af26d74e96b042abb28a79f77d3b6984c20c5a880e29f05c372a9d499646915eabb71a51441734067b0e271a13d111f15c65f6efdca79a40 SHA512 53856c12e3c10733f6ae78e6408af7d628aca7dac8fce5569eed5b3f35ce58bd465d5e40da2183fd06ce70775c199b93f88f73324c68f73c7303d2bc7c71acfa DIST genpatches-5.18-15.extras.tar.xz 3928 BLAKE2B da2016d84154d129ef32595c04f06f861aa91c7981f9122e8120284a04ac0064785ebb2a4717d544c475f63388e36aa2d2012dc426a9a8f9f66492a507e1755c SHA512 743610e02ce92f053bf41351253d27966de5c3dc0a5499e00328debb2d64f7bb41d29dc5670f11e63dbe2e8baf466a7b99fd2b70ba37a7698f53b25044790196 +DIST genpatches-5.18-17.base.tar.xz 670556 BLAKE2B 9f992048a0a964e6a96b077682d6a8412c2f35a15c3b5533c36d474cc724fb9983205fa8f177a9172f5f0c1e26b6127edac3da89b702dc088d3b7bcb24513822 SHA512 d8f38eeebc11f382e0c57f668f213d07f5d2f99c210133d831ee29feef90bfc81eb57c9c9fa173548ef4dba05865990539a879cf0bc1b548ca6a75bdd934e069 +DIST genpatches-5.18-17.extras.tar.xz 3924 BLAKE2B 4d8bb90dc2446493cee33f5db27f46f4a5d6cb60dac8137f5677a133d71bf2feb5db6b9ebbf32fb148c39be3024f5f378ce096fb0c21ea584d3dca01862e160f SHA512 b1ccb518b25c7bea5cccbdec03d0d8d42ab0b048f6f10f2f036871699d5e75e3694ec10922a0e8f01f640cb3710d8e38124e878450842cce060f6202359ca090 DIST genpatches-5.4-208.base.tar.xz 4869104 BLAKE2B 3e9038248ddcfd22d67248e65199cca89bd2b8b3aa99aafcee63e5c294dc360c01d7d7eda809e1c18b06a9356363c575339197b2425bcafa8676cad68c17f90e SHA512 880fd09492e5cb0fa8a94e2df5fdf912be59210f1f142a456e3f80c31142e92bee3161bd77038b606616442cf3396b3961a24422de3056f72b4556d06262d3a5 DIST genpatches-5.4-208.extras.tar.xz 1812 BLAKE2B 3e5b8cae462a748eb36af66c4ebc393fc09882a1fa23cce6f82a078ea5598c23c2ecbe7029d6e2060735fe342b3a7bb5c235dcf16081bba0f05a6b88501af991 SHA512 b550dce1b6d090959eaacd523ee1be258fbf9db84309054c3cce9beb0bae710ff2e1c23f480310072fb08f7456bdf825b3ba76d57e999fc1597368df93e65677 DIST genpatches-5.4-209.base.tar.xz 4887256 BLAKE2B 56d7ea7975b228df055d1bd4cfc41b49890d815409a159772230c6e9d081061a9b438b525b5e8542eb03feb0bdfc1841e5bc5e14dd1570aff8f964862b192b00 SHA512 5ea69d50d836dad1f68f000c6c1f5bd8459dcbc4d50a4fbd4ba3241c4c87638850215c0207dfea6fe06cc596957e3cfa61a3dfc00f0b60513596da43d286615f @@ -71,6 +73,7 @@ EBUILD gentoo-kernel-5.15.56.ebuild 3599 BLAKE2B 166a462972d13245f59f4806e490d5d EBUILD gentoo-kernel-5.18.10.ebuild 3859 BLAKE2B 39a5bf5ba05e8966d0c154ca944547d1d0fcaa320c278de676259385b59da46c41dad6cfb5a4d384e70283668a6bb8c89e297b55117ac479a307f02ddeff351c SHA512 98446575d30ca3131c36c2642cd14ce6a8e0b4053ad94da0e6cec93c82f92add00ef0c34fc18800643347c9ecbc9830ba6103485f43e991cbd4460ad37f9caa9 EBUILD gentoo-kernel-5.18.11.ebuild 3859 BLAKE2B 39a5bf5ba05e8966d0c154ca944547d1d0fcaa320c278de676259385b59da46c41dad6cfb5a4d384e70283668a6bb8c89e297b55117ac479a307f02ddeff351c SHA512 98446575d30ca3131c36c2642cd14ce6a8e0b4053ad94da0e6cec93c82f92add00ef0c34fc18800643347c9ecbc9830ba6103485f43e991cbd4460ad37f9caa9 EBUILD gentoo-kernel-5.18.12.ebuild 3857 BLAKE2B 0dee6d23887d04b56e4f6228ca833ee0cc87bfa66038ec7c36ee6874a066cd53322d92d0e12715d92843eb37e40bb71da53ee068c70af45bb3d0465d5036a71c SHA512 49bd98f3c1c0d1ad11d6156e59ccb757df9ab31c81d871efa8dc0e59a1f14e726729cd773a27b30237aa14eb0b364d5325a4818f0a8dd418eb9849e939da42b9 +EBUILD gentoo-kernel-5.18.13.ebuild 3859 BLAKE2B 7d5e5654d596002eec8478b6f72c3e2b8896acdf1f691f3d329e030b031fc8d2fb46434ec039dea09f1def77086663df6710e5690c0318bc15d8028321d21271 SHA512 3af374c1492526da624dd26511c01d401750fa59a8184f978b8ae28c564644faeb91ce8652f2baffe40a8c8f7d9c59b2a269b8c36ee3636f61f8a9d70093f2da EBUILD gentoo-kernel-5.18.9.ebuild 3859 BLAKE2B 39a5bf5ba05e8966d0c154ca944547d1d0fcaa320c278de676259385b59da46c41dad6cfb5a4d384e70283668a6bb8c89e297b55117ac479a307f02ddeff351c SHA512 98446575d30ca3131c36c2642cd14ce6a8e0b4053ad94da0e6cec93c82f92add00ef0c34fc18800643347c9ecbc9830ba6103485f43e991cbd4460ad37f9caa9 EBUILD gentoo-kernel-5.4.203.ebuild 2799 BLAKE2B faf615c3252cf128099b4b7359422d78b19be5b647e89e4524b519e75e1fe9a8e778398cce27093e6be22c7977f18a996a6f7e72afa813d6a8369fa9f2395e05 SHA512 70a94b7bcb72a3adb27fd4707a7a4b53d952d37857dc22a3523846faa8f77c7309017264e8601f22c4ab01c3b2726a1dbe1b0f5dd2d81c7ea28c5b486265f8d6 EBUILD gentoo-kernel-5.4.204.ebuild 2803 BLAKE2B 8aac73c55ef615de26496e74eb22f0c578f333f2d211535c9a0613f9e2b19f181245a1dcf394ffec75bec308855792ee8edf21c77a9d6c42f3249789cb15bfa6 SHA512 465a4c4f2df9f2332ac7eee6f8e5dc140e02e55ff9fac94bf465604f33d51f3b1cfcad1160bc071233e1a6e40fb15c984a26f1b2377fcdf5d7aa3a9b6536816b diff --git a/sys-kernel/gentoo-kernel/gentoo-kernel-5.18.13.ebuild b/sys-kernel/gentoo-kernel/gentoo-kernel-5.18.13.ebuild new file mode 100644 index 000000000000..14b88df81780 --- /dev/null +++ b/sys-kernel/gentoo-kernel/gentoo-kernel-5.18.13.ebuild @@ -0,0 +1,137 @@ +# Copyright 2020-2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +inherit kernel-build toolchain-funcs + +MY_P=linux-${PV%.*} +GENPATCHES_P=genpatches-${PV%.*}-$(( ${PV##*.} + 4 )) +# https://koji.fedoraproject.org/koji/packageinfo?packageID=8 +# forked to https://github.com/mgorny/fedora-kernel-config-for-gentoo +CONFIG_VER=5.18.9-gentoo +GENTOO_CONFIG_VER=g2 + +DESCRIPTION="Linux kernel built with Gentoo patches" +HOMEPAGE="https://www.kernel.org/" +SRC_URI+=" + https://cdn.kernel.org/pub/linux/kernel/v$(ver_cut 1).x/${MY_P}.tar.xz + https://dev.gentoo.org/~mpagano/dist/genpatches/${GENPATCHES_P}.base.tar.xz + https://dev.gentoo.org/~mpagano/dist/genpatches/${GENPATCHES_P}.extras.tar.xz + https://github.com/mgorny/gentoo-kernel-config/archive/${GENTOO_CONFIG_VER}.tar.gz + -> gentoo-kernel-config-${GENTOO_CONFIG_VER}.tar.gz + amd64? ( + https://raw.githubusercontent.com/mgorny/fedora-kernel-config-for-gentoo/${CONFIG_VER}/kernel-x86_64-fedora.config + -> kernel-x86_64-fedora.config.${CONFIG_VER} + ) + arm64? ( + https://raw.githubusercontent.com/mgorny/fedora-kernel-config-for-gentoo/${CONFIG_VER}/kernel-aarch64-fedora.config + -> kernel-aarch64-fedora.config.${CONFIG_VER} + ) + ppc64? ( + https://raw.githubusercontent.com/mgorny/fedora-kernel-config-for-gentoo/${CONFIG_VER}/kernel-ppc64le-fedora.config + -> kernel-ppc64le-fedora.config.${CONFIG_VER} + ) + x86? ( + https://raw.githubusercontent.com/mgorny/fedora-kernel-config-for-gentoo/${CONFIG_VER}/kernel-i686-fedora.config + -> kernel-i686-fedora.config.${CONFIG_VER} + ) +" +S=${WORKDIR}/${MY_P} + +LICENSE="GPL-2" +KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~ppc ~ppc64 ~riscv ~x86" +IUSE="debug hardened" +REQUIRED_USE="arm? ( savedconfig ) + hppa? ( savedconfig ) + riscv? ( 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 + ;; + 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 + ;; + 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 + + kernel-build_merge_configs "${merge_configs[@]}" +} |