commit: 1dec5aaf4f0da04b09a3f23201a21d4ac4b5d92a
Author: Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Sun Jun 26 04:05:52 2022 +0000
Commit: Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Sun Jun 26 09:08:22 2022 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1dec5aaf
sys-kernel/gentoo-kernel: Bump to 5.18.7
Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>
sys-kernel/gentoo-kernel/Manifest | 2 +
.../gentoo-kernel/gentoo-kernel-5.18.7.ebuild | 137 +++++++++++++++++++++
2 files changed, 139 insertions(+)
diff --git a/sys-kernel/gentoo-kernel/Manifest
b/sys-kernel/gentoo-kernel/Manifest
index 91f50f763851..414e26321a02 100644
--- a/sys-kernel/gentoo-kernel/Manifest
+++ b/sys-kernel/gentoo-kernel/Manifest
@@ -10,6 +10,8 @@ DIST genpatches-5.15-53.base.tar.xz 2200544 BLAKE2B
a6f1e11186e771abe56bb453d45f
DIST genpatches-5.15-53.extras.tar.xz 3932 BLAKE2B
ade13a83b27b14cf19f455539599aff1db3bc6caf99d07e746b292be702c49591519b63f754c4651ac3e0e867412cb5ffb588d5056cf6066c193e09a0c3feaf2
SHA512
438905963b586148d6385f24549343a6fc4d623f24aea089f52af44f772eaa62f0602d729b0232620d8ca08d440210dc7dbe7b5259a3fc232d603f574b5bf714
DIST genpatches-5.15-54.base.tar.xz 2203912 BLAKE2B
36e27d2734e9a62b1900907ea3722a522ddc61c991b5c751dd09d055b9da0fa92bd0de3eeee8b1560ff9a60c8d80181904dd14b7db7878b499a07bb31b0b5f90
SHA512
e751fbd89b91dc59dd0ac87f906ad1c4ae69ccfcad97db616bddd0d25184c133cba8af1141f5e32f690199d6196d0a5035941b70576cd4dd80aea750d1ce0c27
DIST genpatches-5.15-54.extras.tar.xz 3936 BLAKE2B
259497959ac6cd96036809fbc1634fa174e611f626b0f36c8003587ec0825fd75431b34329ecf4a9d9aeda3803986b2e3987f27d37e0fddf27eb83509c248548
SHA512
7c85e42f6195f6a0bdafbf0be5fbbab1b7a634a922c5233d1dfc2c29842fe4617888cdd7769584d2e918457bdd1a295b8761e354772d78b05cd1e917e9f71abb
+DIST genpatches-5.18-10.base.tar.xz 500696 BLAKE2B
e6dfe7b2f752aa0cadb2de11ed7e9e77935abf4d61c99fdb4f6790853364c8b8b189d25b2190b3c85b51ef355b085d1ab740599a920843534f0d4a840fbe8733
SHA512
d425826ca98a5600262485aae057401c131e63b2b84ef6eaea287a433acd4b0f98e3899bd931ac73eda5651c57bcc4bec730469655d54aa1f176ebfda6724aa6
+DIST genpatches-5.18-10.extras.tar.xz 3924 BLAKE2B
ea024b19777b6fd59ad5505eaff41db7dc793f5f29beca1d70c2ab60829f5864f1b78f9b809fa9443f995f70df82746d33ac9ce9453a564b77c3964b49afe822
SHA512
7468faea1020335f546c69d331aa864400687056a01cb54a888f3d4bbe6c9061fc2a5d519f93aa362b87df953bb13c06ea2dda403e48f63ca259a6990120ff5f
DIST genpatches-5.18-8.base.tar.xz 440848 BLAKE2B
8a965867409cc340b13687eec9c7391bbaf26b770ba8d4b657b923226a539b7b68eabab6f12bae4bed09a0d198917373a6ab4f707831c652e2461a49f8dd4981
SHA512
057a00d62f4d8ba7be4ea26aeaa4bfbd5581b22ded85dae71aaa693621eda17532ac00bbeaaea1689f552ce2b95a04e9aade603f6236c2a265aa8fea8231c5d0
DIST genpatches-5.18-8.extras.tar.xz 3924 BLAKE2B
3f575b12166621c67c9cf6ee15a76af551a039d142a85678abc10829e9a573641be8557b9b606352d46fa4d123e95071b2946447a6f53afef5b37eec5f342cf7
SHA512
7aab8d9d18dfb6129ee0e995450c9d9d759545a9fa2cde1d26dfc03d677b9133a310f3943cd77b5981830a6a1cff59463e85759ef5cd68bcb2838dd96104f590
DIST genpatches-5.18-9.base.tar.xz 495452 BLAKE2B
244e049522e9b8586081b9eac59fec51184c532bca70fc1d451af1ded646df9bdc7e047cea0963fd07ae8aa04bd4158d64854a2d790ec90be37aa467c7e8b646
SHA512
b90abf747ae92bb4ac7ef94646aedc21a89080d10f8aecae63821d59c0ac29b3b94c0fc6b862d87eb8b86442c2d41cfe16e3a1341d3c146d2b3c678c2f2cdf9a
diff --git a/sys-kernel/gentoo-kernel/gentoo-kernel-5.18.7.ebuild
b/sys-kernel/gentoo-kernel/gentoo-kernel-5.18.7.ebuild
new file mode 100644
index 000000000000..1ba27417d51c
--- /dev/null
+++ b/sys-kernel/gentoo-kernel/gentoo-kernel-5.18.7.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##*.} + 3 ))
+# https://koji.fedoraproject.org/koji/packageinfo?packageID=8
+# forked to https://github.com/mgorny/fedora-kernel-config-for-gentoo
+CONFIG_VER=5.18.4-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[@]}"
+}