summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichał Górny <mgorny@gentoo.org>2022-04-20 15:23:41 +0200
committerMichał Górny <mgorny@gentoo.org>2022-04-20 19:24:26 +0200
commitbad9833a548174fabaf17c643ef702c436db8a91 (patch)
treef4c5fa657a82ffcda8f29dfdfae673f87c3e2479 /sys-kernel
parentsys-kernel/vanilla-kernel: Bump to 5.17.4 (diff)
downloadgentoo-bad9833a548174fabaf17c643ef702c436db8a91.tar.gz
gentoo-bad9833a548174fabaf17c643ef702c436db8a91.tar.bz2
gentoo-bad9833a548174fabaf17c643ef702c436db8a91.zip
sys-kernel/gentoo-kernel: Bump to 5.17.4
Signed-off-by: Michał Górny <mgorny@gentoo.org>
Diffstat (limited to 'sys-kernel')
-rw-r--r--sys-kernel/gentoo-kernel/Manifest2
-rw-r--r--sys-kernel/gentoo-kernel/gentoo-kernel-5.17.4.ebuild132
2 files changed, 134 insertions, 0 deletions
diff --git a/sys-kernel/gentoo-kernel/Manifest b/sys-kernel/gentoo-kernel/Manifest
index 613b87d93a02..9148a8edb110 100644
--- a/sys-kernel/gentoo-kernel/Manifest
+++ b/sys-kernel/gentoo-kernel/Manifest
@@ -18,6 +18,8 @@ DIST genpatches-5.16-22.base.tar.xz 1156348 BLAKE2B 320027e898f66751b1d0c8e82e63
DIST genpatches-5.16-22.extras.tar.xz 3800 BLAKE2B 73201b8988e7b2c41f9c45eadd21df333655f1d7e2a19b0f319d0b125df5d3aed3c68e9903d0be3d39d6f43fcef62fd95391a0c1eaa8228b40c97118f6993db3 SHA512 81e82fbf1286c4d1e080a4609eb4dd7e549b8b75851afe57c2a918fdfd48f98abf1edaab028e193ac4935ebd790cbd400b0a14ea60b81261281ae832209a2445
DIST genpatches-5.17-5.base.tar.xz 498648 BLAKE2B 07dde85c14b37b5b2e7716de4082477d23c2819de95d3beffec76ec78c54b3d0cdb223ba56c0562309e13eded3ca4be530eedbd862b5c34cdd2c437a4731c850 SHA512 178f09cf2dbf221a1edb34894eef3331e0b4f541abfdd4d1e1e5eccc12a69368c0f3d91dc4b3d26ce1a06fc6d77ba63d638cc1f53330257fe53d893e49ed4f43
DIST genpatches-5.17-5.extras.tar.xz 3800 BLAKE2B 84ff6d95364da66b1ea0a8cb830e855aa4bf262768385607d4ca59c09dd5159073a33f414facce97f3b1a90ec3f055adf03d48f3fae9d05609b75351375af422 SHA512 e4bf053bea92bf10d62dd4a7d07b9f135d540996f3f503da07af9259f6f1f86e17c00d0d1c955b5bb339a29b577de1df9936515e7e0c617847187d77c3b37bef
+DIST genpatches-5.17-6.base.tar.xz 557368 BLAKE2B 7d9668f583167cb46a87a451416a69e1f1042bff745cca1394e83649580f920fd18aa030f558975f9ac4e256f70336ffd3b238616fd58697f9370753d7753d22 SHA512 3164fe7a6907bc7ceaf48dbc474c8d3807aa7499cb2a706995d3c27da89a19b34990d9b981d5d0e583ce23973a9a4dd2ad251d44c1f8d539dfd6e64d93416d28
+DIST genpatches-5.17-6.extras.tar.xz 3796 BLAKE2B 6921f442b3c5a3d1f5d437504668488c96879cfcbbfc096275afccab4664d01a0748b0a72e4bbcc1f1564829eeb8346402a14120d79a7be923cf08c0ecacf385 SHA512 8049dfa5390180a9d0cad7d18ea13cf2620e9883d733d8d5e2a09c11b26e4afd8ae28f81872e7e16bd6107205f0bf17edb475b390384fb4989d688b7b49630ae
DIST genpatches-5.4-192.base.tar.xz 4516512 BLAKE2B dd316606186f305369ea67348acf0b6afbe2eacc16564851a1eb94224afcbdc066f920578092a15bacc7abb7a8f659aa44bde26859aae2525eaa84e8cd0447f1 SHA512 28bed80b1bfa457d24f8367a3a76460e569f7c8eb4f0a6b632f1898615ccb4da4c2fbba95dcfd1cce5675fe6151cee4c0df6bc0fdb158c25c25cf71a9397127b
DIST genpatches-5.4-192.extras.tar.xz 1816 BLAKE2B 2d6760ff367ee0ba6ff8d56f81c7c3587ccd8c4f8fb952e3380148b2f3532a19cd614f352241134eb3256f8e59c000806f3d1eb33caa582e0c4be813d3275672 SHA512 f8d43a3a80abd947cbd667b3ed449215d98967fa8dc2200efbba86db946a04dc7dc971d74afe1aa6b923ea3f9914b28c3bcb9f6ec205b1bfb0cd60c0ae57758a
DIST genpatches-5.4-193.base.tar.xz 4614484 BLAKE2B 94f35c7399a4912dc546f80271989f63bf0c838d953bfcc05cdf3240b7d88e0ce542b44000b21af0b88871d8933e637855b0f42bf3efe523eba2e93933958381 SHA512 9f3d60740388b4947d039f218b5f9e886cdfbe3e781109b6c24cea67d29408fb8f49f5a92fb6bde31bfdd131f6fd329ca2a867819d4dda7666ed84aebce2d5a3
diff --git a/sys-kernel/gentoo-kernel/gentoo-kernel-5.17.4.ebuild b/sys-kernel/gentoo-kernel/gentoo-kernel-5.17.4.ebuild
new file mode 100644
index 000000000000..cae8ad0f740d
--- /dev/null
+++ b/sys-kernel/gentoo-kernel/gentoo-kernel-5.17.4.ebuild
@@ -0,0 +1,132 @@
+# 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 ))
+# https://koji.fedoraproject.org/koji/packageinfo?packageID=8
+# forked to https://github.com/mgorny/fedora-kernel-config-for-gentoo
+CONFIG_VER=5.17.3-gentoo
+GENTOO_CONFIG_VER=g1
+
+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 ~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[@]}"
+}