sys-kernel/libre-kernel: add 5.15.102

This commit is contained in:
projectmoon 2023-03-23 20:48:38 +01:00
parent 2399f618a9
commit c83055165b
2 changed files with 152 additions and 0 deletions

View File

@ -1,10 +1,15 @@
DIST genpatches-5.15-107.base.tar.xz 4209440 BLAKE2B 48fcb9a837d9f13ffa96194e2ec2209decd2d7c50a8d18ce4dadcd15f720496f5a82b821788bc20631b6ca4679cc3f93e48beae4a0c1c515747086476b5c1d5d SHA512 e66a46e0460dc940a021b37f673953d527d87c92f323d3f49d891339bc0040de492193e7415589b47b15ba37fcb05a7c1aeac31d612904afefaf2f748e1ec173
DIST genpatches-5.15-107.extras.tar.xz 3932 BLAKE2B 59b1279051d08009a8c6e15c5083d7056f7eab8b5beed72dd3421631e9730c7306ce7cae8c3c82f508db261c2a4b2076a2c6c7d3a5fe98419b240e87a0d1e636 SHA512 8897cf7b1d42fcb4a0a87417913c624dbc65b9ce5689dee3998b65cba54659e7ecea759c97f4993dca4b928fe7844e025aa8dbe54f5ca492d8f858fdeb9ba3d9
DIST genpatches-5.15-98.base.tar.xz 4003192 BLAKE2B 79d4fb60a5192137571109ffaefdfba23ac589102539cdde89046f627f39e65a52a44a83607232b499509b8bb4c341e2fd26ae971587c9574d4ac87d8b220893 SHA512 946a7638d19d5fd610075520e529a6c5a47aaa433b7986493f62571a7dc541278013a5006bf1e745496e4eb98de44af56f61d23679c139a719a8d5bc20c9e734
DIST genpatches-5.15-98.extras.tar.xz 3932 BLAKE2B 4e5dd4f8ba6d14764a6546cf7e64dffb3ddcc77678b7d96d2498917f30561792c904c635b0fce7191b7c0c65549fa769e89befffbea5e53a3cef64c673937c20 SHA512 337d95159432cba3b85511cf80c350a8a2f67c65b72a90b26ddc98c01d2d8de70d9b6067e0573c5c339a5bf64973d10c06b42001ee19a7add3d672e4577d0622
DIST genpatches-6.1-14.base.tar.xz 774040 BLAKE2B 8e0866c762e2711b766cc75630d66c7c46221bdc47357a903c7e8506ad122b7b5ba84d102b19743d236ac5579b44d24f77b9f52f3c23695ab6a279cf7875e735 SHA512 6a753146013baf0b94d83abd690118517679d4d7dcf6e9f86cf8de35e24f80a792e9c0692f237098671c316d046d6f65f8d3512255e572daf6a8ca81853beca0
DIST genpatches-6.1-14.extras.tar.xz 3804 BLAKE2B 7f016579b130c9a4f7a8ec946254dbd682f22e5654ae777d11b265dafe2b177a4c40c5a979a760a5bd6ed3dac057b90a3120c60b958f6b748ea4731b9a5f1ea6 SHA512 2807d359459dd11b9d3356fcac609dbfb8487e8c924cc543ef37698667b1c8b74cff7b015839ca0677cf1f96b566e0b5018c057b517275886ab500cd2ca49653
DIST gentoo-kernel-config-g6.tar.gz 4562 BLAKE2B ad9e1b28f84916f12cd8b21feb2f4396d3d63f4cfae3e6b6fe93f919c98b0b4523b205711ab7acafa7121360f696eecb63b9f162dd12950e56dab1429cc13633 SHA512 d180122eb00d40126ea7d79224559904eb0ea574314f9a8d6be6b10f0f6a49f526eba1366ae8cd0a4fe23cd8ff5e292c8cab7e856a2c915d4162b75a03f8076b
DIST gentoo-kernel-config-g7.tar.gz 4625 BLAKE2B 72ba0d038ee34ca5eb26d43bd373735aef3a50d02b414993ea05485e49d83d46df98a6cb0f6f3170a8ec0c99b557432fd9a11cbb92ff7c2837625a7f4469831e SHA512 2d74a8ca9f5402b4290ed93cd3ddba04a7f2ff42c8d8d3f2cbbe22fc20daa0fca119368daa8af39b7a26b1b99e4e3187c3c5d95886a651675ad94ff98d686628
DIST kernel-x86_64-fedora.config.5.15.19 223286 BLAKE2B 239995703c01dcb6d179133dd115bc0a57872c07d7a08afaf4d92cf6d78f0c17b19487b5b399ac7fdde5d460fa7931628147817a569fef2c3a62951c96054bdf SHA512 9bee4aff7e5ef4ada57bee7496aaf47b8fdd5c936c4c9b580660d130db0678eaecdebdbcab0dfcaf5c17a71f6419069840db10f5886806b6fc810f8a3619554f
DIST kernel-x86_64-fedora.config.6.1.7-gentoo 228685 BLAKE2B e68236ccc1d51b2aff850eda9f3197b7ea95b8a88716bc7b07dad30348a86fdbb99a948060300dddae73ca82267d851d357f1c9547a9dcefae1364deebdbd124 SHA512 42bec2ddb9cf7eb6e84bbdeb23eb98dc11c9cea41f6134b776010c6b36833b520a290f0ef0145379de15c7f7834398fa5e3aaabd7258d7d4e89567faa09eeb4c
DIST linux-libre-5.15.102-gnu.tar.xz 119754308 BLAKE2B dc908b54795682070bccec93299d38f589b3cbf8e73c4672b7806f075fbfaab487c2af929ec37cc33d743857d77d4ec8177987dc4729976cce5634434598cfa0 SHA512 dac844a42d2e006028db98864689750dc6d8de879a023c0203fbb4266194d9e000cb1ddd9e6644af7a7baedaa299d0547749c9fbca544f6d9f9e12a453937a03
DIST linux-libre-5.15.102-gnu.tar.xz.sign 195 BLAKE2B 7d6cbf9c704224bb28a3040ed44e909b79d4622e19400bf553a3ac632da1da2d35dc859590e1815fb0264bfa4898762c8ea959784c9d5f69ba14313e50fc67c1 SHA512 180afcb0172e0b15a729c38fe567038184d6e785a76aaa142bc9a68a093dc0cf9083ad0e3568ec26a34d08f0a63f5776facd7ae8e167dd8b910a80082040872a
DIST linux-libre-5.15.94-gnu.tar.xz 119739516 BLAKE2B 6d7c7d624991b79a021a5aa8c3c7b829b218ce9cb146f3f508f9fe97c3d738e9c1f02e38ea5928d02a8812f294335b81a2b03ff70039b641554dbfa4569ef7d1 SHA512 02c21e2cf83bf90b2c086ba92407a80be17468f55b7e7877dbd6eb89d90d100dfdb7bfea8776f5738a1335953aeba67dc581383674c1a28f4f6c458b27f652d6
DIST linux-libre-5.15.94-gnu.tar.xz.sign 195 BLAKE2B 84e3688cb26f529785a02a9104aa9f6dd059ff266e550340f09c7c4b916fedfbd63b80c4f634ab97c2ee6b88f864cf0a022d61eb2d30cf9b9201daee65ad5bca SHA512 35282cf99ffef053a1b05126371f70d0b24c16c95e579111f4118e4b2b1c72cbabd1393d2b8d092b62517f7c1c05ab997c2ec51ad0159701d03e715c190095c2
DIST linux-libre-6.1.12-gnu.tar.xz 127116060 BLAKE2B 2d8f457e23d954a1d2bd1c312369ca2ab6fa2c03b1758e78c82d5cc40eec8c5c3b5cb79c6fb168dca44a4ea6837801bb47a91e6b4b437ab6087adbb1b38914d1 SHA512 27c8f3e12e5f95681ef17f8fc698b7a319c69c734154c62437e43f997565f7f0fb3ccce9dd114bc23ccaa4580833a201d45ea744d568bf473b8ef76f6f91c988

View File

@ -0,0 +1,147 @@
# Copyright 2020-2023 Gentoo Authors, projectmoon
# Distributed under the terms of the GNU General Public License v2
EAPI=8
inherit kernel-build verify-sig
BASE_VER="$(ver_cut 1).$(ver_cut 2).$(ver_cut 3)"
RESTRICT="mirror"
GENPATCHES_P=genpatches-${PV%.*}-$(( ${PV##*.} + 5 ))
CONFIG_VER=5.15.19
CONFIG_HASH=ec69da7a42b5b7c3da91572ef22097b069ddbd01
GENTOO_CONFIG_VER=g7
DESCRIPTION="GNU Linux-libre kernel built from upstream sources"
HOMEPAGE="https://www.fsfla.org/ikiwiki/selibre/linux-libre/"
SRC_URI+="
https://git.agnos.is/projectmoon/projectmoon-overlay-files/media/branch/main/sys-kernel/libre-kernel/linux-libre-${BASE_VER}-gnu.tar.xz
https://linux-libre.fsfla.org/pub/linux-libre/releases/${BASE_VER}-gnu/linux-libre-${BASE_VER}-gnu.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/projg2/gentoo-kernel-config/archive/${GENTOO_CONFIG_VER}.tar.gz
-> gentoo-kernel-config-${GENTOO_CONFIG_VER}.tar.gz
verify-sig? (
https://git.agnos.is/projectmoon/projectmoon-overlay-files/media/branch/main/sys-kernel/libre-kernel/linux-libre-${BASE_VER}-gnu.tar.xz.sign
)
amd64? (
https://raw.githubusercontent.com/projg2/fedora-kernel-config-for-gentoo/${CONFIG_VER}/kernel-x86_64-fedora.config
-> kernel-x86_64-fedora.config.${CONFIG_VER}
)
"
# Workdir is named linux-PV.
MY_P=linux-${PV}
S=${WORKDIR}/${MY_P}
LICENSE="GPL-2"
KEYWORDS="amd64"
IUSE="debug +gentoo"
BDEPEND="
debug? ( dev-util/pahole )
verify-sig? ( sec-keys/openpgp-keys-linux-libre )
"
PDEPEND="
>=virtual/dist-kernel-${PV}
"
VERIFY_SIG_OPENPGP_KEY_PATH=${BROOT}/usr/share/openpgp-keys/linux-libre.asc
pkg_pretend() {
if has_version -d sys-kernel/linux-firmware[redistributable]; then
ewarn "sys-kernel/linux-firmware was found installed on your system,"
ewarn "but it is configured to install non-Free firmware files."
ewarn "The non-Free firmware files may be required for some hardware"
ewarn "work. The Linux-libre kernel cannot load non-Free firmware."
ewarn "To install only the Free firmware, set the -redistributable"
ewarn "USE flag on sys-kernel/linux-firmware."
if use initramfs; then
elog
elog "If you decide to change or remove linux-firmware later, you"
elog "can rebuild the initramfs via issuing a command equivalent to:"
elog
elog " emerge --config ${CATEGORY}/${PN}:${SLOT}"
fi
else
if ! has_version -d sys-kernel/linux-firmware; then
ewarn "sys-kernel/linux-firmware[-redistributable] not found installed"
ewarn "on your system. This package provides various firmware files that"
ewarn "may be needed for your hardware to work. If in doubt, it is recommended"
ewarn "to pause or abort the build process and install it before"
ewarn "resuming."
if use initramfs; then
elog
elog "If you decide to install linux-firmware later, you can rebuild"
elog "the initramfs via issuing a command equivalent to:"
elog
elog " emerge --config ${CATEGORY}/${PN}:${SLOT}"
fi
fi
fi
}
src_unpack() {
if use verify-sig; then
FILE="${DISTDIR}"/linux-libre-${PV}-gnu.tar.xz
SIGFILE="${DISTDIR}"/linux-libre-${PV}-gnu.tar.xz.sign
verify-sig_verify_detached $FILE $SIGFILE
fi
default
}
src_prepare() {
local PATCHES
if use gentoo; then
# Fiters out the kernel incremenetal version upgrade patches,
# leaving only the Gentoo bug fix/functionality changes. The
# regex removes any patches starting with 10XX to 14XX.
MY_PATCHES=$(find "${WORKDIR}"/*.patch -printf "%f\n" | grep -v -E -e '^1[01234][[:digit:]][[:digit:]]_.+.patch')
PATCHES=$(echo "$MY_PATCHES" | sed 's|^|'"${WORKDIR}/"'|g')
else
# If no patches are to be applied, apply only the config changes
# for a Gentoo installation, as this does not change any actual
# Kernel functionality.
PATCHES="${WORKDIR}/4567_distro-Gentoo-Kconfig.patch"
fi
default
local biendian=false
# prepare the default config
case ${ARCH} in
amd64)
cp "${DISTDIR}/kernel-x86_64-fedora.config.${CONFIG_VER}" .config || die
;;
*)
die "Unsupported arch ${ARCH}"
;;
esac
sed -i 's/EXTRAVERSION = -gnu/EXTRAVERSION = /' "${S}"/Makefile || \
die 'could not remove EXTRAVERSION'
local myversion="-gnu-dist"
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
)
# 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[@]}"
}