summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichał Górny <mgorny@gentoo.org>2020-11-05 15:18:05 +0100
committerMichał Górny <mgorny@gentoo.org>2020-11-05 17:36:32 +0100
commit0662cea964b8db0d004851eee9ea4074533d9e51 (patch)
treecd71a25266f843360b7c01997c6488cb0dc9330e /sys-kernel/gentoo-kernel
parentsys-kernel/vanilla-kernel: Bump to 5.4.75 (diff)
downloadgentoo-0662cea964b8db0d004851eee9ea4074533d9e51.tar.gz
gentoo-0662cea964b8db0d004851eee9ea4074533d9e51.tar.bz2
gentoo-0662cea964b8db0d004851eee9ea4074533d9e51.zip
sys-kernel/gentoo-kernel: Bump to 5.4.75
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.75.ebuild137
2 files changed, 139 insertions, 0 deletions
diff --git a/sys-kernel/gentoo-kernel/Manifest b/sys-kernel/gentoo-kernel/Manifest
index 461a052a96e..7ae88508080 100644
--- a/sys-kernel/gentoo-kernel/Manifest
+++ b/sys-kernel/gentoo-kernel/Manifest
@@ -4,6 +4,8 @@ DIST genpatches-5.4-74.base.tar.xz 2616380 BLAKE2B d79290a1a6aa3464fcb5ea31d5ec2
DIST genpatches-5.4-74.extras.tar.xz 1772 BLAKE2B 02086dddbfb1c41c2f0e0f693469ed18a870dfee1eb7305c464668a63fc29262e976c79078339691df1493280b8aececadb9bbf8398bf47d339ff06c14271c07 SHA512 ea43bb8a42dbcd63982a4350d287e222a945596f31a513cf6c61711e0e9d586171d8c319a51e63a465cc4fd69ff3fcfa36816d552d09dcd5831ea59473a73a0e
DIST genpatches-5.4-75.base.tar.xz 2626680 BLAKE2B ff32045765e11e01c26a3a11d095940c94fc1774734104c73b0a014401464b97ca623f354e62fc46f8427ae440149e5738741c78e79dc014d4e12ca24470384d SHA512 8c5bc194525e352f4b2a7fd6f92a5344a8036f60440bdbcde0fcf0ed401c191921fa15066aeb368c91d40fb6d166c7bec1ea55f01e5c8ffc3e296c9dc0ee1e2d
DIST genpatches-5.4-75.extras.tar.xz 1772 BLAKE2B 64073a8352dcd26668abacb591afc4f9452d071682619ad335cd77a71c6a82875a189e3d1e5a005da63b81038fe5b7667b282301b3d97f8f218c9ab7d37c02d7 SHA512 b43853961b1b60de1f1577de46d4bf1f650ffc96e46a64d6a37fbdebfd76cd5edc2847ae350ed6eb463f29cb55846cc322744918d5a59a21814c4a7c41b0d795
+DIST genpatches-5.4-76.base.tar.xz 2688764 BLAKE2B 1beffb1043246ec2e855e472da7c038b8a0d1a0e2dbf2b3a41e3139297d0fddffd31cba5338abb8494981f90f963a5f39623a3f638f85d1f10d8fe3901069bae SHA512 da3757d7a831cd9693a06bab9d0df4e9ab02d95fd8ad28ff725798a58a3b06aa036e3d9664ec1dc6f44bdc1292d0c77b57c75a1efceb63059a6640ae8c963bd6
+DIST genpatches-5.4-76.extras.tar.xz 1772 BLAKE2B e03408c3e8d8549ac150268df059c8a12c30bd80c591fa2fb3e9672d0a5df74c8d277ba4e2ca9afbd361fc9a59fc3cf934c634af4a56fb7d4c6c347d6e6efb71 SHA512 19c050f98ff36e27faf5404aea25b5d6fa8e4762a9ac69cee9e177a6e056f53c566dea44860e0428b833b48ff6ee4bae95a2057af4564f2877a4f1a6d2909830
DIST genpatches-5.8-19.base.tar.xz 596728 BLAKE2B ceb6cd57b593b5a2c02f00cefc61035ea765c9bb2bb2f9f8721e7503a149c8ad2ee6b1b3765b6d038e5d34bef2f0e0278acb7f3a8168d31d341ac0a9b58b8590 SHA512 f36c11a008e7965e0e113c3a7d87dbf40b87d87c7a801970a73367dcaaa07e7fc3356a114d339d68f16342d9f3c6601cf4746b9aa96d01d0c5efe2dbfaafabff
DIST genpatches-5.8-19.extras.tar.xz 1772 BLAKE2B c42390c17040a6557054835df177fe87ee124bcdcea91e1a63d50ed8e07a10044d639616497e02082fbb67a708ed408bd1e94a3c9d5b7c7b0c7daeca2bfc65df SHA512 3ba07566f1e721521676b862ca51654638400eeda4f216cdfb860b0639b7a611b2ff2e9659007486841e9a1afa8c05a9454abae87abbc7dff8af396bd0d7100a
DIST genpatches-5.8-20.base.tar.xz 752808 BLAKE2B 6997bcd2b7dcf27f894e521fd95a77fc774ed23c3bf515a4dd3f633aa0d91feaf6f59850d56063bdb07ec7e01a720f17b61b6d32639d6c7b7cebd5cfb722b41e SHA512 59bdfcb2b74c343d673b14a1ede1bd8e726430fccc5b4f87d9edcd8986c5de7d8f473e10713fec5d922ba3949c9ce794438885b00cb125dd896f8e66eefe71ff
diff --git a/sys-kernel/gentoo-kernel/gentoo-kernel-5.4.75.ebuild b/sys-kernel/gentoo-kernel/gentoo-kernel-5.4.75.ebuild
new file mode 100644
index 00000000000..ff0e401cd76
--- /dev/null
+++ b/sys-kernel/gentoo-kernel/gentoo-kernel-5.4.75.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
+}