summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichał Górny <mgorny@gentoo.org>2022-05-18 12:59:41 +0200
committerMichał Górny <mgorny@gentoo.org>2022-05-18 16:43:49 +0200
commit145a360e3ae71de81206049393dc8a467d2a1248 (patch)
tree9582ddb92a9703d894cf4a97c08ee9cef325c0c1 /sys-kernel
parentsys-kernel/vanilla-kernel: Bump to 5.17.9 (diff)
downloadgentoo-145a360e3ae71de81206049393dc8a467d2a1248.tar.gz
gentoo-145a360e3ae71de81206049393dc8a467d2a1248.tar.bz2
gentoo-145a360e3ae71de81206049393dc8a467d2a1248.zip
sys-kernel/gentoo-kernel: Bump to 5.17.9
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.17.9.ebuild137
2 files changed, 139 insertions, 0 deletions
diff --git a/sys-kernel/gentoo-kernel/Manifest b/sys-kernel/gentoo-kernel/Manifest
index 11f843290417..bc77b97ea1bb 100644
--- a/sys-kernel/gentoo-kernel/Manifest
+++ b/sys-kernel/gentoo-kernel/Manifest
@@ -18,6 +18,8 @@ DIST genpatches-5.17-11.base.tar.xz 684208 BLAKE2B 1c1f7a450a1f30d18f8e3eb7cb2db
DIST genpatches-5.17-11.extras.tar.xz 3932 BLAKE2B 8f65276ac101924b918379e84da046a8fc56ba293ebf5c9ace449917e58400ef8ed5cd947d9de558ed95735996eba42e01053c8e71f1a3782696e1ddccfe22fc SHA512 d7baa2bbcf982ede22dbc06dd1a452759c876357ee65750b21bf5a6b22939e5a924311c6e2315f222a65386ec028399d5c82eb0a1b8a215757bcaad1d83b001a
DIST genpatches-5.17-12.base.tar.xz 685640 BLAKE2B 3a662f399b18c9ecf54feb6688b706e2d2529d8c6ff763767d0539475ee23d11bdd76dd236da639f70600c2669b1e6796580a5dfd3d4c5c9491d79e5fd199b48 SHA512 2f360dae9c7f5d298224364fe02dbdc99006308a476b989715111b77710c4c805c018ae95c8c699db34776f74b24e326b5dcb90f4795d0696cf1c40e8d4cbcc3
DIST genpatches-5.17-12.extras.tar.xz 3932 BLAKE2B 3c0b16365f2ddce7aa5323413a19ca1b37fce7cef2d0ce15e47b54dc3450f6cd62ec64d5913ae2817c302ee4fc2556f9e6316a7272aafcd558fc309b3c00e369 SHA512 4eeb7ee2649edf630e70f82584c278b4f6758e2937c3b067575286a3353883baedbbbe578222bfa187674d953b036ee2f1c89d001030efb1db6057f6d264f9ee
+DIST genpatches-5.17-13.base.tar.xz 713196 BLAKE2B ecba47430d0aeaae2d09d586a9ea016b0b602e2005ae7bf04ffaea7967a7542660dd4bed6cbd5268f187416896c046fdcb7e1aeeccbf293012d11c7473c4d6aa SHA512 fad3e0c53a5bf450dd9dec4146233e322553e110c8b3bd93c53cdb664859aeeb3e5c861f5e04cfbd550014288b7dda9b5740e5d970c443c140c8bfe0559ab82c
+DIST genpatches-5.17-13.extras.tar.xz 3932 BLAKE2B 9aa42ee7af3c16e41f6bfffa91855a8f1949d795fd435f0334d89de5240238cdf5fd14b964236973d3178172db2aff98989bc3626f9ca6d9f9878711fc6bc581 SHA512 1cea0fe9035f02f8099768608bcc1d896234058af984db268bd03cd27e3f12c2ad108b3f6d90be11b7edd53983d19d7ae3a00de87f62c3e80f1eace1cb5660d7
DIST genpatches-5.4-195.base.tar.xz 4639264 BLAKE2B 7a3558a8bb125d616bf10dc29045ce0e5b6432eaf4e38326727ee184ae38d90937fc0168bd2654a8c871b7a851a7977cb9ad1b6b258073b20988b51be189235d SHA512 7add11fe740fe7ebb785f6dd2548ce908a053e30fe5ae8eab3e2b95eb6c8da9f9c5dfaf3d2e50a0a319389631162018ea2675ff8770779e8be39bf10a8e21890
DIST genpatches-5.4-195.extras.tar.xz 1812 BLAKE2B d285c26f84b2275007c3ad4aab1d7fde0ba467ec07863fdf4962737b06bbedbb452a8601f3aea28fd4086b2e80680422e6cbc749cebe49918a37e1c790532359 SHA512 f1cc2db130045affd76c6e2fbd8c4d2806b20faa2feae80e8f88d821d4384ab0ecab3ae66d692666107e23c3deb6cb70231b6251be1e2e5f00e880af48228615
DIST genpatches-5.4-197.base.tar.xz 4667616 BLAKE2B fe777dfe7e9301dbda973c6bbb1459c9e8ee245a729b50e528b8f58f8cccdcebe1d572217b089910eb7402473eaa6cbc39c0bdb11cad35d417d3a32d29ca5456 SHA512 eb05870e88d1b1e6740abe669ae5de2994283e95e427ccf55c7f184be5e36e20bc52d74e5ff669ea316add4d62da6a59bacb1a689c0f30a8c0a0dfb3c139b639
diff --git a/sys-kernel/gentoo-kernel/gentoo-kernel-5.17.9.ebuild b/sys-kernel/gentoo-kernel/gentoo-kernel-5.17.9.ebuild
new file mode 100644
index 000000000000..8ce73328af90
--- /dev/null
+++ b/sys-kernel/gentoo-kernel/gentoo-kernel-5.17.9.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##*.} + 4 ))
+# https://koji.fedoraproject.org/koji/packageinfo?packageID=8
+# forked to https://github.com/mgorny/fedora-kernel-config-for-gentoo
+CONFIG_VER=5.17.3-gentoo
+GENTOO_CONFIG_VER=g1
+
+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
+ 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[@]}"
+}