sys-kernel/gentoo-kernel: Restore 5.4.32 as stable target
authorMichał Górny <mgorny@gentoo.org>
Fri, 24 Apr 2020 09:50:07 +0000 (11:50 +0200)
committerMichał Górny <mgorny@gentoo.org>
Fri, 24 Apr 2020 09:52:19 +0000 (11:52 +0200)
Signed-off-by: Michał Górny <mgorny@gentoo.org>
sys-kernel/gentoo-kernel/Manifest
sys-kernel/gentoo-kernel/gentoo-kernel-5.4.32.ebuild [new file with mode: 0644]

index 609d5fd47622944c854eb2fd004f4871da0f8c06..814a1ffe1f33f58dcbaa63f0f1e3382e2b0b412e 100644 (file)
@@ -1,3 +1,5 @@
+DIST genpatches-5.4-32.base.tar.xz 1184244 BLAKE2B 335fa30de35222c3f8bf14d9c2ee6201775671255062929d95c092e2c887c33bf22f1591fa2942db0595b5c02f951d191db51f3a24e192ccd1919c3ba0a5e938 SHA512 9bcd822c03d5733b72c066341c5d730c3ad644a41ebca77b6ae9d8e240f2bb20ec06ef92e317dc74533683bdff85f41d6e8d80d91928faba7d8a5f6a04452f1d
+DIST genpatches-5.4-32.extras.tar.xz 1744 BLAKE2B bf702c213be8e247b5c2e5e25c1d010584e7f227e7bc94c366e770ad71df46c77948c6b9ef47d10cf3dfdecc6fa31f069b35478b750c341d92784d982c99bf21 SHA512 da797e1d8766f310e40e4def65f9dfc95409f3d776cb45a5f00bfab7eb97357e565da4d95df9b425490d77b6ae21939943d39441ad4b8dc33917bd62a0a7b1ef
 DIST genpatches-5.4-34.base.tar.xz 1263276 BLAKE2B 3165a1ba63e6d908c7be1575cf3e7085737e31b754a6d58e61b99438c87fbb3959f46a45ad1dd21791d37251c82b2323a97914cf7d80bea3a8a11fb1bc979282 SHA512 fd53b6969ee1fc94762941dbceabf74a77519aa104078da964acf2b5d199f91a7ccb045a2222cd0cb2d241343b783a3ee24f2c7ed0ea3be69c7bc658fac0c0e1
 DIST genpatches-5.4-34.extras.tar.xz 1756 BLAKE2B 53bed9e3f8bc694d5d1ea0d2e1ec191d70658283954f7ac60098daa0087d8b16578d60329525aa1f09475bf6c7b926b33c90ed7d94ae458c6dfc97c19dea34f1 SHA512 e37d294f655c9081777121faa017d8ba385eb74d2cc1dd6b773a6994f63a1bd70585661837ffd154e12db1f0efd3c1102136916f2f13682313e352f69adb3854
 DIST genpatches-5.4-35.base.tar.xz 1295960 BLAKE2B 4af588c7896e9afad45a915521f57c1c5041dcc6792a8df0d6d79e9bd7fbf2ddb37128cc69e810391eb24f224949dc566f7f0b145ddd79f43df4927321e23429 SHA512 accfab914a5581231f7b8299c18e67b5791e18fd44a41ea3a1070a41c60ac32011274df9c13fd19ab2ceb9190304d839e6d365c02e17163f764fe63d5dc47fd1
diff --git a/sys-kernel/gentoo-kernel/gentoo-kernel-5.4.32.ebuild b/sys-kernel/gentoo-kernel/gentoo-kernel-5.4.32.ebuild
new file mode 100644 (file)
index 0000000..1412b29
--- /dev/null
@@ -0,0 +1,73 @@
+# 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://git.archlinux.org/svntogit/packages.git/log/trunk/config?h=packages/linux
+AMD64_CONFIG_VER=5.4.15-arch1
+AMD64_CONFIG_HASH=dc8d69b59a7a529ec5aaeb6b32b16e59a3cc1569
+# https://git.archlinux32.org/packages/log/core/linux/config.i686
+I686_CONFIG_VER=5.4.15-arch1
+I686_CONFIG_HASH=1ad219bd3f0ab439a81ed01fec7660eeea7daa0e
+
+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
+       amd64? (
+               https://git.archlinux.org/svntogit/packages.git/plain/trunk/config?h=packages/linux&id=${AMD64_CONFIG_HASH}
+                       -> linux-${AMD64_CONFIG_VER}.amd64.config
+       )
+       x86? (
+               https://git.archlinux32.org/packages/plain/core/linux/config.i686?id=${I686_CONFIG_HASH}
+                       -> linux-${I686_CONFIG_VER}.i686.config
+       )"
+S=${WORKDIR}/${MY_P}
+
+LICENSE="GPL-2"
+KEYWORDS="~amd64 ~x86"
+
+RDEPEND="
+       !sys-kernel/vanilla-kernel:${SLOT}
+       !sys-kernel/vanilla-kernel-bin:${SLOT}"
+
+src_prepare() {
+       local PATCHES=(
+               # meh, genpatches have no directory
+               "${WORKDIR}"/*.patch
+       )
+       default
+
+       # prepare the default config
+       case ${ARCH} in
+               amd64)
+                       cp "${DISTDIR}"/linux-${AMD64_CONFIG_VER}.amd64.config .config || die
+                       ;;
+               x86)
+                       cp "${DISTDIR}"/linux-${I686_CONFIG_VER}.i686.config .config || die
+                       ;;
+               *)
+                       die "Unsupported arch ${ARCH}"
+                       ;;
+       esac
+
+       local config_tweaks=(
+               # shove arch under the carpet!
+               -e 's:^CONFIG_DEFAULT_HOSTNAME=:&"gentoo":'
+               # we do support x32
+               -e '/CONFIG_X86_X32/s:.*:CONFIG_X86_X32=y:'
+               # disable signatures
+               -e '/CONFIG_MODULE_SIG/d'
+               -e '/CONFIG_SECURITY_LOCKDOWN/d'
+               # disable compression to allow stripping
+               -e '/CONFIG_MODULE_COMPRESS/d'
+               # disable gcc plugins to unbreak distcc
+               -e '/CONFIG_GCC_PLUGIN_STRUCTLEAK/d'
+       )
+       sed -i "${config_tweaks[@]}" .config || die
+}