summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sys-kernel/gentoo-kernel/Manifest2
-rw-r--r--sys-kernel/gentoo-kernel/gentoo-kernel-5.4.51.ebuild73
2 files changed, 75 insertions, 0 deletions
diff --git a/sys-kernel/gentoo-kernel/Manifest b/sys-kernel/gentoo-kernel/Manifest
index 5744d8403eb9..694e8450ee80 100644
--- a/sys-kernel/gentoo-kernel/Manifest
+++ b/sys-kernel/gentoo-kernel/Manifest
@@ -10,6 +10,8 @@ DIST genpatches-5.4-49.base.tar.xz 1695772 BLAKE2B ad81358e16e2c61bcfa1649e535ed
DIST genpatches-5.4-49.extras.tar.xz 1764 BLAKE2B 285ebf3fec9ec3b5507f80dce0d6e24f635597e1bbae921135bab4ad6b743108fb8fa2a390380e030dd9d9d0d7e240dabefe043a1659cbaf6c8851d5b64d0006 SHA512 43e66a2537b42f53fdee24350903d28ec6904b2dbc10a4a1b075ac8542e6acf9adaa66defdbd10cd3f9b177a369fa1a2c6e4d6c45067b83cc0b381eea97c654c
DIST genpatches-5.4-50.base.tar.xz 1732832 BLAKE2B 46f33ab709c16a59e8bcde3a561e8d9ac4f6e0664dc61662ec82ea3e7805a1e37feaf13c5cefae1375d6c43e26cb07a14c9e030adead1cd9d9da8cedb2c2dcab SHA512 78569c984c19912afce6c10ed2b3cb9c02a0733c058c76c432f10463d7860dd73c8de034893ec2f9e5bee11b85612e5e356d33138259803b497e7da2d7e29cbb
DIST genpatches-5.4-50.extras.tar.xz 1764 BLAKE2B c7c6e8c2ff97fc143802142f85f6b3447ba8cf30e9be5b307781ae216854e03000127899e66546883d34f3f8659ce636ceae677e85ab932a6a8184d5da4f8214 SHA512 e9fbd2bd8224e1e13f41ebd2af9f35f3896b9cba71c656848998ac53e4a824dd1e071a4e533e8e03fdb5a49ca70b533dcab6eab503f00394729e2216acba811c
+DIST genpatches-5.4-51.base.tar.xz 1747452 BLAKE2B f93a14ea424bc1256e7b8ff34b8aae19f81d4e084ef0e8058f6dc25d776e78705e5e983b45bd24288c1c30b2456a61e349a20ea3bd8275d4e5eeb0fee0a7553b SHA512 4d1ee62f2a8931e97d7be5abfcccfe08ca9687e27abb553148f03d7d8672a35c7c3b1541555e4976e7405ba4782f170acff60b0588a0dda356a2771fe2bc17e4
+DIST genpatches-5.4-51.extras.tar.xz 1768 BLAKE2B b464b9c9ac573b159211c51f9b131ee02f3a009dac6faa1a7f6d123a8070370074cdafe36e9b9e3dd7fbe66ebed290c0372088689425b49c687e79619641fd44 SHA512 5d77b35bfb5af8d0449c543b687a62139c4efdbaba1c75701a44a88c7446ae9a766babb3687d5a26cf8fde1e8b5b7c6f861631b1db9a81afc7dee8240345c7b0
DIST genpatches-5.6-22.base.tar.xz 499020 BLAKE2B c6a9977f776a79a3da7b61dd57fbf76af7cb91069bd87cbf7189cefd207befdbec044c7bd440aad194245b93ef4254dda949f15a19d1c82e7aac44bc306e14b6 SHA512 c40c15088b75dc325712cb95468d84a4eb87616d634f51a479ac6a34e9515329c90f8360a3f7d7876ab5bb335c4d435d308e37c1562507fa6c57c88f9ecd775c
DIST genpatches-5.6-22.extras.tar.xz 1764 BLAKE2B 64a589b498dfa1cc41b525a90b77a1524926a4ff9a2f9c1e2e7bd3d3750c531df3545e4af68a04fc7e3e641b6c8985a627190407f6eb85657eac960261f98ef6 SHA512 d0c11d9d5d2966ad3bf2da898e89f99b83f179f5ffda28c8ff4c0c0d0eb7a0e2553d1773ced53557fa54a58a85486802acd51f372ec3026862af58c09049a0f4
DIST genpatches-5.6-23.base.tar.xz 540292 BLAKE2B f22ce1772f5ab80c9a20e6447a3874c7c664dfe8c1934202706e6d2e84fc378068dc98719796d45809392e7e32d6c0a2233693617f3c3ce84f42dfab00dcdbe7 SHA512 f5db5e258efc2fd0d29e1a772f03838d232b11b9fc22e9cc78ecab70cfcae819a9bc7c24234fbaf94c2b30b559f4fb88e493643e4a6e58169e62eb665564ee9c
diff --git a/sys-kernel/gentoo-kernel/gentoo-kernel-5.4.51.ebuild b/sys-kernel/gentoo-kernel/gentoo-kernel-5.4.51.ebuild
new file mode 100644
index 000000000000..1412b2980be3
--- /dev/null
+++ b/sys-kernel/gentoo-kernel/gentoo-kernel-5.4.51.ebuild
@@ -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
+}