summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichał Górny <mgorny@gentoo.org>2020-09-10 08:43:42 +0200
committerMichał Górny <mgorny@gentoo.org>2020-09-10 10:48:50 +0200
commit7dc9b42bd7f54e1ee89fd2a6a6d88c2a4ddbe6e4 (patch)
treebada27795a77ab9c42be9bb9c735ae2905a3f6fd /sys-kernel/gentoo-kernel
parentsys-kernel/vanilla-kernel: Bump to 5.4.64 (diff)
downloadgentoo-7dc9b42bd7f54e1ee89fd2a6a6d88c2a4ddbe6e4.tar.gz
gentoo-7dc9b42bd7f54e1ee89fd2a6a6d88c2a4ddbe6e4.tar.bz2
gentoo-7dc9b42bd7f54e1ee89fd2a6a6d88c2a4ddbe6e4.zip
sys-kernel/gentoo-kernel: Bump to 5.4.64
Closes: https://bugs.gentoo.org/739128 Closes: https://bugs.gentoo.org/740846 Closes: https://github.com/gentoo/gentoo/pull/17450 Signed-off-by: Michał Górny <mgorny@gentoo.org>
Diffstat (limited to 'sys-kernel/gentoo-kernel')
-rw-r--r--sys-kernel/gentoo-kernel/Manifest2
-rw-r--r--sys-kernel/gentoo-kernel/gentoo-kernel-5.4.64.ebuild137
2 files changed, 139 insertions, 0 deletions
diff --git a/sys-kernel/gentoo-kernel/Manifest b/sys-kernel/gentoo-kernel/Manifest
index 790d69731a4d..fe565c0f0caa 100644
--- a/sys-kernel/gentoo-kernel/Manifest
+++ b/sys-kernel/gentoo-kernel/Manifest
@@ -6,6 +6,8 @@ DIST genpatches-5.4-63.base.tar.xz 2261952 BLAKE2B 98f002f6a4f7a5908c4da9e9fb254
DIST genpatches-5.4-63.extras.tar.xz 1768 BLAKE2B ca8c254b3f0f31ba0e0dff7e99127c36acf94783075ddb53ef8da28c017422e6a1537992e06796983b703d1062c0b6a609d58f6b0ed5e62a069902065bc6dca7 SHA512 075581b8fa5123d2b48b5a66d939fc126db7000229713a07cbc475c7052e07acb357c408b2b4484d3d60b72088c260af09e9d871c7ff6b0ea559ea396109aba3
DIST genpatches-5.4-64.base.tar.xz 2269092 BLAKE2B c2e312dcbac6410bb416047d2e1182ce1c1bf4f01abf164571d8f24cac7c2c05dcb9d4076f80c6f19bfea185ad214f0c5b0fe5f519e7b3a9603bdde41cf2486b SHA512 832a9697d2960562a87d1a669990d42d889c6a79d3095144255a3a38b0e53b391a9398f764449bd27b0f5c19ad724d9973fcfffe91989c6f5cf7aef9258d1a2a
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.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.64.ebuild b/sys-kernel/gentoo-kernel/gentoo-kernel-5.4.64.ebuild
new file mode 100644
index 000000000000..ff0e401cd76a
--- /dev/null
+++ b/sys-kernel/gentoo-kernel/gentoo-kernel-5.4.64.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
+}