diff options
-rw-r--r-- | sys-kernel/gentoo-kernel/Manifest | 2 | ||||
-rw-r--r-- | sys-kernel/gentoo-kernel/gentoo-kernel-5.15.17.ebuild | 126 |
2 files changed, 128 insertions, 0 deletions
diff --git a/sys-kernel/gentoo-kernel/Manifest b/sys-kernel/gentoo-kernel/Manifest index a54be4c2a3f9..1633d10c4839 100644 --- a/sys-kernel/gentoo-kernel/Manifest +++ b/sys-kernel/gentoo-kernel/Manifest @@ -2,6 +2,8 @@ DIST genpatches-5.10-100.base.tar.xz 2822696 BLAKE2B 8958af480d9babf927d8b1ac5ff DIST genpatches-5.10-100.extras.tar.xz 3852 BLAKE2B 7ac718b6080adb6a641ef7b976185b09ddf7f225fcaede25afbf6a15bf855eb6dbbe44416fcddf1ea466c36433e04736c68f032a1c79bde858434427c6658a1b SHA512 558c9fc3279d7fb507ac8251369966dd40282776890da045d96eab328fd7300a93dab12afbfabc3dd52f61d49c0020b87cd4087d4c8f840f3443ed8ffe89c81d DIST genpatches-5.15-18.base.tar.xz 697228 BLAKE2B 01a377a9c1f2709ad2cde18e3094d37ba2414c7c3d949f236d41f5d36e8c4513331c4859740ec34bc8418d6fb2457fbb7d9f7c64f6f596795e1abc9a02c9e340 SHA512 14a652cf64e8e22539a61f14af715fd1a59644875a8a61473b5eb66bcc7b5f4bb34602463b208114bb4dbb73f159932983d48c0567a44b5090b9ff8f52920eaf DIST genpatches-5.15-18.extras.tar.xz 3852 BLAKE2B d3521142bf5ece893429ec7e1b6aec724fff15fbba2f80e9fb092af4d40bc258e034226989d2502ee258faa0c7e0aacd885499d22f4317060d61cd916e00e7fa SHA512 f1a98d3875541ec4b8f3461c1af8a9b37fd4f5a64e7d717e906f851bf4e976e4509df4b8cb67b9e210215cc33924d039599cecc8f4892dcbed510e00f8119df8 +DIST genpatches-5.15-19.base.tar.xz 925776 BLAKE2B 040a1cabc9217a91e8bae89ef7878e61056f3eccc97472a27dd2b3c695b2bce59c487ff303048d1f98553349c0b6227d0a3dfa837ccfd6cfd7b1147606b4703f SHA512 b2facd0ba66001ce9327ef2d037097e78e4b9c8e02eb5b66f9ab9bacc6af5800ccfe576ca4383c263c597a67e92b96bb0287140396a602f15fbec403a4173a53 +DIST genpatches-5.15-19.extras.tar.xz 3852 BLAKE2B 9ae7ef921212fb3b67dedf9647e0ca3091382410a5bf9c7ae67539f9cac0b97f54eef1bb63279481722184bf0e64d4208928d9485f670e47f0c60e62a0bc036e SHA512 462cc99b18a41f5dc2265732d63349c17696d5ca4e360e23e50ecfe56f3b08ce7d5bb0dc1505011cd5336c16057d1f9d97c3faecb551f4eeffe4d8ca95938998 DIST genpatches-5.4-177.base.tar.xz 4317444 BLAKE2B e7ad5f0a561dc50a11aa3720c3096230d8209c58a523da7f6f0fb1b0c8ed903780d74c48edc2791f8d8ba7fdc946ef0fc506d73ff3f86e9e2bfb4c05609d4456 SHA512 0e04707f1f5e85b53f425d54c74d9483d33280769d1cdd5122e34d19dfea1fcf0cf258d84579f3f169a1f620d9107a7d454970da313806c5edbad8a6d8632c9d DIST genpatches-5.4-177.extras.tar.xz 1784 BLAKE2B e840ca0c6b2dd9399ff4f0d03e828bbb42f53528e1c13b2825c5439cbccdc36577f029caccf91690857cd6e4901cebd98cc27e2ad2d0644c7503822563f38d0c SHA512 a17abf06bb76236986b9a86f671dc60544b39fc47736aca69359e6d68699a52a3e72b1a2ebd57f78602114e9d1f5a201f37121bd6917f50c9d06e385b194cb20 DIST gentoo-kernel-config-5.15.5.tar.gz 4128 BLAKE2B e30fff372b0112cc05723463cb4e93de79b5b643483796402eb88a7e704706a4033af2dbab9424cf14b1d894b57fc053b969f5fbfa15cf74e30e3d045703918f SHA512 5e8c6945da5e9cfb8d20663910fc38ee36813067e1679e17bbf1dfc6fc0aa9125f1fc949d81937b297215925004e0ebfb3b55c7e707184b5ffcf23d28882113d diff --git a/sys-kernel/gentoo-kernel/gentoo-kernel-5.15.17.ebuild b/sys-kernel/gentoo-kernel/gentoo-kernel-5.15.17.ebuild new file mode 100644 index 000000000000..1ae96dd74de4 --- /dev/null +++ b/sys-kernel/gentoo-kernel/gentoo-kernel-5.15.17.ebuild @@ -0,0 +1,126 @@ +# 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##*.} + 2 )) +CONFIG_VER=5.15.14 +CONFIG_HASH=8cc461d9cfb256bb831225bb38e29fa944bd890f +GENTOO_CONFIG_VER=5.15.5 + +DESCRIPTION="Linux kernel built with Gentoo patches" +HOMEPAGE="https://www.kernel.org/" +SRC_URI+=" https://cdn.kernel.org/pub/linux/kernel/v$(ver_cut 1).x/${MY_P}.tar.xz + https://dev.gentoo.org/~mpagano/dist/genpatches/${GENPATCHES_P}.base.tar.xz + https://dev.gentoo.org/~mpagano/dist/genpatches/${GENPATCHES_P}.extras.tar.xz + https://github.com/mgorny/gentoo-kernel-config/archive/v${GENTOO_CONFIG_VER}.tar.gz + -> gentoo-kernel-config-${GENTOO_CONFIG_VER}.tar.gz + amd64? ( + https://src.fedoraproject.org/rpms/kernel/raw/${CONFIG_HASH}/f/kernel-x86_64-fedora.config + -> kernel-x86_64-fedora.config.${CONFIG_VER} + ) + arm64? ( + https://src.fedoraproject.org/rpms/kernel/raw/${CONFIG_HASH}/f/kernel-aarch64-fedora.config + -> kernel-aarch64-fedora.config.${CONFIG_VER} + ) + ppc64? ( + https://src.fedoraproject.org/rpms/kernel/raw/${CONFIG_HASH}/f/kernel-ppc64le-fedora.config + -> kernel-ppc64le-fedora.config.${CONFIG_VER} + ) + x86? ( + https://src.fedoraproject.org/rpms/kernel/raw/${CONFIG_HASH}/f/kernel-i686-fedora.config + -> kernel-i686-fedora.config.${CONFIG_VER} + )" +S=${WORKDIR}/${MY_P} + +LICENSE="GPL-2" +KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~ppc64 ~x86" +IUSE="debug hardened" +REQUIRED_USE="arm? ( savedconfig )" + +RDEPEND=" + !sys-kernel/gentoo-kernel-bin:${SLOT}" +BDEPEND=" + debug? ( dev-util/pahole )" +PDEPEND=" + >=virtual/dist-kernel-${PV}" + +QA_FLAGS_IGNORED=" + usr/src/linux-.*/scripts/gcc-plugins/.*.so + 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 + ;; + 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[@]}" +} |