From 82ccc87397eb56b727189cbd3e0de6afc6e49703 Mon Sep 17 00:00:00 2001 From: projectmoon Date: Sat, 2 Nov 2024 19:42:28 +0100 Subject: [PATCH] sys-kernel/libre-kernel: 6.6.58 --- sys-kernel/libre-kernel/Manifest | 5 + .../libre-kernel-6.6.58-r1.ebuild | 148 ++++++++++++++++++ 2 files changed, 153 insertions(+) create mode 100644 sys-kernel/libre-kernel/libre-kernel-6.6.58-r1.ebuild diff --git a/sys-kernel/libre-kernel/Manifest b/sys-kernel/libre-kernel/Manifest index 9a37f8d..c867035 100644 --- a/sys-kernel/libre-kernel/Manifest +++ b/sys-kernel/libre-kernel/Manifest @@ -4,7 +4,10 @@ DIST genpatches-6.6-54.base.tar.xz 2922380 BLAKE2B f65404127bb6547208aeddac1996a DIST genpatches-6.6-54.extras.tar.xz 4060 BLAKE2B 22ea7d143bfe168bc5d9d30832423bcd33b49c1b3b5ddf031000d7d9fce96f6fa0fb1d06fd33b27a5de9c9f3833a139557f0ed7408ef12b23568784ff38ca7a9 SHA512 1b1a229b5923e7f3426139b17608b5feae6061313f7aea66de23f09a54696def39bf4b384c4e884a3e5c758c08e04dcfe1ab7f2aa331db74b59f5e511c6f2c5b DIST genpatches-6.6-58.base.tar.xz 3154204 BLAKE2B 5b9456e93cb0984599e065fab0d05e40b7efbc8079763ede75ed7a6e7f0e241de96f0c6438cde52f64a5074f5bfcc5d55b5d3c21a9e9528138ea5c36e164ea58 SHA512 e775ac64564c201c3e1293d34a70f347a5afd5691a006d958f69959d2eea0af690cf66f7bdd450034ef9eb43daeccbedd58819dc688cd3e7e9933da9312cbf75 DIST genpatches-6.6-58.extras.tar.xz 4060 BLAKE2B 7e16c5d713aaf221335b81f3a301e9bb1e7f243d9bc6739c3dd07bb3cfedbe6bd5a763ce418172c838fbd3de82909cabff7c2e5c4b4f1b675098b709ddc5203e SHA512 315bfdf633398b3b1a9650dae88fdd0c1442336cabe45a3f2722e968f510da13050657e8d35acf8a313981bd9403f5056abea182a0115a79952a2740ceb4ff88 +DIST genpatches-6.6-65.base.tar.xz 3582916 BLAKE2B 3d750c677e61c122144de989a55db6f04a2a545981858b71c602c156f802478ad19f4d87629760be724a9b522b377479df9f0c5f9a859235c5fc438df95c2aae SHA512 1ac5e7fb36e50227a6bdf035562f11401ef6a19c1a7af2d001d224b8710e3aa10434d828a3a0213a1f5cce101992bb803199e5d4e76474b657dc5c4d6328c385 +DIST genpatches-6.6-65.extras.tar.xz 4060 BLAKE2B 53cdbf5d680c9943d189e7606caa10c18bd3317789ffc1f120bf535255d80bfb5e3969fe952eb0da3c1001ee41e93755616332363465d4714a67a90140c43bfb SHA512 b5b3c817426be391a72633740beb4ba7b4e2546ee441081906d77ba31636321501af414140d487d284de325f80d004aefb241f3e349ef3ccd62d2c6fc4d7cf7e DIST gentoo-kernel-config-g13.tar.gz 5759 BLAKE2B 831f89078e539c8b4ce244528dfd847c12a45b52d540eb10d85ec0d9deb1c14288d8de12456865c92d16e3523ec3595676787a8f3b79545d76870b0fb68deb5d SHA512 2a7230cce57a67e3333f9a88a311afe4a928e27ce76036747451cb77d3186569ad11d7a5b827748ad53290a17ad63637a8362ca896516f85ff0944a8d68265a6 +DIST gentoo-kernel-config-g14.tar.gz 5686 BLAKE2B e5147ff4ffab92428b3e7f1b0897b997f8a298805f4f43b0a4d3047607bbb1a5ebfc268e0bb9688372a5eda561df9f256c78e00cdd7e3caf7868724214722f56 SHA512 f79638f9ff9dd0154512baf0234024216b6708d35a3c03a580ca5913286ad1ea13bdde5ea9b4722c6a7cd8d591c11ec52c1e225111a260343cd56aa1f1a88502 DIST kernel-x86_64-fedora.config.6.1.102-gentoo 228685 BLAKE2B e68236ccc1d51b2aff850eda9f3197b7ea95b8a88716bc7b07dad30348a86fdbb99a948060300dddae73ca82267d851d357f1c9547a9dcefae1364deebdbd124 SHA512 42bec2ddb9cf7eb6e84bbdeb23eb98dc11c9cea41f6134b776010c6b36833b520a290f0ef0145379de15c7f7834398fa5e3aaabd7258d7d4e89567faa09eeb4c DIST kernel-x86_64-fedora.config.6.6.12-gentoo 243607 BLAKE2B 7e670d37c6471e50aa0ba395570cd0173af0210afe63faa48d7a147327110652e3aab5c339cf10ed22a6a20e81e505aee84311beb21fda3eb577e06ea55ecac8 SHA512 c484403a60670dd006ecbe65240cb00d97e8b3fe22d1169c5b6ccb92bcdbddb3ecd474d2b57880b30baf6a38bcef11fc8d56b8b0b02fcddd859833c3640cdc9c DIST linux-libre-5.15.165-gnu.tar.xz 119931308 BLAKE2B 312d6a2091f48fe013d9207c749ff6fd850565e1a77b8bd437167fe8b7863f2b4c39b4ee43bd00614c3b8229a6de2ae671863e1a258e8248d8dc19e5333e309d SHA512 475063e224e3fc3c9bcc64b79dc5d3e41159bbf144c7cd1dd7b024c90996d788718b1ebceb19412b357cb6b8976f7135ad202a2b36197dbb7a311c4b1be9997b @@ -13,3 +16,5 @@ DIST linux-libre-6.6.47-gnu.tar.xz 131910236 BLAKE2B 34c90f7f96a00b05f6de5bab316 DIST linux-libre-6.6.47-gnu.tar.xz.sign 195 BLAKE2B ebc1564bc0b0de60050af17f78af8b6ba38aa59bba52c4b9c1a2f32e941fe6214ed42b5e4e986700a3e5871b4298bfac06790cb7b903830b34639eb2a8d6a44d SHA512 8a88e80b8702d1d68ad012dd72ccc32e512fdf994761850f187a19e90cd1534588150fdd2dfb942a152b1c56cd3f5ac5fba0586cb784a3d7af13c9ca517f6199 DIST linux-libre-6.6.51-gnu.tar.xz 131971516 BLAKE2B f39f9c6b61eb2c1a479082f7f8054973fc532a363ce79251fc0cddf3651302835959e3177fb1b1cd87ad4246fba04bf99d0ddb362064ad4d67a3104def5988f5 SHA512 aa00b79c71d7d496546a85e31e0d53b706e03c7f6aa067ca1a09fc841ed062efb6a194f25ec0cf7ad27f239d90524b88f6e90d76e6d88f0d4fa0cc65bdf2a342 DIST linux-libre-6.6.51-gnu.tar.xz.sign 195 BLAKE2B 53b3cc4f8a7ebeb10e43bed19cfd1b009b925c77116846169084491c44c27b18edb4f6cc60283bfee16f45dd4cf9b94b992067bcd6871848c2a02f176468507a SHA512 b0ba576d98b682a4ab19936228540b551cd2dbb0157046d17f964974862b8189c0b40877fe848e96e396b8bf9d970120562afdf9dbefdd98bfd5acdfb526abb3 +DIST linux-libre-6.6.58-gnu.tar.xz 131974404 BLAKE2B 36b2c780289aa047ef935ab033f593a11326c827a3ee3b94ad93904d639d94d36cad8ae48eb47371b68418fdfd615033922800686be9675ca0c6eca43aa2b0f0 SHA512 551d27412b42877de5a38e20dbcd2f6bda041e1f64a91da805725253956206adf8d19b5a56af5b15693e8dd486f73451615d96002c532f994ff4961801fef1c9 +DIST linux-libre-6.6.58-gnu.tar.xz.sign 195 BLAKE2B 6012a731e63d326d59ae3bfc9532ecb80ca63a9936c4d2524acd0773d67d7faa7862ea6a59ee85862c347868e3c5ed872d38f76c893de5626f0eea4432ac98f0 SHA512 76e0ecd9d63fc66a4bbf7d02e4de4d5e30541ef6ca4b0dfb467ef42669f8ce00ec4e461714f4ab036e04b0b35c9809adf83870ff3559a5a24e42cc86fcea6c83 diff --git a/sys-kernel/libre-kernel/libre-kernel-6.6.58-r1.ebuild b/sys-kernel/libre-kernel/libre-kernel-6.6.58-r1.ebuild new file mode 100644 index 0000000..f4dc02f --- /dev/null +++ b/sys-kernel/libre-kernel/libre-kernel-6.6.58-r1.ebuild @@ -0,0 +1,148 @@ +# Copyright 2020-2024 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##*.} + 7 )) +CONFIG_VER=6.6.12-gentoo +#CONFIG_HASH=ec69da7a42b5b7c3da91572ef22097b069ddbd01 +GENTOO_CONFIG_VER=g14 + +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/~mpagano/dist/genpatches/${GENPATCHES_P}.base.tar.xz + https://dev.gentoo.org/~mpagano/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 + https://linux-libre.fsfla.org/pub/linux-libre/releases/${BASE_VER}-gnu/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 incremental 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[@]}" +}