summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichał Górny <mgorny@gentoo.org>2020-11-13 23:38:21 +0100
committerMichał Górny <mgorny@gentoo.org>2020-11-14 15:01:38 +0100
commit477b5f6b6ebdd1d374e1745ec5652443306671e5 (patch)
tree165d54a6df5623a0a702147ea3742f6cd7d5cad5 /sys-kernel/gentoo-kernel
parentkernel-build.eclass: Support merging config files (diff)
downloadgentoo-477b5f6b6ebdd1d374e1745ec5652443306671e5.tar.gz
gentoo-477b5f6b6ebdd1d374e1745ec5652443306671e5.tar.bz2
gentoo-477b5f6b6ebdd1d374e1745ec5652443306671e5.zip
sys-kernel/gentoo-kernel: Use externalized configs for 5.9.8-r1
Closes: https://bugs.gentoo.org/753326 Closes: https://github.com/gentoo/gentoo/pull/18235 Signed-off-by: Michał Górny <mgorny@gentoo.org>
Diffstat (limited to 'sys-kernel/gentoo-kernel')
-rw-r--r--sys-kernel/gentoo-kernel/Manifest1
-rw-r--r--sys-kernel/gentoo-kernel/gentoo-kernel-5.9.8-r1.ebuild87
2 files changed, 88 insertions, 0 deletions
diff --git a/sys-kernel/gentoo-kernel/Manifest b/sys-kernel/gentoo-kernel/Manifest
index 3e24a0a61c4..d6bca697d08 100644
--- a/sys-kernel/gentoo-kernel/Manifest
+++ b/sys-kernel/gentoo-kernel/Manifest
@@ -4,6 +4,7 @@ DIST genpatches-5.4-78.base.tar.xz 2710752 BLAKE2B caf08c588198fa9a364ec299c9918
DIST genpatches-5.4-78.extras.tar.xz 1772 BLAKE2B 2b1790308dfe3bcfbd74ff7293fb0819e3949f0eb3d6ee448e4f7770d9e282505238dfbf4cfc5fcd144df7091816cb7f1c7d3514e9f9741ce4891539ca63fa8c SHA512 1d5814c23702f562b2207a95901b9ac4c5160508a0ac4dfb45468e6500f0a750c7ac4982d86ebd9de8acd26e23974f2893b3961d9aaa30fcaa3be2a217bbe80b
DIST genpatches-5.9-8.base.tar.xz 443192 BLAKE2B 48c79a97fe1201bab87ba601feac1e05ce12f2db155e53e0a543c7994ba8dfcac75b17e315929c0b68b8136913fdf93005690ccb260640ccc31527088beb326b SHA512 c365018bcfe84ff64a8171951fd4f97bb89044633df137926d22bedc738cd17ebe72c26800eaf30171c3495ce2b1bfdc93866112756bdd2207e6e184b5f1fb6f
DIST genpatches-5.9-8.extras.tar.xz 1768 BLAKE2B 96413f75c606fe4515d0facb8f0ca784702bb5d83591af87fb4bcf2b6c5e135eabcc55e0e84be9ecd3854ec108b8ed93cff11c41e7efba8c45aadefa291cacff SHA512 646efb1f6e0b9252b0220aa5922b0c0d8f093dba8edb7e40e127680c8a471aa49724f9591a3147925d7a4084af8d5e1cc5f78b0e72297072fd15bd13d1c93e40
+DIST gentoo-kernel-config-5.9.8-r1.tar.gz 1198 BLAKE2B 8fc6d432e9d7e1f7f2be75c5741ab18be399066e9837a52023bebfbffe6299eabfa7e8e94822ef205bd443f6d75a75530cf0c3989dc0414a7c3e4ff06d4743bc SHA512 bc554f46ffb8a4422269e5d9b8e9e0c0f1ecd29fd008719f7ab027e87f4b4bb284d7854d1af2e1e5af0784043db79de058b38fd1ff0bf50d3086e8adc6254e1f
DIST kernel-aarch64-fedora.config.5.9.2 217893 BLAKE2B 03a36c1fe81a16b434cd94bad3984bf8984808b2e7092089f9a23a565c6d9bc8a512baa4e5754633783ef47feb6cc67010a0093f096e5a15db0f13aaaf6d6426 SHA512 ebe29150ae625cf2f285649984c27246ef85cc13f0b5d4e40dd3ef479489aaa09b6ee4aee859d6e4361dd7e7b4432db8aec077a099a25e90609b9eac2d42802d
DIST kernel-aarch64.config.5.4.21 199104 BLAKE2B 578ad451a76204df2a9bbbe34b5cb27051d2ac5e2c33967f562b01338c43f35da6dc33a4c2cc67ea6c3b32b155729360d3748ec28dcaa750f18449245b2e8a09 SHA512 66e9a437beb350fdc59512c17b8f72c5b5bfacf2b35070d810d77e66f49cf7929026cc28ad44b04a016d61e65d9fb4a10af6996ba09b604bf97e9c467d08f8ff
DIST kernel-i686-fedora.config.5.9.2 201362 BLAKE2B 93e5dbbeec7761d777b8cf8795b38dd6a727f07c58176013dc5d18c60165af21c6e0e9140c7c7217fcc31f9b9a9c959be9d3ef0f853035986605fc513e7c70c1 SHA512 7bb41160333fa0f751c80ec9ad1e49ef991c26e05575a1e5fb41967bd984c91294629d91624eacbbdf2f307a28f9de8c994a9a7bef63cc933b0e13727dd33619
diff --git a/sys-kernel/gentoo-kernel/gentoo-kernel-5.9.8-r1.ebuild b/sys-kernel/gentoo-kernel/gentoo-kernel-5.9.8-r1.ebuild
new file mode 100644
index 00000000000..2bbd08ab281
--- /dev/null
+++ b/sys-kernel/gentoo-kernel/gentoo-kernel-5.9.8-r1.ebuild
@@ -0,0 +1,87 @@
+# Copyright 2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit kernel-build
+
+MY_P=linux-${PV%.*}
+GENPATCHES_P=genpatches-${PV%.*}-${PV##*.}
+# https://koji.fedoraproject.org/koji/packageinfo?packageID=8
+CONFIG_VER=5.9.2
+CONFIG_HASH=94a4277f8827d1b2c911deabe56e7d929dc93146
+GENTOO_CONFIG_VER=5.9.8-r1
+
+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/v${GENTOO_CONFIG_VER}.tar.gz
+ -> gentoo-kernel-config-${GENTOO_CONFIG_VER}.tar.gz
+ amd64? (
+ https://src.fedoraproject.org/rpms/kernel/raw/${CONFIG_HASH}/f/kernel-x86_64-fedora.config
+ -> kernel-x86_64-fedora.config.${CONFIG_VER}
+ )
+ arm64? (
+ https://src.fedoraproject.org/rpms/kernel/raw/${CONFIG_HASH}/f/kernel-aarch64-fedora.config
+ -> kernel-aarch64-fedora.config.${CONFIG_VER}
+ )
+ ppc64? (
+ https://src.fedoraproject.org/rpms/kernel/raw/${CONFIG_HASH}/f/kernel-ppc64le-fedora.config
+ -> kernel-ppc64le-fedora.config.${CONFIG_VER}
+ )
+ x86? (
+ https://src.fedoraproject.org/rpms/kernel/raw/${CONFIG_HASH}/f/kernel-i686-fedora.config
+ -> kernel-i686-fedora.config.${CONFIG_VER}
+ )"
+S=${WORKDIR}/${MY_P}
+
+LICENSE="GPL-2"
+KEYWORDS="~amd64 ~arm ~arm64 ~ppc64 ~x86"
+IUSE="debug"
+REQUIRED_USE="arm? ( savedconfig )"
+
+RDEPEND="
+ !sys-kernel/vanilla-kernel:${SLOT}
+ !sys-kernel/vanilla-kernel-bin:${SLOT}"
+BDEPEND="
+ debug? ( dev-util/dwarves )"
+
+src_prepare() {
+ local PATCHES=(
+ # meh, genpatches have no directory
+ "${WORKDIR}"/*.patch
+ )
+ default
+
+ # 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
+ ;;
+ ppc64)
+ cp "${DISTDIR}/kernel-ppc64le-fedora.config.${CONFIG_VER}" .config || die
+ ;;
+ x86)
+ cp "${DISTDIR}/kernel-i686-fedora.config.${CONFIG_VER}" .config || die
+ ;;
+ *)
+ die "Unsupported arch ${ARCH}"
+ ;;
+ esac
+
+ local merge_configs=(
+ "${WORKDIR}/gentoo-kernel-config-${GENTOO_CONFIG_VER}"/base.config
+ )
+ use debug || merge_configs+=(
+ "${WORKDIR}/gentoo-kernel-config-${GENTOO_CONFIG_VER}"/no-debug.config
+ )
+ kernel-build_merge_configs "${merge_configs[@]}"
+}