summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichał Górny <mgorny@gentoo.org>2020-09-12 22:18:08 +0200
committerMichał Górny <mgorny@gentoo.org>2020-09-13 00:58:13 +0200
commit9bd820a0b58ff15ae89879ea5ab82b5f3c60f6d4 (patch)
tree2965becaef8f7b94d4e2096163ea138da5df5144 /sys-kernel
parentsys-kernel/vanilla-kernel: Bump to 5.4.65 (diff)
downloadgentoo-9bd820a0b58ff15ae89879ea5ab82b5f3c60f6d4.tar.gz
gentoo-9bd820a0b58ff15ae89879ea5ab82b5f3c60f6d4.tar.bz2
gentoo-9bd820a0b58ff15ae89879ea5ab82b5f3c60f6d4.zip
sys-kernel/gentoo-kernel: Bump to 5.4.65
Signed-off-by: Michał Górny <mgorny@gentoo.org>
Diffstat (limited to 'sys-kernel')
-rw-r--r--sys-kernel/gentoo-kernel/Manifest2
-rw-r--r--sys-kernel/gentoo-kernel/gentoo-kernel-5.4.65.ebuild137
2 files changed, 139 insertions, 0 deletions
diff --git a/sys-kernel/gentoo-kernel/Manifest b/sys-kernel/gentoo-kernel/Manifest
index fe565c0f0caa..892882ba2b65 100644
--- a/sys-kernel/gentoo-kernel/Manifest
+++ b/sys-kernel/gentoo-kernel/Manifest
@@ -8,6 +8,8 @@ DIST genpatches-5.4-64.base.tar.xz 2269092 BLAKE2B c2e312dcbac6410bb416047d2e118
DIST genpatches-5.4-64.extras.tar.xz 1768 BLAKE2B 1b0808cc84f4b3c2c4e783274a56a48f0c8dcc4e764eb4bfddf889b23c1cf99fe1f2eff42765814c73015f371c2d979b94cd14d1518ec32d04ee113282bac9d7 SHA512 407e744ed486337c0e32a4c7b518fb6cc36d0f144fca59eb89d56db9bd368845048f47b906eeb024b2bcfc4fab63b1414a61648506fce1d9fec46094bf39153b
DIST genpatches-5.4-65.base.tar.xz 2300512 BLAKE2B 7ed1f7694782a2f2aba5448d4e2786b813d1caaa6d3da986ad429834c73f15c29268dd1cf3e3fbc63a913717cdd707084d5c1d0a9a0d0a91a558e44d1605927c SHA512 3109881309ec0354ab91924b6e45e8ecad18e13ecbcdd86adc4626668557ce6324ccb942d9a62ca02d7093fd221e90e8b8e9f33ce8c009676122ffc100576f61
DIST genpatches-5.4-65.extras.tar.xz 1768 BLAKE2B 07e18047c9d88d73325933496d70d645acc6d07bf70d531a4e4602b85c6dacded40d9fae716bfa4654672be78f0d6029700cf4b5b368f3bdbec485218f74abeb SHA512 b3421a90b0e664a64e49b4e87c4392871d425577995cbd15cc420d3f4a1a101706bd19e32aefc077144d6da955c442c7635552f8987f1af707af05868aa61a2c
+DIST genpatches-5.4-66.base.tar.xz 2303300 BLAKE2B 1107b439bab215b9dc438d40cb69d08353ef9841329151298f91b9191a4f798eab7904cd2acf23fe5d69c4cb224b0f87f972255e54acb46ea162f431e307a134 SHA512 71f4a032dc2dfd71195fe9acaf2e75966515f1ec7fd2f46830080e563916da9504de8ccd9214d49637b8234de9610c4d7ce3bed1b6dfdfcb063c88588bb32c6d
+DIST genpatches-5.4-66.extras.tar.xz 1768 BLAKE2B 0a81b02b97cbbc7c34d8b8ff13c4f26bce534e92a3f75da169b24c1dcc7b215091f9a2363f9e19cdd3af4febb26d8bf85808eb78cbab6d2e3ab9fda5b1bd346e SHA512 8ef8938c32c46eda7a35cdec9bcb2ffdd3c507a9e2024fae1ebb4684869b6de97ef1d531e71e23d286c49bb4a8b6f2d959b0f874f31aa7f9276ac28fbbcf4422
DIST genpatches-5.7-18.base.tar.xz 778720 BLAKE2B 384315c8e0e23db1137f73d6d60bc6f681d7b74e23e2b5288ad741ae8f005255164074c08a4ece67667d5eaff15dd0f955fb2eb23d9745c8647ce7761aad3f47 SHA512 8c36cb71a02d9bff7d3257c527c16191a8ba05e08e4cd836047e97264d93cd93343d13e2a550f2b8321d638a00069d8108296240c7d2656023185c80ad640c0d
DIST genpatches-5.7-18.extras.tar.xz 1768 BLAKE2B 7312c4b26f1e3aaa51b8a8e67f9fade727b1ec6dbcc256d581061ea6ab878a47dcecfe6d949d677500a49d62928ce4a8c6aae75ce618b9555fcf7fa11fee4ecc SHA512 6b4459fef57765cf67503265ea094ffebbf5f2f9db7c753e1182f524f44981e9b047b6a1661f45b9d99f39e2c2ec57bb1a93e35dfc4a62997d9b629728c2b5c6
DIST genpatches-5.7-19.base.tar.xz 806520 BLAKE2B 1eba96a84e0a75a6dd53cbe24181ee761579f49ab95b2d128dac2bb2780fb0e5b2d5751b95368df70dbe8a9e6ea2ddde960b04e7961d52be02928f17ae2b43c4 SHA512 e654d6444e82e083996f57cb3a8775898e37ec1ab71cd0f639ee0398d6b1f4e875c5bc661db83f46b1d67c5d77a9528182f9ef7980e5c222084d0f016d6e57d5
diff --git a/sys-kernel/gentoo-kernel/gentoo-kernel-5.4.65.ebuild b/sys-kernel/gentoo-kernel/gentoo-kernel-5.4.65.ebuild
new file mode 100644
index 000000000000..ff0e401cd76a
--- /dev/null
+++ b/sys-kernel/gentoo-kernel/gentoo-kernel-5.4.65.ebuild
@@ -0,0 +1,137 @@
+# 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##*.} + 1 ))
+# https://koji.fedoraproject.org/koji/packageinfo?packageID=8
+CONFIG_VER=5.4.21
+CONFIG_HASH=2809b7faa6a8cb232cd825096c146b7bdc1e08ea
+
+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://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 ~ppc64 ~x86"
+IUSE="debug"
+
+RDEPEND="
+ !sys-kernel/vanilla-kernel:${SLOT}
+ !sys-kernel/vanilla-kernel-bin:${SLOT}"
+BDEPEND="
+ debug? ( dev-util/dwarves )"
+
+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_prepare() {
+ local PATCHES=(
+ # meh, genpatches have no directory
+ "${WORKDIR}"/*.patch
+ )
+ 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 config_tweaks=(
+ # replace (none) with gentoo
+ -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'
+ -e '/CONFIG_KEXEC_SIG/d'
+ -e '/CONFIG_KEXEC_BZIMAGE_VERIFY_SIG/d'
+ -e '/CONFIG_SYSTEM_EXTRA_CERTIFICATE/d'
+ -e '/CONFIG_SIGNATURE/d'
+ # remove massive array of LSMs
+ -e 's/CONFIG_LSM=.*/CONFIG_LSM="yama"/'
+ -e 's/CONFIG_DEFAULT_SECURITY_SELINUX=y/CONFIG_DEFAULT_SECURITY_DAC=y/'
+ # nobody actually wants fips
+ -e '/CONFIG_CRYPTO_FIPS/d'
+ # these tests are really not necessary
+ -e 's/.*CONFIG_CRYPTO_MANAGER_DISABLE_TESTS.*/CONFIG_CRYPTO_MANAGER_DISABLE_TESTS=y/'
+ # probably not needed by anybody but developers
+ -e '/CONFIG_CRYPTO_STATS/d'
+ # 1000hz is excessive for laptops
+ -e 's/CONFIG_HZ_1000=y/CONFIG_HZ_300=y/'
+ # nobody is using this kernel on insane super computers
+ -e 's/CONFIG_NR_CPUS=.*/CONFIG_NR_CPUS=512/'
+ # we're not actually producing live patches for folks
+ -e 's/CONFIG_LIVEPATCH=y/CONFIG_LIVEPATCH=n/'
+ # this slows down networking in general
+ -e 's/CONFIG_IP_FIB_TRIE_STATS=y/CONFIG_IP_FIB_TRIE_STATS=n/'
+ # include font for normal and hidpi screens
+ -e 's/.*CONFIG_FONTS.*/CONFIG_FONTS=y\nCONFIG_FONT_8x16=y\nCONFIG_FONT_TER16x32=y/'
+ # we don't need to actually install system headers from this ebuild
+ -e '/CONFIG_HEADERS_INSTALL/d'
+ # enable /proc/config.gz, used by linux-info.eclass
+ -e '/CONFIG_IKCONFIG/s:.*:CONFIG_IKCONFIG=y\nCONFIG_IKCONFIG_PROC=y:'
+ # WireGuard was backported to 5.4 but we use old configs (#739128)
+ -e '$aCONFIG_WIREGUARD=m'
+ )
+ use debug || config_tweaks+=(
+ -e '/CONFIG_DEBUG_INFO/d'
+ -e '/CONFIG_DEBUG_RODATA_TEST/d'
+ -e '/CONFIG_DEBUG_VM/d'
+ -e '/CONFIG_DEBUG_SHIRQ/d'
+ -e '/CONFIG_DEBUG_LIST/d'
+ -e '/CONFIG_BUG_ON_DATA_CORRUPTION/d'
+ -e '/CONFIG_TORTURE_TEST/d'
+ -e '/CONFIG_BOOTTIME_TRACING/d'
+ -e '/CONFIG_RING_BUFFER_BENCHMARK/d'
+ -e '/CONFIG_X86_DECODER_SELFTEST/d'
+ -e '/CONFIG_KGDB/d'
+ )
+ [[ ${ARCH} == x86 ]] && config_tweaks+=(
+ # fix autoenabling 64bit
+ -e '2i\
+# CONFIG_64BIT is not set'
+ )
+ sed -i "${config_tweaks[@]}" .config || die
+}