From b846e1a1ef5685462a20abbc77cf57ead9064b85 Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Thu, 31 Oct 2024 03:04:18 +0000 Subject: gentoo auto-resync : 31:10:2024 - 03:04:18 --- dev-util/Manifest.gz | Bin 64988 -> 64989 bytes dev-util/bpftool/Manifest | 14 +- dev-util/bpftool/bpftool-7.4.0.ebuild | 132 +++++++++++ dev-util/bpftool/bpftool-9999.ebuild | 121 ++++++++++ ...ffs-on-provided-dir-instead-of-parent-dir.patch | 255 +++++++++++++++++++++ ...set-DESTDIR-to-empty-when-building-libbpf.patch | 38 +++ .../files/7.4-003-fix-typo-in-usage-help.patch | 30 +++ .../7.4-004-fix-the-wrong-format-specifier.patch | 38 +++ ...vior-caused-by-shifting-into-the-sign-bit.patch | 47 ++++ .../7.4-006-fix-undefined-behavior-in-qsort.patch | 49 ++++ ...t-build-time-when-trying-to-detect-libbfd.patch | 48 ++++ ...d-CLI-arguments-warning-for-feature-probe.patch | 38 +++ dev-util/bpftool/metadata.xml | 3 + dev-util/desktop-file-utils/Manifest | 2 + .../desktop-file-utils-0.28.ebuild | 23 ++ dev-util/maturin/Manifest | 2 +- dev-util/maturin/maturin-1.7.4.ebuild | 2 +- dev-util/ruff/Manifest | 2 +- dev-util/ruff/ruff-0.7.1.ebuild | 2 +- 19 files changed, 841 insertions(+), 5 deletions(-) create mode 100644 dev-util/bpftool/bpftool-7.4.0.ebuild create mode 100644 dev-util/bpftool/bpftool-9999.ebuild create mode 100644 dev-util/bpftool/files/7.4-001-mount-bpffs-on-provided-dir-instead-of-parent-dir.patch create mode 100644 dev-util/bpftool/files/7.4-002-set-DESTDIR-to-empty-when-building-libbpf.patch create mode 100644 dev-util/bpftool/files/7.4-003-fix-typo-in-usage-help.patch create mode 100644 dev-util/bpftool/files/7.4-004-fix-the-wrong-format-specifier.patch create mode 100644 dev-util/bpftool/files/7.4-005-fix-undefined-behavior-caused-by-shifting-into-the-sign-bit.patch create mode 100644 dev-util/bpftool/files/7.4-006-fix-undefined-behavior-in-qsort.patch create mode 100644 dev-util/bpftool/files/7.4-007-define-PACKAGE-at-build-time-when-trying-to-detect-libbfd.patch create mode 100644 dev-util/bpftool/files/7.4-008-always-disable-unused-CLI-arguments-warning-for-feature-probe.patch create mode 100644 dev-util/desktop-file-utils/desktop-file-utils-0.28.ebuild (limited to 'dev-util') diff --git a/dev-util/Manifest.gz b/dev-util/Manifest.gz index 5c2c9dee490d..5f7cd6dadf4f 100644 Binary files a/dev-util/Manifest.gz and b/dev-util/Manifest.gz differ diff --git a/dev-util/bpftool/Manifest b/dev-util/bpftool/Manifest index dcba96112e21..ecec4f4ed9fc 100644 --- a/dev-util/bpftool/Manifest +++ b/dev-util/bpftool/Manifest @@ -1,3 +1,13 @@ +AUX 7.4-001-mount-bpffs-on-provided-dir-instead-of-parent-dir.patch 7140 BLAKE2B 12166138aefdb8e9e9b99c8045181da9c35c453e2f628defee789be62f09f8a20af1c4dabb396c7821fe0223b7a876d70b2555580eb971e941f8a95d17b5ab45 SHA512 44f242d7245a1c2fbbdaab31f519244ee6f7ce6ce8c1a6e5bfcf7e3a305ec9555ab22831df503ad51f090772d739043ce9e6bfc8cb766660fe764e2b481a3176 +AUX 7.4-002-set-DESTDIR-to-empty-when-building-libbpf.patch 1798 BLAKE2B 8e355fa72c550dae8b76abeeb393c0980ea097ebbee475f3d256c37960782993c93ba5c7862863f3f73cbab0761b89acf6bef6c6eff34db59fba3c18fe0f740b SHA512 c28810572f7bfa22ccf27fbe69b9761eb78209ddac7913f9cef1bf4b59ebaab7abbb560f29bba73ecdd526a752549b5f78db95e486a6cb93f53b98f28fd09760 +AUX 7.4-003-fix-typo-in-usage-help.patch 1603 BLAKE2B f1efe3c8deca53a06a342262e1366c7f8dd3932541a76280afeb01960af0b2a1d57a2eebb5075f9769117e154a2145daa1482a3e57551a89ba511e101ae99896 SHA512 7162f0cea84e36d5758724d5290544312cbdd43d7785e10742a326d9b22878e43619002c26f03f3b7c827e43fb490ee829c893a379ac347ec435375f23a0c063 +AUX 7.4-004-fix-the-wrong-format-specifier.patch 1242 BLAKE2B d2077558f4f3901e499c2bc82194f8a0d202530579838d0202cfdf97ce4924032d9efe4e69e1e5d931e63d6ad372fe1f68c47a425da78d37d398e12efb437385 SHA512 e0e0a2b9ce73a1ee6a156892fc7c7dab3e879c94fa622628af6f0a4fc4ef47f04e7a5d39aa5531b84f4a299f5b51f3d222e9b82cd381574c0e92b232861c0c24 +AUX 7.4-005-fix-undefined-behavior-caused-by-shifting-into-the-sign-bit.patch 1778 BLAKE2B 546488479bd50da42273c07a5008c46f425739f4f989df9171cd7a195eb55c9d8ac2dba36b189e58db3e8665964b7dde6b0d43db9a0b0953395f390621969591 SHA512 d8c5d41b6dad8c5a7f9575a58c4f8fe1e19f0069cd807efc15083a6e1ae90368b8cc98189d1d262331224c84cb27b7698dea028f760516ce07ac6f8012ed4d83 +AUX 7.4-006-fix-undefined-behavior-in-qsort.patch 1922 BLAKE2B 52aab0ee6878c29bd99a60e0c264a6b6802ddb355010fcc35c45b92dbc8bc7af172fda0ef88f5aeb9f673e2254b68736af0ddc1aeaf5ddd5795047a176dad737 SHA512 9e748b1215aa2e93bda92cf818167150a543d89c5a19119eb2eeffa48b2659e5399be426d0d62c81f39b48fcf4ad7f9492bdfabdf29eed6b65bf3d3283210472 +AUX 7.4-007-define-PACKAGE-at-build-time-when-trying-to-detect-libbfd.patch 2268 BLAKE2B a537c0356ca2da4bdaf39a5dc77a0f5f0ef004a081c7620230edc55c407887a56f1a3bfcfb3036f24dd8b5a46ca7ee303c87332dc094556694ea8a201ba29ae4 SHA512 e96b0ce37ca5306dcd093ebbd185417d6f7830c5abb4ebadcc9c117066ebc43328752e6819bea211e92f4f4d6ce7d023b60db4c1ca11ce4f2e41877feb08c48a +AUX 7.4-008-always-disable-unused-CLI-arguments-warning-for-feature-probe.patch 1481 BLAKE2B 74e618cb84c3f62553b50b351b495993aa608508cbb54fefca667369c9f49a127742f27b2514a3bb7dae6bc09145068641f548710e9b9299fb14b0783bff4ba2 SHA512 dbeb9e5e2e0750220b69c07b15110c6af19e2ab049d484d73f676d14d321289d5c6bfc96bed6bd0fe717af09b2f75aff2ecee7e084985026a2f30c5fcbd57958 +DIST bpftool-7.4.0.tar.gz 472915 BLAKE2B ae7b6bc6cb742712981ba8972bcecccc63d440b2a77c5a14f91ba5106c013774313d65fd3f42b843ba4027ab17cf9d44d256270f7f8ad11907714f16f3149078 SHA512 08a3095b37a9b897400f2be7dbb9de10d129ae4eef193d03955fdf84017cd3a5d7419e856aa68a425e609419868e8b1dd5409b4f218cc24feeb059c1898cdff4 +DIST libbpf-1.4.7.tar.gz 1016441 BLAKE2B 10be52c7e97b2f08edd33cb263c4737bb52edfd2226f0c5b86d4f95b584b81f8f6b1ede469e9ad6c231e55b6d6b9a038160662606c3f30dc79b1336aaaa90e74 SHA512 f09ff28ac75b0d0c1bfe7d233aee6a00e5c21f185646b2afe11b7bd048d74962f893237437dd81a762768f9235b9f2a2a33cb297201b2aa3e98f7c6f58e5b365 DIST linux-6.10.tar.xz 145142812 BLAKE2B bb243ea7493b9d63aa2df2050a3f1ae2b89ee84a20015239cf157e3f4f51c7ac5efedc8a51132b2d7482f9276ac418de6624831c8a3b806130d9c2d2124c539b SHA512 baa2487954044f991d2ae254d77d14a1f0185dd62c9f0fcaff69f586c9f906823017b8db1c4588f27b076dfa3ebb606929fec859f60ea419e7974330b9289cc2 DIST linux-6.11.tar.xz 146900704 BLAKE2B e7750c0878d71a56a0ce52d4c4c912199dad5bf5e2e8f872585a6494afbb37cbd852e612a6858936d2dc9b7776a3933818f540db408d57e90d18ea5249bba7ab SHA512 329c1f94008742e3f0c2ce7e591a16316d1b2cb9ea4596d4f45604097e07b7aa2f64afa40630a07f321a858455c77aa32ba57b271932ddcf4dc27863f9081cea DIST linux-6.8.tar.xz 142502100 BLAKE2B c6f17f816cea16e629f63e9379b98888713f57b2c5173306926471f139a9d612a0c74e119341f8075390e55e203d787d9edeb4ad5a064b18870f6f0f7ffaafb2 SHA512 5c4eb4aa1d3f7d1ea01c0f7ddeadacdece6e144fd4bdfc16b2b925d3e10dc04de3a6db69320b79a96c3560052616f001d2c09e7a1bb4f7b731e2380a7ecce068 @@ -8,6 +18,8 @@ DIST patch-6.8.2.xz 247244 BLAKE2B a85078230548543c38550a5546689d0b44a54208cdad5 DIST patch-6.9.2.xz 16184 BLAKE2B 8a37e96c253b55b57c86f1654f2ea8bf65af96b1b38213e90032cb918bb8eea992d6ddbfa6a6774a229ab2e2288ab57bdb6cbad6e7e393c123f24850e06847c9 SHA512 a27af24f0caaa5de3811b6db5acc2d72b96df9ebb5c44bad99a949d871fb06c6ffd2be10cfc35b246d430c7be2291701f802aed47eaa8818ad12b8818a60f3ec EBUILD bpftool-6.8.2.ebuild 3101 BLAKE2B b032c5133f13d0a2f789a08fa054bd5d88cc729026974189d20b9d91f6295fdbad39056acc1223e78923b6201d91799c8cb833948135bccf25b84b4c25f00d5d SHA512 1efcf7572c1aa378394f38d2b939752aaf3215f92ffa227c493d0e3e9c8f945bcca82f759487386cd62e9c5996400395a944962f61af20fc62f8a206b57740d5 EBUILD bpftool-6.9.2.ebuild 3125 BLAKE2B a8395a94a01d8fe758246cc158713ca30f928aa4051380f6fbb4a285f7a16a223db02b199b422242adca3df4032d79daa20b9420f3a4543aeefca128e41ddfad SHA512 3931abd489a3cbb7aaaf4ea8fd004a45c4a27c8a645fb7eb5088fab3186ebc59b61d58e4b0704dd1c264eee50a95288ad1824af0aff482da306c282465d3013b +EBUILD bpftool-7.4.0.ebuild 3984 BLAKE2B aea7bd4c8939b32e2a866a291712191615e4eb96ece7ecf7c21bf073df59a027b041e7de5d32606cf0aafe1a61bdd2ef4cd9e67131f4a63f72539470c432c4d2 SHA512 dde442cf261513ff787eb15ee94da91287928daf7928679c530a930cbdb0d0351fa059c0ade10f11e7dc278aaace589ef6643956de21b9875889d0281fab4ce5 EBUILD bpftool-7.5.0-r1.ebuild 3405 BLAKE2B 74da665bc8e3ddd5ea372590455345ea6e75348500eefe7117926d313d8d4c75579e31635b8b67761ffe1ad3284788dfd19f524709f2a951b1f9790a41ea3b1e SHA512 a228790899d82206d7378d24aaf02257b6fb540983ea83157eb7a0ef4c09d420c57257849830c8352df4a1f55f482fad9490813d8657e6b512bbe28b46958429 EBUILD bpftool-7.5.0-r2.ebuild 3692 BLAKE2B 96f5e8a3d432141f2222e84bb7855e99dcfbec79dae69730fc59c43844dce96c0b062a0a5795148309f3da3fbe794c0ce4e58037a2d5d715708d60a4b16ad86f SHA512 e8238e2c69c00a0f398e31b22cb0433f424246725c3f5be779ba52abf0b838540cbf54c8b52ab545ce462d71294e11ec085a36ccc614efaab776a4a0c04d2421 -MISC metadata.xml 650 BLAKE2B 4e195974ef7cee9b087c5c5f58e1782ff6b884603c68042c3d28471d4e7eb92004e9963ecdf534b360579e475424e64dd905fa5e98a74385aaadbe132b598176 SHA512 4a9d57fc518a3dbe67b0c0436ba41a66cd25d970e9b4c1d0cb1c8120f8d02e1e4fcca7e68d878dd74ae16e7804952a68c486621a44d59e5782341d1800f2e142 +EBUILD bpftool-9999.ebuild 3383 BLAKE2B e58739227f533cc5e0f65bdfa1eebf3a45a73b980f27661607d036f5a7b9622be12c6194f8d6e8ec4eca61b68233dc64beee36c32a36e2444b1ed38e359df169 SHA512 b5b7782ab8dd50208d5e69acadfc509479024e1b524c35618afc8d2cd19f80f3bba3ae1acd8ae500062046f28f535ab8682730cf53dff20abc1902f32904467b +MISC metadata.xml 729 BLAKE2B 7a30c956e2e563b5a22b9301afa77f1025d93464c4f33f31aba6ec727b85857393318bc2941b2165fcf6c4258c318e48e66b1f1147f30e80a4ebcb63cb6f4b3f SHA512 799fcd5cf2da7c6dc67adb6766f73aa350f412444f1a2e8a911d2db6e6c7f228cf0863a09bd32a07fc8ef8d7fce68036239e779e78454285c36a2b95935afef6 diff --git a/dev-util/bpftool/bpftool-7.4.0.ebuild b/dev-util/bpftool/bpftool-7.4.0.ebuild new file mode 100644 index 000000000000..8f60dcd2b97d --- /dev/null +++ b/dev-util/bpftool/bpftool-7.4.0.ebuild @@ -0,0 +1,132 @@ +# Copyright 2021-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +LLVM_COMPAT=( {15..19} ) +LLVM_OPTIONAL=1 +PYTHON_COMPAT=( python3_{10..13} ) + +inherit bash-completion-r1 linux-info llvm-r1 optfeature python-any-r1 toolchain-funcs + +DESCRIPTION="Tool for inspection and simple manipulation of eBPF programs and maps" +HOMEPAGE="https://github.com/libbpf/bpftool" + +if [[ ${PV} == *9999* ]] ; then + inherit git-r3 + EGIT_REPO_URI="https://github.com/libbpf/bpftool.git" + EGIT_SUBMODULES=(libbpf) +else + # bpftool typically vendors whatever libbpf is current at the time + # of a release, while libbpf publishes minor updates more frequently. + # Uncomment the following to bundle an updated libbpf e.g. in case of + # security or crasher bugs in libbpf and to keep the two synchronized. + # This allows us to quickly update the vendored lib with a revbump. + # Currently bpftool-x.y vendors libbpf-1.y; DO NOT mix different y versions. + # See the libbpf repo (https://github.com/libbpf/libbpf) for possible updates. + LIBBPF_VERSION=1.4.7 + + if [[ ! -z ${LIBBPF_VERSION} ]] ; then + SRC_URI="https://github.com/libbpf/bpftool/archive/refs/tags/v${PV}.tar.gz -> bpftool-${PV}.tar.gz + https://github.com/libbpf/libbpf/archive/refs/tags/v${LIBBPF_VERSION}.tar.gz + -> libbpf-${LIBBPF_VERSION}.tar.gz" + else + # use tarball with bundled libbpf + SRC_URI="https://github.com/libbpf/bpftool/releases/download/v${PV}/bpftool-libbpf-v${PV}-sources.tar.gz" + S="${WORKDIR}/bpftool-libbpf-v${PV}-sources" + fi + + KEYWORDS="~amd64 ~arm ~arm64 ~loong ~ppc ~ppc64 ~riscv ~x86" +fi + +LICENSE="|| ( GPL-2 BSD-2 )" +SLOT="0" +IUSE="caps llvm" +REQUIRED_USE="llvm? ( ${LLVM_REQUIRED_USE} )" + +RDEPEND=" + caps? ( sys-libs/libcap:= ) + llvm? ( $(llvm_gen_dep 'sys-devel/llvm:${LLVM_SLOT}') ) + !llvm? ( sys-libs/binutils-libs:= ) + sys-libs/zlib:= + virtual/libelf:= +" +DEPEND=" + ${RDEPEND} + >=sys-kernel/linux-headers-5.8 +" +BDEPEND=" + ${PYTHON_DEPS} + app-arch/tar + dev-python/docutils +" + +CONFIG_CHECK="~DEBUG_INFO_BTF" + +PATCHES=( + "${FILESDIR}"/7.4-001-mount-bpffs-on-provided-dir-instead-of-parent-dir.patch + "${FILESDIR}"/7.4-002-set-DESTDIR-to-empty-when-building-libbpf.patch + "${FILESDIR}"/7.4-003-fix-typo-in-usage-help.patch + "${FILESDIR}"/7.4-004-fix-the-wrong-format-specifier.patch + "${FILESDIR}"/7.4-005-fix-undefined-behavior-caused-by-shifting-into-the-sign-bit.patch + "${FILESDIR}"/7.4-006-fix-undefined-behavior-in-qsort.patch + "${FILESDIR}"/7.4-007-define-PACKAGE-at-build-time-when-trying-to-detect-libbfd.patch + "${FILESDIR}"/7.4-008-always-disable-unused-CLI-arguments-warning-for-feature-probe.patch +) + +pkg_setup() { + python-any-r1_pkg_setup + use llvm && llvm-r1_pkg_setup +} + +src_prepare() { + default + + # prepare libbpf if necessary + if [[ ! -z ${LIBBPF_VERSION} ]] ; then + rm -rf libbpf || die + ln -s "${WORKDIR}/libbpf-${LIBBPF_VERSION}" libbpf || die + fi + + # remove -Werror from libbpf (bug 887981) + sed -i -e 's/\-Werror//g' libbpf/src/Makefile || die + + # remove -Werror from bpftool feature detection + sed -i -e 's/-Werror//g' src/Makefile.feature || die + + # remove hardcoded/unhelpful flags from bpftool + sed -i -e '/CFLAGS += -O2/d' -e 's/-W //g' -e 's/-Wextra //g' src/Makefile || die + + # Use rst2man or rst2man.py depending on which one exists (#930076) + type -P rst2man >/dev/null || sed -i -e 's/rst2man/rst2man.py/g' docs/Makefile || die +} + +bpftool_make() { + tc-export AR CC LD + + emake \ + ARCH="$(tc-arch-kernel)" \ + HOSTAR="$(tc-getBUILD_AR)" \ + HOSTCC="$(tc-getBUILD_CC)" \ + HOSTLD="$(tc-getBUILD_LD)" \ + bash_compdir="$(get_bashcompdir)" \ + feature-libcap="$(usex caps 1 0)" \ + feature-llvm="$(usex llvm 1 0)" \ + prefix="${EPREFIX}"/usr \ + V=1 \ + "$@" +} + +src_compile() { + bpftool_make -C src + bpftool_make -C docs +} + +src_install() { + bpftool_make DESTDIR="${D}" -C src install + bpftool_make mandir="${ED}"/usr/share/man -C docs install +} + +pkg_postinst() { + optfeature "clang-bpf-co-re support" sys-devel/clang[llvm_targets_BPF] +} diff --git a/dev-util/bpftool/bpftool-9999.ebuild b/dev-util/bpftool/bpftool-9999.ebuild new file mode 100644 index 000000000000..03f97becf881 --- /dev/null +++ b/dev-util/bpftool/bpftool-9999.ebuild @@ -0,0 +1,121 @@ +# Copyright 2021-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +LLVM_COMPAT=( {15..19} ) +LLVM_OPTIONAL=1 +PYTHON_COMPAT=( python3_{10..13} ) + +inherit bash-completion-r1 linux-info llvm-r1 optfeature python-any-r1 toolchain-funcs + +DESCRIPTION="Tool for inspection and simple manipulation of eBPF programs and maps" +HOMEPAGE="https://github.com/libbpf/bpftool" + +if [[ ${PV} == *9999* ]] ; then + inherit git-r3 + EGIT_REPO_URI="https://github.com/libbpf/bpftool.git" + EGIT_SUBMODULES=(libbpf) +else + # bpftool typically vendors whatever libbpf is current at the time + # of a release, while libbpf publishes minor updates more frequently. + # Uncomment the following to bundle an updated libbpf e.g. in case of + # security or crasher bugs in libbpf and to keep the two synchronized. + # This allows us to quickly update the vendored lib with a revbump. + # Currently bpftool-x.y vendors libbpf-1.y; DO NOT mix different y versions. + # See the libbpf repo (https://github.com/libbpf/libbpf) for possible updates. + # LIBBPF_VERSION=1.5.0 + + if [[ ! -z ${LIBBPF_VERSION} ]] ; then + SRC_URI="https://github.com/libbpf/bpftool/archive/refs/tags/v${PV}.tar.gz -> bpftool-${PV}.tar.gz + https://github.com/libbpf/libbpf/archive/refs/tags/v${LIBBPF_VERSION}.tar.gz + -> libbpf-${LIBBPF_VERSION}.tar.gz" + else + # use tarball with bundled libbpf + SRC_URI="https://github.com/libbpf/bpftool/releases/download/v${PV}/bpftool-libbpf-v${PV}-sources.tar.gz" + S="${WORKDIR}/bpftool-libbpf-v${PV}-sources" + fi + + KEYWORDS="~amd64 ~arm ~arm64 ~loong ~ppc ~ppc64 ~riscv ~x86" +fi + +LICENSE="|| ( GPL-2 BSD-2 )" +SLOT="0" +IUSE="caps llvm" +REQUIRED_USE="llvm? ( ${LLVM_REQUIRED_USE} )" + +RDEPEND=" + caps? ( sys-libs/libcap:= ) + llvm? ( $(llvm_gen_dep 'sys-devel/llvm:${LLVM_SLOT}') ) + !llvm? ( sys-libs/binutils-libs:= ) + sys-libs/zlib:= + virtual/libelf:= +" +DEPEND=" + ${RDEPEND} + >=sys-kernel/linux-headers-5.8 +" +BDEPEND=" + ${PYTHON_DEPS} + app-arch/tar + dev-python/docutils +" + +CONFIG_CHECK="~DEBUG_INFO_BTF" + +pkg_setup() { + python-any-r1_pkg_setup + use llvm && llvm-r1_pkg_setup +} + +src_prepare() { + default + + # prepare libbpf if necessary + if [[ ! -z ${LIBBPF_VERSION} ]] ; then + rm -rf libbpf || die + ln -s "${WORKDIR}/libbpf-${LIBBPF_VERSION}" libbpf || die + fi + + # remove -Werror from libbpf (bug 887981) + sed -i -e 's/\-Werror//g' libbpf/src/Makefile || die + + # remove -Werror from bpftool feature detection + sed -i -e 's/-Werror//g' src/Makefile.feature || die + + # remove hardcoded/unhelpful flags from bpftool + sed -i -e '/CFLAGS += -O2/d' -e 's/-W //g' -e 's/-Wextra //g' src/Makefile || die + + # Use rst2man or rst2man.py depending on which one exists (#930076) + type -P rst2man >/dev/null || sed -i -e 's/rst2man/rst2man.py/g' docs/Makefile || die +} + +bpftool_make() { + tc-export AR CC LD + + emake \ + ARCH="$(tc-arch-kernel)" \ + HOSTAR="$(tc-getBUILD_AR)" \ + HOSTCC="$(tc-getBUILD_CC)" \ + HOSTLD="$(tc-getBUILD_LD)" \ + bash_compdir="$(get_bashcompdir)" \ + feature-libcap="$(usex caps 1 0)" \ + feature-llvm="$(usex llvm 1 0)" \ + prefix="${EPREFIX}"/usr \ + V=1 \ + "$@" +} + +src_compile() { + bpftool_make -C src + bpftool_make -C docs +} + +src_install() { + bpftool_make DESTDIR="${D}" -C src install + bpftool_make mandir="${ED}"/usr/share/man -C docs install +} + +pkg_postinst() { + optfeature "clang-bpf-co-re support" sys-devel/clang[llvm_targets_BPF] +} diff --git a/dev-util/bpftool/files/7.4-001-mount-bpffs-on-provided-dir-instead-of-parent-dir.patch b/dev-util/bpftool/files/7.4-001-mount-bpffs-on-provided-dir-instead-of-parent-dir.patch new file mode 100644 index 000000000000..c874555d3799 --- /dev/null +++ b/dev-util/bpftool/files/7.4-001-mount-bpffs-on-provided-dir-instead-of-parent-dir.patch @@ -0,0 +1,255 @@ +From 54bcb7c7fecb33d40266223d4bba49ad38e59ee3 Mon Sep 17 00:00:00 2001 +From: Sahil Siddiq +Date: Fri, 5 Apr 2024 00:52:19 +0530 +Subject: [PATCH] bpftool: Mount bpffs on provided dir instead of parent dir + +When pinning programs/objects under PATH (eg: during "bpftool prog +loadall") the bpffs is mounted on the parent dir of PATH in the +following situations: +- the given dir exists but it is not bpffs. +- the given dir doesn't exist and the parent dir is not bpffs. + +Mounting on the parent dir can also have the unintentional side- +effect of hiding other files located under the parent dir. + +If the given dir exists but is not bpffs, then the bpffs should +be mounted on the given dir and not its parent dir. + +Similarly, if the given dir doesn't exist and its parent dir is not +bpffs, then the given dir should be created and the bpffs should be +mounted on this new dir. + +Fixes: 2a36c26fe3b8 ("bpftool: Support bpffs mountpoint as pin path for prog loadall") +Signed-off-by: Sahil Siddiq +Signed-off-by: Andrii Nakryiko +Link: https://lore.kernel.org/bpf/2da44d24-74ae-a564-1764-afccf395eeec@isovalent.com/T/#t +Link: https://lore.kernel.org/bpf/20240404192219.52373-1-icegambit91@gmail.com + +Closes: https://github.com/libbpf/bpftool/issues/100 + +Changes since v1: + - Split "mount_bpffs_for_pin" into two functions. + This is done to improve maintainability and readability. + +Changes since v2: +- mount_bpffs_for_pin: rename to "create_and_mount_bpffs_dir". +- mount_bpffs_given_file: rename to "mount_bpffs_given_file". +- create_and_mount_bpffs_dir: + - introduce "dir_exists" boolean. + - remove new dir if "mnt_fs" fails. +- improve error handling and error messages. + +Changes since v3: +- Rectify function name. +- Improve error messages and formatting. +- mount_bpffs_for_file: + - Check if dir exists before block_mount check. + +Changes since v4: +- Use strdup instead of strcpy. +- create_and_mount_bpffs_dir: + - Use S_IRWXU instead of 0700. +- Improve error handling and formatting. +--- + src/common.c | 96 ++++++++++++++++++++++++++++++++++++++++++------ + src/iter.c | 2 +- + src/main.h | 3 +- + src/prog.c | 5 ++- + src/struct_ops.c | 2 +- + 5 files changed, 92 insertions(+), 16 deletions(-) + +diff --git a/src/common.c b/src/common.c +index cc6e6aae..958e92ac 100644 +--- a/src/common.c ++++ b/src/common.c +@@ -244,29 +244,101 @@ int open_obj_pinned_any(const char *path, enum bpf_obj_type exp_type) + return fd; + } + +-int mount_bpffs_for_pin(const char *name, bool is_dir) ++int create_and_mount_bpffs_dir(const char *dir_name) + { + char err_str[ERR_MAX_LEN]; +- char *file; +- char *dir; ++ bool dir_exists; + int err = 0; + +- if (is_dir && is_bpffs(name)) ++ if (is_bpffs(dir_name)) + return err; + +- file = malloc(strlen(name) + 1); +- if (!file) { ++ dir_exists = access(dir_name, F_OK) == 0; ++ ++ if (!dir_exists) { ++ char *temp_name; ++ char *parent_name; ++ ++ temp_name = strdup(dir_name); ++ if (!temp_name) { ++ p_err("mem alloc failed"); ++ return -1; ++ } ++ ++ parent_name = dirname(temp_name); ++ ++ if (is_bpffs(parent_name)) { ++ /* nothing to do if already mounted */ ++ free(temp_name); ++ return err; ++ } ++ ++ if (access(parent_name, F_OK) == -1) { ++ p_err("can't create dir '%s' to pin BPF object: parent dir '%s' doesn't exist", ++ dir_name, parent_name); ++ free(temp_name); ++ return -1; ++ } ++ ++ free(temp_name); ++ } ++ ++ if (block_mount) { ++ p_err("no BPF file system found, not mounting it due to --nomount option"); ++ return -1; ++ } ++ ++ if (!dir_exists) { ++ err = mkdir(dir_name, S_IRWXU); ++ if (err) { ++ p_err("failed to create dir '%s': %s", dir_name, strerror(errno)); ++ return err; ++ } ++ } ++ ++ err = mnt_fs(dir_name, "bpf", err_str, ERR_MAX_LEN); ++ if (err) { ++ err_str[ERR_MAX_LEN - 1] = '\0'; ++ p_err("can't mount BPF file system on given dir '%s': %s", ++ dir_name, err_str); ++ ++ if (!dir_exists) ++ rmdir(dir_name); ++ } ++ ++ return err; ++} ++ ++int mount_bpffs_for_file(const char *file_name) ++{ ++ char err_str[ERR_MAX_LEN]; ++ char *temp_name; ++ char *dir; ++ int err = 0; ++ ++ if (access(file_name, F_OK) != -1) { ++ p_err("can't pin BPF object: path '%s' already exists", file_name); ++ return -1; ++ } ++ ++ temp_name = strdup(file_name); ++ if (!temp_name) { + p_err("mem alloc failed"); + return -1; + } + +- strcpy(file, name); +- dir = dirname(file); ++ dir = dirname(temp_name); + + if (is_bpffs(dir)) + /* nothing to do if already mounted */ + goto out_free; + ++ if (access(dir, F_OK) == -1) { ++ p_err("can't pin BPF object: dir '%s' doesn't exist", dir); ++ err = -1; ++ goto out_free; ++ } ++ + if (block_mount) { + p_err("no BPF file system found, not mounting it due to --nomount option"); + err = -1; +@@ -276,12 +348,12 @@ int mount_bpffs_for_pin(const char *name, bool is_dir) + err = mnt_fs(dir, "bpf", err_str, ERR_MAX_LEN); + if (err) { + err_str[ERR_MAX_LEN - 1] = '\0'; +- p_err("can't mount BPF file system to pin the object (%s): %s", +- name, err_str); ++ p_err("can't mount BPF file system to pin the object '%s': %s", ++ file_name, err_str); + } + + out_free: +- free(file); ++ free(temp_name); + return err; + } + +@@ -289,7 +361,7 @@ int do_pin_fd(int fd, const char *name) + { + int err; + +- err = mount_bpffs_for_pin(name, false); ++ err = mount_bpffs_for_file(name); + if (err) + return err; + +diff --git a/src/iter.c b/src/iter.c +index 6b0e5202..5c39c2ed 100644 +--- a/src/iter.c ++++ b/src/iter.c +@@ -76,7 +76,7 @@ static int do_pin(int argc, char **argv) + goto close_obj; + } + +- err = mount_bpffs_for_pin(path, false); ++ err = mount_bpffs_for_file(path); + if (err) + goto close_link; + +diff --git a/src/main.h b/src/main.h +index b8bb08d1..9eb764fe 100644 +--- a/src/main.h ++++ b/src/main.h +@@ -142,7 +142,8 @@ const char *get_fd_type_name(enum bpf_obj_type type); + char *get_fdinfo(int fd, const char *key); + int open_obj_pinned(const char *path, bool quiet); + int open_obj_pinned_any(const char *path, enum bpf_obj_type exp_type); +-int mount_bpffs_for_pin(const char *name, bool is_dir); ++int mount_bpffs_for_file(const char *file_name); ++int create_and_mount_bpffs_dir(const char *dir_name); + int do_pin_any(int argc, char **argv, int (*get_fd_by_id)(int *, char ***)); + int do_pin_fd(int fd, const char *name); + +diff --git a/src/prog.c b/src/prog.c +index 9cb42a33..4c4cf16a 100644 +--- a/src/prog.c ++++ b/src/prog.c +@@ -1778,7 +1778,10 @@ static int load_with_options(int argc, char **argv, bool first_prog_only) + goto err_close_obj; + } + +- err = mount_bpffs_for_pin(pinfile, !first_prog_only); ++ if (first_prog_only) ++ err = mount_bpffs_for_file(pinfile); ++ else ++ err = create_and_mount_bpffs_dir(pinfile); + if (err) + goto err_close_obj; + +diff --git a/src/struct_ops.c b/src/struct_ops.c +index d573f264..aa43dead 100644 +--- a/src/struct_ops.c ++++ b/src/struct_ops.c +@@ -515,7 +515,7 @@ static int do_register(int argc, char **argv) + if (argc == 1) + linkdir = GET_ARG(); + +- if (linkdir && mount_bpffs_for_pin(linkdir, true)) { ++ if (linkdir && create_and_mount_bpffs_dir(linkdir)) { + p_err("can't mount bpffs for pinning"); + return -1; + } diff --git a/dev-util/bpftool/files/7.4-002-set-DESTDIR-to-empty-when-building-libbpf.patch b/dev-util/bpftool/files/7.4-002-set-DESTDIR-to-empty-when-building-libbpf.patch new file mode 100644 index 000000000000..2eb6e72d0279 --- /dev/null +++ b/dev-util/bpftool/files/7.4-002-set-DESTDIR-to-empty-when-building-libbpf.patch @@ -0,0 +1,38 @@ +From 06c61eccd3b8a6ff3df3e451a2a93058913124fc Mon Sep 17 00:00:00 2001 +From: jinzhiguang +Date: Sun, 7 Apr 2024 16:54:33 +0800 +Subject: [PATCH] mirror: Set DESTDIR to empty when building libbpf + +If a value is assigned to the variable DESTDIR when compiling bpftool, +this variable will be passed to libbpf's Makefile. + +In this case, libbpf's header files will be installed in an unexpected +directory, causing bpftool to be unable to find the header files. + +Signed-off-by: jinzhiguang +--- + src/Makefile | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/src/Makefile b/src/Makefile +index a3bc6a0..d48d22f 100644 +--- a/src/Makefile ++++ b/src/Makefile +@@ -42,7 +42,7 @@ $(LIBBPF_OUTPUT) $(BOOTSTRAP_OUTPUT) $(LIBBPF_BOOTSTRAP_OUTPUT) $(LIBBPF_HDRS_DI + + $(LIBBPF): $(wildcard $(BPF_DIR)/*.[ch] $(BPF_DIR)/Makefile) | $(LIBBPF_OUTPUT) + $(Q)$(MAKE) -C $(BPF_DIR) OBJDIR=$(patsubst %/,%,$(LIBBPF_OUTPUT)) \ +- PREFIX=$(LIBBPF_DESTDIR:/=) $(LIBBPF) install_headers ++ DESTDIR="" PREFIX=$(LIBBPF_DESTDIR:/=) $(LIBBPF) install_headers + + $(LIBBPF_INTERNAL_HDRS): $(LIBBPF_HDRS_DIR)/%.h: $(BPF_DIR)/%.h | $(LIBBPF_HDRS_DIR) + $(call QUIET_INSTALL, $@) +@@ -50,7 +50,7 @@ $(LIBBPF_INTERNAL_HDRS): $(LIBBPF_HDRS_DIR)/%.h: $(BPF_DIR)/%.h | $(LIBBPF_HDRS_ + + $(LIBBPF_BOOTSTRAP): $(wildcard $(BPF_DIR)/*.[ch] $(BPF_DIR)/Makefile) | $(LIBBPF_BOOTSTRAP_OUTPUT) + $(Q)$(MAKE) -C $(BPF_DIR) OBJDIR=$(patsubst %/,%,$(LIBBPF_BOOTSTRAP_OUTPUT)) \ +- PREFIX=$(LIBBPF_BOOTSTRAP_DESTDIR:/=) \ ++ DESTDIR="" PREFIX=$(LIBBPF_BOOTSTRAP_DESTDIR:/=) \ + ARCH= CROSS_COMPILE= CC="$(HOSTCC)" LD="$(HOSTLD)" AR="$(HOSTAR)" $@ install_headers + + $(LIBBPF_BOOTSTRAP_INTERNAL_HDRS): $(LIBBPF_BOOTSTRAP_HDRS_DIR)/%.h: $(BPF_DIR)/%.h | $(LIBBPF_BOOTSTRAP_HDRS_DIR) diff --git a/dev-util/bpftool/files/7.4-003-fix-typo-in-usage-help.patch b/dev-util/bpftool/files/7.4-003-fix-typo-in-usage-help.patch new file mode 100644 index 000000000000..fc488aca5b02 --- /dev/null +++ b/dev-util/bpftool/files/7.4-003-fix-typo-in-usage-help.patch @@ -0,0 +1,30 @@ +From a44a93bb7ed0d8e62220b534df92ea2a678fb4b7 Mon Sep 17 00:00:00 2001 +From: Donald Hunter +Date: Wed, 17 Jul 2024 14:45:08 +0100 +Subject: [PATCH] bpftool: Fix typo in usage help + +The usage help for "bpftool prog help" contains a ° instead of the _ +symbol for cgroup/sendmsg_unix. Fix the typo. + +Fixes: 8b3cba987e6d ("bpftool: Add support for cgroup unix socket address hooks") +Signed-off-by: Donald Hunter +Signed-off-by: Daniel Borkmann +Acked-by: Quentin Monnet +Link: https://lore.kernel.org/bpf/20240717134508.77488-1-donald.hunter@gmail.com +--- + src/prog.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/prog.c b/src/prog.c +index 40ea743..2ff949e 100644 +--- a/src/prog.c ++++ b/src/prog.c +@@ -2489,7 +2489,7 @@ static int do_help(int argc, char **argv) + " cgroup/connect_unix | cgroup/getpeername4 | cgroup/getpeername6 |\n" + " cgroup/getpeername_unix | cgroup/getsockname4 | cgroup/getsockname6 |\n" + " cgroup/getsockname_unix | cgroup/sendmsg4 | cgroup/sendmsg6 |\n" +- " cgroup/sendmsg°unix | cgroup/recvmsg4 | cgroup/recvmsg6 | cgroup/recvmsg_unix |\n" ++ " cgroup/sendmsg_unix | cgroup/recvmsg4 | cgroup/recvmsg6 | cgroup/recvmsg_unix |\n" + " cgroup/getsockopt | cgroup/setsockopt | cgroup/sock_release |\n" + " struct_ops | fentry | fexit | freplace | sk_lookup }\n" + " ATTACH_TYPE := { sk_msg_verdict | sk_skb_verdict | sk_skb_stream_verdict |\n" diff --git a/dev-util/bpftool/files/7.4-004-fix-the-wrong-format-specifier.patch b/dev-util/bpftool/files/7.4-004-fix-the-wrong-format-specifier.patch new file mode 100644 index 000000000000..19dfa0c00746 --- /dev/null +++ b/dev-util/bpftool/files/7.4-004-fix-the-wrong-format-specifier.patch @@ -0,0 +1,38 @@ +From cb035aad23cf92254d8d3c7631e5b642e6805bd1 Mon Sep 17 00:00:00 2001 +From: Zhu Jun +Date: Wed, 24 Jul 2024 04:11:20 -0700 +Subject: [PATCH] tools/bpf: Fix the wrong format specifier + +The format specifier of "unsigned int" in printf() should be "%u", not +"%d". + +Signed-off-by: Zhu Jun +Signed-off-by: Andrii Nakryiko +Acked-by: Quentin Monnet +Link: https://lore.kernel.org/bpf/20240724111120.11625-1-zhujun2@cmss.chinamobile.com +--- + src/xlated_dumper.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/src/xlated_dumper.c b/src/xlated_dumper.c +index 567f56d..d009434 100644 +--- a/src/xlated_dumper.c ++++ b/src/xlated_dumper.c +@@ -349,7 +349,7 @@ void dump_xlated_plain(struct dump_data *dd, void *buf, unsigned int len, + + double_insn = insn[i].code == (BPF_LD | BPF_IMM | BPF_DW); + +- printf("% 4d: ", i); ++ printf("%4u: ", i); + print_bpf_insn(&cbs, insn + i, true); + + if (opcodes) { +@@ -415,7 +415,7 @@ void dump_xlated_for_graph(struct dump_data *dd, void *buf_start, void *buf_end, + } + } + +- printf("%d: ", insn_off); ++ printf("%u: ", insn_off); + print_bpf_insn(&cbs, cur, true); + + if (opcodes) { diff --git a/dev-util/bpftool/files/7.4-005-fix-undefined-behavior-caused-by-shifting-into-the-sign-bit.patch b/dev-util/bpftool/files/7.4-005-fix-undefined-behavior-caused-by-shifting-into-the-sign-bit.patch new file mode 100644 index 000000000000..90c3499ec0b3 --- /dev/null +++ b/dev-util/bpftool/files/7.4-005-fix-undefined-behavior-caused-by-shifting-into-the-sign-bit.patch @@ -0,0 +1,47 @@ +From a0f887bbdc525006f7662f4a83e240f2c46d3418 Mon Sep 17 00:00:00 2001 +From: Kuan-Wei Chiu +Date: Sun, 8 Sep 2024 22:00:09 +0800 +Subject: [PATCH] bpftool: Fix undefined behavior caused by shifting into the sign bit + +Replace shifts of '1' with '1U' in bitwise operations within +__show_dev_tc_bpf() to prevent undefined behavior caused by shifting +into the sign bit of a signed integer. By using '1U', the operations +are explicitly performed on unsigned integers, avoiding potential +integer overflow or sign-related issues. + +Signed-off-by: Kuan-Wei Chiu +Signed-off-by: Andrii Nakryiko +Acked-by: Quentin Monnet +Link: https://lore.kernel.org/bpf/20240908140009.3149781-1-visitorckw@gmail.com +--- + src/net.c | 8 ++++---- + 1 file changed, 4 insertions(+), 4 deletions(-) + +diff --git a/src/net.c b/src/net.c +index 2a51f1c..3c50fc6 100644 +--- a/src/net.c ++++ b/src/net.c +@@ -486,9 +486,9 @@ static void __show_dev_tc_bpf(const struct ip_devname_ifindex *dev, + if (prog_flags[i] || json_output) { + NET_START_ARRAY("prog_flags", "%s "); + for (j = 0; prog_flags[i] && j < 32; j++) { +- if (!(prog_flags[i] & (1 << j))) ++ if (!(prog_flags[i] & (1U << j))) + continue; +- NET_DUMP_UINT_ONLY(1 << j); ++ NET_DUMP_UINT_ONLY(1U << j); + } + NET_END_ARRAY(""); + } +@@ -497,9 +497,9 @@ static void __show_dev_tc_bpf(const struct ip_devname_ifindex *dev, + if (link_flags[i] || json_output) { + NET_START_ARRAY("link_flags", "%s "); + for (j = 0; link_flags[i] && j < 32; j++) { +- if (!(link_flags[i] & (1 << j))) ++ if (!(link_flags[i] & (1U << j))) + continue; +- NET_DUMP_UINT_ONLY(1 << j); ++ NET_DUMP_UINT_ONLY(1U << j); + } + NET_END_ARRAY(""); + } diff --git a/dev-util/bpftool/files/7.4-006-fix-undefined-behavior-in-qsort.patch b/dev-util/bpftool/files/7.4-006-fix-undefined-behavior-in-qsort.patch new file mode 100644 index 000000000000..466258112b18 --- /dev/null +++ b/dev-util/bpftool/files/7.4-006-fix-undefined-behavior-in-qsort.patch @@ -0,0 +1,49 @@ +From 37e304df400c69347189449b38864705cc88b987 Mon Sep 17 00:00:00 2001 +From: Kuan-Wei Chiu +Date: Tue, 10 Sep 2024 23:02:07 +0800 +Subject: [PATCH] bpftool: Fix undefined behavior in qsort(NULL, 0, ...) + +When netfilter has no entry to display, qsort is called with +qsort(NULL, 0, ...). This results in undefined behavior, as UBSan +reports: + +net.c:827:2: runtime error: null pointer passed as argument 1, which is declared to never be null + +Although the C standard does not explicitly state whether calling qsort +with a NULL pointer when the size is 0 constitutes undefined behavior, +Section 7.1.4 of the C standard (Use of library functions) mentions: + +"Each of the following statements applies unless explicitly stated +otherwise in the detailed descriptions that follow: If an argument to a +function has an invalid value (such as a value outside the domain of +the function, or a pointer outside the address space of the program, or +a null pointer, or a pointer to non-modifiable storage when the +corresponding parameter is not const-qualified) or a type (after +promotion) not expected by a function with variable number of +arguments, the behavior is undefined." + +To avoid this, add an early return when nf_link_info is NULL to prevent +calling qsort with a NULL pointer. + +Signed-off-by: Kuan-Wei Chiu +Signed-off-by: Andrii Nakryiko +Reviewed-by: Quentin Monnet +Link: https://lore.kernel.org/bpf/20240910150207.3179306-1-visitorckw@gmail.com +--- + src/net.c | 3 +++ + 1 file changed, 3 insertions(+) + +diff --git a/src/net.c b/src/net.c +index 3c50fc6..d2242d9 100644 +--- a/src/net.c ++++ b/src/net.c +@@ -880,6 +880,9 @@ static void show_link_netfilter(void) + nf_link_count++; + } + ++ if (!nf_link_info) ++ return; ++ + qsort(nf_link_info, nf_link_count, sizeof(*nf_link_info), netfilter_link_compar); + + for (id = 0; id < nf_link_count; id++) { diff --git a/dev-util/bpftool/files/7.4-007-define-PACKAGE-at-build-time-when-trying-to-detect-libbfd.patch b/dev-util/bpftool/files/7.4-007-define-PACKAGE-at-build-time-when-trying-to-detect-libbfd.patch new file mode 100644 index 000000000000..c88cbdf367c4 --- /dev/null +++ b/dev-util/bpftool/files/7.4-007-define-PACKAGE-at-build-time-when-trying-to-detect-libbfd.patch @@ -0,0 +1,48 @@ +From bf9e0609acb97d73a7ebf3e8910b0119cd943dfb Mon Sep 17 00:00:00 2001 +From: Quentin Monnet +Date: Mon, 14 Oct 2024 17:43:25 +0100 +Subject: [PATCH] mirror: Define PACKAGE at build time when trying to detect libbfd + +Feature detection from the Makefile.feature for libbfd (with the +different variants of the probe) may fail on some systems where the +bfd.h and dis-asm.h headers expect the PACKAGE or PACKAGE_VERSION macros +to be defined [0]. In the kernel tree, feature detection addresses it by +defining the PACKAGE macro when invoking the compiler [1]. Add a similar +definition for the mirror repository. + +Note that this issue has remained undetected for a while. This is +because the bfd.h included in some distributions (Debian/Ubuntu, for +example) does not contain the inclusion guard [2]. + +[0] https://sourceware.org/git/?p=binutils-gdb.git;a=blob;f=bfd/bfd-in.h;h=04e65aad5f0c235a5013513c545e57a01e96541f;hb=binutils-2_43_1#l27 +[1] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/tools/build/feature/Makefile?h=v6.11#n114 +[2] https://git.launchpad.net/ubuntu/+source/binutils/tree/debian/rules?h=applied/2.43.1-5#n1031 + +Reported-by: Holger Hoffstätte +Signed-off-by: Quentin Monnet +--- + src/Makefile.feature | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/src/Makefile.feature b/src/Makefile.feature +index 131c67e..90f9e7c 100644 +--- a/src/Makefile.feature ++++ b/src/Makefile.feature +@@ -45,7 +45,7 @@ LIBBFD_PROBE += ' bfd_demangle(0, 0, 0);' + LIBBFD_PROBE += ' return 0;' + LIBBFD_PROBE += '}' + LIBBFD_PROBE_CMD = printf '%b\n' $(LIBBFD_PROBE) | \ +- $(CC) $(CFLAGS) -Wall -Werror -x c - $(1) -o /dev/null >/dev/null ++ $(CC) $(CFLAGS) -Wall -Werror -x c -DPACKAGE='"bpftool"' - $(1) -o /dev/null >/dev/null + + define libbfd_build + $(call detect,$(LIBBFD_PROBE_CMD)) +@@ -78,7 +78,7 @@ DISASSEMBLER_PROBE += ' return 0;' + DISASSEMBLER_PROBE += '}' + + DISASSEMBLER_PROBE_CMD = printf '%b\n' $(1) | \ +- $(CC) $(CFLAGS) -Wall -Werror -x c - -lbfd -lopcodes -S -o - >/dev/null ++ $(CC) $(CFLAGS) -Wall -Werror -x c -DPACKAGE='"bpftool"' - -lbfd -lopcodes -S -o - >/dev/null + define disassembler_build + $(call detect,$(DISASSEMBLER_PROBE_CMD)) + endef diff --git a/dev-util/bpftool/files/7.4-008-always-disable-unused-CLI-arguments-warning-for-feature-probe.patch b/dev-util/bpftool/files/7.4-008-always-disable-unused-CLI-arguments-warning-for-feature-probe.patch new file mode 100644 index 000000000000..399b824ce06b --- /dev/null +++ b/dev-util/bpftool/files/7.4-008-always-disable-unused-CLI-arguments-warning-for-feature-probe.patch @@ -0,0 +1,38 @@ +From 3be8ac358900c5f57028b2b6501407a14167a9bb Mon Sep 17 00:00:00 2001 +From: Quentin Monnet +Date: Thu, 17 Oct 2024 11:22:14 +0100 +Subject: [PATCH] mirror: Always disable unused CLI arguments warning for feature probe + +In commit 8a2d7d510ccd ("mirror: Fix features detection for building +with clang") we prevented clang to error out when encountering unused +command-line arguments in the feature probes, because we do add unused +arguments for some of the probes when retrieving arguments from +llvm-config, and we don't want probes to fail because of that. + +At the time, the issue was apparent for the LLVM-based disassembler, so +we added -Wno-unused-command-line-argument when $(LLVM) was enabled, +only. We missed the case when we're building bpftool with clang instead +of gcc, without building the LLVM disassembler. Let's disable the +warning unconditionally instead to fix this case. + +Reported-by: Holger Hoffstätte +Signed-off-by: Quentin Monnet +--- + src/Makefile.feature | 4 +--- + 1 file changed, 1 insertion(+), 3 deletions(-) + +diff --git a/src/Makefile.feature b/src/Makefile.feature +index 90f9e7c..b08e7b9 100644 +--- a/src/Makefile.feature ++++ b/src/Makefile.feature +@@ -4,9 +4,7 @@ pound := \# + + CFLAGS_BACKUP := $(CFLAGS) + CFLAGS := $(EXTRA_CFLAGS) +-ifneq ($(LLVM),) +- CFLAGS += -Wno-unused-command-line-argument +-endif ++CFLAGS += -Wno-unused-command-line-argument + + ifeq ($(V),1) + LOG=$(warning $(1)) diff --git a/dev-util/bpftool/metadata.xml b/dev-util/bpftool/metadata.xml index a09ffc7b9425..1e8c354ad0e2 100644 --- a/dev-util/bpftool/metadata.xml +++ b/dev-util/bpftool/metadata.xml @@ -13,4 +13,7 @@ Use sys-libs/libcap to enable unprivileged run support Use sys-devel/llvm instead of libbfd (sys-libs/binutils-libs) for JIT disassembly + + libbpf/bpftool + diff --git a/dev-util/desktop-file-utils/Manifest b/dev-util/desktop-file-utils/Manifest index a0c654d00966..75b3a8d038ac 100644 --- a/dev-util/desktop-file-utils/Manifest +++ b/dev-util/desktop-file-utils/Manifest @@ -1,5 +1,7 @@ AUX 50desktop-file-utils-gentoo.el 250 BLAKE2B 6778fd6faecc6afe376598cdab5d890364edc33f0a55983b9a1ae76bcaf78a784fae92eaa66dc24c270ecf160f747e848872fa17e9c331dce7ad2deb498492b1 SHA512 5fc03fb9c9eea7d4c19c9b263413fb4f7f247b6bd40a7452b26f7e175646dc9b3af945d25cafc42a01a8d95059324652c56baa4bb5768b62dbd58f3ae4f05fe3 DIST desktop-file-utils-0.27.tar.xz 80808 BLAKE2B 66708cd11d5f81824cad814846cdeac6c339e8e93a7f1dceaeed545d9dc1940523fd64ae890e54632b3d32cc91b258aabd41d6d467081539f978ae2993fdfb22 SHA512 81356239a92fb17885aa85a5192c84c2757ebb2e540920d0d41d07035795f08f4162f41b1a87bb2bfcf70ec61f19f1f158e4395a359f46b46f68cb9e24f259a8 +DIST desktop-file-utils-0.28.tar.xz 81620 BLAKE2B c5ef35ad1a7b8cebee72d512ea660546730624b95c22af6e0429976076bcc8ad9572d7ccf529363ac24846df7bfe447628c8da09f9efdf46b3177a9c73cc3985 SHA512 1024172fcd37ace0660fd58195c0562b47f1ef8ed37f662b88048c295a388d1458d01f86799b34ec9e8b27a7ea441f98665f0d641c29cb5ecc3abd7da41230f0 EBUILD desktop-file-utils-0.27-r1.ebuild 673 BLAKE2B 367514327bf5b6ad94845353b6c2cb347861cdb4a6c90dca5572d1c26b75f10c3bc84139f61a83228e770085b60fd12ebc5b68675ba21ad2f7a48b60b7aefd1b SHA512 e0adf8b9d14cd208bb0450154fbbdaae81d11683ba09205490575347bb590c5c9c28156c86c01ea5cdb8e0d5e6544a17638b75efc16356fd3f4907a515718143 EBUILD desktop-file-utils-0.27.ebuild 1132 BLAKE2B 03c571e7098c6039fc879a22a2d538c348599ae17991bbd9a560710b24c0a9e6c67e24eb9fa0d5ee83d4fa6176cec03dd9d594a656ebc6f5f4dc93c9e379a749 SHA512 212cd916da3982fb3203c428fe2db2b55025efc9aea1b80a6ca07cd6b98473ffcb34f7ac32f595087ffb0b7b41f5a848b9762436aa83f2c6cc8cdb5c68ab9b13 +EBUILD desktop-file-utils-0.28.ebuild 681 BLAKE2B 627091da8380c774aa974b5ec598ca39dcd9810bc715d322e60bd57d6046dd48685c5ad8ea73d57b3ef2067e948b3cd77a63d574499d7f30b9ab0f1a87d803c5 SHA512 496344412182eecd85e2c107d0c83c9eacca10eb1bad7b7174eb9eec1b32a8458476bcbf29e293f1c688d3fd56183fac84ea88b878c2fda0fae9e00e01ff38cc MISC metadata.xml 225 BLAKE2B 293ebc97ac40be7df2825c558f7def8026a2c8b49af06c8a5fc0dfb58657ee3093306f2a6b90bce5f7fc10f9c3165eee3cd77b58fcea8d293dacff5ba2f04657 SHA512 6f3645f7fe9f5362268973d150b122dcaef666c61e30ddc96917485c617568105aadf7b8d78bf06e402f8592c90369fdc7d949832b9fda13258b4693f1c4c6f3 diff --git a/dev-util/desktop-file-utils/desktop-file-utils-0.28.ebuild b/dev-util/desktop-file-utils/desktop-file-utils-0.28.ebuild new file mode 100644 index 000000000000..b516fba32bc8 --- /dev/null +++ b/dev-util/desktop-file-utils/desktop-file-utils-0.28.ebuild @@ -0,0 +1,23 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit meson + +DESCRIPTION="Command line utilities to work with desktop menu entries" +HOMEPAGE="https://freedesktop.org/wiki/Software/desktop-file-utils/" +SRC_URI="https://www.freedesktop.org/software/${PN}/releases/${P}.tar.xz" + +LICENSE="GPL-2+" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~arm64-macos ~x64-macos ~x64-solaris" + +RDEPEND=">=dev-libs/glib-2.26:2" +DEPEND="${RDEPEND}" +BDEPEND=" + app-arch/xz-utils + virtual/pkgconfig +" + +DOCS=( AUTHORS ChangeLog HACKING NEWS README ) diff --git a/dev-util/maturin/Manifest b/dev-util/maturin/Manifest index 3173674e934d..b6e77fed1de3 100644 --- a/dev-util/maturin/Manifest +++ b/dev-util/maturin/Manifest @@ -703,5 +703,5 @@ DIST zip-0.6.6.crate 65789 BLAKE2B acefc076297468d72cb20d8c6234fe5406875056fbf78 DIST zip-1.1.4.crate 77910 BLAKE2B 1c6a0e14becbb43faa9510d303ab254486e97730bc741c1fa3c7a88327da0b1e8815026e319abdbeb9e6c9e0ec713d83dbb3a0ae83a32ed2d197923afa803866 SHA512 18c8e7c9246049c7be4ade2bee501da2ff7cfe45aaab88e20650246833ae3f7b492644c0f4a43aa93a7ef7bf95413c9b27d0f5f8d099f19131a682b92a6d3fc4 EBUILD maturin-1.6.0.ebuild 12304 BLAKE2B f00ef36a7eb337dc2d7bb2cb0c9f5a0151ce87f20e262b3b992cc05b9ecd748996e60c4e572eb392dac5710b96c3d9cb937e26f9926c176f27ea8e6d0eda32d6 SHA512 fa144969049adabee32c4bc70bbc8ca83d3b4530521f17f74f32000aebb94f089fdc2878e4ec95d6b7e2063aeb369012b53845ca7980068b1998f382a3a9b249 EBUILD maturin-1.7.1.ebuild 11628 BLAKE2B 6f9974eb6eb6b1e2aace19244fbac999793a433fbc52a0f98d577e26662e68e2600d292b0f6fd28cef9ec2767c955bc0538050a52726146f6c83ee5952fe9d1c SHA512 9ebab27d674a6276228ddbb82ff03cf8d137d7f1dd4e807c87b100aacd908159401495f1080ca1afb3ffe413d39d43cea0eb92c6e9c0b094e41a27aadaf2af08 -EBUILD maturin-1.7.4.ebuild 12457 BLAKE2B c3d20cd420e142f002c29a34a553fb87ceb88c13404095e33ded5503e1e4ce47c81e42e59d366a8453749a36531e2c7fec6c6a3dfd83584ffdc38447302f4d41 SHA512 30403b506dd00d0952a8f324bdc07fff481b9bfa6890c904cc9d8e4683377e87f6b8546f552f0121d4debece2afd728c89993047fc1715dc5a1b4d034249afa7 +EBUILD maturin-1.7.4.ebuild 12456 BLAKE2B 89b083df8e7e47103521bfcbd2838f1ada88d51563918aa4b594311373fa50d83291fe9c47e3680af1b4ed9ec84e260c1cf9ddce436208c19c239bbf80ea79de SHA512 0daa023600b9e9f96564e2d94631670eb33ff315b94bf6143ff599e59c0d5a46a91970f7bce204c1d8a3a84494542ce45889e23bd12840e7d2565debe28960a6 MISC metadata.xml 431 BLAKE2B 15731479f56d8b819c60e8e5541d3c4720462c5a90b199b803097b208432b18cc0143f8cbee471ce81ffeb8b54846fdb61fad083e7507f4f6c3630ac628546ed SHA512 7431db948fd5ab520fb6cae76c7e7dbb2c7aef907d7cde21189d1bb17c686cca7f69a0b84470b1c5d90f672e80d30fbb56f37beec1da04ebfdf025015c099ae7 diff --git a/dev-util/maturin/maturin-1.7.4.ebuild b/dev-util/maturin/maturin-1.7.4.ebuild index 0cdb066ae28e..df02c5f7c88d 100644 --- a/dev-util/maturin/maturin-1.7.4.ebuild +++ b/dev-util/maturin/maturin-1.7.4.ebuild @@ -454,7 +454,7 @@ LICENSE+=" Unicode-DFS-2016 " # crates SLOT="0" -KEYWORDS="amd64 arm ~arm64 ~loong ~mips ppc ppc64 ~riscv ~s390 sparc x86" +KEYWORDS="amd64 arm arm64 ~loong ~mips ppc ppc64 ~riscv ~s390 sparc x86" IUSE="doc +ssl test" RESTRICT="!test? ( test )" diff --git a/dev-util/ruff/Manifest b/dev-util/ruff/Manifest index edd712c8045d..b18dc9498272 100644 --- a/dev-util/ruff/Manifest +++ b/dev-util/ruff/Manifest @@ -395,5 +395,5 @@ DIST zstd-0.11.2+zstd.1.5.2.crate 28987 BLAKE2B e04fe25ec6661819efeca08698c20792 DIST zstd-safe-5.0.2+zstd.1.5.2.crate 17273 BLAKE2B 74dc561046f9bc595c58b62bc6ff291325bc23fd06a1249148426bb853271393eab5121d2e1e29e433eff562c9eab72c1be265f3fe3bf14cc35d4a741db03c38 SHA512 03a6f07ada211fd6c364f03d06acff705fa5b08129aa09c29ad310f05b233553f8ea697e504470d4c104bd947f5d4102328c4df0df5e1da6d8e537f51451a014 DIST zstd-sys-2.0.11+zstd.1.5.6.crate 749078 BLAKE2B 6be19b2ea22e557a6b38bdb37c97817eb0a112fe9ad3626e822485a96f04087a79726b872d819ac05517dde56fb5eadd8f1e6885d356526c34635547bfe762d3 SHA512 37081282feffee1e78ddd8992ad5d8b2179ed7ec1be340d0cef0ce0aeea4aaa57850050f4b896d02875f0dec04ac1c20d9aa392f01b12e49ed885f4b8929f48d EBUILD ruff-0.7.0.ebuild 9993 BLAKE2B 08d12e486848f855369144e91a01bb72486be5ae1963f17a921318ff134a765bc33780f42f8a7f563887e61c4b3ecad8adfeebe1dd59357649518ffa6459be79 SHA512 ce53bc98750efe9975e399caaa1f9f987be2a078a17c8194414322ac0432f913fe9245eddec266e21f8829b28d3661752c237817807d31629c72dedbabb52797 -EBUILD ruff-0.7.1.ebuild 9922 BLAKE2B 1448a5fd04820b11b2405dddd68108249fe21068b337e10336259b2975650d473171218e79649f95d1bff349b8d5b210ae77d6b12316cfddea09e39fcb7fefdf SHA512 7fd0d420d9e819d35781ba8c69b92f71cdffd7f04f2338a2569572108756d7315fe291da29e4f6a0ccefc500ac159375263362c7af160bb0e5603d89f22a38af +EBUILD ruff-0.7.1.ebuild 9929 BLAKE2B 9a690735ee770143266868d83f12eba377241a7b83c4652099dd1c52957244ee71a96b266c2d6ebfb3d3694c42b51b2966e08a0624d2e4ac1b6731715d639bd9 SHA512 21aae0fcc2a6f45481126daa44f6c35f9a52b35b298c55bad08cc3ee22d377a02946b077a8ffe5adea9322c2292487bcf3e2568272607e5757c8edc6351fb7f5 MISC metadata.xml 480 BLAKE2B 6ddd486a0e095df64a5bb79eaccda8d230e05172dce0b05261e5bd8b2bc5d9c9dac19c69677dc88fb38ca8b5da4dbb203ccfe5c11176cfc9a488e74fdda4e4ec SHA512 9b29a47558bb67d83ff0e2da03096e0c4bfdd4d70146d4e084c590712a17f3823afb0318eac6501ff36ef457e5287c7161502115ea78b3aaf7042fa4ed865195 diff --git a/dev-util/ruff/ruff-0.7.1.ebuild b/dev-util/ruff/ruff-0.7.1.ebuild index fe6ee034d4d1..2aa4d4baf989 100644 --- a/dev-util/ruff/ruff-0.7.1.ebuild +++ b/dev-util/ruff/ruff-0.7.1.ebuild @@ -420,7 +420,7 @@ LICENSE+=" " SLOT="0" -KEYWORDS="~amd64 ~loong ~riscv" +KEYWORDS="~amd64 ~arm64 ~loong ~riscv" BDEPEND=" >=virtual/rust-1.76 -- cgit v1.2.3