summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichał Górny <mgorny@gentoo.org>2020-09-27 06:22:39 +0200
committerMichał Górny <mgorny@gentoo.org>2020-09-27 08:16:57 +0200
commit36f6b4f15ced5c4802d0cadb801ab8dbe5c0ba80 (patch)
tree628936f72fa02d151d1ca9965abfa52abbdc553b /sys-kernel/gentoo-kernel
parentsys-kernel/vanilla-kernel: Bump to 5.4.68 (diff)
downloadgentoo-36f6b4f15ced5c4802d0cadb801ab8dbe5c0ba80.tar.gz
gentoo-36f6b4f15ced5c4802d0cadb801ab8dbe5c0ba80.tar.bz2
gentoo-36f6b4f15ced5c4802d0cadb801ab8dbe5c0ba80.zip
sys-kernel/gentoo-kernel: Bump to 5.4.68
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.68.ebuild137
2 files changed, 139 insertions, 0 deletions
diff --git a/sys-kernel/gentoo-kernel/Manifest b/sys-kernel/gentoo-kernel/Manifest
index bc460e75783c..904913624b38 100644
--- a/sys-kernel/gentoo-kernel/Manifest
+++ b/sys-kernel/gentoo-kernel/Manifest
@@ -14,6 +14,8 @@ DIST genpatches-5.4-67.base.tar.xz 2335352 BLAKE2B ae98701f88da8c3ab823499c6d568
DIST genpatches-5.4-67.extras.tar.xz 1768 BLAKE2B 6e6718c80465485c0271d46231d45412e4bb7e713caed3a333b27f1a655048c2ccea871d5331fc4d6413ddbeb2776df02acf00ad1c399a1d86e65615f05d5c69 SHA512 7da85f2ff8f50f43ae1eb814e34402fa8a55629c7b8e9b362ad657974be2ac60489157adf474f91c05587475d89deb1cb1511c5241b80885d695651bfb122af3
DIST genpatches-5.4-68.base.tar.xz 2349792 BLAKE2B e7c2dec93508a89d24ac5a8cc08a40289953abf1715a0f624872a5b327e8c957489fd37d6486bfd2362ee745ff252595f3371becfb88c54980c4db48e62e30f0 SHA512 8b4e19b5cbdd7e18113f72736338eb6f23438fc5beaa051ffe48c9a23d58acabddecc3742588865cc3ef1e3b73e200caaaa0125c388b19640444a81df52404c5
DIST genpatches-5.4-68.extras.tar.xz 1764 BLAKE2B af078c5e8d444d6b5f615fa6c1d07b810d2cf55a425ebbee3febd8cf3a327525a384139fa140576dacbfac197e50eb01bd32599e09ab2132f821f4018868aa93 SHA512 727bcde520c62b67dc7bceea8252a9ebe351b8797a0a3e79d3c47817c8841321d3a5d69cf5e38e592070bbb383280923a1688091fc272a1ecd71a9e7140d8edb
+DIST genpatches-5.4-69.base.tar.xz 2362320 BLAKE2B 5f0a1f950d6b4edd2eb2189256e128350df0d9682c218527e8f2c8283cdebefddaddaabb7d77e3f8bc8a09d4fb23fea37a9208ffe3c3bbf748eb5e05df85ba28 SHA512 d323506ceb6d8cdb01ff7be8ee80d6b7d5a72fc7a2411d96a84f58ae12392f2f72565413878cc7b4abf9221bdcd0b505d8dc5ee5920945aebbe6984250f13d88
+DIST genpatches-5.4-69.extras.tar.xz 1768 BLAKE2B ab83c9bd71bb08d7356aa93c27c3596911fe67fcadfe97a80313d2a038001be7ccada663ab25aee1d5cc348b220d3c82970d08bd3ebd538a729918a7487e0a1a SHA512 6a780c1a4ab2d2acd313e45c3fca0ae013104e916961855c76b4bc2c4f732f8eec27240b728677bf8e3c0042694605f477e672af41e5e4e50e266320d126fc32
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.68.ebuild b/sys-kernel/gentoo-kernel/gentoo-kernel-5.4.68.ebuild
new file mode 100644
index 000000000000..ff0e401cd76a
--- /dev/null
+++ b/sys-kernel/gentoo-kernel/gentoo-kernel-5.4.68.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
+}