summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichał Górny <mgorny@gentoo.org>2022-11-03 17:32:45 +0100
committerMichał Górny <mgorny@gentoo.org>2022-11-04 06:40:49 +0100
commit74f05e6d0471c0c61c444c2784fb3ac8201044bb (patch)
treea5d3db9b0a0f23571ab1d9a10376b5eba62be571 /sys-kernel
parentsys-kernel/vanilla-kernel: Bump to 6.0.7 (diff)
downloadgentoo-74f05e6d0471c0c61c444c2784fb3ac8201044bb.tar.gz
gentoo-74f05e6d0471c0c61c444c2784fb3ac8201044bb.tar.bz2
gentoo-74f05e6d0471c0c61c444c2784fb3ac8201044bb.zip
sys-kernel/gentoo-kernel: Bump to 6.0.7
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-6.0.7.ebuild137
2 files changed, 139 insertions, 0 deletions
diff --git a/sys-kernel/gentoo-kernel/Manifest b/sys-kernel/gentoo-kernel/Manifest
index 0203ad325248..e67368c12a53 100644
--- a/sys-kernel/gentoo-kernel/Manifest
+++ b/sys-kernel/gentoo-kernel/Manifest
@@ -24,6 +24,8 @@ DIST genpatches-6.0-5.base.tar.xz 279980 BLAKE2B 72e3445a0d791825d6aebfed695bde2
DIST genpatches-6.0-5.extras.tar.xz 3804 BLAKE2B 36e9a4a81f9cc9bea2dab9138bbfa9e380ef6e6d1305ff27072f96be23a8be691c20505c07d0034f0cead7b0f955e463485fc7d488b04ccb951a27eb3aabfb39 SHA512 b0c4a0640f20bbad1c5a5ce4a4c7413c1bd3fa1463be6d8dde3447d0131beb0a5809be53d2df7660516affe4b35f9b88a6ad8ff1b8575cf76f01bc086e4ccf60
DIST genpatches-6.0-6.base.tar.xz 307564 BLAKE2B 14e3d451ae6f21219ed86f8fea2cd8c4888e8b8d23e43d6d855ccb3e07346348aa267e0e20e65c0cb782c3fbb0adc98e3e6728dc83d58bb8dbbed656b3273076 SHA512 1ed76b47ee510074787be882b999dc60c108e1411f4704c9104936f808b12bb97700883f2eed9e41d6da6a0cb5fd00cdd47f267cff1c34173bed49e1379a8786
DIST genpatches-6.0-6.extras.tar.xz 3804 BLAKE2B df263043bb2e5608eba21f3e3512628029043bbab7dc43c1190e341f66d74d7adabe224a7d726aaa23c7fb9290544419b10704e6697a45c39d1932acdc75627c SHA512 243a9810ff21706c2624a796f61690235c37faaa0b748a0c3e80bf4f7e3f6ed2285201a1f6510e03f3244adcbb3c58ecd90e6f0eed09fe06f469725792554be0
+DIST genpatches-6.0-7.base.tar.xz 373860 BLAKE2B c6cce4c024ed86128424d47eea766acf42c6ebee468003aa072a20254261c2dedea7833ec55af4a9b04bc31e041e9489553ebbbad4419176caeff77c1b14ed8a SHA512 d7fed4dbaa7baa89fa045242805793a0d5cae0fc32e4ee05aeec482b41776bc6acc96307aea63cffc7521695a31c6033d183b41c1bcc6e89b580b7a67439d019
+DIST genpatches-6.0-7.extras.tar.xz 3808 BLAKE2B e332e2144f8831ac194ec1bce1e8b1bef7ffdd8a1ad76003153abfe0d3d5df2db739e8299f033a67d539b51f7d97645d447e023431fddd3ba06c595be3798748 SHA512 43a5ec73f5f552c557d2456df96e9996499408a9701f35d37e78b9363ffa8e319a3d877bc45702fe3fe24f9cc8c4c9af2d0a63e3b596c4a5c7715ffb8a9ce2fe
DIST gentoo-kernel-config-g1.tar.gz 4283 BLAKE2B 44dd51ec45ebc71bffcd6d85a2fefba053f7bce8035057f0bbe928e24816ad4ba03c9bf67dcfcd6d6d1833c0a2ea93e0fd486c2093664dc41ccce316e1e60588 SHA512 3a45f28df9d457df0fe0d185da8b10f4e35f49dad75075e041e8cf3cf6972fecc8145cd557b0bf3a8dea20ddffae0194f88e61c1e5098fa0a5ca301d40aeea2e
DIST gentoo-kernel-config-g3.tar.gz 4411 BLAKE2B 00edc4b5dc943834bc7ee977382b2960160888db00a25c5a7f73968784aa39a2b3b69f0bbda89b3ce8eb55e746006cff2839481493ac8bfca6a21de2299564f7 SHA512 44beae869bebf5445655dafe1facc47c3dbe602b34c5bf2fa984a581bfe3250fa0df908b8807c333c2e66ab9d1a2bb8026e22140f2a1f522d0dd647c96ca4d5e
DIST kernel-aarch64-fedora.config.5.10.12 223184 BLAKE2B a0246dac2f7a4ad6a55b611538d24382ac87a8960077811a859c9595ac67f961b4bccb7e139a89abc7c0e26e80832da5c94211fc658082f2e7dde984f14dd29d SHA512 7d803b347b136331db1ad6e22e0445fe0224c3e26cd7c034cbe9794915d457b492e05f77664865079874ec001351553652646e2e08d0fee31e30b841b0008f52
diff --git a/sys-kernel/gentoo-kernel/gentoo-kernel-6.0.7.ebuild b/sys-kernel/gentoo-kernel/gentoo-kernel-6.0.7.ebuild
new file mode 100644
index 000000000000..b2d46f8af059
--- /dev/null
+++ b/sys-kernel/gentoo-kernel/gentoo-kernel-6.0.7.ebuild
@@ -0,0 +1,137 @@
+# Copyright 2020-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit kernel-build toolchain-funcs
+
+MY_P=linux-${PV%.*}
+GENPATCHES_P=genpatches-${PV%.*}-$(( ${PV##*.} + 0 ))
+# https://koji.fedoraproject.org/koji/packageinfo?packageID=8
+# forked to https://github.com/projg2/fedora-kernel-config-for-gentoo
+CONFIG_VER=6.0.3-gentoo
+GENTOO_CONFIG_VER=g3
+
+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/projg2/gentoo-kernel-config/archive/${GENTOO_CONFIG_VER}.tar.gz
+ -> gentoo-kernel-config-${GENTOO_CONFIG_VER}.tar.gz
+ amd64? (
+ https://raw.githubusercontent.com/projg2/fedora-kernel-config-for-gentoo/${CONFIG_VER}/kernel-x86_64-fedora.config
+ -> kernel-x86_64-fedora.config.${CONFIG_VER}
+ )
+ arm64? (
+ https://raw.githubusercontent.com/projg2/fedora-kernel-config-for-gentoo/${CONFIG_VER}/kernel-aarch64-fedora.config
+ -> kernel-aarch64-fedora.config.${CONFIG_VER}
+ )
+ ppc64? (
+ https://raw.githubusercontent.com/projg2/fedora-kernel-config-for-gentoo/${CONFIG_VER}/kernel-ppc64le-fedora.config
+ -> kernel-ppc64le-fedora.config.${CONFIG_VER}
+ )
+ x86? (
+ https://raw.githubusercontent.com/projg2/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[@]}"
+}