commit:     c2bd9a2c9e676fd76ab02b59383034dec8474bf6
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Wed Jun 22 14:38:17 2022 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Wed Jun 22 20:01:10 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c2bd9a2c

sys-kernel/gentoo-kernel: Bump to 5.18.6

Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>

 sys-kernel/gentoo-kernel/Manifest                  |   2 +
 .../gentoo-kernel/gentoo-kernel-5.18.6.ebuild      | 137 +++++++++++++++++++++
 2 files changed, 139 insertions(+)

diff --git a/sys-kernel/gentoo-kernel/Manifest 
b/sys-kernel/gentoo-kernel/Manifest
index fcf4a7046109..15090a6b59e5 100644
--- a/sys-kernel/gentoo-kernel/Manifest
+++ b/sys-kernel/gentoo-kernel/Manifest
@@ -8,6 +8,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.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
+DIST genpatches-5.18-9.extras.tar.xz 3924 BLAKE2B 
db49a915b2d7b6a357cbf27ef1185c936ecd6c8ab130d5fd548133459a2fb9a4037741dcb88ebf80da947fb7e252eff22bdd2ccb5436921f9f141eba085ff778
 SHA512 
a1ec3e8b1599401bfdc29d6acb3180ce9522df52f6d934c03208af86894f2cfa774b2a67f49adaa7eeca5f7e40ee8dbb45cfa2a7d02c895c0fa9ccf3355827c5
 DIST genpatches-5.4-203.base.tar.xz 4798932 BLAKE2B 
dc918ca3e7538b66b87a8bd8d2c673f56b71706d913007176de20014a2ebe38889541aa3441af7f4d6db69044779a1e54dadc122e59d180c15fe5131b8056aca
 SHA512 
975dd953d5baf0e72e5718dd4979657597adc380559f41e769e94d294a08b272ba06080517d134a3b2611a6d4779cc3d8b423d869b7dec5e6c43af0634996871
 DIST genpatches-5.4-203.extras.tar.xz 1812 BLAKE2B 
c4f67f3fcd08b6d845c7fc6174a747e805ee2614ddc2733771cfeec8df5535a7e0a6b8c3528b23c7cd1127765094deb565d3e1b96bda5d1882510cdce4b050ea
 SHA512 
029f4ba2b1fc2c581d343e9847b926ffbcbcd1c0a5cc45c28f35f2ca1572cffaf6ce75a9bfb42d2cd94f6a93ab5bdb8a3297636ddeb4be4afc66efa87a55d7cc
 DIST genpatches-5.4-205.base.tar.xz 4658076 BLAKE2B 
172fc1760b7636d6d2de9014c36f792e7e85f81d36748e7fed87f6784647e3488acb401c26abead8703319616c83ed09bebaceb47f8f179b91ef3af3a2b4dc37
 SHA512 
03a2368388de8fa0977f0af58234060d2ce156d23fa5d954e49791182ad78d2bb66c7abe319323f184c3d344915083c961c8d7646f2ac7faa56d85a21fcb7c9e

diff --git a/sys-kernel/gentoo-kernel/gentoo-kernel-5.18.6.ebuild 
b/sys-kernel/gentoo-kernel/gentoo-kernel-5.18.6.ebuild
new file mode 100644
index 000000000000..1ba27417d51c
--- /dev/null
+++ b/sys-kernel/gentoo-kernel/gentoo-kernel-5.18.6.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[@]}"
+}

Reply via email to