summaryrefslogtreecommitdiff
path: root/sys-kernel/vanilla-kernel
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2020-01-15 15:51:32 +0000
committerV3n3RiX <venerix@redcorelinux.org>2020-01-15 15:51:32 +0000
commit21435953e16cda318a82334ddbadb3b5c36d9ea7 (patch)
treee1810a4b135afce04b34862ef0fab2bfaeb8aeca /sys-kernel/vanilla-kernel
parent7bc9c63c9da678a7e6fceb095d56c634afd22c56 (diff)
gentoo resync : 15.01.2020
Diffstat (limited to 'sys-kernel/vanilla-kernel')
-rw-r--r--sys-kernel/vanilla-kernel/Manifest28
-rw-r--r--sys-kernel/vanilla-kernel/metadata.xml10
-rw-r--r--sys-kernel/vanilla-kernel/vanilla-kernel-4.19.94-r1.ebuild71
-rw-r--r--sys-kernel/vanilla-kernel/vanilla-kernel-4.19.95.ebuild73
-rw-r--r--sys-kernel/vanilla-kernel/vanilla-kernel-4.19.96.ebuild73
-rw-r--r--sys-kernel/vanilla-kernel/vanilla-kernel-5.4.10-r1.ebuild71
-rw-r--r--sys-kernel/vanilla-kernel/vanilla-kernel-5.4.11.ebuild73
-rw-r--r--sys-kernel/vanilla-kernel/vanilla-kernel-5.4.12.ebuild73
-rw-r--r--sys-kernel/vanilla-kernel/vanilla-kernel-5.4.2.ebuild168
-rw-r--r--sys-kernel/vanilla-kernel/vanilla-kernel-5.4.3.ebuild168
-rw-r--r--sys-kernel/vanilla-kernel/vanilla-kernel-5.4.7.ebuild290
11 files changed, 749 insertions, 349 deletions
diff --git a/sys-kernel/vanilla-kernel/Manifest b/sys-kernel/vanilla-kernel/Manifest
index b5cd2a53cc26..0549d35138f8 100644
--- a/sys-kernel/vanilla-kernel/Manifest
+++ b/sys-kernel/vanilla-kernel/Manifest
@@ -1,6 +1,22 @@
-DIST linux-5.4.1.arch1-1.config 241587 BLAKE2B 71db76bf30a8d7f4dc680399b9f9fbb4236d1938bb86e23eb1ab236a667a959fc1cff788f7e432c43a6173e1bac4e20f3a6c3391d84275d46f1f66bd338bf538 SHA512 34d66658963dbd72fa3e96f2c5d5bccafb781fa14f6ebafe7859953929ba2fbb112f1435ca68cec8389d789cf0efa81d5fc0f5ac6dfa23a704348ab83709e9db
-DIST linux-5.4.2.tar.xz 109441848 BLAKE2B 126e00ef6a084049089f6733e480e68271083cc5f88bd2c64cba198c983c78c3e5f61a9cded8357d1767c4faadec5ab81c1a7231cc65f41913de2820e02a3467 SHA512 42bd0e1887555cf92d424243d85bb39911669da814b0201503319604f1d45f7f0b45d535ee08ca7831f47047db96125496159945c3cd05dac491e0f5e0685854
-DIST linux-5.4.3.tar.xz 109443116 BLAKE2B c874dc8d2fcf344efc6111071e9a54128d5b05fda2aa4ff56b684b68c5b61d58105d3cbf012f7005ed01f8d4350cf23096befc7f9357acbb0d003c5e8dc2bbd7 SHA512 bbdf4179c5263f313aac56a75ebe14da6d05128b27b3d84305743605745bb0ffa872dc6fd349a9f066676ab39ed395e512bb1b27fec47a99d6f002cd25f64ed5
-EBUILD vanilla-kernel-5.4.2.ebuild 4399 BLAKE2B 6ccac31f3c2e00d22626ce457ec4f0184980fec367d3ec25e22cbee5c86ee07afa8900755ef8aac5de152cb1ed1d6e15275f341744d88e8f5517c9b9446b2895 SHA512 63887b5f6b6792e1414c87c1f4f1c1acf84a81fad14cc5f196b5228af9415e56ff98754fce6990df046a2aca4ffe705b12d98f91746d19c60cd094d070cf2733
-EBUILD vanilla-kernel-5.4.3.ebuild 4399 BLAKE2B 6ccac31f3c2e00d22626ce457ec4f0184980fec367d3ec25e22cbee5c86ee07afa8900755ef8aac5de152cb1ed1d6e15275f341744d88e8f5517c9b9446b2895 SHA512 63887b5f6b6792e1414c87c1f4f1c1acf84a81fad14cc5f196b5228af9415e56ff98754fce6990df046a2aca4ffe705b12d98f91746d19c60cd094d070cf2733
-MISC metadata.xml 441 BLAKE2B 7d55a49726dea1d59869898efec62705613c5096b6e52fccd390557db187f6d393cfd8ee0e14d925824eaff9c9426ed4fbee135e0318372c1a16daee41c7a098 SHA512 fe68ddebf6b7ec810bd1748fea879064b19d0415dc45634cf9f624562eb9072b7c40d908c6861cc7ced295d5da0522ed193794c5d5a764bd5a0dd58f255cc337
+DIST linux-4.19.85-arch1.i686.config 222183 BLAKE2B 03eac77940db0ee6b4f2a006edc600ef34141bbca849f5be4de9b961301a8fc987da6d0e21344aa5d80c29bb7793d56cf5441abb6c8e4057d94e2601c174c1be SHA512 6bd45c9dfd96b1afb8c1ca1ca72722baee6c91894e454d7af937de02242d3bb9d3b6870f5976aa96245c753c6bc1ac637a6356125b0d4c596aadef643b8c3d8d
+DIST linux-4.19.92-arch1.amd64.config 222487 BLAKE2B a658d80d85525287a1df9053ca2ddfe423ab423bcc3b9ea8bd9cda65cc7ffa4b1be782c48c867c13e46070af4016f446860f5cf71351f239da1eff6c45a5aa6a SHA512 a5658c8e8464516dffd6f624344e739784cb315d334b2c5105bd5d16022b6366ad4ec00d3692a7b78e2458514175522bc85e834bf19593feff6363b616860258
+DIST linux-4.19.94.tar.xz 103389152 BLAKE2B 291db6f448606a4ba288295b4b1c0b813e736534e4749a152baa1d07fcf52bba2b59e7b4b261594a2deb9ad961afec50a28b4ec126f97033f1c0a36aba9f2961 SHA512 c6017e854ec06054c658042c2e8227d79284ecdadf0a2e1c5da799ca2ac165a266e7d33aa52361d0036ddb3059e3b24f0a68b45ffd84d87394d3f41492f6f9a4
+DIST linux-4.19.95.tar.xz 103392820 BLAKE2B ace518a2ba287bbc7e9a7259a3354284f1118408328e1620eef13eee478ef83dd80e3431e52c46a30dea86313131e650c88dcb5c2cc2f19e07c35b7e843e52dc SHA512 f41e8b50cd12ef86854207491e7f4e4a90d474d0e8354cc430bd73e2458d9bf9893385b6308ea356d02d6f1cfdaf647c1ab364024836b3e10301b1f5353c10d4
+DIST linux-4.19.96.tar.xz 103395480 BLAKE2B 1bc24dd40d427e088e1569be4d5964ae92028ce6ce7e549734837040c5043b5ef4aae572b1430ea5c03f67b7f071e18c4f58a24a63dcb342f18aecf2401ab9a8 SHA512 1fb1ee24429f2183b7e6b85d34e4c88f9c2a82ed95de1b7ca2db3d8ee4815ebcd05cdb171f93e1b0e85f9ffbc3a6fa8c66adceb240d3bf9c38afcc32f21c8dcf
+DIST linux-5.4.10.tar.xz 109453652 BLAKE2B 88706cfc05ec1cc201f08e069dc6ad4f8e6fb49dbef5937208ba1e752e18b46639a5d32d4d0e270a0f2f6ed872aed70beeb2b0367d41fe443437331902a90bb2 SHA512 6328ad7e18b6fa982415b0de75e3384f58ce8428bd8c212871a31f3885a0819d241138d384b2e6d1b74a1d260229a027f9c1674a65f5b6c48e6b25e3024a0974
+DIST linux-5.4.11.tar.xz 109456460 BLAKE2B 38f2620f7773ddd1d26e0638f1e2200e5f37611dc1d606a4200e352a4593bd934f109ee936093194347a26f8797683bbed5e9b81fab353d23bbe1bf28fda2ddc SHA512 75aba0e124def6604cc0050ca7b005d1d5398498d71199cb9e196d5739f0fc25664637849025aa7f965d46f9aecb2fafadc7b35dcb83e396dc4d3a084c458497
+DIST linux-5.4.12.tar.xz 109451372 BLAKE2B f08d30011b2021724a240f45a4d0a92ba01b97d0d2d33ce0d88aeb6dfb0a2e5a532fd55ad0a2ef0e3ec160cb23b351a09b494382e80b0db85bcfe7cfeaa554dd SHA512 d178d775b5d6204b2f53c38ecf81d52141a5520b63e758992c75a59d983e448db2a0c220a17b62588baaad1eda2d9b4a6a86e757f5d50041170559ef6bbc2da0
+DIST linux-5.4.3-arch1.i686.config 241295 BLAKE2B 795b6286bd1e7dc6aa5c1428e7bf08c204ce6c8cbee57863e9f64f8990790cc4398a7d062b54c89b1b80640f02a40fce028d9397725db0f968e8028b0611a20f SHA512 8c7387ded21c02b9cffee0e6d61a7040c44deae21764f743f7719f0d1c7adf684f6b62a501fe31709787ba741859e55fc3b8a3d3d27e52c09f2d8604212bf0a7
+DIST linux-5.4.7-arch1.i686.config 241295 BLAKE2B da45f2de600fafdb48e9bb37e6f7a8ea57ed31dc6fb47062bcee694db0b824844c0556ad6a88afa33bf3a365f50c9ac6326389cfa87d0e47a012252fa1444536 SHA512 dcfd9c03cbafeeb942fd37c1f18432aeeacaff438cb88528e17aa8c28bae20090695a2acad08a707e66ecaa5851aa47b012baa6d9274c617fa8c71cde641e8ec
+DIST linux-5.4.7.arch1-1.amd64.config 241598 BLAKE2B 536cce5cc23cf20e71cba7468a125557f85d8ffc3cb194dced79bd489d39f2e4ed3960816d15d1491007d11b3af466e0a74267f983dfcc5f511f9f566f7e9821 SHA512 8658db603e180c75caf76972d85ecf8a4e9c9cf6e047b4f9fc7cba0fa426f434361528c1c29b5580f116cdd23091bf9afb6635d751f3b90c4e968d16db90eac1
+DIST linux-5.4.7.tar.xz 109448088 BLAKE2B 70197bb6955253710be5b56660dd6e224d3415f9074afeac9525d28089a6c1aa307408cf6bf460370093b8d079837850136a06dee2f3203370ed6cd8ab4d6e66 SHA512 b3b6c843bb8210acf04d294887b527c2da10507ac731fe9f6f04cd21486d519cda5767a2ba094f10886717720ca3bd3dee22a650c213b7f8f6c1f825396dbed4
+DIST tinycorelinux-10.1-amd64.qcow2 16842752 BLAKE2B e013e76503c335739a9623c0901ca791937a0e6b177854535cadec1e2c2cd2df588283ed3128cf652595f32264fbfe5b3bd3a8c97665fd4da344e308535be366 SHA512 c3aeb20ff8769da9211694b7f701907cc7ae7582cdfad2c2fdc008d97ebcbd9dc08245b4e8f8450e1cb304bd705345a11fe79f901a47979fee91443841d55641
+DIST tinycorelinux-10.1-x86.qcow2 14876672 BLAKE2B 3c760eb7438b13261e52ecfaa33a53649ced95f1ab40aae52134b8cdc31a16d7aa0d6a6dd716e268ed148e9d77a10b7c700b141b61d70c82d271ffe88e8e2a3c SHA512 9964538dc42f232a11949f74b61d46422ea5da3bdc253a217119bd0b8a750c40fd2da0b07157067be9ac0226472614f210a1248114df0d331df390979867a895
+EBUILD vanilla-kernel-4.19.94-r1.ebuild 1971 BLAKE2B d5da5053ce00851a044cc6917a37b325e9b25840e40e031662112b5525a43121a514d56e2a27ad97de68653b67c98942a378c1f248d5f54dd1c016286ac25ae1 SHA512 88ddfd907b2575ca278be27e3fe3ac0bd5169eada56ea21bf7cf5414083fdbc1eb202c6ba56a3fd5d7bd47c7837b8bcf6b9686fd2c4f83e32775151374da5475
+EBUILD vanilla-kernel-4.19.95.ebuild 2124 BLAKE2B 3a5815e4c7e168af05501c98c78c19f2d55d4661d2386fcf6510b5bc48bcff5e875444a5c9a406272ca510845f3549674132aa1e25d45c584022b3b178fa2135 SHA512 173e618ce190403c8b86520a0aa63f78399e79dd81f709967550b1f42c715e19c973d3d4fb8a4016f7c17bf217edc7726df0ed9de010179cb09d4875fdf7276f
+EBUILD vanilla-kernel-4.19.96.ebuild 2124 BLAKE2B 3a5815e4c7e168af05501c98c78c19f2d55d4661d2386fcf6510b5bc48bcff5e875444a5c9a406272ca510845f3549674132aa1e25d45c584022b3b178fa2135 SHA512 173e618ce190403c8b86520a0aa63f78399e79dd81f709967550b1f42c715e19c973d3d4fb8a4016f7c17bf217edc7726df0ed9de010179cb09d4875fdf7276f
+EBUILD vanilla-kernel-5.4.10-r1.ebuild 1966 BLAKE2B 79c0a4946b983ee9b63752628d2f4e5ce12a2ceaa340c918533efa2ae8970bed8f6a74ee46a603a87ffff5f7af551566d5e1083e32db9676f1e82ca065fb2b2e SHA512 4f253e1f4784913b5f8c6a348ab92de78a395d0d61741735eb74395cec201240a2f2886ec0bc6a4c8e35f357fef253d5080db0b0159bb15cf7993cd6eb19e310
+EBUILD vanilla-kernel-5.4.11.ebuild 2116 BLAKE2B 306176059212ae786154140e8baaf2b1017655ba449d8bf8517bf7e5729d47fb880c6abbcb0b0a8455227521da72d68c2a261fa3cd775ba3c74f3d670fe53af8 SHA512 b4fcb5b2ca980e0e6d558504aba30784930d2047804a9483ad17bb4f23aba7c805c17c3326976ef9a36d17a02bfc2d9a716479a03057e2f7da1e85d19d1fb058
+EBUILD vanilla-kernel-5.4.12.ebuild 2116 BLAKE2B 306176059212ae786154140e8baaf2b1017655ba449d8bf8517bf7e5729d47fb880c6abbcb0b0a8455227521da72d68c2a261fa3cd775ba3c74f3d670fe53af8 SHA512 b4fcb5b2ca980e0e6d558504aba30784930d2047804a9483ad17bb4f23aba7c805c17c3326976ef9a36d17a02bfc2d9a716479a03057e2f7da1e85d19d1fb058
+EBUILD vanilla-kernel-5.4.7.ebuild 7860 BLAKE2B bd4fb5b12fc5ff5ce898f937fbd8ef7adf149361b8dc6bd7acf7b979141d0ed27ea8bd93649bf0bb1f376c3bbbbd925b9361d89dcfd3a49fe1c2c628a90f52ca SHA512 d10cbfdd8b66da24c2ca2677a938f07adc538e11fc9a5885d1f4224f8b105f5a5bd163b00a38972b92f722ccc95200098c62a3cc10eaf2f329d2e31a7a0b49f0
+MISC metadata.xml 352 BLAKE2B d45c3f23945883bcb819c225e43715f5cfd86090f3e928dfb62b26a7b38b98421ee0c0d3b4fe9ebdb9de39c294cbc288c1731e9493f69436a6916034d8b834d9 SHA512 e3b9651b8f0fa3b07626b4cfb01456e4ecea1ae053ad9e9e1b3c925a5de601b35c9f3983535d62edae9ef49a40fe4c319e013542908839f30415f6ad85463e24
diff --git a/sys-kernel/vanilla-kernel/metadata.xml b/sys-kernel/vanilla-kernel/metadata.xml
index cd6a1d015181..b0b959adbe61 100644
--- a/sys-kernel/vanilla-kernel/metadata.xml
+++ b/sys-kernel/vanilla-kernel/metadata.xml
@@ -1,13 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
- <maintainer type="person">
- <email>mgorny@gentoo.org</email>
- <name>Michał Górny</name>
- </maintainer>
- <maintainer type="person">
- <email>zlogene@gentoo.org</email>
- <name>Mikle Kolyada</name>
+ <maintainer type="project">
+ <email>dist-kernel@gentoo.org</email>
+ <name>Distribution Kernel Project</name>
</maintainer>
<use>
<flag name='initramfs'>Build initramfs along with the kernel.</flag>
diff --git a/sys-kernel/vanilla-kernel/vanilla-kernel-4.19.94-r1.ebuild b/sys-kernel/vanilla-kernel/vanilla-kernel-4.19.94-r1.ebuild
new file mode 100644
index 000000000000..18607be74834
--- /dev/null
+++ b/sys-kernel/vanilla-kernel/vanilla-kernel-4.19.94-r1.ebuild
@@ -0,0 +1,71 @@
+# Copyright 2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit kernel-build
+
+MY_P=linux-${PV}
+AMD64_CONFIG_VER=4.19.92-arch1
+AMD64_CONFIG_HASH=bf97de6a2e405659aaad4c251b7f0bb48d5ed3c9
+I686_CONFIG_VER=4.19.85-arch1
+I686_CONFIG_HASH=1f0345e2983d2edd55b401cb5a87fdf365a4192c
+
+DESCRIPTION="Linux kernel built from vanilla upstream sources"
+HOMEPAGE="https://www.kernel.org/"
+SRC_URI+=" https://cdn.kernel.org/pub/linux/kernel/v$(ver_cut 1).x/${MY_P}.tar.xz
+ amd64? (
+ https://git.archlinux.org/svntogit/packages.git/plain/trunk/config?h=packages/linux-lts&id=${AMD64_CONFIG_HASH}
+ -> linux-${AMD64_CONFIG_VER}.amd64.config
+ )
+ x86? (
+ https://git.archlinux32.org/packages/plain/core/linux-lts/config?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-bin:${SLOT}"
+
+pkg_pretend() {
+ mount-boot_pkg_pretend
+
+ ewarn "This is an experimental package. The built kernel and/or initramfs"
+ ewarn "may not work at all or fail with your bootloader configuration. Please"
+ ewarn "make sure to keep a backup kernel available before testing it."
+}
+
+src_prepare() {
+ 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
+}
diff --git a/sys-kernel/vanilla-kernel/vanilla-kernel-4.19.95.ebuild b/sys-kernel/vanilla-kernel/vanilla-kernel-4.19.95.ebuild
new file mode 100644
index 000000000000..03ea40f919c4
--- /dev/null
+++ b/sys-kernel/vanilla-kernel/vanilla-kernel-4.19.95.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}
+# https://git.archlinux.org/svntogit/packages.git/log/trunk/config?h=packages/linux-lts
+AMD64_CONFIG_VER=4.19.92-arch1
+AMD64_CONFIG_HASH=bf97de6a2e405659aaad4c251b7f0bb48d5ed3c9
+# https://git.archlinux32.org/packages/log/core/linux-lts/config
+I686_CONFIG_VER=4.19.85-arch1
+I686_CONFIG_HASH=1f0345e2983d2edd55b401cb5a87fdf365a4192c
+
+DESCRIPTION="Linux kernel built from vanilla upstream sources"
+HOMEPAGE="https://www.kernel.org/"
+SRC_URI+=" https://cdn.kernel.org/pub/linux/kernel/v$(ver_cut 1).x/${MY_P}.tar.xz
+ amd64? (
+ https://git.archlinux.org/svntogit/packages.git/plain/trunk/config?h=packages/linux-lts&id=${AMD64_CONFIG_HASH}
+ -> linux-${AMD64_CONFIG_VER}.amd64.config
+ )
+ x86? (
+ https://git.archlinux32.org/packages/plain/core/linux-lts/config?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-bin:${SLOT}"
+
+pkg_pretend() {
+ mount-boot_pkg_pretend
+
+ ewarn "This is an experimental package. The built kernel and/or initramfs"
+ ewarn "may not work at all or fail with your bootloader configuration. Please"
+ ewarn "make sure to keep a backup kernel available before testing it."
+}
+
+src_prepare() {
+ 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
+}
diff --git a/sys-kernel/vanilla-kernel/vanilla-kernel-4.19.96.ebuild b/sys-kernel/vanilla-kernel/vanilla-kernel-4.19.96.ebuild
new file mode 100644
index 000000000000..03ea40f919c4
--- /dev/null
+++ b/sys-kernel/vanilla-kernel/vanilla-kernel-4.19.96.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}
+# https://git.archlinux.org/svntogit/packages.git/log/trunk/config?h=packages/linux-lts
+AMD64_CONFIG_VER=4.19.92-arch1
+AMD64_CONFIG_HASH=bf97de6a2e405659aaad4c251b7f0bb48d5ed3c9
+# https://git.archlinux32.org/packages/log/core/linux-lts/config
+I686_CONFIG_VER=4.19.85-arch1
+I686_CONFIG_HASH=1f0345e2983d2edd55b401cb5a87fdf365a4192c
+
+DESCRIPTION="Linux kernel built from vanilla upstream sources"
+HOMEPAGE="https://www.kernel.org/"
+SRC_URI+=" https://cdn.kernel.org/pub/linux/kernel/v$(ver_cut 1).x/${MY_P}.tar.xz
+ amd64? (
+ https://git.archlinux.org/svntogit/packages.git/plain/trunk/config?h=packages/linux-lts&id=${AMD64_CONFIG_HASH}
+ -> linux-${AMD64_CONFIG_VER}.amd64.config
+ )
+ x86? (
+ https://git.archlinux32.org/packages/plain/core/linux-lts/config?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-bin:${SLOT}"
+
+pkg_pretend() {
+ mount-boot_pkg_pretend
+
+ ewarn "This is an experimental package. The built kernel and/or initramfs"
+ ewarn "may not work at all or fail with your bootloader configuration. Please"
+ ewarn "make sure to keep a backup kernel available before testing it."
+}
+
+src_prepare() {
+ 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
+}
diff --git a/sys-kernel/vanilla-kernel/vanilla-kernel-5.4.10-r1.ebuild b/sys-kernel/vanilla-kernel/vanilla-kernel-5.4.10-r1.ebuild
new file mode 100644
index 000000000000..0733939284ba
--- /dev/null
+++ b/sys-kernel/vanilla-kernel/vanilla-kernel-5.4.10-r1.ebuild
@@ -0,0 +1,71 @@
+# Copyright 2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit kernel-build
+
+MY_P=linux-${PV}
+AMD64_CONFIG_VER=5.4.7.arch1-1
+AMD64_CONFIG_HASH=ff79453bc0451a9083bdaa02c3901372d61a9982
+I686_CONFIG_VER=5.4.3-arch1
+I686_CONFIG_HASH=076a52d43a08c4b3a3eacd1f2f9a855fb3b62f42
+
+DESCRIPTION="Linux kernel built from vanilla upstream sources"
+HOMEPAGE="https://www.kernel.org/"
+SRC_URI+=" https://cdn.kernel.org/pub/linux/kernel/v$(ver_cut 1).x/${MY_P}.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-bin:${SLOT}"
+
+pkg_pretend() {
+ mount-boot_pkg_pretend
+
+ ewarn "This is an experimental package. The built kernel and/or initramfs"
+ ewarn "may not work at all or fail with your bootloader configuration. Please"
+ ewarn "make sure to keep a backup kernel available before testing it."
+}
+
+src_prepare() {
+ 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
+}
diff --git a/sys-kernel/vanilla-kernel/vanilla-kernel-5.4.11.ebuild b/sys-kernel/vanilla-kernel/vanilla-kernel-5.4.11.ebuild
new file mode 100644
index 000000000000..dcf1bf9103c6
--- /dev/null
+++ b/sys-kernel/vanilla-kernel/vanilla-kernel-5.4.11.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}
+# https://git.archlinux.org/svntogit/packages.git/log/trunk/config?h=packages/linux
+AMD64_CONFIG_VER=5.4.7.arch1-1
+AMD64_CONFIG_HASH=ff79453bc0451a9083bdaa02c3901372d61a9982
+# https://git.archlinux32.org/packages/log/core/linux/config.i686
+I686_CONFIG_VER=5.4.7-arch1
+I686_CONFIG_HASH=f888688da499e17f3c7a5f15a3c44482a29acc2c
+
+DESCRIPTION="Linux kernel built from vanilla upstream sources"
+HOMEPAGE="https://www.kernel.org/"
+SRC_URI+=" https://cdn.kernel.org/pub/linux/kernel/v$(ver_cut 1).x/${MY_P}.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-bin:${SLOT}"
+
+pkg_pretend() {
+ mount-boot_pkg_pretend
+
+ ewarn "This is an experimental package. The built kernel and/or initramfs"
+ ewarn "may not work at all or fail with your bootloader configuration. Please"
+ ewarn "make sure to keep a backup kernel available before testing it."
+}
+
+src_prepare() {
+ 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
+}
diff --git a/sys-kernel/vanilla-kernel/vanilla-kernel-5.4.12.ebuild b/sys-kernel/vanilla-kernel/vanilla-kernel-5.4.12.ebuild
new file mode 100644
index 000000000000..dcf1bf9103c6
--- /dev/null
+++ b/sys-kernel/vanilla-kernel/vanilla-kernel-5.4.12.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}
+# https://git.archlinux.org/svntogit/packages.git/log/trunk/config?h=packages/linux
+AMD64_CONFIG_VER=5.4.7.arch1-1
+AMD64_CONFIG_HASH=ff79453bc0451a9083bdaa02c3901372d61a9982
+# https://git.archlinux32.org/packages/log/core/linux/config.i686
+I686_CONFIG_VER=5.4.7-arch1
+I686_CONFIG_HASH=f888688da499e17f3c7a5f15a3c44482a29acc2c
+
+DESCRIPTION="Linux kernel built from vanilla upstream sources"
+HOMEPAGE="https://www.kernel.org/"
+SRC_URI+=" https://cdn.kernel.org/pub/linux/kernel/v$(ver_cut 1).x/${MY_P}.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-bin:${SLOT}"
+
+pkg_pretend() {
+ mount-boot_pkg_pretend
+
+ ewarn "This is an experimental package. The built kernel and/or initramfs"
+ ewarn "may not work at all or fail with your bootloader configuration. Please"
+ ewarn "make sure to keep a backup kernel available before testing it."
+}
+
+src_prepare() {
+ 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
+}
diff --git a/sys-kernel/vanilla-kernel/vanilla-kernel-5.4.2.ebuild b/sys-kernel/vanilla-kernel/vanilla-kernel-5.4.2.ebuild
deleted file mode 100644
index ef5bf85d7eb6..000000000000
--- a/sys-kernel/vanilla-kernel/vanilla-kernel-5.4.2.ebuild
+++ /dev/null
@@ -1,168 +0,0 @@
-# Copyright 2019 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-inherit mount-boot savedconfig toolchain-funcs
-
-MY_P=linux-${PV}
-CONFIG_VER=5.4.1.arch1-1
-CONFIG_HASH=d6bbb261bd2c8f83b9c93041dae9aa4175e20e6e
-
-DESCRIPTION="Linux kernel built from vanilla upstream sources"
-HOMEPAGE="https://www.kernel.org/"
-SRC_URI="https://cdn.kernel.org/pub/linux/kernel/v5.x/${MY_P}.tar.xz
- https://git.archlinux.org/svntogit/packages.git/plain/trunk/config?h=packages/linux&id=${CONFIG_HASH}
- -> linux-${CONFIG_VER}.config"
-S=${WORKDIR}/${MY_P}
-
-LICENSE="GPL-2"
-SLOT="${PV}"
-KEYWORDS="~amd64"
-IUSE="+initramfs"
-
-# install-DEPEND actually
-# note: we need installkernel with initramfs support!
-RDEPEND="
- || (
- sys-kernel/installkernel-gentoo
- sys-kernel/installkernel-systemd-boot
- )
- initramfs? ( sys-kernel/dracut )"
-
-pkg_pretend() {
- mount-boot_pkg_pretend
-
- ewarn "This is an experimental package. The built kernel and/or initramfs"
- ewarn "may not work at all or fail with your bootloader configuration. Please"
- ewarn "make sure to keep a backup kernel available before testing it."
-}
-
-src_configure() {
- # force ld.bfd if we can find it easily
- local LD="$(tc-getLD)"
- if type -P "${LD}.bfd" &>/dev/null; then
- LD+=.bfd
- fi
-
- MAKEARGS=(
- V=1
-
- HOSTCC="$(tc-getCC)"
- HOSTCXX="$(tc-getCXX)"
- HOSTCFLAGS="${CFLAGS}"
- HOSTLDFLAGS="${LDFLAGS}"
-
- AS="$(tc-getAS)"
- CC="$(tc-getCC)"
- LD="${LD}"
- AR="$(tc-getAR)"
- NM="$(tc-getNM)"
- STRIP=":"
- OBJCOPY="$(tc-getOBJCOPY)"
- OBJDUMP="$(tc-getOBJDUMP)"
-
- # we need to pass it to override colliding Gentoo envvar
- ARCH=x86
- )
-
- cp "${DISTDIR}"/linux-${CONFIG_VER}.config .config || die
- # while Arch config is cool, we don't want gcc plugins as they
- # break distcc
- sed -i -e '/GCC_PLUGIN/d' .config || die
- # module compression prevents us from stripping them post-inst
- sed -i -e '/MODULE_COMPRESS/d' .config || die
- # shove our theft under the carpet!
- sed -i -e '/HOSTNAME/s:archlinux:gentoo:' .config || die
- restore_config .config
-
- mkdir -p "${WORKDIR}"/modprep || die
- mv .config "${WORKDIR}"/modprep/ || die
- emake O="${WORKDIR}"/modprep "${MAKEARGS[@]}" olddefconfig
- emake O="${WORKDIR}"/modprep "${MAKEARGS[@]}" modules_prepare
- cp -pR "${WORKDIR}"/modprep "${WORKDIR}"/build || die
-}
-
-src_compile() {
- emake O="${WORKDIR}"/build "${MAKEARGS[@]}" all
-}
-
-src_test() {
- :
-}
-
-src_install() {
- # do not use 'make install' as it behaves differently based
- # on what kind of installkernel is installed
- emake O="${WORKDIR}"/build "${MAKEARGS[@]}" \
- INSTALL_MOD_PATH="${ED}" modules_install
-
- # install headers and prepared objects on top of them
- # note: we're using mv rather than doins to save space and time
- find -name '*.c' -delete || die
- rm -r Documentation || die
- dodir /usr/src
- cd "${WORKDIR}" || die
- mv "${S}" "${ED}"/usr/src/ || die
- # strip out-of-source build stuffs from modprep
- find modprep -type f '(' \
- -name Makefile -o \
- -name '*.[ao]' -o \
- '(' -name '.*' -a -not -name '.config' ')' \
- ')' -delete || die
- rm modprep/source || die
- cp -pR modprep/. "${ED}/usr/src/linux-${PV}"/ || die
-
- # install the kernel and files needed for module builds
- cp build/{arch/x86/boot/bzImage,System.map,Module.symvers} \
- "${ED}/usr/src/linux-${PV}"/ || die
-
- # fix source tree and build dir symlinks
- dosym ../../../usr/src/linux-${PV} /lib/modules/${PV}/build
- dosym ../../../usr/src/linux-${PV} /lib/modules/${PV}/source
-
- save_config build/.config
-}
-
-pkg_preinst() {
- :
-}
-
-pkg_postinst() {
- if [[ -z ${ROOT} ]]; then
- mount-boot_pkg_preinst
-
- local fail=
-
- if use initramfs; then
- ebegin "Building initramfs via dracut"
- # putting it alongside kernel image as 'initrd' makes
- # kernel-install happier
- dracut --force "${EROOT}/usr/src/linux-${PV}/initrd" "${PV}"
- eend || die "Building initramfs failed"
- fi
-
- ebegin "Installing the kernel via installkernel"
- # note: .config is taken relatively to System.map;
- # initrd relatively to bzImage
- installkernel "${PV}" \
- "${EROOT}/usr/src/linux-${PV}/bzImage" \
- "${EROOT}/usr/src/linux-${PV}/System.map"
- eend || fail=1
-
- [[ ${fail} ]] && die "Installing the kernel failed"
-
- # TODO: update /usr/src/linux symlink?
- fi
-
- savedconfig_pkg_postinst
-}
-
-pkg_prerm() {
- :
-}
-
-pkg_postrm() {
- rm -f "${EROOT}/usr/src/linux-${PV}/initrd" &&
- rmdir --ignore-fail-on-non-empty "${EROOT}/usr/src/linux-${PV}"
-}
diff --git a/sys-kernel/vanilla-kernel/vanilla-kernel-5.4.3.ebuild b/sys-kernel/vanilla-kernel/vanilla-kernel-5.4.3.ebuild
deleted file mode 100644
index ef5bf85d7eb6..000000000000
--- a/sys-kernel/vanilla-kernel/vanilla-kernel-5.4.3.ebuild
+++ /dev/null
@@ -1,168 +0,0 @@
-# Copyright 2019 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-inherit mount-boot savedconfig toolchain-funcs
-
-MY_P=linux-${PV}
-CONFIG_VER=5.4.1.arch1-1
-CONFIG_HASH=d6bbb261bd2c8f83b9c93041dae9aa4175e20e6e
-
-DESCRIPTION="Linux kernel built from vanilla upstream sources"
-HOMEPAGE="https://www.kernel.org/"
-SRC_URI="https://cdn.kernel.org/pub/linux/kernel/v5.x/${MY_P}.tar.xz
- https://git.archlinux.org/svntogit/packages.git/plain/trunk/config?h=packages/linux&id=${CONFIG_HASH}
- -> linux-${CONFIG_VER}.config"
-S=${WORKDIR}/${MY_P}
-
-LICENSE="GPL-2"
-SLOT="${PV}"
-KEYWORDS="~amd64"
-IUSE="+initramfs"
-
-# install-DEPEND actually
-# note: we need installkernel with initramfs support!
-RDEPEND="
- || (
- sys-kernel/installkernel-gentoo
- sys-kernel/installkernel-systemd-boot
- )
- initramfs? ( sys-kernel/dracut )"
-
-pkg_pretend() {
- mount-boot_pkg_pretend
-
- ewarn "This is an experimental package. The built kernel and/or initramfs"
- ewarn "may not work at all or fail with your bootloader configuration. Please"
- ewarn "make sure to keep a backup kernel available before testing it."
-}
-
-src_configure() {
- # force ld.bfd if we can find it easily
- local LD="$(tc-getLD)"
- if type -P "${LD}.bfd" &>/dev/null; then
- LD+=.bfd
- fi
-
- MAKEARGS=(
- V=1
-
- HOSTCC="$(tc-getCC)"
- HOSTCXX="$(tc-getCXX)"
- HOSTCFLAGS="${CFLAGS}"
- HOSTLDFLAGS="${LDFLAGS}"
-
- AS="$(tc-getAS)"
- CC="$(tc-getCC)"
- LD="${LD}"
- AR="$(tc-getAR)"
- NM="$(tc-getNM)"
- STRIP=":"
- OBJCOPY="$(tc-getOBJCOPY)"
- OBJDUMP="$(tc-getOBJDUMP)"
-
- # we need to pass it to override colliding Gentoo envvar
- ARCH=x86
- )
-
- cp "${DISTDIR}"/linux-${CONFIG_VER}.config .config || die
- # while Arch config is cool, we don't want gcc plugins as they
- # break distcc
- sed -i -e '/GCC_PLUGIN/d' .config || die
- # module compression prevents us from stripping them post-inst
- sed -i -e '/MODULE_COMPRESS/d' .config || die
- # shove our theft under the carpet!
- sed -i -e '/HOSTNAME/s:archlinux:gentoo:' .config || die
- restore_config .config
-
- mkdir -p "${WORKDIR}"/modprep || die
- mv .config "${WORKDIR}"/modprep/ || die
- emake O="${WORKDIR}"/modprep "${MAKEARGS[@]}" olddefconfig
- emake O="${WORKDIR}"/modprep "${MAKEARGS[@]}" modules_prepare
- cp -pR "${WORKDIR}"/modprep "${WORKDIR}"/build || die
-}
-
-src_compile() {
- emake O="${WORKDIR}"/build "${MAKEARGS[@]}" all
-}
-
-src_test() {
- :
-}
-
-src_install() {
- # do not use 'make install' as it behaves differently based
- # on what kind of installkernel is installed
- emake O="${WORKDIR}"/build "${MAKEARGS[@]}" \
- INSTALL_MOD_PATH="${ED}" modules_install
-
- # install headers and prepared objects on top of them
- # note: we're using mv rather than doins to save space and time
- find -name '*.c' -delete || die
- rm -r Documentation || die
- dodir /usr/src
- cd "${WORKDIR}" || die
- mv "${S}" "${ED}"/usr/src/ || die
- # strip out-of-source build stuffs from modprep
- find modprep -type f '(' \
- -name Makefile -o \
- -name '*.[ao]' -o \
- '(' -name '.*' -a -not -name '.config' ')' \
- ')' -delete || die
- rm modprep/source || die
- cp -pR modprep/. "${ED}/usr/src/linux-${PV}"/ || die
-
- # install the kernel and files needed for module builds
- cp build/{arch/x86/boot/bzImage,System.map,Module.symvers} \
- "${ED}/usr/src/linux-${PV}"/ || die
-
- # fix source tree and build dir symlinks
- dosym ../../../usr/src/linux-${PV} /lib/modules/${PV}/build
- dosym ../../../usr/src/linux-${PV} /lib/modules/${PV}/source
-
- save_config build/.config
-}
-
-pkg_preinst() {
- :
-}
-
-pkg_postinst() {
- if [[ -z ${ROOT} ]]; then
- mount-boot_pkg_preinst
-
- local fail=
-
- if use initramfs; then
- ebegin "Building initramfs via dracut"
- # putting it alongside kernel image as 'initrd' makes
- # kernel-install happier
- dracut --force "${EROOT}/usr/src/linux-${PV}/initrd" "${PV}"
- eend || die "Building initramfs failed"
- fi
-
- ebegin "Installing the kernel via installkernel"
- # note: .config is taken relatively to System.map;
- # initrd relatively to bzImage
- installkernel "${PV}" \
- "${EROOT}/usr/src/linux-${PV}/bzImage" \
- "${EROOT}/usr/src/linux-${PV}/System.map"
- eend || fail=1
-
- [[ ${fail} ]] && die "Installing the kernel failed"
-
- # TODO: update /usr/src/linux symlink?
- fi
-
- savedconfig_pkg_postinst
-}
-
-pkg_prerm() {
- :
-}
-
-pkg_postrm() {
- rm -f "${EROOT}/usr/src/linux-${PV}/initrd" &&
- rmdir --ignore-fail-on-non-empty "${EROOT}/usr/src/linux-${PV}"
-}
diff --git a/sys-kernel/vanilla-kernel/vanilla-kernel-5.4.7.ebuild b/sys-kernel/vanilla-kernel/vanilla-kernel-5.4.7.ebuild
new file mode 100644
index 000000000000..37e03a83622e
--- /dev/null
+++ b/sys-kernel/vanilla-kernel/vanilla-kernel-5.4.7.ebuild
@@ -0,0 +1,290 @@
+# Copyright 2019-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit mount-boot savedconfig toolchain-funcs
+
+MY_P=linux-${PV}
+TCL_VER=10.1
+AMD64_CONFIG_VER=5.4.7.arch1-1
+AMD64_CONFIG_HASH=ff79453bc0451a9083bdaa02c3901372d61a9982
+I686_CONFIG_VER=5.4.3-arch1
+I686_CONFIG_HASH=076a52d43a08c4b3a3eacd1f2f9a855fb3b62f42
+
+DESCRIPTION="Linux kernel built from vanilla upstream sources"
+HOMEPAGE="https://www.kernel.org/"
+SRC_URI="https://cdn.kernel.org/pub/linux/kernel/v5.x/${MY_P}.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
+ test? (
+ https://dev.gentoo.org/~mgorny/dist/tinycorelinux-${TCL_VER}-amd64.qcow2
+ )
+ )
+ x86? (
+ https://git.archlinux32.org/packages/plain/core/linux/config.i686?id=${I686_CONFIG_HASH}
+ -> linux-${I686_CONFIG_VER}.i686.config
+ test? (
+ https://dev.gentoo.org/~mgorny/dist/tinycorelinux-${TCL_VER}-x86.qcow2
+ )
+ )"
+S=${WORKDIR}/${MY_P}
+
+LICENSE="GPL-2"
+SLOT="${PV}"
+KEYWORDS="~amd64 ~x86"
+IUSE="+initramfs test"
+RESTRICT="!test? ( test ) test? ( userpriv )"
+
+# install-DEPEND actually
+# note: we need installkernel with initramfs support!
+RDEPEND="
+ || (
+ sys-kernel/installkernel-gentoo
+ sys-kernel/installkernel-systemd-boot
+ )
+ initramfs? ( >=sys-kernel/dracut-049-r3 )"
+BDEPEND="
+ sys-devel/bc
+ virtual/libelf
+ test? (
+ dev-tcltk/expect
+ sys-kernel/dracut
+ amd64? ( app-emulation/qemu[qemu_softmmu_targets_x86_64] )
+ x86? ( app-emulation/qemu[qemu_softmmu_targets_i386] )
+ )"
+
+pkg_pretend() {
+ mount-boot_pkg_pretend
+
+ ewarn "This is an experimental package. The built kernel and/or initramfs"
+ ewarn "may not work at all or fail with your bootloader configuration. Please"
+ ewarn "make sure to keep a backup kernel available before testing it."
+}
+
+src_configure() {
+ # force ld.bfd if we can find it easily
+ local LD="$(tc-getLD)"
+ if type -P "${LD}.bfd" &>/dev/null; then
+ LD+=.bfd
+ fi
+
+ MAKEARGS=(
+ V=1
+
+ HOSTCC="$(tc-getCC)"
+ HOSTCXX="$(tc-getCXX)"
+ HOSTCFLAGS="${CFLAGS}"
+ HOSTLDFLAGS="${LDFLAGS}"
+
+ AS="$(tc-getAS)"
+ CC="$(tc-getCC)"
+ LD="${LD}"
+ AR="$(tc-getAR)"
+ NM="$(tc-getNM)"
+ STRIP=":"
+ OBJCOPY="$(tc-getOBJCOPY)"
+ OBJDUMP="$(tc-getOBJDUMP)"
+
+ # we need to pass it to override colliding Gentoo envvar
+ ARCH=x86
+ )
+
+ 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
+
+ # while Arch config is cool, we don't want gcc plugins as they
+ # break distcc
+ sed -i -e '/GCC_PLUGIN/d' .config || die
+ # module compression prevents us from stripping them post-inst
+ sed -i -e '/MODULE_COMPRESS/d' .config || die
+ # shove our theft under the carpet!
+ sed -i -e '/HOSTNAME/s:archlinux:gentoo:' .config || die
+ # hey, we do support x32
+ sed -i -e '/CONFIG_X86_X32/s:.*:CONFIG_X86_X32=y:' .config || die
+ restore_config .config
+
+ mkdir -p "${WORKDIR}"/modprep || die
+ mv .config "${WORKDIR}"/modprep/ || die
+ emake O="${WORKDIR}"/modprep "${MAKEARGS[@]}" olddefconfig
+ emake O="${WORKDIR}"/modprep "${MAKEARGS[@]}" modules_prepare
+ cp -pR "${WORKDIR}"/modprep "${WORKDIR}"/build || die
+}
+
+src_compile() {
+ emake O="${WORKDIR}"/build "${MAKEARGS[@]}" all
+}
+
+get_kern_arch() {
+ echo x86
+}
+
+src_test() {
+ local image_arch=${ARCH}
+ local qemu_arch=$(usex amd64 x86_64 i386)
+
+ emake O="${WORKDIR}"/build "${MAKEARGS[@]}" \
+ INSTALL_MOD_PATH="${T}" modules_install
+
+ dracut \
+ --conf /dev/null \
+ --confdir /dev/null \
+ --no-hostonly \
+ --kmoddir "${T}/lib/modules/${PV}" \
+ "${T}/initrd" "${PV}" || die
+ cp "${DISTDIR}/tinycorelinux-${TCL_VER}-${image_arch}.qcow2" \
+ "${T}/fs.qcow2" || die
+
+ cd "${T}" || die
+ cat > run.sh <<-EOF || die
+ #!/bin/sh
+ exec qemu-system-${qemu_arch} \
+ -m 256M \
+ -display none \
+ -no-reboot \
+ -kernel '${WORKDIR}/build/arch/$(get_kern_arch)/boot/bzImage' \
+ -initrd '${T}/initrd' \
+ -serial mon:stdio \
+ -hda '${T}/fs.qcow2' \
+ -append 'root=/dev/sda console=ttyS0,115200n8'
+ EOF
+ chmod +x run.sh || die
+ # TODO: initramfs does not let core finish starting on some systems,
+ # figure out how to make it better at that
+ expect - <<-EOF || die "Booting kernel failed"
+ set timeout 900
+ spawn ./run.sh
+ expect {
+ "Kernel panic" {
+ send_error "\n* Kernel panic"
+ exit 1
+ }
+ "Entering emergency mode" {
+ send_error "\n* Initramfs failed to start the system"
+ exit 1
+ }
+ "Core 10.1" {
+ send_error "\n* Booted to login"
+ exit 0
+ }
+ timeout {
+ send_error "\n* Kernel boot timed out"
+ exit 2
+ }
+ }
+ EOF
+}
+
+src_install() {
+ # do not use 'make install' as it behaves differently based
+ # on what kind of installkernel is installed
+ emake O="${WORKDIR}"/build "${MAKEARGS[@]}" \
+ INSTALL_MOD_PATH="${ED}" modules_install
+
+ # note: we're using mv rather than doins to save space and time
+ # install main and arch-specific headers first, and scripts
+ local kern_arch=$(get_kern_arch)
+ dodir "/usr/src/linux-${PV}/arch/${kern_arch}"
+ mv include scripts "${ED}/usr/src/linux-${PV}/" || die
+ mv "arch/${kern_arch}/include" \
+ "${ED}/usr/src/linux-${PV}/arch/${kern_arch}/" || die
+
+ # remove everything but Makefile* and Kconfig*
+ find -type f '!' '(' -name 'Makefile*' -o -name 'Kconfig*' ')' \
+ -delete || die
+ find -type l -delete || die
+ cp -p -R * "${ED}/usr/src/linux-${PV}/" || die
+
+ cd "${WORKDIR}" || die
+ # strip out-of-source build stuffs from modprep
+ # and then copy built files as well
+ find modprep -type f '(' \
+ -name Makefile -o \
+ -name '*.[ao]' -o \
+ '(' -name '.*' -a -not -name '.config' ')' \
+ ')' -delete || die
+ rm modprep/source || die
+ cp -p -R modprep/. "${ED}/usr/src/linux-${PV}"/ || die
+
+ # install the kernel and files needed for module builds
+ cp build/{arch/x86/boot/bzImage,System.map,Module.symvers} \
+ "${ED}/usr/src/linux-${PV}"/ || die
+
+ # strip empty directories
+ find "${D}" -type d -empty -exec rmdir {} + || die
+
+ # fix source tree and build dir symlinks
+ dosym ../../../usr/src/linux-${PV} /lib/modules/${PV}/build
+ dosym ../../../usr/src/linux-${PV} /lib/modules/${PV}/source
+
+ save_config build/.config
+}
+
+pkg_preinst() {
+ :
+}
+
+pkg_postinst() {
+ if [[ -z ${ROOT} ]]; then
+ mount-boot_pkg_preinst
+
+ if use initramfs; then
+ ebegin "Building initramfs via dracut"
+ # putting it alongside kernel image as 'initrd' makes
+ # kernel-install happier
+ dracut --force "${EROOT}/usr/src/linux-${PV}/initrd" "${PV}"
+ eend ${?} || die "Building initramfs failed"
+ fi
+
+ ebegin "Installing the kernel via installkernel"
+ # note: .config is taken relatively to System.map;
+ # initrd relatively to bzImage
+ installkernel "${PV}" \
+ "${EROOT}/usr/src/linux-${PV}/bzImage" \
+ "${EROOT}/usr/src/linux-${PV}/System.map"
+ eend ${?} || die "Installing the kernel failed"
+ fi
+
+ if [[ ! -e ${EROOT}/usr/src/linux ]]; then
+ ebegin "Creating /usr/src/linux symlink"
+ ln -f -n -s linux-${PV} "${EROOT}"/usr/src/linux
+ eend ${?}
+ else
+ local symlink_target=$(readlink "${EROOT}"/usr/src/linux)
+ local symlink_ver=${symlink_target#linux-}
+ if [[ ${symlink_target} == linux-* && -z ${symlink_ver//[0-9.]/} ]]
+ then
+ local symlink_pkg=${CATEGORY}/${PN}-${symlink_ver}
+ # if the current target is either being replaced, or still
+ # installed (probably depclean candidate), update the symlink
+ if has "${symlink_ver}" ${REPLACING_VERSIONS} ||
+ has_version -r "~${symlink_pkg}"
+ then
+ ebegin "Updating /usr/src/linux symlink"
+ ln -f -n -s linux-${PV} "${EROOT}"/usr/src/linux
+ eend ${?}
+ fi
+ fi
+ fi
+
+ savedconfig_pkg_postinst
+}
+
+pkg_prerm() {
+ :
+}
+
+pkg_postrm() {
+ rm -f "${EROOT}/usr/src/linux-${PV}/initrd" &&
+ rmdir --ignore-fail-on-non-empty "${EROOT}/usr/src/linux-${PV}"
+}