From d0349ca0f4903608beca459a9db2068dab9fa6ea Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Sat, 26 Oct 2024 04:04:26 +0100 Subject: gentoo auto-resync : 26:10:2024 - 04:04:26 --- sys-kernel/gentoo-kernel-bin/Manifest | 4 +- .../gentoo-kernel-bin-6.6.57-r1.ebuild | 171 +++++++++++++++++++ .../gentoo-kernel-bin-6.6.57.ebuild | 170 ------------------- .../gentoo-kernel-bin-6.6.58-r1.ebuild | 182 +++++++++++++++++++++ .../gentoo-kernel-bin-6.6.58.ebuild | 180 -------------------- 5 files changed, 355 insertions(+), 352 deletions(-) create mode 100644 sys-kernel/gentoo-kernel-bin/gentoo-kernel-bin-6.6.57-r1.ebuild delete mode 100644 sys-kernel/gentoo-kernel-bin/gentoo-kernel-bin-6.6.57.ebuild create mode 100644 sys-kernel/gentoo-kernel-bin/gentoo-kernel-bin-6.6.58-r1.ebuild delete mode 100644 sys-kernel/gentoo-kernel-bin/gentoo-kernel-bin-6.6.58.ebuild (limited to 'sys-kernel/gentoo-kernel-bin') diff --git a/sys-kernel/gentoo-kernel-bin/Manifest b/sys-kernel/gentoo-kernel-bin/Manifest index 5ed4e9d46364..36b3395ea457 100644 --- a/sys-kernel/gentoo-kernel-bin/Manifest +++ b/sys-kernel/gentoo-kernel-bin/Manifest @@ -71,6 +71,6 @@ EBUILD gentoo-kernel-bin-6.1.113.ebuild 3411 BLAKE2B 9243c250c96f33a719b8dc4f06a EBUILD gentoo-kernel-bin-6.1.114.ebuild 3415 BLAKE2B a055768b284fe252a8561a59800cf358d680f071fb13909e608232e14d4c1eb043d87500945c2e79ea7f1c05172c8cdafc547a9d005543bf6b7836f0a70f7ae4 SHA512 4decdcb1a99cd302054f110cb204dc34ba17516b0b3c8936c08ddc588b84e5c504d5a8b9e76c3b85ca4ddd7e3a0fe573ad49bc8ef730a66c6ca4ac9c2b69c74d EBUILD gentoo-kernel-bin-6.11.4.ebuild 4404 BLAKE2B 9afa632e141e459083b38f2c090b56ce5c7ee8019541197041879a19a80eddc44988395f66adfa0db37ea1fb13a519ffc6df284096d82af8f742baf151374347 SHA512 cd44d3203e6597f87b3d89d84487258ddb2564143cb8cb26700a746588256c58e549beb1b58d641b5615bbb3a929ac7772a77d2917a04423d22218c1120277d5 EBUILD gentoo-kernel-bin-6.11.5.ebuild 4778 BLAKE2B c9812c9d49073d6def5dd285bbc2fa9f743a85cc406477c1066a44fbf6a740795a73d6c83c9d64feddac343f6723f2adc90e1a9fee6a7fdc76d4780f8956a17d SHA512 904cc1577f4507a26f45c82977960af064029cd16340b24a5b5c437538c1812404733b6d1bb05bb53b68c3c38ef313f2c97292595a3997e104e4a0e4864093b5 -EBUILD gentoo-kernel-bin-6.6.57.ebuild 4377 BLAKE2B c074e5411073f3096658d81b01ed8e5793a485aaa882edbb1dd102eb1bc51a7a8a709d3c9cd58dbe988302d6e96a263104685b92427d97fe0c04bdf5b68a7bd2 SHA512 0183d97ecd7c02811e8fdf9d11bb98f0be52b2d62dd53431350ef7091a70b207c329a10c25d9dddb50b0c80acffdb2075ec67a90b20755eba0e0e47466a44786 -EBUILD gentoo-kernel-bin-6.6.58.ebuild 4719 BLAKE2B f82d130ddaf784789b1ecbe53b47a2762f0b756ed6986f65f023eb89a78375965697cf6d0897dc50ba85b8d74a70ab9199aad80375ed2a1ab488a914d718b362 SHA512 9580647eda2f3c4f9a2ab60e3047effb6974493035c29f8601db9c2f680356693b2f08f9d3d40ceb6facf31a24d57558f4f539580317c1acba9a6a0892a54644 +EBUILD gentoo-kernel-bin-6.6.57-r1.ebuild 4401 BLAKE2B 27fd0fd04d3b2d0dbd49710202abe264151af0b4d33148602780fe3d9917ca9060444398b5af1e9d300c8bc15dbc3aa3bbf02e6b359518b4df9eddd93afa1029 SHA512 d89f95b86e5e49ea4792d048583695d2dba42698fc470a268f21df176f4df9a667f81f5e31a450af1de3fc26691a58b6d1f327ed99d58b168153fae712be30fe +EBUILD gentoo-kernel-bin-6.6.58-r1.ebuild 4783 BLAKE2B 65c0f6092495ac1cf9a8a798b0cd3af8cfdd10b7be80eaee8299519901f6e789918d9531f6d8099f82eb89e7dd38e03efc43d617db30f6f80819ffbdab2beb6a SHA512 389d2f890accbb2aaeaa1323fe3071737ca431e28bdf511040048463e6c14adadae9ca9a88beea6246a95b8d69d5f0829f5f5ad4596745f032fe81ed86a733af MISC metadata.xml 482 BLAKE2B 3e7e4723542cbb8ac93dae78248fb8c26b96b7bfb2a3cd7913e4e7aef9beff07d9e8301219ae95bbbe4282d0806614b2733bea5d818797d19b0070c9119c0e1d SHA512 e3de887610d2c063fde21d52ce78c5d15301bffff49a82508c50dc1b03e606bf3e87506b376f10c6c10334949f577bc0f5307c3f45f2544fac799c57cf75d4d4 diff --git a/sys-kernel/gentoo-kernel-bin/gentoo-kernel-bin-6.6.57-r1.ebuild b/sys-kernel/gentoo-kernel-bin/gentoo-kernel-bin-6.6.57-r1.ebuild new file mode 100644 index 000000000000..2c3653f2c4f6 --- /dev/null +++ b/sys-kernel/gentoo-kernel-bin/gentoo-kernel-bin-6.6.57-r1.ebuild @@ -0,0 +1,171 @@ +# Copyright 2020-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +KERNEL_EFI_ZBOOT=1 +KERNEL_IUSE_GENERIC_UKI=1 +KERNEL_IUSE_SECUREBOOT=1 + +inherit kernel-install toolchain-funcs unpacker + +MY_P=linux-${PV%.*} +GENPATCHES_P=genpatches-${PV%.*}-$(( ${PV##*.} + 6 )) +BINPKG=${PN/-bin}-6.6.57-1 + +DESCRIPTION="Pre-built Linux kernel 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 + amd64? ( + https://dev.gentoo.org/~mgorny/binpkg/amd64/kernel/sys-kernel/gentoo-kernel/${BINPKG}.gpkg.tar + -> ${BINPKG}.amd64.gpkg.tar + ) + arm64? ( + https://dev.gentoo.org/~mgorny/binpkg/arm64/kernel/sys-kernel/gentoo-kernel/${BINPKG}.gpkg.tar + -> ${BINPKG}.arm64.gpkg.tar + ) + ppc64? ( + https://dev.gentoo.org/~mgorny/binpkg/ppc64le/kernel/sys-kernel/gentoo-kernel/${BINPKG}.gpkg.tar + -> ${BINPKG}.ppc64le.gpkg.tar + ) + x86? ( + https://dev.gentoo.org/~mgorny/binpkg/x86/kernel/sys-kernel/gentoo-kernel/${BINPKG}.gpkg.tar + -> ${BINPKG}.x86.gpkg.tar + ) +" +S=${WORKDIR} + +KEYWORDS="amd64 arm64 ppc64 x86" + +RDEPEND=" + !sys-kernel/gentoo-kernel:${SLOT} +" +PDEPEND=" + >=virtual/dist-kernel-${PV} +" +BDEPEND=" + app-alternatives/bc + app-alternatives/lex + dev-util/pahole + virtual/libelf + app-alternatives/yacc +" + +QA_PREBUILT='*' + +KV_LOCALVERSION='-gentoo-dist' +KPV=${PV}${KV_LOCALVERSION} + +src_prepare() { + local PATCHES=( + # meh, genpatches have no directory + "${WORKDIR}"/*.patch + ) + cd "${MY_P}" || die + default +} + +src_configure() { + # force ld.bfd if we can find it easily + local HOSTLD="$(tc-getBUILD_LD)" + if type -P "${HOSTLD}.bfd" &>/dev/null; then + HOSTLD+=.bfd + fi + local LD="$(tc-getLD)" + if type -P "${LD}.bfd" &>/dev/null; then + LD+=.bfd + fi + tc-export_build_env + local makeargs=( + V=1 + + HOSTCC="$(tc-getBUILD_CC)" + HOSTCXX="$(tc-getBUILD_CXX)" + HOSTLD="${HOSTLD}" + HOSTAR="$(tc-getBUILD_AR)" + HOSTCFLAGS="${BUILD_CFLAGS}" + HOSTLDFLAGS="${BUILD_LDFLAGS}" + + CROSS_COMPILE=${CHOST}- + AS="$(tc-getAS)" + CC="$(tc-getCC)" + LD="${LD}" + AR="$(tc-getAR)" + NM="$(tc-getNM)" + STRIP="$(tc-getSTRIP)" + OBJCOPY="$(tc-getOBJCOPY)" + OBJDUMP="$(tc-getOBJDUMP)" + READELF="$(tc-getREADELF)" + + # we need to pass it to override colliding Gentoo envvar + ARCH="$(tc-arch-kernel)" + + O="${WORKDIR}"/modprep + ) + + local kernel_dir="${BINPKG}/image/usr/src/linux-${KPV}" + local image="${kernel_dir}/$(dist-kernel_get_image_path)" + local uki="${image%/*}/uki.efi" + if [[ -s ${uki} ]]; then + # We need to extract the plain image for the test phase + # and USE=-generic-uki. + kernel-install_extract_from_uki linux "${uki}" "${image}" + fi + + mkdir modprep || die + cp "${kernel_dir}/.config" modprep/ || die + emake -C "${MY_P}" "${makeargs[@]}" modules_prepare +} + +src_test() { + local kernel_dir="${BINPKG}/image/usr/src/linux-${KPV}" + kernel-install_test "${KPV}" \ + "${WORKDIR}/${kernel_dir}/$(dist-kernel_get_image_path)" \ + "${BINPKG}/image/lib/modules/${KPV}" +} + +src_install() { + local kernel_dir="${BINPKG}/image/usr/src/linux-${KPV}" + local image="${kernel_dir}/$(dist-kernel_get_image_path)" + local uki="${image%/*}/uki.efi" + if [[ -s ${uki} ]]; then + # Keep the kernel image type we don't want out of install tree + # Replace back with placeholder + if use generic-uki; then + > "${image}" || die + else + > "${uki}" || die + fi + fi + + # Overwrite the identifier in the prebuilt package + echo "${CATEGORY}/${PF}:${SLOT}" > "${kernel_dir}/dist-kernel" || die + + mv "${BINPKG}"/image/{lib,usr} "${ED}"/ || die + + # FIXME: requires proper mount-boot + if [[ -d ${BINPKG}/image/boot/dtbs ]]; then + mv "${BINPKG}"/image/boot "${ED}"/ || die + fi + + # strip out-of-source build stuffs from modprep + # and then copy built files + find modprep -type f '(' \ + -name Makefile -o \ + -name '*.[ao]' -o \ + '(' -name '.*' -a -not -name '.config' ')' \ + ')' -delete || die + rm modprep/source || die + cp -p -R modprep/. "${ED}/usr/src/linux-${KPV}"/ || die + + # Update timestamps on all modules to ensure cleanup works correctly + # when switching USE=modules-compress. + find "${ED}/lib" -name '*.ko' -exec touch {} + || die + + # Modules were already stripped before signing + dostrip -x /lib/modules + kernel-install_compress_modules +} diff --git a/sys-kernel/gentoo-kernel-bin/gentoo-kernel-bin-6.6.57.ebuild b/sys-kernel/gentoo-kernel-bin/gentoo-kernel-bin-6.6.57.ebuild deleted file mode 100644 index 1243efac1c88..000000000000 --- a/sys-kernel/gentoo-kernel-bin/gentoo-kernel-bin-6.6.57.ebuild +++ /dev/null @@ -1,170 +0,0 @@ -# Copyright 2020-2024 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=8 - -KERNEL_EFI_ZBOOT=1 -KERNEL_IUSE_GENERIC_UKI=1 -KERNEL_IUSE_SECUREBOOT=1 - -inherit kernel-install toolchain-funcs unpacker - -MY_P=linux-${PV%.*} -GENPATCHES_P=genpatches-${PV%.*}-$(( ${PV##*.} + 6 )) -BINPKG=${PF/-bin}-1 - -DESCRIPTION="Pre-built Linux kernel 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 - amd64? ( - https://dev.gentoo.org/~mgorny/binpkg/amd64/kernel/sys-kernel/gentoo-kernel/${BINPKG}.gpkg.tar - -> ${BINPKG}.amd64.gpkg.tar - ) - arm64? ( - https://dev.gentoo.org/~mgorny/binpkg/arm64/kernel/sys-kernel/gentoo-kernel/${BINPKG}.gpkg.tar - -> ${BINPKG}.arm64.gpkg.tar - ) - ppc64? ( - https://dev.gentoo.org/~mgorny/binpkg/ppc64le/kernel/sys-kernel/gentoo-kernel/${BINPKG}.gpkg.tar - -> ${BINPKG}.ppc64le.gpkg.tar - ) - x86? ( - https://dev.gentoo.org/~mgorny/binpkg/x86/kernel/sys-kernel/gentoo-kernel/${BINPKG}.gpkg.tar - -> ${BINPKG}.x86.gpkg.tar - ) -" -S=${WORKDIR} - -KEYWORDS="amd64 arm64 ppc64 x86" - -RDEPEND=" - !sys-kernel/gentoo-kernel:${SLOT} -" -PDEPEND=" - >=virtual/dist-kernel-${PV} -" -BDEPEND=" - app-alternatives/bc - app-alternatives/lex - virtual/libelf - app-alternatives/yacc -" - -QA_PREBUILT='*' - -KV_LOCALVERSION='-gentoo-dist' -KPV=${PV}${KV_LOCALVERSION} - -src_prepare() { - local PATCHES=( - # meh, genpatches have no directory - "${WORKDIR}"/*.patch - ) - cd "${MY_P}" || die - default -} - -src_configure() { - # force ld.bfd if we can find it easily - local HOSTLD="$(tc-getBUILD_LD)" - if type -P "${HOSTLD}.bfd" &>/dev/null; then - HOSTLD+=.bfd - fi - local LD="$(tc-getLD)" - if type -P "${LD}.bfd" &>/dev/null; then - LD+=.bfd - fi - tc-export_build_env - local makeargs=( - V=1 - - HOSTCC="$(tc-getBUILD_CC)" - HOSTCXX="$(tc-getBUILD_CXX)" - HOSTLD="${HOSTLD}" - HOSTAR="$(tc-getBUILD_AR)" - HOSTCFLAGS="${BUILD_CFLAGS}" - HOSTLDFLAGS="${BUILD_LDFLAGS}" - - CROSS_COMPILE=${CHOST}- - AS="$(tc-getAS)" - CC="$(tc-getCC)" - LD="${LD}" - AR="$(tc-getAR)" - NM="$(tc-getNM)" - STRIP="$(tc-getSTRIP)" - OBJCOPY="$(tc-getOBJCOPY)" - OBJDUMP="$(tc-getOBJDUMP)" - READELF="$(tc-getREADELF)" - - # we need to pass it to override colliding Gentoo envvar - ARCH="$(tc-arch-kernel)" - - O="${WORKDIR}"/modprep - ) - - local kernel_dir="${BINPKG}/image/usr/src/linux-${KPV}" - local image="${kernel_dir}/$(dist-kernel_get_image_path)" - local uki="${image%/*}/uki.efi" - if [[ -s ${uki} ]]; then - # We need to extract the plain image for the test phase - # and USE=-generic-uki. - kernel-install_extract_from_uki linux "${uki}" "${image}" - fi - - mkdir modprep || die - cp "${kernel_dir}/.config" modprep/ || die - emake -C "${MY_P}" "${makeargs[@]}" modules_prepare -} - -src_test() { - local kernel_dir="${BINPKG}/image/usr/src/linux-${KPV}" - kernel-install_test "${KPV}" \ - "${WORKDIR}/${kernel_dir}/$(dist-kernel_get_image_path)" \ - "${BINPKG}/image/lib/modules/${KPV}" -} - -src_install() { - local kernel_dir="${BINPKG}/image/usr/src/linux-${KPV}" - local image="${kernel_dir}/$(dist-kernel_get_image_path)" - local uki="${image%/*}/uki.efi" - if [[ -s ${uki} ]]; then - # Keep the kernel image type we don't want out of install tree - # Replace back with placeholder - if use generic-uki; then - > "${image}" || die - else - > "${uki}" || die - fi - fi - - # Overwrite the identifier in the prebuilt package - echo "${CATEGORY}/${PF}:${SLOT}" > "${kernel_dir}/dist-kernel" || die - - mv "${BINPKG}"/image/{lib,usr} "${ED}"/ || die - - # FIXME: requires proper mount-boot - if [[ -d ${BINPKG}/image/boot/dtbs ]]; then - mv "${BINPKG}"/image/boot "${ED}"/ || die - fi - - # strip out-of-source build stuffs from modprep - # and then copy built files - find modprep -type f '(' \ - -name Makefile -o \ - -name '*.[ao]' -o \ - '(' -name '.*' -a -not -name '.config' ')' \ - ')' -delete || die - rm modprep/source || die - cp -p -R modprep/. "${ED}/usr/src/linux-${KPV}"/ || die - - # Update timestamps on all modules to ensure cleanup works correctly - # when switching USE=modules-compress. - find "${ED}/lib" -name '*.ko' -exec touch {} + || die - - # Modules were already stripped before signing - dostrip -x /lib/modules - kernel-install_compress_modules -} diff --git a/sys-kernel/gentoo-kernel-bin/gentoo-kernel-bin-6.6.58-r1.ebuild b/sys-kernel/gentoo-kernel-bin/gentoo-kernel-bin-6.6.58-r1.ebuild new file mode 100644 index 000000000000..479dd0787e61 --- /dev/null +++ b/sys-kernel/gentoo-kernel-bin/gentoo-kernel-bin-6.6.58-r1.ebuild @@ -0,0 +1,182 @@ +# Copyright 2020-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +KERNEL_EFI_ZBOOT=1 +KERNEL_IUSE_GENERIC_UKI=1 +KERNEL_IUSE_SECUREBOOT=1 + +inherit kernel-install toolchain-funcs unpacker + +MY_P=linux-${PV%.*} +GENPATCHES_P=genpatches-${PV%.*}-$(( ${PV##*.} + 6 )) +# XXX: Change this back after 6.6.58-r1 +BINPKG=${PN/-bin}-6.6.58-1 + +DESCRIPTION="Pre-built Linux kernel 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 + amd64? ( + https://dev.gentoo.org/~mgorny/binpkg/amd64/kernel/sys-kernel/gentoo-kernel/${BINPKG}.gpkg.tar + -> ${BINPKG}.amd64.gpkg.tar + ) + arm64? ( + https://dev.gentoo.org/~mgorny/binpkg/arm64/kernel/sys-kernel/gentoo-kernel/${BINPKG}.gpkg.tar + -> ${BINPKG}.arm64.gpkg.tar + ) + ppc64? ( + https://dev.gentoo.org/~mgorny/binpkg/ppc64le/kernel/sys-kernel/gentoo-kernel/${BINPKG}.gpkg.tar + -> ${BINPKG}.ppc64le.gpkg.tar + ) + x86? ( + https://dev.gentoo.org/~mgorny/binpkg/x86/kernel/sys-kernel/gentoo-kernel/${BINPKG}.gpkg.tar + -> ${BINPKG}.x86.gpkg.tar + ) +" +S=${WORKDIR} + +KEYWORDS="~amd64 ~arm64 ~ppc64 ~x86" +IUSE="debug" + +RDEPEND=" + !sys-kernel/gentoo-kernel:${SLOT} +" +PDEPEND=" + >=virtual/dist-kernel-${PV} +" +BDEPEND=" + app-alternatives/bc + app-alternatives/lex + dev-util/pahole + virtual/libelf + app-alternatives/yacc +" + +QA_PREBUILT='*' + +KV_LOCALVERSION='-gentoo-dist' +KPV=${PV}${KV_LOCALVERSION} + +src_prepare() { + local PATCHES=( + # meh, genpatches have no directory + "${WORKDIR}"/*.patch + ) + cd "${MY_P}" || die + default +} + +src_configure() { + # force ld.bfd if we can find it easily + local HOSTLD="$(tc-getBUILD_LD)" + if type -P "${HOSTLD}.bfd" &>/dev/null; then + HOSTLD+=.bfd + fi + local LD="$(tc-getLD)" + if type -P "${LD}.bfd" &>/dev/null; then + LD+=.bfd + fi + tc-export_build_env + local makeargs=( + V=1 + + HOSTCC="$(tc-getBUILD_CC)" + HOSTCXX="$(tc-getBUILD_CXX)" + HOSTLD="${HOSTLD}" + HOSTAR="$(tc-getBUILD_AR)" + HOSTCFLAGS="${BUILD_CFLAGS}" + HOSTLDFLAGS="${BUILD_LDFLAGS}" + + CROSS_COMPILE=${CHOST}- + AS="$(tc-getAS)" + CC="$(tc-getCC)" + LD="${LD}" + AR="$(tc-getAR)" + NM="$(tc-getNM)" + STRIP="$(tc-getSTRIP)" + OBJCOPY="$(tc-getOBJCOPY)" + OBJDUMP="$(tc-getOBJDUMP)" + READELF="$(tc-getREADELF)" + + # we need to pass it to override colliding Gentoo envvar + ARCH="$(tc-arch-kernel)" + + O="${WORKDIR}"/modprep + ) + + local kernel_dir="${BINPKG}/image/usr/src/linux-${KPV}" + local image="${kernel_dir}/$(dist-kernel_get_image_path)" + local uki="${image%/*}/uki.efi" + if [[ -s ${uki} ]]; then + # We need to extract the plain image for the test phase + # and USE=-generic-uki. + kernel-install_extract_from_uki linux "${uki}" "${image}" + fi + + mkdir modprep || die + cp "${kernel_dir}/.config" modprep/ || die + emake -C "${MY_P}" "${makeargs[@]}" modules_prepare +} + +src_test() { + local kernel_dir="${BINPKG}/image/usr/src/linux-${KPV}" + kernel-install_test "${KPV}" \ + "${WORKDIR}/${kernel_dir}/$(dist-kernel_get_image_path)" \ + "${BINPKG}/image/lib/modules/${KPV}" +} + +src_install() { + local kernel_dir="${BINPKG}/image/usr/src/linux-${KPV}" + local image="${kernel_dir}/$(dist-kernel_get_image_path)" + local uki="${image%/*}/uki.efi" + if [[ -s ${uki} ]]; then + # Keep the kernel image type we don't want out of install tree + # Replace back with placeholder + if use generic-uki; then + > "${image}" || die + else + > "${uki}" || die + fi + fi + + # Overwrite the identifier in the prebuilt package + echo "${CATEGORY}/${PF}:${SLOT}" > "${kernel_dir}/dist-kernel" || die + + mv "${BINPKG}"/image/{lib,usr} "${ED}"/ || die + + # FIXME: requires proper mount-boot + if [[ -d ${BINPKG}/image/boot/dtbs ]]; then + mv "${BINPKG}"/image/boot "${ED}"/ || die + fi + + # strip out-of-source build stuffs from modprep + # and then copy built files + find modprep -type f '(' \ + -name Makefile -o \ + -name '*.[ao]' -o \ + '(' -name '.*' -a -not -name '.config' ')' \ + ')' -delete || die + rm modprep/source || die + cp -p -R modprep/. "${ED}/usr/src/linux-${KPV}"/ || die + + # Update timestamps on all modules to ensure cleanup works correctly + # when switching USE=modules-compress. + find "${ED}/lib" -name '*.ko' -exec touch {} + || die + + # Modules were already stripped before signing + dostrip -x /lib/modules + kernel-install_compress_modules + + # Mirror the logic from kernel-build_src_install, for architectures + # where USE=debug is used. + if use ppc64; then + dostrip -x "${rel_kernel_dir}/$(dist-kernel_get_image_path)" + elif use debug && { use amd64 || use arm64; }; then + dostrip -x "${rel_kernel_dir}/vmlinux" + dostrip -x "${rel_kernel_dir}/vmlinux.ctfa" + fi +} diff --git a/sys-kernel/gentoo-kernel-bin/gentoo-kernel-bin-6.6.58.ebuild b/sys-kernel/gentoo-kernel-bin/gentoo-kernel-bin-6.6.58.ebuild deleted file mode 100644 index 4873f0a07e43..000000000000 --- a/sys-kernel/gentoo-kernel-bin/gentoo-kernel-bin-6.6.58.ebuild +++ /dev/null @@ -1,180 +0,0 @@ -# Copyright 2020-2024 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=8 - -KERNEL_EFI_ZBOOT=1 -KERNEL_IUSE_GENERIC_UKI=1 -KERNEL_IUSE_SECUREBOOT=1 - -inherit kernel-install toolchain-funcs unpacker - -MY_P=linux-${PV%.*} -GENPATCHES_P=genpatches-${PV%.*}-$(( ${PV##*.} + 6 )) -BINPKG=${PF/-bin}-1 - -DESCRIPTION="Pre-built Linux kernel 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 - amd64? ( - https://dev.gentoo.org/~mgorny/binpkg/amd64/kernel/sys-kernel/gentoo-kernel/${BINPKG}.gpkg.tar - -> ${BINPKG}.amd64.gpkg.tar - ) - arm64? ( - https://dev.gentoo.org/~mgorny/binpkg/arm64/kernel/sys-kernel/gentoo-kernel/${BINPKG}.gpkg.tar - -> ${BINPKG}.arm64.gpkg.tar - ) - ppc64? ( - https://dev.gentoo.org/~mgorny/binpkg/ppc64le/kernel/sys-kernel/gentoo-kernel/${BINPKG}.gpkg.tar - -> ${BINPKG}.ppc64le.gpkg.tar - ) - x86? ( - https://dev.gentoo.org/~mgorny/binpkg/x86/kernel/sys-kernel/gentoo-kernel/${BINPKG}.gpkg.tar - -> ${BINPKG}.x86.gpkg.tar - ) -" -S=${WORKDIR} - -KEYWORDS="~amd64 ~arm64 ~ppc64 ~x86" -IUSE="debug" - -RDEPEND=" - !sys-kernel/gentoo-kernel:${SLOT} -" -PDEPEND=" - >=virtual/dist-kernel-${PV} -" -BDEPEND=" - app-alternatives/bc - app-alternatives/lex - virtual/libelf - app-alternatives/yacc -" - -QA_PREBUILT='*' - -KV_LOCALVERSION='-gentoo-dist' -KPV=${PV}${KV_LOCALVERSION} - -src_prepare() { - local PATCHES=( - # meh, genpatches have no directory - "${WORKDIR}"/*.patch - ) - cd "${MY_P}" || die - default -} - -src_configure() { - # force ld.bfd if we can find it easily - local HOSTLD="$(tc-getBUILD_LD)" - if type -P "${HOSTLD}.bfd" &>/dev/null; then - HOSTLD+=.bfd - fi - local LD="$(tc-getLD)" - if type -P "${LD}.bfd" &>/dev/null; then - LD+=.bfd - fi - tc-export_build_env - local makeargs=( - V=1 - - HOSTCC="$(tc-getBUILD_CC)" - HOSTCXX="$(tc-getBUILD_CXX)" - HOSTLD="${HOSTLD}" - HOSTAR="$(tc-getBUILD_AR)" - HOSTCFLAGS="${BUILD_CFLAGS}" - HOSTLDFLAGS="${BUILD_LDFLAGS}" - - CROSS_COMPILE=${CHOST}- - AS="$(tc-getAS)" - CC="$(tc-getCC)" - LD="${LD}" - AR="$(tc-getAR)" - NM="$(tc-getNM)" - STRIP="$(tc-getSTRIP)" - OBJCOPY="$(tc-getOBJCOPY)" - OBJDUMP="$(tc-getOBJDUMP)" - READELF="$(tc-getREADELF)" - - # we need to pass it to override colliding Gentoo envvar - ARCH="$(tc-arch-kernel)" - - O="${WORKDIR}"/modprep - ) - - local kernel_dir="${BINPKG}/image/usr/src/linux-${KPV}" - local image="${kernel_dir}/$(dist-kernel_get_image_path)" - local uki="${image%/*}/uki.efi" - if [[ -s ${uki} ]]; then - # We need to extract the plain image for the test phase - # and USE=-generic-uki. - kernel-install_extract_from_uki linux "${uki}" "${image}" - fi - - mkdir modprep || die - cp "${kernel_dir}/.config" modprep/ || die - emake -C "${MY_P}" "${makeargs[@]}" modules_prepare -} - -src_test() { - local kernel_dir="${BINPKG}/image/usr/src/linux-${KPV}" - kernel-install_test "${KPV}" \ - "${WORKDIR}/${kernel_dir}/$(dist-kernel_get_image_path)" \ - "${BINPKG}/image/lib/modules/${KPV}" -} - -src_install() { - local kernel_dir="${BINPKG}/image/usr/src/linux-${KPV}" - local image="${kernel_dir}/$(dist-kernel_get_image_path)" - local uki="${image%/*}/uki.efi" - if [[ -s ${uki} ]]; then - # Keep the kernel image type we don't want out of install tree - # Replace back with placeholder - if use generic-uki; then - > "${image}" || die - else - > "${uki}" || die - fi - fi - - # Overwrite the identifier in the prebuilt package - echo "${CATEGORY}/${PF}:${SLOT}" > "${kernel_dir}/dist-kernel" || die - - mv "${BINPKG}"/image/{lib,usr} "${ED}"/ || die - - # FIXME: requires proper mount-boot - if [[ -d ${BINPKG}/image/boot/dtbs ]]; then - mv "${BINPKG}"/image/boot "${ED}"/ || die - fi - - # strip out-of-source build stuffs from modprep - # and then copy built files - find modprep -type f '(' \ - -name Makefile -o \ - -name '*.[ao]' -o \ - '(' -name '.*' -a -not -name '.config' ')' \ - ')' -delete || die - rm modprep/source || die - cp -p -R modprep/. "${ED}/usr/src/linux-${KPV}"/ || die - - # Update timestamps on all modules to ensure cleanup works correctly - # when switching USE=modules-compress. - find "${ED}/lib" -name '*.ko' -exec touch {} + || die - - # Modules were already stripped before signing - dostrip -x /lib/modules - kernel-install_compress_modules - - # Mirror the logic from kernel-build_src_install, for architectures - # where USE=debug is used. - if use ppc64; then - dostrip -x "${rel_kernel_dir}/$(dist-kernel_get_image_path)" - elif use debug && { use amd64 || use arm64; }; then - dostrip -x "${rel_kernel_dir}/vmlinux" - dostrip -x "${rel_kernel_dir}/vmlinux.ctfa" - fi -} -- cgit v1.2.3