summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'sys-kernel/vanilla-kernel')
-rw-r--r--sys-kernel/vanilla-kernel/Manifest2
-rw-r--r--sys-kernel/vanilla-kernel/vanilla-kernel-5.4.96.ebuild106
2 files changed, 108 insertions, 0 deletions
diff --git a/sys-kernel/vanilla-kernel/Manifest b/sys-kernel/vanilla-kernel/Manifest
index b59f18e15d45..47542215d6fe 100644
--- a/sys-kernel/vanilla-kernel/Manifest
+++ b/sys-kernel/vanilla-kernel/Manifest
@@ -41,3 +41,5 @@ DIST linux-5.4.94.tar.sign 989 BLAKE2B 779a725d0164c98bf2ebc0590af693eebb6fe7183
DIST linux-5.4.94.tar.xz 109082512 BLAKE2B fac6683453e41065760cbdd170ea4a5f72778e39807389d2f4c4dd9165dc1727a875ee26e6e440089ec2d8e8b4dca9fa1e1dc02a9b217cada700f9a118ae7613 SHA512 2d9f0feeb9ba6871d31c8a5e281c8e3eed99ce7da3af3be4f222db37f082374f852021a5117a994c8cc37681e5f335329c9e430e7edb835de801c901765a505b
DIST linux-5.4.95.tar.sign 989 BLAKE2B 527763c6afbf7e02269dbe1c4779c5a5464e428a0fae9f44351aeff301ba629b148497a7beb11f9d53479d33414704a5db9ce2535b027e7beda45aef35dc62c3 SHA512 31104d4db2b30a95df0574bcc7eecc07e579b8bbac378d31b015a00294d3a17569f165d5aaed5ae9231c4e707eaf0b2d0d3c594c046c53daad6be31822d4dcb9
DIST linux-5.4.95.tar.xz 109065052 BLAKE2B 732c57458e4179cf87c46c7ef80e4afbf445e462d877b29d4111b5a8256a0d88879136f6184361b6d8eb2c623978297d994d4db6e572f56f393a917bdf8f540f SHA512 c6f5b306a8dc844dfff006ecc27879a8e120100bee8b429a143cebafd689403d93d8650dc3d962d4e13e906476c4b43bb32e4f2dbcc3002eee9dd070d63b26f7
+DIST linux-5.4.96.tar.sign 989 BLAKE2B b4641189da90cf6e854d9ff9d5cfa7d6f559f4f5fbd9f795a820a0e3f1a57d56122c2a59a94ebaba5c9e444a5839e9bcb684a4139ff09bb6299ad732c462ce86 SHA512 481673d29883c0f150bc1df483e763152aeba251d742471216710d7af61e4ab0f95f6220dfcda0d267d63a5e7d997e700434d8efe8dd0f39f9dee23335383bda
+DIST linux-5.4.96.tar.xz 109075552 BLAKE2B b6e604030f3d1f14880a38ec65d2169e668a7eeb43f21045fef28be98560a7fcc91189149a3ccbf2500f3d55860ef71351ea1c79cceb940c67beb6b01149c912 SHA512 4f2017c374af9485aaec6fc021cfa22a1f5e635a2fca7ffe5cd535306a93d3ebcb985d30491f7f4e05ce1d91647ff62a41e766a677acfa7f5b0269b808e069c4
diff --git a/sys-kernel/vanilla-kernel/vanilla-kernel-5.4.96.ebuild b/sys-kernel/vanilla-kernel/vanilla-kernel-5.4.96.ebuild
new file mode 100644
index 000000000000..f8ec23f5913a
--- /dev/null
+++ b/sys-kernel/vanilla-kernel/vanilla-kernel-5.4.96.ebuild
@@ -0,0 +1,106 @@
+# Copyright 2020-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit kernel-build verify-sig
+
+MY_P=linux-${PV}
+# https://koji.fedoraproject.org/koji/packageinfo?packageID=8
+CONFIG_VER=5.4.21
+CONFIG_HASH=2809b7faa6a8cb232cd825096c146b7bdc1e08ea
+GENTOO_CONFIG_VER=5.4.89
+
+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
+ https://github.com/mgorny/gentoo-kernel-config/archive/v${GENTOO_CONFIG_VER}.tar.gz
+ -> gentoo-kernel-config-${GENTOO_CONFIG_VER}.tar.gz
+ verify-sig? (
+ https://cdn.kernel.org/pub/linux/kernel/v$(ver_cut 1).x/${MY_P}.tar.sign
+ )
+ amd64? (
+ https://src.fedoraproject.org/rpms/kernel/raw/${CONFIG_HASH}/f/kernel-x86_64.config
+ -> kernel-x86_64.config.${CONFIG_VER}
+ )
+ arm64? (
+ https://src.fedoraproject.org/rpms/kernel/raw/${CONFIG_HASH}/f/kernel-aarch64.config
+ -> kernel-aarch64.config.${CONFIG_VER}
+ )
+ ppc64? (
+ https://src.fedoraproject.org/rpms/kernel/raw/${CONFIG_HASH}/f/kernel-ppc64le.config
+ -> kernel-ppc64le.config.${CONFIG_VER}
+ )
+ x86? (
+ https://src.fedoraproject.org/rpms/kernel/raw/${CONFIG_HASH}/f/kernel-i686.config
+ -> kernel-i686.config.${CONFIG_VER}
+ )"
+S=${WORKDIR}/${MY_P}
+
+LICENSE="GPL-2"
+KEYWORDS="~amd64 ~arm64 ~x86"
+IUSE="debug"
+
+RDEPEND="
+ !sys-kernel/vanilla-kernel-bin:${SLOT}"
+BDEPEND="
+ debug? ( dev-util/dwarves )
+ verify-sig? ( app-crypt/openpgp-keys-kernel )"
+PDEPEND="
+ >=virtual/dist-kernel-${PV}"
+
+VERIFY_SIG_OPENPGP_KEY_PATH=${BROOT}/usr/share/openpgp-keys/kernel.org.asc
+
+pkg_pretend() {
+ ewarn "Starting with 5.4.52, Distribution Kernels are switching from Arch"
+ ewarn "Linux configs to Fedora. Please keep a backup kernel just in case."
+
+ kernel-install_pkg_pretend
+}
+
+src_unpack() {
+ if use verify-sig; then
+ einfo "Unpacking linux-${PV}.tar.xz ..."
+ verify-sig_verify_detached - "${DISTDIR}"/linux-${PV}.tar.sign \
+ < <(xz -cd "${DISTDIR}"/linux-${PV}.tar.xz | tee >(tar -x))
+ assert "Unpack failed"
+ unpack "gentoo-kernel-config-${GENTOO_CONFIG_VER}.tar.gz"
+ else
+ default
+ fi
+}
+
+src_prepare() {
+ default
+
+ # prepare the default config
+ case ${ARCH} in
+ amd64)
+ cp "${DISTDIR}/kernel-x86_64.config.${CONFIG_VER}" .config || die
+ ;;
+ arm64)
+ cp "${DISTDIR}/kernel-aarch64.config.${CONFIG_VER}" .config || die
+ ;;
+ ppc64)
+ cp "${DISTDIR}/kernel-ppc64le.config.${CONFIG_VER}" .config || die
+ ;;
+ x86)
+ cp "${DISTDIR}/kernel-i686.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
+ )
+ [[ ${ARCH} == x86 ]] && merge_configs+=(
+ "${WORKDIR}/gentoo-kernel-config-${GENTOO_CONFIG_VER}"/32-bit.config
+ )
+
+ kernel-build_merge_configs "${merge_configs[@]}"
+}