Skip to content

Commit

Permalink
sys-kernel/gentoo-kernel: Bump to 5.18.10
Browse files Browse the repository at this point in the history
Signed-off-by: Michał Górny <[email protected]>
  • Loading branch information
mgorny committed Jul 8, 2022
1 parent 576df22 commit fc87a2d
Show file tree
Hide file tree
Showing 2 changed files with 139 additions and 0 deletions.
2 changes: 2 additions & 0 deletions sys-kernel/gentoo-kernel/Manifest
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ DIST genpatches-5.18-11.base.tar.xz 547804 BLAKE2B d0550c546e93b806d96c8e64c5ea9
DIST genpatches-5.18-11.extras.tar.xz 3924 BLAKE2B de48f32f46f5d8fd8cb607490eae51338e6e7e94501e2e1ded2c990274270d80c7a883ed227203cb7306c0259f8dbe226ca3ae271eab76e367eae0ca7bd653e0 SHA512 bcb9190ba00f1028ede7ec7c18615260d8de263f508cd9c543938c6dc0fc9b0be856be386af4a86770562453e094e1794fad064baffdcb4363cb128abb35fa75
DIST genpatches-5.18-12.base.tar.xz 549680 BLAKE2B d6973dfb0d7749fadfc511b1092dedc67b3f8a57e2a117674113f43177bde8608b6106c4c84fbf5f5a161b9710cfad28a3c2fd419fb3c4088d98f9a504ae0cb8 SHA512 c7ad63058bb77c92d3ecf618a41164476a56f2b7b879c667c7fc9666fa1d7f81b599d6ffc5f0fbaa3223e7d399dbb6348ddd511598581083f7b78d505dd81e7c
DIST genpatches-5.18-12.extras.tar.xz 3920 BLAKE2B 89642c29bae1b15664749c11e581ebf1d0b42801cbd3e436805faaacc419fa7d946a05e7d37bc8d056e36768d181b2e71dfdd6b28943ea112dad9f17a9c2bde1 SHA512 301cd52af9db5a8ec91891a0258a262261d87cf22cb01c27a531d0274ee23d0e928977abe8f5928d3dcba430d032a3cb418193bd1f3e09a923ca6e8718ec7420
DIST genpatches-5.18-13.base.tar.xz 578484 BLAKE2B 03215db005e5a3668898b1ac4c25aeee5f20d6802d00b11d24d41f506ca9f730f031f5cde187f81406a3c75937d65f854acd3c0e2d2cf9f9cb3ba99454304180 SHA512 bdf29085cf76022aa21faaee63033e3231b9757282633eb5897717128bc340cbf38b12a2918b169b452e85aafc9fadac2645df414f877f43950a3147e00dea68
DIST genpatches-5.18-13.extras.tar.xz 3928 BLAKE2B 21db8944e961dc054e69901d711a85d2965bc90dcdbcaac4d939e033d7b2007860f594e7bd3decdb5b2ed73b0e6b67872dcbd64a3301fc106cfd1c9c189f071d SHA512 21fe61063d2e4b3ff40664d700643693068aa73d1d5416272116001c7f4ab6a3c006824ad868fd4185fc20fe53647727874e7fff01450d5f5dc36aec84a6e55f
DIST genpatches-5.18-8.base.tar.xz 440848 BLAKE2B 8a965867409cc340b13687eec9c7391bbaf26b770ba8d4b657b923226a539b7b68eabab6f12bae4bed09a0d198917373a6ab4f707831c652e2461a49f8dd4981 SHA512 057a00d62f4d8ba7be4ea26aeaa4bfbd5581b22ded85dae71aaa693621eda17532ac00bbeaaea1689f552ce2b95a04e9aade603f6236c2a265aa8fea8231c5d0
DIST genpatches-5.18-8.extras.tar.xz 3924 BLAKE2B 3f575b12166621c67c9cf6ee15a76af551a039d142a85678abc10829e9a573641be8557b9b606352d46fa4d123e95071b2946447a6f53afef5b37eec5f342cf7 SHA512 7aab8d9d18dfb6129ee0e995450c9d9d759545a9fa2cde1d26dfc03d677b9133a310f3943cd77b5981830a6a1cff59463e85759ef5cd68bcb2838dd96104f590
DIST genpatches-5.18-9.base.tar.xz 495452 BLAKE2B 244e049522e9b8586081b9eac59fec51184c532bca70fc1d451af1ded646df9bdc7e047cea0963fd07ae8aa04bd4158d64854a2d790ec90be37aa467c7e8b646 SHA512 b90abf747ae92bb4ac7ef94646aedc21a89080d10f8aecae63821d59c0ac29b3b94c0fc6b862d87eb8b86442c2d41cfe16e3a1341d3c146d2b3c678c2f2cdf9a
Expand Down
137 changes: 137 additions & 0 deletions sys-kernel/gentoo-kernel/gentoo-kernel-5.18.10.ebuild
Original file line number Diff line number Diff line change
@@ -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/~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[@]}"
}

0 comments on commit fc87a2d

Please sign in to comment.