diff options
author | Michał Górny <mgorny@gentoo.org> | 2022-07-15 13:04:50 +0200 |
---|---|---|
committer | Michał Górny <mgorny@gentoo.org> | 2022-07-15 16:46:30 +0200 |
commit | a6e9aea3ad7256beae502a72361495f15e6f6acd (patch) | |
tree | 29571802390b45c4bb56cc0ef16ea08293a662b6 /sys-kernel | |
parent | sys-kernel/vanilla-kernel: Bump to 5.18.12 (diff) | |
download | gentoo-a6e9aea3ad7256beae502a72361495f15e6f6acd.tar.gz gentoo-a6e9aea3ad7256beae502a72361495f15e6f6acd.tar.bz2 gentoo-a6e9aea3ad7256beae502a72361495f15e6f6acd.zip |
sys-kernel/gentoo-kernel: Bump to 5.18.12
Signed-off-by: Michał Górny <mgorny@gentoo.org>
Diffstat (limited to 'sys-kernel')
-rw-r--r-- | sys-kernel/gentoo-kernel/Manifest | 2 | ||||
-rw-r--r-- | sys-kernel/gentoo-kernel/gentoo-kernel-5.18.12.ebuild | 137 |
2 files changed, 139 insertions, 0 deletions
diff --git a/sys-kernel/gentoo-kernel/Manifest b/sys-kernel/gentoo-kernel/Manifest index 17dce16b0063..63e13a135ad5 100644 --- a/sys-kernel/gentoo-kernel/Manifest +++ b/sys-kernel/gentoo-kernel/Manifest @@ -20,6 +20,8 @@ DIST genpatches-5.18-13.base.tar.xz 578484 BLAKE2B 03215db005e5a3668898b1ac4c25a DIST genpatches-5.18-13.extras.tar.xz 3928 BLAKE2B 21db8944e961dc054e69901d711a85d2965bc90dcdbcaac4d939e033d7b2007860f594e7bd3decdb5b2ed73b0e6b67872dcbd64a3301fc106cfd1c9c189f071d SHA512 21fe61063d2e4b3ff40664d700643693068aa73d1d5416272116001c7f4ab6a3c006824ad868fd4185fc20fe53647727874e7fff01450d5f5dc36aec84a6e55f DIST genpatches-5.18-14.base.tar.xz 610104 BLAKE2B 1bb79a0ab1239773023c353305c30c8c9ba5cc9ad50c539f1bceb069ad20e6feacc45bc8249b6d23f2f707d9ec3870afc5425140698411070f54593fa33b26f8 SHA512 b646dc8f7dd8177d2d97a52e8bff958ce036edcf1d1304164c8e9e7e6b796383593fb0838cf3ab16b3aadb31aede16eb763c915062763b78676c69a094234626 DIST genpatches-5.18-14.extras.tar.xz 3928 BLAKE2B 6daca2ba0f7a1a2f318f3a398a37303bc9e1524bcb9cfb2713642eeafc86f1919f2e16789815780b78a391607d2f6fc34a84682f257360fbb3793e34aa56c84a SHA512 58e6fe384be03255599468c196b89e8f3f266f113a6b7f623494937205892d5f7dd301361ead1569790f05c4bf0a6f3813b4511a11cc77294dfc2d2e69590140 +DIST genpatches-5.18-15.base.tar.xz 610660 BLAKE2B d3a1d9a432ffc110af26d74e96b042abb28a79f77d3b6984c20c5a880e29f05c372a9d499646915eabb71a51441734067b0e271a13d111f15c65f6efdca79a40 SHA512 53856c12e3c10733f6ae78e6408af7d628aca7dac8fce5569eed5b3f35ce58bd465d5e40da2183fd06ce70775c199b93f88f73324c68f73c7303d2bc7c71acfa +DIST genpatches-5.18-15.extras.tar.xz 3928 BLAKE2B da2016d84154d129ef32595c04f06f861aa91c7981f9122e8120284a04ac0064785ebb2a4717d544c475f63388e36aa2d2012dc426a9a8f9f66492a507e1755c SHA512 743610e02ce92f053bf41351253d27966de5c3dc0a5499e00328debb2d64f7bb41d29dc5670f11e63dbe2e8baf466a7b99fd2b70ba37a7698f53b25044790196 DIST genpatches-5.4-208.base.tar.xz 4869104 BLAKE2B 3e9038248ddcfd22d67248e65199cca89bd2b8b3aa99aafcee63e5c294dc360c01d7d7eda809e1c18b06a9356363c575339197b2425bcafa8676cad68c17f90e SHA512 880fd09492e5cb0fa8a94e2df5fdf912be59210f1f142a456e3f80c31142e92bee3161bd77038b606616442cf3396b3961a24422de3056f72b4556d06262d3a5 DIST genpatches-5.4-208.extras.tar.xz 1812 BLAKE2B 3e5b8cae462a748eb36af66c4ebc393fc09882a1fa23cce6f82a078ea5598c23c2ecbe7029d6e2060735fe342b3a7bb5c235dcf16081bba0f05a6b88501af991 SHA512 b550dce1b6d090959eaacd523ee1be258fbf9db84309054c3cce9beb0bae710ff2e1c23f480310072fb08f7456bdf825b3ba76d57e999fc1597368df93e65677 DIST genpatches-5.4-209.base.tar.xz 4887256 BLAKE2B 56d7ea7975b228df055d1bd4cfc41b49890d815409a159772230c6e9d081061a9b438b525b5e8542eb03feb0bdfc1841e5bc5e14dd1570aff8f964862b192b00 SHA512 5ea69d50d836dad1f68f000c6c1f5bd8459dcbc4d50a4fbd4ba3241c4c87638850215c0207dfea6fe06cc596957e3cfa61a3dfc00f0b60513596da43d286615f diff --git a/sys-kernel/gentoo-kernel/gentoo-kernel-5.18.12.ebuild b/sys-kernel/gentoo-kernel/gentoo-kernel-5.18.12.ebuild new file mode 100644 index 000000000000..4b6280ffa4e4 --- /dev/null +++ b/sys-kernel/gentoo-kernel/gentoo-kernel-5.18.12.ebuild @@ -0,0 +1,137 @@ +# Copyright 2020-2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +inherit kernel-build toolchain-funcs + +MY_P=linux-${PV%.*} +GENPATCHES_P=genpatches-${PV%.*}-$(( ${PV##*.} + 3 )) +# https://koji.fedoraproject.org/koji/packageinfo?packageID=8 +# forked to https://github.com/mgorny/fedora-kernel-config-for-gentoo +CONFIG_VER=5.18.9-gentoo +GENTOO_CONFIG_VER=g2 + +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/~alicef/dist/genpatches/${GENPATCHES_P}.base.tar.xz + https://dev.gentoo.org/~alicef/dist/genpatches/${GENPATCHES_P}.extras.tar.xz + https://github.com/mgorny/gentoo-kernel-config/archive/${GENTOO_CONFIG_VER}.tar.gz + -> gentoo-kernel-config-${GENTOO_CONFIG_VER}.tar.gz + amd64? ( + https://raw.githubusercontent.com/mgorny/fedora-kernel-config-for-gentoo/${CONFIG_VER}/kernel-x86_64-fedora.config + -> kernel-x86_64-fedora.config.${CONFIG_VER} + ) + arm64? ( + https://raw.githubusercontent.com/mgorny/fedora-kernel-config-for-gentoo/${CONFIG_VER}/kernel-aarch64-fedora.config + -> kernel-aarch64-fedora.config.${CONFIG_VER} + ) + ppc64? ( + https://raw.githubusercontent.com/mgorny/fedora-kernel-config-for-gentoo/${CONFIG_VER}/kernel-ppc64le-fedora.config + -> kernel-ppc64le-fedora.config.${CONFIG_VER} + ) + x86? ( + https://raw.githubusercontent.com/mgorny/fedora-kernel-config-for-gentoo/${CONFIG_VER}/kernel-i686-fedora.config + -> kernel-i686-fedora.config.${CONFIG_VER} + ) +" +S=${WORKDIR}/${MY_P} + +LICENSE="GPL-2" +KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~ppc ~ppc64 ~riscv ~x86" +IUSE="debug hardened" +REQUIRED_USE="arm? ( savedconfig ) + hppa? ( savedconfig ) + riscv? ( savedconfig )" + +RDEPEND=" + !sys-kernel/gentoo-kernel-bin:${SLOT} +" +BDEPEND=" + debug? ( dev-util/pahole ) +" +PDEPEND=" + >=virtual/dist-kernel-${PV} +" + +QA_FLAGS_IGNORED=" + usr/src/linux-.*/scripts/gcc-plugins/.*.so + usr/src/linux-.*/vmlinux + usr/src/linux-.*/arch/powerpc/kernel/vdso.*/vdso.*.so.dbg +" + +src_prepare() { + local PATCHES=( + # meh, genpatches have no directory + "${WORKDIR}"/*.patch + ) + default + + local biendian=false + + # prepare the default config + case ${ARCH} in + amd64) + cp "${DISTDIR}/kernel-x86_64-fedora.config.${CONFIG_VER}" .config || die + ;; + arm) + return + ;; + arm64) + cp "${DISTDIR}/kernel-aarch64-fedora.config.${CONFIG_VER}" .config || die + biendian=true + ;; + hppa) + return + ;; + ppc) + # assume powermac/powerbook defconfig + # we still package.use.force savedconfig + cp "${WORKDIR}/${MY_P}/arch/powerpc/configs/pmac32_defconfig" .config || die + ;; + ppc64) + cp "${DISTDIR}/kernel-ppc64le-fedora.config.${CONFIG_VER}" .config || die + biendian=true + ;; + riscv) + return + ;; + x86) + cp "${DISTDIR}/kernel-i686-fedora.config.${CONFIG_VER}" .config || die + ;; + *) + die "Unsupported arch ${ARCH}" + ;; + esac + + local myversion="-gentoo-dist" + use hardened && myversion+="-hardened" + echo "CONFIG_LOCALVERSION=\"${myversion}\"" > "${T}"/version.config || die + local dist_conf_path="${WORKDIR}/gentoo-kernel-config-${GENTOO_CONFIG_VER}" + + local merge_configs=( + "${T}"/version.config + "${dist_conf_path}"/base.config + ) + use debug || merge_configs+=( + "${dist_conf_path}"/no-debug.config + ) + if use hardened; then + merge_configs+=( "${dist_conf_path}"/hardened-base.config ) + + tc-is-gcc && merge_configs+=( "${dist_conf_path}"/hardened-gcc-plugins.config ) + + if [[ -f "${dist_conf_path}/hardened-${ARCH}.config" ]]; then + merge_configs+=( "${dist_conf_path}/hardened-${ARCH}.config" ) + fi + fi + + # this covers ppc64 and aarch64_be only for now + if [[ ${biendian} == true && $(tc-endian) == big ]]; then + merge_configs+=( "${dist_conf_path}/big-endian.config" ) + fi + + kernel-build_merge_configs "${merge_configs[@]}" +} |