diff options
Diffstat (limited to 'sys-kernel')
-rw-r--r-- | sys-kernel/Manifest.gz | bin | 5071 -> 5071 bytes | |||
-rw-r--r-- | sys-kernel/linux-firmware/Manifest | 2 | ||||
-rw-r--r-- | sys-kernel/linux-firmware/files/linux-firmware-copy-firmware-r7.patch | 57 | ||||
-rw-r--r-- | sys-kernel/linux-firmware/linux-firmware-20241210-r1.ebuild | 406 | ||||
-rw-r--r-- | sys-kernel/scx/Manifest | 13 | ||||
-rw-r--r-- | sys-kernel/scx/scx-1.0.8.ebuild | 383 |
6 files changed, 861 insertions, 0 deletions
diff --git a/sys-kernel/Manifest.gz b/sys-kernel/Manifest.gz Binary files differindex 76a0caba8d55..7dd1bd218e53 100644 --- a/sys-kernel/Manifest.gz +++ b/sys-kernel/Manifest.gz diff --git a/sys-kernel/linux-firmware/Manifest b/sys-kernel/linux-firmware/Manifest index 5db0173e036a..84a2a4769fdf 100644 --- a/sys-kernel/linux-firmware/Manifest +++ b/sys-kernel/linux-firmware/Manifest @@ -3,12 +3,14 @@ AUX 35-amd-microcode.install 1321 BLAKE2B 4205a10d0224869245b62707ae830dd290dfd1 AUX linux-firmware-check-whence.patch 1414 BLAKE2B ba6e076e4ffe529b4b763445145251a99d5ee1e6f85134dbda973e87ef929e558638d7b1a88add77afbeecfabb84686a692dc37809595c9c01a0824812a9d5de SHA512 a118251e934ae3c3f8be30579c66edfa0859b4271832b3776d12d04d128f593296d03b9cf35d28d46683b04c250f78db269f0b4674c0428ce03d402eef657d76 AUX linux-firmware-copy-firmware-r4.patch 1538 BLAKE2B 65712bb1b6ba0d4c2a04f2e202a4a9ee272aca364813825f568a6544b7b63537fc44a4304269fd323c9299f8dce4744414f8fe859958d5f9b52d57c9822615b4 SHA512 56694eb4ae6ec13093f1e3f86df9f5494109693f6456ed6d3ad2b2041deae0ce36e2919d256025f7442fcf0e966c0954ce4634c717e4e7cb68fc6d34ae5554f3 AUX linux-firmware-copy-firmware-r6.patch 1843 BLAKE2B 8d848533a3f6b60e3053eb2b7761b87f1a11467c8300e54124442c368b7e83592137537108aab59f2951ca3e316052ee431f685c6549674abba4145eed948dd2 SHA512 b18f6aa4006526ff7b2d0d3d47491aa0f275cca257d491ebfb631b7f7c8869844e5a44f66874d07602d00be2927a01a0e25c1757c8c8af982fed09834d589578 +AUX linux-firmware-copy-firmware-r7.patch 2218 BLAKE2B a06ccc834d5142da9fda5392c6fcf6872c4d9e915f08705652a319ffe3527a6219d2f0d120353c9f93c4ff2054aa917096ddd34c1824a23d560bd1f8abeed16c SHA512 934da2cc51cfa8769954d3a531ae70c87ebe0e8d817f404bc3fac93bc6fec28f062110895e76dbada061706219b7def6d014eee9a5a3d4fe342c41d124a7086f AUX linux-firmware-make-amd-ucode-img.bash 2911 BLAKE2B 94586ef124310da2314655ebb517c71e3ac73ca636df3c534d4bd5de4ab175b5aa3d40bffe5c126e292a08cff677542df276660380d3b1f474326c9e456b2ee1 SHA512 21465fe141d5c58bb9a50653788f1084833b0a698aaca4b2dc589bd9129c9f3ee87f179791ef5dd8fda4182a48e378e0f83abbb452422b3462b8e81b57ca43a0 DIST linux-firmware-20241017.tar.xz 397400292 BLAKE2B b158855a61324e3194274b0d6dc146bde2b517915a3f1fe5ddba1cc80fca39d7c0c5058eaaf4189c85cd43f1e432c8ccc9c338fc35cd8289e0d661cc5c321b18 SHA512 2b72f1e7651acc04209ab12841915e1bed5819964d9d31f0be5523ad0ea50b51557687b6005014dff1b1f9caa38038321522b17a5de86ee065961fbb5462b5b6 DIST linux-firmware-20241110.tar.xz 405593676 BLAKE2B 949fbcc2da08c0cbde6e03613cb820d18c9c2443a8c9769e251958cbc600efa31d8b37d108bd7396c6ea539f972344053f3a3d6ab0f9fd8471f2797b833db765 SHA512 74e5e7ae2fb7af7c69b118ba14dea0ee69d36c3b9a39cf1c87f820410c79af9291b900381eaca6d367caa5207d8cb81ffb88e122a5f68e3fa1f16dbb33d0782e DIST linux-firmware-20241210.tar.xz 411440732 BLAKE2B 64e02e1c61bddb154f1434c4ee52de3f990730ad7125620f042b9706d1a721feb950b66a0f8d71606d5cba3c0e665c43b8c29e05e84227b7fdaba62b405ec59c SHA512 852e63a936fb324033d819ff14084787a1ac9af8682487cddea889e85e69b3297e262ebc9a1fe029c2ece4e010bfc067b3c8f7f87cd440b6334975f0d81d1226 EBUILD linux-firmware-20241017-r3.ebuild 11151 BLAKE2B 96164e2955922808133afba98801559a807944f9eec0fce6d0236f2f15f9112d3380464c908776fb8b8d803fcd4e5b6892c180b2aa5f1688d24aa2d4acea59a8 SHA512 cbb8bf436a9e7d0243b8a6463795be66a1bb53f7b7f181a53d329e46695f5a2c8c7ad6448ef6b04484fc262725654257ceb8f9ec186025209b11821084abc625 EBUILD linux-firmware-20241110.ebuild 11111 BLAKE2B 510aac5b9b833cd7ad2d15079a6f7cb0cf4a3514a1ee4e58c032c47e96cd0e24eec58787048925a42bf1197f98c4655d96513d972b6491389c256ee0d1bf34a8 SHA512 b782be258a2f17c66896e89d4cb5f2b64e5c005261f3f94ef5d8b36e6856c2f973a1bf78867cfcc9af2be4142e52f68183bb586c79a63ce627b33b87bc9ab2ee +EBUILD linux-firmware-20241210-r1.ebuild 11119 BLAKE2B 90b653640aa35480664426299204acd98217caec0c27de75a7d25d23510f62823e859db94ff7016f026fd4d71ac51a52e84a6ca1212748bd0d387fdecbff2d40 SHA512 02ec0b4f47f58c7da62a5b0b168b62f12e78b31ff594c123126f12acae2fff428bb87a0d3f50f7a25aae1b3e7e896202bf9651f42c47c6da4604735ac66cd2b1 EBUILD linux-firmware-20241210.ebuild 11111 BLAKE2B 510aac5b9b833cd7ad2d15079a6f7cb0cf4a3514a1ee4e58c032c47e96cd0e24eec58787048925a42bf1197f98c4655d96513d972b6491389c256ee0d1bf34a8 SHA512 b782be258a2f17c66896e89d4cb5f2b64e5c005261f3f94ef5d8b36e6856c2f973a1bf78867cfcc9af2be4142e52f68183bb586c79a63ce627b33b87bc9ab2ee EBUILD linux-firmware-99999999.ebuild 11375 BLAKE2B aa565e1987a561216363d1166c7d41a3a25d714472c82a0d38c95c44db5d6d4deef3d50a45abd38915aa895fc071b54becd178d09dd23a7f2d80b2ed7d3a80e5 SHA512 829fc5efe1107e7090c1d7fc58248886f672a24c15b4e02944a97b6f948bcc69c4defebbaa42a82b283639b7bf942ee5c45315aa3b1190f582ec1ed75726b937 MISC metadata.xml 1289 BLAKE2B 109336d30e5ec5fb5e679cff9b31e6f69c0b4f629e2aaf4d0d7b6c0db78c1ddcbbb0b283f724f2758207324b622c2af9dfe15874ab34b34876e3e4f58cb5ced6 SHA512 9b925b26bb58a39360ab5ff3cdd7d88bd489645e73f101209f0813a0b926b15dae34f28db05ff6419a0a62fab2ac84ae0546b5007ce17ad3611188bf7aeda3e5 diff --git a/sys-kernel/linux-firmware/files/linux-firmware-copy-firmware-r7.patch b/sys-kernel/linux-firmware/files/linux-firmware-copy-firmware-r7.patch new file mode 100644 index 000000000000..a27c9521815e --- /dev/null +++ b/sys-kernel/linux-firmware/files/linux-firmware-copy-firmware-r7.patch @@ -0,0 +1,57 @@ +--- a/copy-firmware.sh 2024-11-11 03:15:42.000000000 +0100 ++++ b/copy-firmware.sh 2024-12-11 07:45:50.451166572 +0100 +@@ -46,6 +46,16 @@ + shift + ;; + ++ --firmware-list) ++ if [ -n "$2" ]; then ++ FIRMWARE_LIST=$2 ++ shift 2 ++ else ++ echo "ERROR: '--firmware-list' requires a non-empty option argument of firmware files to install" ++ exit 1 ++ fi ++ ;; ++ + *) + if test -n "$destdir"; then + err "unknown command-line options: $*" +@@ -70,8 +80,18 @@ + ./check_whence.py || err "check_whence.py has detected errors." + fi + ++if test -n "${FIRMWARE_LIST}"; then ++ grep -E '^Link:' WHENCE | sed -e 's/^Link: *//g;s/-> //g' | while read l t; do ++ if ! cat "${FIRMWARE_LIST}" | grep -q "${l}"; then continue; fi ++ target="$(realpath --relative-to="$(pwd)" -m -s "$(dirname "$l")/$t")" ++ echo "${target}" >> "${FIRMWARE_LIST}" ++ done ++ FIRMWARE_LIST=$(cat "${FIRMWARE_LIST}") ++fi ++ + # shellcheck disable=SC2162 # file/folder name can include escaped symbols + grep -E '^(RawFile|File):' WHENCE | sed -E -e 's/^(RawFile|File): */\1 /;s/"//g' | while read k f; do ++ [ -n "${FIRMWARE_LIST}" ] && if ! echo "${FIRMWARE_LIST}" | grep -q "${f}"; then continue; fi + install -d "$destdir/$(dirname "$f")" + $verbose "copying/compressing file $f$compext" + if test "$compress" != "cat" && test "$k" = "RawFile"; then +@@ -84,6 +104,7 @@ + + # shellcheck disable=SC2162 # file/folder name can include escaped symbols + grep -E '^Link:' WHENCE | sed -e 's/^Link: *//g;s/-> //g' | while read l t; do ++ [ -n "${FIRMWARE_LIST}" ] && if ! echo "${FIRMWARE_LIST}" | grep -q "${l}"; then continue; fi + directory="$destdir/$(dirname "$l")" + install -d "$directory" + target="$(cd "$directory" && realpath -m -s "$t")" +@@ -98,7 +119,9 @@ + + # Verify no broken symlinks + if test "$(find "$destdir" -xtype l | wc -l)" -ne 0 ; then +- err "Broken symlinks found:\\n$(find "$destdir" -xtype l)" ++ if [ -z "${FIRMWARE_LIST}" ]; then ++ err "Broken symlinks found:\\n$(find "$destdir" -xtype l)" ++ fi + fi + + exit 0 diff --git a/sys-kernel/linux-firmware/linux-firmware-20241210-r1.ebuild b/sys-kernel/linux-firmware/linux-firmware-20241210-r1.ebuild new file mode 100644 index 000000000000..10ff5ade1f44 --- /dev/null +++ b/sys-kernel/linux-firmware/linux-firmware-20241210-r1.ebuild @@ -0,0 +1,406 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 +PYTHON_COMPAT=( python3_{10..13} ) +inherit dist-kernel-utils linux-info mount-boot python-any-r1 savedconfig + +# In case this is a real snapshot, fill in commit below. +# For normal, tagged releases, leave blank +MY_COMMIT="" + +if [[ ${PV} == 99999999* ]]; then + inherit git-r3 + EGIT_REPO_URI="https://git.kernel.org/pub/scm/linux/kernel/git/firmware/${PN}.git" +else + if [[ -n "${MY_COMMIT}" ]]; then + SRC_URI="https://git.kernel.org/cgit/linux/kernel/git/firmware/linux-firmware.git/snapshot/${MY_COMMIT}.tar.gz -> ${P}.tar.gz" + S="${WORKDIR}/${MY_COMMIT}" + else + SRC_URI="https://mirrors.edge.kernel.org/pub/linux/kernel/firmware/${P}.tar.xz" + fi + + KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86" +fi + +DESCRIPTION="Linux firmware files" +HOMEPAGE="https://git.kernel.org/?p=linux/kernel/git/firmware/linux-firmware.git" + +LICENSE="GPL-2 GPL-2+ GPL-3 BSD MIT || ( MPL-1.1 GPL-2 ) + redistributable? ( linux-fw-redistributable BSD-2 BSD BSD-4 ISC MIT ) + unknown-license? ( all-rights-reserved )" +SLOT="0" +IUSE="bindist compress-xz compress-zstd deduplicate dist-kernel +initramfs +redistributable savedconfig unknown-license" +REQUIRED_USE="initramfs? ( redistributable ) + ?? ( compress-xz compress-zstd ) + savedconfig? ( !deduplicate )" + +RESTRICT="binchecks strip test + !bindist? ( bindist ) + unknown-license? ( bindist )" + +BDEPEND="initramfs? ( app-alternatives/cpio ) + compress-xz? ( app-arch/xz-utils ) + compress-zstd? ( app-arch/zstd ) + deduplicate? ( app-misc/rdfind ) + ${PYTHON_DEPS}" + +#add anything else that collides to this +RDEPEND="!savedconfig? ( + redistributable? ( + !sys-firmware/alsa-firmware[alsa_cards_ca0132] + !sys-block/qla-fc-firmware + !sys-firmware/raspberrypi-wifi-ucode + ) + unknown-license? ( + !sys-firmware/alsa-firmware[alsa_cards_korg1212] + !sys-firmware/alsa-firmware[alsa_cards_maestro3] + !sys-firmware/alsa-firmware[alsa_cards_sb16] + !sys-firmware/alsa-firmware[alsa_cards_ymfpci] + ) + ) + dist-kernel? ( + virtual/dist-kernel + initramfs? ( + app-alternatives/cpio + ) + ) +" +IDEPEND=" + dist-kernel? ( + initramfs? ( sys-kernel/installkernel ) + ) +" + +QA_PREBUILT="*" +PATCHES=( + "${FILESDIR}"/${PN}-copy-firmware-r7.patch +) + +pkg_pretend() { + if use initramfs; then + if use dist-kernel; then + # Check, but don't die because we can fix the problem and then + # emerge --config ... to re-run installation. + [[ -z ${ROOT} ]] && nonfatal mount-boot_check_status + else + mount-boot_pkg_pretend + fi + fi +} + +pkg_setup() { + if use compress-xz || use compress-zstd ; then + local CONFIG_CHECK + + if kernel_is -ge 5 19; then + use compress-xz && CONFIG_CHECK="~FW_LOADER_COMPRESS_XZ" + use compress-zstd && CONFIG_CHECK="~FW_LOADER_COMPRESS_ZSTD" + else + use compress-xz && CONFIG_CHECK="~FW_LOADER_COMPRESS" + if use compress-zstd; then + eerror "Kernels <5.19 do not support ZSTD-compressed firmware files" + fi + fi + fi + linux-info_pkg_setup +} + +src_unpack() { + if [[ ${PV} == 99999999* ]]; then + git-r3_src_unpack + else + default + # rename directory from git snapshot tarball + if [[ ${#GIT_COMMIT} -gt 8 ]]; then + mv ${PN}-*/ ${P} || die + fi + fi +} + +src_prepare() { + default + + cp "${FILESDIR}/${PN}-make-amd-ucode-img.bash" "${T}/make-amd-ucode-img" || die + chmod +x "${T}/make-amd-ucode-img" || die + + if use initramfs && ! use dist-kernel; then + if [[ -d "${S}/amd-ucode" ]]; then + "${T}/make-amd-ucode-img" "${S}" "${S}/amd-ucode" || die + else + # If this will ever happen something has changed which + # must be reviewed + die "'${S}/amd-ucode' not found!" + fi + fi + + # whitelist of misc files + local misc_files=( + build_packages.py + carl9170fw/autogen.sh + carl9170fw/genapi.sh + contrib/process_linux_firmware.py + copy-firmware.sh + check_whence.py + dedup-firmware.sh + LICEN[CS]E.* + README.md + WHENCE + ) + + # whitelist of images with a free software license + local free_software=( + # keyspan_pda (GPL-2+) + keyspan_pda/keyspan_pda.fw + keyspan_pda/xircom_pgs.fw + # dsp56k (GPL-2+) + dsp56k/bootstrap.bin + # ath9k_htc (BSD GPL-2+ MIT) + ath9k_htc/htc_7010-1.4.0.fw + ath9k_htc/htc_9271-1.4.0.fw + # pcnet_cs, 3c589_cs, 3c574_cs, serial_cs (dual GPL-2/MPL-1.1) + cis/LA-PCM.cis + cis/PCMLM28.cis + cis/DP83903.cis + cis/NE2K.cis + cis/tamarack.cis + cis/PE-200.cis + cis/PE520.cis + cis/3CXEM556.cis + cis/3CCFEM556.cis + cis/MT5634ZLX.cis + cis/RS-COM-2P.cis + cis/COMpad2.cis + cis/COMpad4.cis + # serial_cs (GPL-3) + cis/SW_555_SER.cis + cis/SW_7xx_SER.cis + cis/SW_8xx_SER.cis + # dvb-ttpci (GPL-2+) + av7110/bootcode.bin + # usbdux, usbduxfast, usbduxsigma (GPL-2+) + usbdux_firmware.bin + usbduxfast_firmware.bin + usbduxsigma_firmware.bin + # brcmfmac (GPL-2+) + brcm/brcmfmac4330-sdio.Prowise-PT301.txt + brcm/brcmfmac43340-sdio.meegopad-t08.txt + brcm/brcmfmac43362-sdio.cubietech,cubietruck.txt + brcm/brcmfmac43362-sdio.lemaker,bananapro.txt + brcm/brcmfmac43430a0-sdio.jumper-ezpad-mini3.txt + "brcm/brcmfmac43430a0-sdio.ONDA-V80 PLUS.txt" + brcm/brcmfmac43430-sdio.AP6212.txt + brcm/brcmfmac43430-sdio.Hampoo-D2D3_Vi8A1.txt + brcm/brcmfmac43430-sdio.MUR1DX.txt + brcm/brcmfmac43430-sdio.raspberrypi,3-model-b.txt + brcm/brcmfmac43455-sdio.raspberrypi,3-model-b-plus.txt + brcm/brcmfmac4356-pcie.gpd-win-pocket.txt + # isci (GPL-2) + isci/isci_firmware.bin + # carl9170 (GPL-2+) + carl9170-1.fw + # atusb (GPL-2+) + atusb/atusb-0.2.dfu + atusb/atusb-0.3.dfu + atusb/rzusb-0.3.bin + # mlxsw_spectrum (dual BSD/GPL-2) + mellanox/mlxsw_spectrum-13.1420.122.mfa2 + mellanox/mlxsw_spectrum-13.1530.152.mfa2 + mellanox/mlxsw_spectrum-13.1620.192.mfa2 + mellanox/mlxsw_spectrum-13.1702.6.mfa2 + mellanox/mlxsw_spectrum-13.1703.4.mfa2 + mellanox/mlxsw_spectrum-13.1910.622.mfa2 + mellanox/mlxsw_spectrum-13.2000.1122.mfa2 + ) + + # blacklist of images with unknown license + local unknown_license=( + korg/k1212.dsp + ess/maestro3_assp_kernel.fw + ess/maestro3_assp_minisrc.fw + yamaha/ds1_ctrl.fw + yamaha/ds1_dsp.fw + yamaha/ds1e_ctrl.fw + ttusb-budget/dspbootcode.bin + emi62/bitstream.fw + emi62/loader.fw + emi62/midi.fw + emi62/spdif.fw + ti_3410.fw + ti_5052.fw + mts_mt9234mu.fw + mts_mt9234zba.fw + whiteheat.fw + whiteheat_loader.fw + cpia2/stv0672_vp4.bin + vicam/firmware.fw + edgeport/boot.fw + edgeport/boot2.fw + edgeport/down.fw + edgeport/down2.fw + edgeport/down3.bin + sb16/mulaw_main.csp + sb16/alaw_main.csp + sb16/ima_adpcm_init.csp + sb16/ima_adpcm_playback.csp + sb16/ima_adpcm_capture.csp + sun/cassini.bin + acenic/tg1.bin + acenic/tg2.bin + adaptec/starfire_rx.bin + adaptec/starfire_tx.bin + yam/1200.bin + yam/9600.bin + ositech/Xilinx7OD.bin + qlogic/isp1000.bin + myricom/lanai.bin + yamaha/yss225_registers.bin + lgs8g75.fw + ) + + if use !unknown-license; then + einfo "Removing files with unknown license ..." + rm -v "${unknown_license[@]}" || die + fi + + if use !redistributable; then + # remove files _not_ in the free_software or unknown_license lists + # everything else is confirmed (or assumed) to be redistributable + # based on upstream acceptance policy + einfo "Removing non-redistributable files ..." + local OLDIFS="${IFS}" + local IFS=$'\n' + set -o pipefail + find ! -type d -printf "%P\n" \ + | grep -Fvx -e "${misc_files[*]}" -e "${free_software[*]}" -e "${unknown_license[*]}" \ + | xargs -d '\n' --no-run-if-empty rm -v + + [[ ${?} -ne 0 ]] && die "Failed to remove non-redistributable files" + + IFS="${OLDIFS}" + fi + + restore_config ${PN}.conf +} + +src_install() { + + local FW_OPTIONS=( "-v" ) + local files_to_keep= + + if use savedconfig; then + if [[ -s "${S}/${PN}.conf" ]]; then + files_to_keep="${T}/files_to_keep.lst" + grep -v '^#' "${S}/${PN}.conf" 2>/dev/null > "${files_to_keep}" || die + [[ -s "${files_to_keep}" ]] || die "grep failed, empty config file?" + FW_OPTIONS+=( "--firmware-list" "${files_to_keep}" ) + fi + fi + + if use compress-xz; then + FW_OPTIONS+=( "--xz" ) + elif use compress-zstd; then + FW_OPTIONS+=( "--zstd" ) + fi + FW_OPTIONS+=( "${ED}/lib/firmware" ) + ./copy-firmware.sh "${FW_OPTIONS[@]}" || die + use deduplicate && { ./dedup-firmware.sh "${ED}/lib/firmware" || die; } + + pushd "${ED}/lib/firmware" &>/dev/null || die + + # especially use !redistributable will cause some broken symlinks + einfo "Removing broken symlinks ..." + find * -xtype l -print -delete || die + + # remove empty directories, bug #396073 + find -type d -empty -delete || die + + # sanity check + if ! ( shopt -s failglob; : * ) 2>/dev/null; then + eerror "No files to install. Check your USE flag settings" + eerror "and the list of files in your saved configuration." + die "Refusing to install an empty package" + fi + + # create config file + echo "# Remove files that shall not be installed from this list." > "${S}"/${PN}.conf || die + find * ! -type d >> "${S}"/${PN}.conf || die + save_config "${S}"/${PN}.conf + + popd &>/dev/null || die + + # Instruct Dracut on whether or not we want the microcode in initramfs + ( + insinto /usr/lib/dracut/dracut.conf.d + newins - 10-${PN}.conf <<<"early_microcode=$(usex initramfs)" + ) + if use initramfs; then + # Install installkernel/kernel-install hooks for non-dracut initramfs + # generators that don't bundled the microcode + dobin "${T}/make-amd-ucode-img" + ( + exeinto /usr/lib/kernel/preinst.d + doexe "${FILESDIR}/35-amd-microcode.install" + exeinto /usr/lib/kernel/install.d + doexe "${FILESDIR}/35-amd-microcode-systemd.install" + ) + fi + + if use initramfs && ! use dist-kernel; then + insinto /boot + doins "${S}"/amd-uc.img + fi + + dodoc README.md + # some licenses require copyright and permission notice to be included + use bindist && dodoc WHENCE LICEN[CS]E.* +} + +pkg_preinst() { + if use savedconfig; then + ewarn "USE=savedconfig is active. You must handle file collisions manually." + fi + + # Fix 'symlink is blocked by a directory' Bug #871315 + if has_version "<${CATEGORY}/${PN}-20220913-r2" ; then + rm -rf "${EROOT}"/lib/firmware/qcom/LENOVO/21BX + fi + + # Make sure /boot is available if needed. + use initramfs && ! use dist-kernel && mount-boot_pkg_preinst +} + +pkg_postinst() { + elog "If you are only interested in particular firmware files, edit the saved" + elog "configfile and remove those that you do not want." + + local ver + for ver in ${REPLACING_VERSIONS}; do + if ver_test ${ver} -lt 20190514; then + elog + elog 'Starting with version 20190514, installation of many firmware' + elog 'files is controlled by USE flags. Please review your USE flag' + elog 'and package.license settings if you are missing some files.' + break + fi + done + + if use initramfs; then + if use dist-kernel; then + [[ -z ${ROOT} ]] && dist-kernel_reinstall_initramfs "${KV_DIR}" "${KV_FULL}" + else + # Don't forget to umount /boot if it was previously mounted by us. + mount-boot_pkg_postinst + fi + fi +} + +pkg_prerm() { + # Make sure /boot is mounted so that we can remove /boot/amd-uc.img! + use initramfs && ! use dist-kernel && mount-boot_pkg_prerm +} + +pkg_postrm() { + # Don't forget to umount /boot if it was previously mounted by us. + use initramfs && ! use dist-kernel && mount-boot_pkg_postrm +} diff --git a/sys-kernel/scx/Manifest b/sys-kernel/scx/Manifest index 5fe9d43a0bd9..1f5e5204ea04 100644 --- a/sys-kernel/scx/Manifest +++ b/sys-kernel/scx/Manifest @@ -12,6 +12,8 @@ DIST anstyle-wincon-3.0.4.crate 12234 BLAKE2B 23294d6ed7715c55c8f796eb7b860450c5 DIST anyhow-1.0.87.crate 46831 BLAKE2B 8d277aef9dfb9e28d6fbbb840fc3dde385ae29df8fdaf76913c39ccdfac487c8a7599783c6bf4271cd7466a06bcb4b3b1459b317c0f531634a4b4b8ccc1d6174 SHA512 1ed272eb20bd28d361d71b8dd1279bb3ab3a722c6a68e0f7bf4fb0a196f8a5d9f5ed9874d231ba7cf93e6a6f2551e96411d1fcb26908c79ee76919214637816f DIST async-broadcast-0.7.1.crate 21867 BLAKE2B 9c430a70bbd2b15ecc88afee064bcb04a665c0421d6c239de611d86ff3fe56fafc083ebc172c5d41c9f72a40080d87a75dae8e9b1e85249202dd844b8360735b SHA512 82b90a41ade624631dd5a03226921ed58835ddf1bcde271ff0c0e14905fb069847bbacee5592978c5389cbf366d77a7cab244ca92871949f3f4872d6da10755c DIST async-channel-2.3.1.crate 14576 BLAKE2B 09ea03c9758805c90be9aba222e1d74f3166ab492e533597647d1b4f08bf1dda79d73b21de791b9802e19c225cb94b7cb25550bba61488c7b61fa87f88eb29dd SHA512 94c999912bdf681dcb686292645bc8c340c2687bc9544f317e0123e672752c6b31e9d784e488e7d0bab79b5f207da8904a7f1fe140397513b47c292a6508a7e5 +DIST async-executor-1.13.1.crate 27991 BLAKE2B 856bd4f42a0d8d35bfb8b8525f626e0b52fd6704810f8bc964cebc47aa0c7a4450f16e5df307f4fc613da81fb3207f4671543f48710177931d6f70dc40c9f95d SHA512 27357b3dc28ad5512b46306ab7d959b2e68b4b5ed0d42fc8cd12fd265a1931a4d8c8c328911eca97227b12d861c9658c14afea6336f999436671d6ef351f3820 +DIST async-fs-2.1.2.crate 17071 BLAKE2B 7b8a67fdab5d9d964af7d45a03a3ef405f9590b556249a35897f14a231f2b781d90df48c8296965e941f8c259c4c13a57691c81f09c20ce81406d5d2e7962731 SHA512 a671374a59c7804d26bf22d9617fc329cfa0cb38413ac05cb2f6ff192c5275a8ba41f1a088fb1978e61a66693c85f9c6b08486d44e30b7fa158568e41dc005a1 DIST async-io-2.3.4.crate 49145 BLAKE2B 0530cfcd440e09f0132d2f078b9dbece4a0ed6c1eae668072d29042f41c2855c06a28a9a5420778f9b35150aafc3f0833789091f4779663cb838d44b07feb114 SHA512 30ff1355bcf0d93857604b93d22532040cf50195b6337bbab2cc734e8b81c485a4ac1e575c7c00495519afd0cf406cde9e49f044b183f29ce7b9a1f44edb2760 DIST async-lock-3.4.0.crate 34446 BLAKE2B e113033a86101bd93543d287379ba354b4bd61ce87786719f05f8a990c177a885eb50a19eb71fcd5cafa01308cb45b7872be65cd7e975cde03b0555a691a4bd7 SHA512 83731067a3302d3266848b0f65ea6564dad60188472c80e78a7d4cd93804f830332aa01b404b60a8f91cc1c6c7170020ebdfe4b5bae14fef6d3bddcc5f1ed9a5 DIST async-process-2.2.4.crate 27145 BLAKE2B 23f90d88b5fc0938d93b79ae1618b8729958e3016a38a803b816250ba690a753e23b867e1997779f378f2d8ff190276f8c125340d61301a639483cb20e8d1a89 SHA512 add194306985920e9520a95a82ecd6a3f90c8fff3030107094f361a90b43c5535e6c5cc7793435b7f5817f4e80a52070828cf43bbc13745318887a6da4bf3af2 @@ -110,8 +112,11 @@ DIST js-sys-0.3.70.crate 53863 BLAKE2B 15e75a94a2b7c77ff18847f98f76a1442b6e5f669 DIST lazy_static-1.5.0.crate 14025 BLAKE2B df29e0e3d1c061815bdd608b41074436024dc407d454f32517705ab04b2fe06075e310086c5e4961df0b4885e91021589d0bca2c1cbe6f0aeffa3ff1b3fd4637 SHA512 6d2f9887cd7f34f019644e42f02f2bf0111accd73aeaa60973ba0b039b6774670debece1ea9a6978e923208ef5d3ab7326473ee3560c078817f0f7ab8ed0f65f DIST lazycell-1.3.0.crate 12502 BLAKE2B dca2d3f46823a52dcf87b7d6103fc4f1f83bc5247ce361946ac2d9df239fb43ce4b418104503698dff0242480cd014996e77da4ae0a88f3cedbce4eb9d3c9ef8 SHA512 f9d627afc28b61e9687a3f72260eb013401fd64057647641ff2e763770d7380ab1d2d8cbb4a3c8818d53d504c618a3b46aaf701f72f4d7b25d226042824c2f8d DIST libbpf-cargo-0.24.4.crate 50558 BLAKE2B 181a5e75535ae4ef0e4b58ea218f11d3eda13fe15cd5328adf94b909d6be56ed496fceadca159d85a93a6152dd2ba2caa0868b1a0db5eb996e5a51537b422ae1 SHA512 33c49a91d1240f403ded5a1f4cad7d205a255577490a00b24b44699061a2e7eab6b1158ab21b7da7adcb82b72a362af00e62f8dd83abe2e936cdb54823731d29 +DIST libbpf-cargo-0.24.8.crate 50893 BLAKE2B be1706b69494b5d27361dac5cc610cfd4a995ac77dfe79a37052a52359279c36685d7da1fe6677bcac316512a3a448ebe361f415ea30adf3066bb6e5f2391483 SHA512 c4e87559523fe1cf5024df16dac83b6d28ca9935da80446423798ac5b1f7ba1a77ffc07dbd3502e59ba80ff05f996ebf8ae7e09beef32e8af7a45f9b9b271a14 DIST libbpf-rs-0.24.4.crate 93313 BLAKE2B 7f70fc57cab6328c1e05eab80486a3cd36f08353501380cf0908404cdb38226e9a0ed81a1627fa79eac5ac0a462e8297bc83e271274b339ae0ec63c854b19b34 SHA512 e8a5e1374d66def9a63cee38b24ab2caf9b2f2cdfe7f050ff4a0d0ca519bd993f0c75a4de53f55b5230af523bb86c862d851478b3c7e950579008631bbd9f5a5 +DIST libbpf-rs-0.24.8.crate 94353 BLAKE2B 8bbfd877e328336c253fa6e475b634260a1a5e3689922bb13fd9728458b7360c9de6899ea28f6c6148f61baf07e87ac47879abc48a85df9872726b3b3670e33a SHA512 d50aaababd81834cfc4d840bb26f1c4cafdbd7418cdc80ee6008058cd0c19d3e0d7e7a6be139d24c9e2a00683484fbf9ec2b487956110d6724d87f16e05f6f6a DIST libbpf-sys-1.4.5+v1.4.5.crate 4268322 BLAKE2B caf9a7555c01a2ed1fbaf68ec6976a2e062be6fde65c5c8eeeed1c5445448818a0ee19bddca4313c95441629db1d7866cee5689cca7082f31fc8ce3a50ec090f SHA512 83e1ac4eb75e45ebdfd0aaabd00b3c5b788eeacc5db76a322466927299f7ac2c13cc4d52a64c96276a8645fac2ce24d449ca15aaf16e8165edbd0ba08806ce30 +DIST libbpf-sys-1.4.6+v1.4.7.crate 4268424 BLAKE2B 9e79b6fb29dbc0e744eac2664a00c5a99d7a333b4f5730e5200a5577efc229e5b908d1ec692119a4709437184fd10c0d7e48a2993621a896ee728097e9982694 SHA512 52da381a9b957f65d6cb207cc40c9e72ae72c9159ddd81b35c83400a4959d2dbadd16d3ab7959632cc6dbdbe8a043037161c5b93c17d0f9be1408048e80b51f6 DIST libc-0.2.158.crate 751340 BLAKE2B a67318ab24bb86c4df682cdf846d51f5f0a69504567acff43cc6e724f2641521945dc75dddc10c1c265fda960cb28b528575b5d39ce321073844dbddbc77bdb8 SHA512 c2d90d58480cca3464db475d7c70cd66bc1492239d8183038b48def8f5d8a437a1e2a2f084cb2bd9456889221b10aa07981cd5e9bcbb6bea28a2bde3c76f1105 DIST libloading-0.8.5.crate 28902 BLAKE2B a0fca8f8876092e874964b3dcbaacd417451704fc1d687669a95a0b9df22ccda73a754118ac0bd706a7c7d86e4eceb2ad012e20e341d71548b34ea8d629bbfdf SHA512 f332884fa75cf210460f4678d45091345b23469c09301614c476e95bc54163afd6d4f098a34f9e0d529fa1ec63892395b50957598070ff327743e4c3b0871074 DIST libredox-0.1.3.crate 6068 BLAKE2B cf09f261d3a945d290ecaaa724903e0042d66eca46dde8a40c261ccb1e82c0d6b9926898eadafc6313fdb9f19cde56377b8a9179935482559c4b9707e327511a SHA512 c62142fdca92388664eef83fc89b8607e2df318cbadff6edf9e3d927837853d5cfeb54445299a82054a0ca81853b0a33536966ab26f1f2e0fa43b39aaaf67c49 @@ -180,6 +185,7 @@ DIST rustversion-1.0.17.crate 17621 BLAKE2B 1f077ca6fd90333724d1ea9df7f5b178f37f DIST ryu-1.0.18.crate 47713 BLAKE2B 409cdf4b4e77685394018371e91ad6fdb175ac57e1df9f902871f13208515e5a2ab1daa226fc1e7291278e64448332845be4cc9409bce3b2f3daed409259e104 SHA512 a9b2beac778ec47e6be303148d7512ee681bd2361f6e4ac6db32c8b4baf86a8c5eb5b0d02eacd6131ae88c7b5105c57018c3050676e0b3dd1ed9c4d2fd650e84 DIST same-file-1.0.6.crate 10183 BLAKE2B a320c8343e0b38078ba81c4f0159d886bf47764c74efe0d7cd2b3218426e8341b51e523c00a9e5fbc2ee1057618296bd70b576c68751bd55d6ddb352defaca15 SHA512 3ba35309742c8db63210d9ea78bff4ecd80471d69e6238eb96c7bf0673814f221e2d838fe6311bfc5a0e71b4a7ccba33e07859c0b9cff2171969ff08a4214a7c DIST scx-1.0.6.tar.gz 4172710 BLAKE2B 5d2cf3930c309b2753a08df80943af8c6a3a0d81fafc0f8b8f481aa8c1d8670cea4134f4d64a49b481b64fdcccb368c23eca86cc843fd83b482a22aef938a50d SHA512 16e9960a9411a6f9ed9f3b1a8c70eb8535c5fe79decfd5fccc11fe6463f227bc22a434f3509e14d6e49c66e658d03792f9cb9253bae4875f686310e4a45d5e06 +DIST scx-1.0.8.tar.gz 4206261 BLAKE2B af9b832945ec99a188d437cd4ce898a93768910661bed8a48c8c8d4a93e0550c9f34d356a7b4c78bbf4afb8477f52c475eb0cfd3d6c91913556d473a9972b8b8 SHA512 dc9352a6d131b4dcda1a721dd792bebc159f439cef8b14d2c9b065c3144892931dfec23f5db802efb13d3961a00a36720f0295553099dcfa88b33dce6cbeebcf DIST semver-1.0.23.crate 30622 BLAKE2B af5f7401daa2004ac1fc419ff907a65feb9b11743ad0feca0929bf2409eb81e03637ec5f92ba9f38ea386c4ee5cde72bd3d2042083e2fb0d6fa0b839b1c5093a SHA512 5ea1fa17c08d1280c3a4bc8d28494e88ee05acd5dc969ef6f0c6f91fd3b5a8fbe999c9e8bbd2da383413038b8d29fabf02b87bd5265bbb8333f3fcbe409103ec DIST serde-1.0.210.crate 78338 BLAKE2B b3621d1313312177a346313e6e384fe9660f74eefb18e6cffa39fc2aadc0ab73be84b9037c59b716e5feafcd73f4f054f83e6d17d82746984b3064bf8d3ed338 SHA512 0d853ca51543ae8b4a0c70204ff4e559a4eec77af3d3bdcfc75c5905c80d4ffd1bd9eb8258ea4f6ecfbdd26477ecac7dd698d84d86759fa32e03a9cce02fa4ae DIST serde_derive-1.0.210.crate 56020 BLAKE2B b346e574c99b6a8b12dfc29b20a4fd2daf8abfabd3714ccfde059a3a1f14a5628d4acf6a03f8076174fd28adfdb7cb9bbdb8ac0d4403aa2f43e917eed4b08028 SHA512 1c54d70a55007c00d3ff3d8c2096f4f9966431ba7bfd9195bcf41932de71b71c4ab934f9a8c5067cb56a042742cf0efab07377dbabf12feb1af6d20399de00b5 @@ -279,12 +285,19 @@ DIST wyz-0.5.1.crate 18790 BLAKE2B 07ac1435a812d2f50309348ef8378ea4955c001f01eda DIST xattr-1.3.1.crate 12580 BLAKE2B 25c414d761a7fcd23bbe057add62c6da971cf33149066aa024320ab80e0ec8e8e8d5d3d0506e8de954b8f8c178d34c52a00a5fa9aa109510678098a3e3564b7f SHA512 4047abda42b949cf58f820e15ee99850de483857bbaaef737eeee48e1a2132972470f15bb2ddda56438f6a934918be96607a8de518a5a3dcec7c8ee6c00ad280 DIST xdg-home-1.3.0.crate 4000 BLAKE2B 0da36aadfa518f1ecb3fe9067eb4c014689af1f76c71c592184aa4c4fe457883faf1dad757344b375a92c484bcb3d7a408f8759c24b2e7738ef4997c870fdb85 SHA512 4d090f18ea4a37199d2c1760faca11e16ba9069086245543b3390c53e74a84145144a94863c7d8c3155a9d616732a3cd8caaa1a416c43dc4d107ce045727279d DIST zbus-4.4.0.crate 158301 BLAKE2B 7a9a3f8712d99285955020ec60c128289578824061964ae0c26d7f6b284f0ea393087dcf40ae15d13bf87977ba61acab71460120256a5f16b9e5f713fe0a9cad SHA512 2522cf51b6eeeb06b350a0fcacd7cb768459a55a524c8c379da8d0c6f1b7b946f352fe95f993b0af8297de4eb9e63e2f009888465a2b554cfd904d4ca3717699 +DIST zbus-5.1.1.crate 161284 BLAKE2B fd7ba8bff806fa672101863d8f68ac2632a202f75d855fc7105bf6dc633a0dc96abc072307a8ba97470402fc86b53ff8a8e3c51aeaa672a5f44ecf0f2c36fcc7 SHA512 ba56988da55ed0a0d285fb35c98810a255944fbc3d29059896efc7510c1ad379b48f4a69181fec0069aed5a794755d2c0d5ffa44f76c3e3b53df348d73130a6f DIST zbus_macros-4.4.0.crate 31183 BLAKE2B 9448845e1cfa58d51688b74ddf0aa3e65d1621db3c636809426e67433074dcbce36cbe595dbdaca895650775e7971d9e1fd1e9feb7cad42ba6521839459b6780 SHA512 7fa5d4baa95f440be12d74d4c855f16f60803690020a6af1d28d1ba04d792ff763df3c2c3e4d275e0753a6effeaf597ad8cdedd4a34d4b93f8e69a34b31fa1dd +DIST zbus_macros-5.1.1.crate 31455 BLAKE2B cd951b342dbf67a8337e26c88e6b337c5be376596fd6a9d6419db81e9e2eac34b86b224ed50403e0faf79a6d8d56e7904d54047d2869fbeec3145d947e6ec774 SHA512 e6b4a64bb3e9686ebafac9de6b91be11b320f81a813c3f01f9b577654d37d89840b5b997a8c1b234c433d2a22e70a4b626433683af2fb6b5671a673a9056d22a DIST zbus_names-3.0.0.crate 10650 BLAKE2B 0c8a0ee67c9236ef51a1add3038d5ac5a9f00dccd9df059b16454754db44e7c5ac66b74f3f98c317ee73a1c982b8439d6a92995d984b9b9d744c3c9203edbed3 SHA512 e0ebd468f152ef8063faa547f60b58d2d87948e24741d1cec0e97eef1817653d524ce5519795db64a3a7d9101ee2c6b67f0bf2bade894c57b5c37aee19fc82ab +DIST zbus_names-4.1.0.crate 11532 BLAKE2B b1c5092b3b898d890e19459021dc6d540ef4154ee998bd1e4e210f12d2933960b5e8caa44f75e09fdccbbc4d80988fb55caa2ceffc22397b96216594a5e65421 SHA512 9e65472efd6d29c62d803d13d053443b6ddfb3de6ba322a52ad5907a2573779494f9bf031a2db243a6495507691adc8c65f8d25432bac90e80d14e9513216944 DIST zerocopy-0.7.35.crate 152645 BLAKE2B 8f13123c9d9257ac5a5c6954d38c3510fa658624442f7e03cdcc6db5a0977d9f26bb4e277be172b7872ec365cf6e58ac742e5578636f7698f9f37093e9249d9a SHA512 17fcb31c029ae89c01e5bae5fb2bb46bd434120199a3dc2c7fe0012dbbcfe2a0bb38934c4a7d3a4920e3fe47c097403beee554fefa54b66cb390f8b1de638d3c DIST zerocopy-derive-0.7.35.crate 37829 BLAKE2B badeb7fa5e0bfe93a6788d93fd297604ed31de526b121549300ead3c49d450f49265f499e2e7ce606dcce2b59dd01f7fa817b8fbb3f237475185c5b42f5299c4 SHA512 dbe23573b62a6267d7bc8c744320b75b2fbda03b908c1d175211f7394374fe182bce58021e25485c10671d726b2007f250565dfe53134d51c89293bb607e9feb DIST zvariant-4.2.0.crate 82180 BLAKE2B 6d8309a223c32eae3c1ba4291d69bab395a3ef0f65da1e380552d27ccc547a31cf32f9dcf2feecce34276c065d044d0c897c9468b6df4c16efa94a0668dd19eb SHA512 ae7329db133ff8c262443bfe6fc10698606501ecdde8295367f3876e9c590730778ad2d4977c27e26288c92737055897686e7a0d30210723279c33da7467af80 +DIST zvariant-5.1.0.crate 78529 BLAKE2B e4842199571c480032bd6fabf5a2921aaaa8811829e3651f8b3417e1289fd6c2bacf39b6f9e7646c0ffe8fbc30ffbca4181d28fad2f800926f158b98624b7866 SHA512 48ec2d9ff064cf89f69032b87f5f77bd19d8f685788ca1d846e2058cfb3d92059c4fc9cd4ce0e483861c03db87cadb94370e6f2014a32cb32440c747f9291d0c DIST zvariant_derive-4.2.0.crate 11057 BLAKE2B 891c141bfa0db95a5ac62ab2c31bef1215ef658a787d855c09c9b0e42485cd8aa52683c82a07394042615ec51b42ae5efcde81e7dbd2a35f7670888b28477df2 SHA512 8a50d143b38d57a757b3a6b6293c43d7db1a563ccf25002ad6b6a69b7c157765c604329659318a0cb64df1ecf78b3f0dbe88d6650740c016da9161719427f9c2 +DIST zvariant_derive-5.1.0.crate 11483 BLAKE2B d363a679d522d9b241f65eaf29d838f466062ed0ea963c95e9e042edf752d857c789f30e34f2b114196744859b4c0d8b4c272560a5581e057e90509d9cefdb85 SHA512 dfd75d66550cbde0f8d1c920f8f86cf1790241822d8f2c0befa0a4fb9fd82ed5a2d9a4701796d5e768ebafb3bf716bcb1234a5fe8538f4e739efd9674b11f357 DIST zvariant_utils-2.1.0.crate 7043 BLAKE2B b891c5fc2b5afb5eba01b9068b454a965b4f07548c1a080fd5b598165994a5177a7df5f39cf7263ea8bcc5d054c7d87012ca1588737d630d96f24f0d00dee6cf SHA512 345b70d1106b37df41426efdb1ba49bf270e00898381c2a8021b5761c59efdea55def45cb2e2598b130b6cba8733503f3997a55578bca90867ab3e8f2346f80e +DIST zvariant_utils-3.0.2.crate 13751 BLAKE2B 2bd54b955b677eb3d7a6930677b8c6657a1802ac183b4e59646a16351f40bf0adc535dca4024d084c8e8f3cc05772a79b6a9142b407a965fb89cb24c02f0433e SHA512 8711367ae755fadc5a36cad7ec818c73f03d5c6cfcf5a8e9675cebcd3ae15eea7863b183fea68aa324e34c016d44fd174e6c78470d3f0711f562ab4752607906 EBUILD scx-1.0.6-r2.ebuild 7812 BLAKE2B 3459d694040067d8762368a8a76c64a901c0c2fba56755871e61dc344e7479d45755ffee98943e84d3fd6bd59a62a6074d5664635ce010f78572fc05c66c2f3f SHA512 152c845d50e003ecb18b24d7436af6171c48214f175152ba4caa9712a10793bf022539484e18154b481a1514eca501edc8aa81b13511933ac674a56dc40ca3fa +EBUILD scx-1.0.8.ebuild 7373 BLAKE2B 412a59b7497c693a2d8e46a911ae37303827a4ef9cc58d10292e03842ef939ac558eb90f2adbdcba237f53c2a2c0f80f50754aa317aa8f81ac99bbe5e10bf5c4 SHA512 58bad9c8b1edd669d17ffaab36b300d5074b62b6162700046388158ed8226c3f77ec6a1c782979adf3319067d30f2b1f2ff1d6c2a92f12eb913bb551b2968d15 MISC metadata.xml 786 BLAKE2B 5cd78c254f6c4247a76fc3b65aef3046f4419fe2e5b2f6a52f61d8a01c17a8b17a5a0d2459c037aafff5c2fe98a8c1c5949bf72e6ef6542d53e371db38526b36 SHA512 f79a9746f9dee0f3f992aaa36a02616ad04223bc04b0d9ab4858d7d33d2360b32a721f8565df4cc84e616f0e7674585c31c6968795691d741a46983586986348 diff --git a/sys-kernel/scx/scx-1.0.8.ebuild b/sys-kernel/scx/scx-1.0.8.ebuild new file mode 100644 index 000000000000..336c5f97215b --- /dev/null +++ b/sys-kernel/scx/scx-1.0.8.ebuild @@ -0,0 +1,383 @@ +# Copyright 2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +LLVM_COMPAT=( {16..18} ) + +# List of crates for pycargoebuild: +# rust/scx_{loader,rustland_core,stats,utils} +# scheds/rust/scx_{bpfland,lavd,layered,rlfifo,rustland,rusty} +CRATES=" + addr2line@0.24.1 + adler2@2.0.0 + aho-corasick@1.1.3 + android-tzdata@0.1.1 + android_system_properties@0.1.5 + anstream@0.6.15 + anstyle-parse@0.2.5 + anstyle-query@1.1.1 + anstyle-wincon@3.0.4 + anstyle@1.0.8 + anyhow@1.0.87 + async-broadcast@0.7.1 + async-channel@2.3.1 + async-executor@1.13.1 + async-fs@2.1.2 + async-io@2.3.4 + async-lock@3.4.0 + async-process@2.2.4 + async-recursion@1.1.1 + async-signal@0.2.10 + async-task@4.7.1 + async-trait@0.1.82 + atomic-waker@1.1.2 + autocfg@1.3.0 + backtrace@0.3.74 + bindgen@0.69.4 + bitflags@1.3.2 + bitflags@2.6.0 + bitvec@1.0.1 + blocking@1.6.1 + bumpalo@3.16.0 + bytes@1.7.1 + camino@1.1.9 + cargo-platform@0.1.8 + cargo_metadata@0.15.4 + cargo_metadata@0.18.1 + cc@1.1.18 + cexpr@0.6.0 + cfg-if@1.0.0 + cfg_aliases@0.2.1 + cgroupfs@0.7.1 + chrono@0.4.38 + clang-sys@1.8.1 + clap@4.5.17 + clap_builder@4.5.17 + clap_derive@4.5.13 + clap_lex@0.7.2 + colorchoice@1.0.2 + colored@2.1.0 + concurrent-queue@2.5.0 + const_format@0.2.31 + const_format_proc_macros@0.2.31 + convert_case@0.6.0 + core-foundation-sys@0.8.7 + crossbeam-channel@0.5.13 + crossbeam-deque@0.8.5 + crossbeam-epoch@0.9.18 + crossbeam-queue@0.3.11 + crossbeam-utils@0.8.20 + crossbeam@0.8.4 + ctrlc@3.4.5 + darling@0.20.10 + darling_core@0.20.10 + darling_macro@0.20.10 + deranged@0.3.11 + either@1.13.0 + endi@1.1.0 + enumflags2@0.7.10 + enumflags2_derive@0.7.10 + equivalent@1.0.1 + errno@0.3.9 + event-listener-strategy@0.5.2 + event-listener@5.3.1 + fastrand@2.1.1 + fb_procfs@0.7.1 + filetime@0.2.25 + fnv@1.0.7 + funty@2.0.0 + futures-core@0.3.30 + futures-io@0.3.30 + futures-lite@2.3.0 + futures-sink@0.3.30 + futures-task@0.3.30 + futures-util@0.3.30 + gimli@0.31.0 + glob@0.3.1 + gpoint@0.2.1 + hashbrown@0.14.5 + heck@0.5.0 + hermit-abi@0.3.9 + hermit-abi@0.4.0 + hex@0.4.3 + home@0.5.9 + iana-time-zone-haiku@0.1.2 + iana-time-zone@0.1.60 + ident_case@1.0.1 + indexmap@2.5.0 + is_terminal_polyfill@1.70.1 + itertools@0.12.1 + itertools@0.13.0 + itoa@1.0.11 + js-sys@0.3.70 + lazy_static@1.5.0 + lazycell@1.3.0 + libbpf-cargo@0.24.8 + libbpf-rs@0.24.8 + libbpf-sys@1.4.6+v1.4.7 + libc@0.2.158 + libloading@0.8.5 + libredox@0.1.3 + linux-raw-sys@0.4.14 + log@0.4.22 + maplit@1.0.2 + memchr@2.7.4 + memmap2@0.5.10 + memoffset@0.6.5 + memoffset@0.9.1 + minimal-lexical@0.2.1 + miniz_oxide@0.8.0 + mio@1.0.2 + nix@0.25.1 + nix@0.29.0 + nom@7.1.3 + ntapi@0.4.1 + num-conv@0.1.0 + num-traits@0.2.19 + num_cpus@1.16.0 + num_threads@0.1.7 + nvml-wrapper-sys@0.8.0 + nvml-wrapper@0.10.0 + object@0.36.4 + once_cell@1.19.0 + openat@0.1.21 + ordered-float@3.9.2 + ordered-stream@0.2.0 + parking@2.2.1 + paste@1.0.15 + pin-project-lite@0.2.14 + pin-utils@0.1.0 + piper@0.2.4 + pkg-config@0.3.30 + plain@0.2.3 + polling@3.7.3 + powerfmt@0.2.0 + prettyplease@0.2.22 + proc-macro-crate@3.2.0 + proc-macro2@1.0.86 + quote@1.0.37 + radium@0.7.0 + rayon-core@1.12.1 + rayon@1.10.0 + redox_syscall@0.5.3 + regex-automata@0.4.7 + regex-syntax@0.6.29 + regex-syntax@0.8.4 + regex@1.10.6 + rustc-demangle@0.1.24 + rustc-hash@1.1.0 + rustix@0.38.36 + rustversion@1.0.17 + ryu@1.0.18 + same-file@1.0.6 + semver@1.0.23 + serde@1.0.210 + serde_derive@1.0.210 + serde_json@1.0.128 + serde_repr@0.1.19 + serde_spanned@0.6.8 + shlex@1.3.0 + signal-hook-registry@1.4.2 + simple_logger@5.0.0 + simplelog@0.12.2 + slab@0.4.9 + socket2@0.5.7 + sorted-vec@0.8.3 + sscanf@0.4.2 + sscanf_macro@0.4.2 + static_assertions@1.1.0 + strsim@0.10.0 + strsim@0.11.1 + syn@2.0.77 + sysinfo@0.31.4 + tap@1.0.1 + tar@0.4.41 + tempfile@3.12.0 + termcolor@1.4.1 + terminal_size@0.3.0 + thiserror-impl@1.0.63 + thiserror@1.0.63 + threadpool@1.8.1 + time-core@0.1.2 + time-macros@0.2.18 + time@0.3.36 + tokio-macros@2.4.0 + tokio@1.40.0 + toml@0.8.19 + toml_datetime@0.6.8 + toml_edit@0.22.20 + tracing-attributes@0.1.27 + tracing-core@0.1.32 + tracing@0.1.40 + uds_windows@1.1.0 + unicase@2.7.0 + unicode-ident@1.0.12 + unicode-segmentation@1.11.0 + unicode-width@0.1.12 + unicode-xid@0.2.5 + utf8parse@0.2.2 + vergen@8.3.2 + version-compare@0.1.1 + version_check@0.9.5 + vsprintf@2.0.0 + walkdir@2.5.0 + wasi@0.11.0+wasi-snapshot-preview1 + wasm-bindgen-backend@0.2.93 + wasm-bindgen-macro-support@0.2.93 + wasm-bindgen-macro@0.2.93 + wasm-bindgen-shared@0.2.93 + wasm-bindgen@0.2.93 + which@4.4.2 + winapi-i686-pc-windows-gnu@0.4.0 + winapi-util@0.1.9 + winapi-x86_64-pc-windows-gnu@0.4.0 + winapi@0.3.9 + windows-core@0.52.0 + windows-core@0.57.0 + windows-implement@0.57.0 + windows-interface@0.57.0 + windows-result@0.1.2 + windows-sys@0.48.0 + windows-sys@0.52.0 + windows-sys@0.59.0 + windows-targets@0.48.5 + windows-targets@0.52.6 + windows@0.57.0 + windows_aarch64_gnullvm@0.48.5 + windows_aarch64_gnullvm@0.52.6 + windows_aarch64_msvc@0.48.5 + windows_aarch64_msvc@0.52.6 + windows_i686_gnu@0.48.5 + windows_i686_gnu@0.52.6 + windows_i686_gnullvm@0.52.6 + windows_i686_msvc@0.48.5 + windows_i686_msvc@0.52.6 + windows_x86_64_gnu@0.48.5 + windows_x86_64_gnu@0.52.6 + windows_x86_64_gnullvm@0.48.5 + windows_x86_64_gnullvm@0.52.6 + windows_x86_64_msvc@0.48.5 + windows_x86_64_msvc@0.52.6 + winnow@0.6.18 + wrapcenum-derive@0.4.1 + wyz@0.5.1 + xattr@1.3.1 + xdg-home@1.3.0 + zbus@5.1.1 + zbus_macros@5.1.1 + zbus_names@4.1.0 + zvariant@5.1.0 + zvariant_derive@5.1.0 + zvariant_utils@3.0.2 +" + +RUST_MIN_VER="1.74.1" + +inherit llvm-r1 linux-info cargo rust-toolchain meson + +DESCRIPTION="sched_ext schedulers and tools" +HOMEPAGE="https://github.com/sched-ext/scx" +SRC_URI=" + https://github.com/sched-ext/scx/archive/refs/tags/v${PV}.tar.gz -> ${P}.tar.gz + ${CARGO_CRATE_URIS} +" + +LICENSE="GPL-2" +# Dependent crate licenses +LICENSE+=" Apache-2.0 BSD-2 BSD ISC MIT MPL-2.0 Unicode-DFS-2016 ZLIB" +SLOT="0" +KEYWORDS="~amd64" +IUSE="openrc systemd" + +DEPEND=" + virtual/libelf:= + sys-libs/zlib:= + >=dev-libs/libbpf-1.5:= + openrc? ( || ( + sys-apps/openrc + sys-apps/openrc-navi + ) ) +" +RDEPEND=" + ${DEPEND} +" +BDEPEND=" + app-misc/jq + dev-util/bpftool + $(llvm_gen_dep ' + llvm-core/clang:${LLVM_SLOT}=[llvm_targets_BPF(-)] + ') +" + +CONFIG_CHECK=" + ~BPF + ~BPF_EVENTS + ~BPF_JIT + ~BPF_SYSCALL + ~DEBUG_INFO_BTF + ~FTRACE + ~SCHED_CLASS_EXT +" + +QA_PREBUILT="/usr/bin/scx_loader" + +pkg_setup() { + linux-info_pkg_setup + llvm-r1_pkg_setup + rust_pkg_setup +} + +src_prepare() { + default + + # Inject the rust_abi value into install_rust_user_scheds + sed -i "s;\${MESON_BUILD_ROOT};\${MESON_BUILD_ROOT}/$(rust_abi);" \ + meson-scripts/install_rust_user_scheds || die + + # bug #944832 + sed -i 's;^#!/usr/bin/;#!/sbin/;' \ + services/openrc/scx.initrd || die +} + +src_configure() { + BUILD_DIR="${BUILD_DIR:-${WORKDIR}/${P}-build}" + + local emesonargs=( + -Dbpf_clang="$(get_llvm_prefix)/bin/clang" + -Dbpftool=disabled + -Dlibbpf_a=disabled + -Dcargo="${EPREFIX}/usr/bin/cargo" + -Dcargo_home="${ECARGO_HOME}" + -Doffline=true + -Denable_rust=true + -Dlibalpm=disabled + $(meson_feature openrc) + $(meson_feature systemd) + ) + + cargo_env meson_src_configure +} + +src_compile() { + cargo_env meson_src_compile +} + +src_test() { + cargo_env meson_src_test +} + +src_install() { + cargo_env meson_src_install + + dodoc README.md + + local readme readme_name + for readme in scheds/{rust,c}/*/README.md ./rust/*/README.md; do + [[ -e ${readme} ]] || continue + readme_name="${readme#*/rust/}" + readme_name="${readme_name#*/c/}" + readme_name="${readme_name%/README.md}" + newdoc "${readme}" "${readme_name}.md" + done +} |