summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichał Górny <mgorny@gentoo.org>2022-10-24 13:51:55 +0200
committerMichał Górny <mgorny@gentoo.org>2022-10-24 15:16:23 +0200
commitd3c1bf309ca3e1ef0d2da46971da168c7d9e2371 (patch)
tree8fd11cafee3d90916345166e2dc00cfbcdb44333
parentsys-kernel/vanilla-kernel: Bump to 5.19.17 (diff)
downloadgentoo-d3c1bf309ca3e1ef0d2da46971da168c7d9e2371.tar.gz
gentoo-d3c1bf309ca3e1ef0d2da46971da168c7d9e2371.tar.bz2
gentoo-d3c1bf309ca3e1ef0d2da46971da168c7d9e2371.zip
sys-kernel/gentoo-kernel: Bump to 5.19.17
Signed-off-by: Michał Górny <mgorny@gentoo.org>
-rw-r--r--sys-kernel/gentoo-kernel/Manifest2
-rw-r--r--sys-kernel/gentoo-kernel/gentoo-kernel-5.19.17.ebuild137
2 files changed, 139 insertions, 0 deletions
diff --git a/sys-kernel/gentoo-kernel/Manifest b/sys-kernel/gentoo-kernel/Manifest
index 4bf95fe1df7b..34e27db009b5 100644
--- a/sys-kernel/gentoo-kernel/Manifest
+++ b/sys-kernel/gentoo-kernel/Manifest
@@ -6,6 +6,8 @@ DIST genpatches-5.15-78.base.tar.xz 3076864 BLAKE2B e868bff991ca299fe186380ef4e7
DIST genpatches-5.15-78.extras.tar.xz 3932 BLAKE2B b971f35cd6b525ea2fa675909790f489b66a1bd96403d12acf47ac2cb00218181ad267649d143e37f2cc775f4892c0e3a24817c9270c27c7b937b69ad002000e SHA512 6973da0d4dc2d48c5c481a45581ca51449957bb662dc8520ae00a23056dc25f2b9d419cd2ccf9fd5244313ee2eee0b907cd367259ae1d27cbd226bbe8bbced32
DIST genpatches-5.19-18.base.tar.xz 911172 BLAKE2B db20a811ffc927b01dc389fc3d959809442fa4065fc2951b992561fbc102e854b5fd8dd17833604458e95f8bcec23c75ae94095df90745b489628e52661b5878 SHA512 4e9b9eb22f6a3b634964c35241a9a50517228787f6bd7f25f2de3ff82336c8d0acd8b2fe703a9595ed32776d64bb66ba518919f597948922db6791c10c572b67
DIST genpatches-5.19-18.extras.tar.xz 3808 BLAKE2B dab7e5596066c9b70ebc2b7413ec7dc9c35bddc29f230dfdc74a9594706713a6807e0ded167eea3ec6a4bcf0c901404bb4fe1a71fa1c8aa265c599b6a1dac8fa SHA512 f39d76551328f9e8d1aa646e819282096bbcea1cb22902fd087dec878a7d673aacb517441a9c213e85a03f2f15768e1a252f103ca89f1b84ef994a0998416bb8
+DIST genpatches-5.19-19.base.tar.xz 1098964 BLAKE2B c79251602e677d36db4f923ad148422c1c19d9e35b33d1eead75f317ac468ba919baa0c61a690425714bc0b29d96eb47aeb1c960ec4192ccb3905df752f81ab4 SHA512 bb0ed1e481a78f8f65229db777c5d8031edbd3d31cdc0ed45e48d4f5916b838397c1ccec5d465d957673494469290a1dffc8a4466c252395348c8160f2f5cc67
+DIST genpatches-5.19-19.extras.tar.xz 3804 BLAKE2B c73e8bb8be2845ada725f71045e69fa38c99d0561e702d38e3827cf1e25ff2ab2105e3142d0f85baea59fa4a28a4521202d222c53190b741055609551ac1039f SHA512 b6f813b816f475a120543f637857f683e82cb22484fad7149bfbc5bcdd6d5119373d915ac53d6b743197910e78fc2ebdf35bcfb3612015e571629d33740f2701
DIST genpatches-5.4-223.base.tar.xz 5119600 BLAKE2B d2ad667a58be0061e5e94a885f3cafd7c0d99b108f129a5d7bdc18d0d77b99d52b2dfd0067f6d4657dadcc73f371555949c9ae70f71c1b457c9487179db25070 SHA512 0e58903a7e78f1a50a961a27929f3a936f07ee45343d079389cf9e8b9e78a1b542ec58bbba49ced2e0873d86d28ef2ebf3501a70a5cc8465298c267d95a09899
DIST genpatches-5.4-223.extras.tar.xz 1812 BLAKE2B e0ebc78506b6ca3d8bc09164b26f15a8cc94495797fc17a36381a3f031dd81bf7870915a48b0deb4f58cfb43e5ec4a64e18e6ca6c00837bdfc5e4fab913752b8 SHA512 ce01405cfc355d6230e687c407c9a5e92d88c6f0837eda19d2bc23d3517df4c5159332d491459867841827e0dc3976c8229cf0d0cb1c9d39360ba67ea616a734
DIST genpatches-5.4-224.base.tar.xz 5119576 BLAKE2B 3f5fa9712da6376491d9903759334ca4981a6fc9b24919ba6acb5114ce805333a26052570df1a192dc8e062ee77667b45dac62c309d37b02190e4f8a07640aea SHA512 d433e356e47f0a6be0ba3b41172618f0b9cce634e4227924d62a8487cb74af3ea0c4d3245ee4fd2936d39ed5eb839d52985866b9d796f7e7a84415a6b60f9b50
diff --git a/sys-kernel/gentoo-kernel/gentoo-kernel-5.19.17.ebuild b/sys-kernel/gentoo-kernel/gentoo-kernel-5.19.17.ebuild
new file mode 100644
index 000000000000..09dafaff5094
--- /dev/null
+++ b/sys-kernel/gentoo-kernel/gentoo-kernel-5.19.17.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##*.} + 2 ))
+# https://koji.fedoraproject.org/koji/packageinfo?packageID=8
+# forked to https://github.com/projg2/fedora-kernel-config-for-gentoo
+CONFIG_VER=5.19.13-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[@]}"
+}