From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id CE7BF158013 for ; Sun, 26 Sep 2021 12:05:58 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id BA4F1E0984; Sun, 26 Sep 2021 12:05:56 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher ECDHE-RSA-CHACHA20-POLY1305 (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 6BC02E0984 for ; Sun, 26 Sep 2021 12:05:56 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.2 with cipher ECDHE-RSA-CHACHA20-POLY1305 (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 2A193342A65 for ; Sun, 26 Sep 2021 12:05:55 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id B5EDFA3 for ; Sun, 26 Sep 2021 12:05:53 +0000 (UTC) From: "Jakov Smolić" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Jakov Smolić" Message-ID: <1632657783.7b9a76860cbd7c10f7c9acdc140cf5c7f7e6dbd1.jsmolic@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: dev-util/bpftool/ X-VCS-Repository: repo/gentoo X-VCS-Files: dev-util/bpftool/Manifest dev-util/bpftool/bpftool-5.14.6.ebuild X-VCS-Directories: dev-util/bpftool/ X-VCS-Committer: jsmolic X-VCS-Committer-Name: Jakov Smolić X-VCS-Revision: 7b9a76860cbd7c10f7c9acdc140cf5c7f7e6dbd1 X-VCS-Branch: master Date: Sun, 26 Sep 2021 12:05:53 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: 49c8d504-f092-41c2-ab6b-3de229484773 X-Archives-Hash: 02d184749ba4f0634cb6bfd05fe19e4b commit: 7b9a76860cbd7c10f7c9acdc140cf5c7f7e6dbd1 Author: Jakov Smolić gentoo org> AuthorDate: Sun Sep 26 12:03:03 2021 +0000 Commit: Jakov Smolić gentoo org> CommitDate: Sun Sep 26 12:03:03 2021 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7b9a7686 dev-util/bpftool: Version bump to 5.14.6 Signed-off-by: Jakov Smolić gentoo.org> dev-util/bpftool/Manifest | 1 + dev-util/bpftool/bpftool-5.14.6.ebuild | 117 +++++++++++++++++++++++++++++++++ 2 files changed, 118 insertions(+) diff --git a/dev-util/bpftool/Manifest b/dev-util/bpftool/Manifest index bd226a4ebe2..e7d4177a821 100644 --- a/dev-util/bpftool/Manifest +++ b/dev-util/bpftool/Manifest @@ -1,2 +1,3 @@ DIST linux-5.14.tar.xz 120669872 BLAKE2B 0047f5aaa3940dff97f4055ef544faafbbb5282128e6afe21d2f47d8dc8c395806a17016febfa050117d16f59e74b882cb8b9c5011d68f119c230d0a4d120524 SHA512 8e4f3ec3d36f774280f75dc7b004a43e09417af58f12e9c9f8348976659d4cfda7ad905f306f43fed66a27922e5c45db22e46bbfa7a0b9f365012380de3b6f64 DIST patch-5.14.5.xz 121948 BLAKE2B 1f1c503e9d56384250f0e3bc36d698a3fbd07e45dab8b01cb8046d660d32630f3f26daead931b5adc8d7ff26af3d819325d4af2c6ec0a37cb4ead637244dfe80 SHA512 496859c954a700704f5f4aca64ed134c183638d270155e5456fcc871c917a82f41ab4d70a0f503c9f1a7c63426f99a25545f4a930753e6afeb23dbd4be92e6b2 +DIST patch-5.14.6.xz 262092 BLAKE2B 06c3b6c194d67e5a2c39c9b97799fb2f4e76071e058d62f29c1d2aa049980719bcc27deba445081b0e3d5fc6fc476ac722945214baf60fed672c417bd837a31c SHA512 9270e911d2a71dc9c284f95217c10fc3b3666d7e6c54ce3bb1b1d4f3c081d7ea5449e7ac645c60c18986531b4675291ba3808367f5630eb15adaee3de4e63d46 diff --git a/dev-util/bpftool/bpftool-5.14.6.ebuild b/dev-util/bpftool/bpftool-5.14.6.ebuild new file mode 100644 index 00000000000..e3fa3487cfe --- /dev/null +++ b/dev-util/bpftool/bpftool-5.14.6.ebuild @@ -0,0 +1,117 @@ +# Copyright 2021 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +PYTHON_COMPAT=( python3_{8..10} ) +inherit estack linux-info optfeature python-any-r1 toolchain-funcs + +MY_PV="${PV/_/-}" +MY_PV="${MY_PV/-pre/-git}" + +DESCRIPTION="Tool for inspection and simple manipulation of eBPF programs and maps" +HOMEPAGE="https://kernel.org/" + +LINUX_V="${PV:0:1}.x" +LINUX_VER=$(ver_cut 1-2) +LINUX_PATCH=patch-${PV}.xz +SRC_URI="https://www.kernel.org/pub/linux/kernel/v${LINUX_V}/${LINUX_PATCH}" + +LINUX_SOURCES="linux-${LINUX_VER}.tar.xz" +SRC_URI+=" https://www.kernel.org/pub/linux/kernel/v${LINUX_V}/${LINUX_SOURCES}" + +S_K="${WORKDIR}/linux-${LINUX_VER}" +S="${S_K}/tools/bpf/bpftool" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="caps" + +RDEPEND=" + sys-libs/binutils-libs:= + sys-libs/zlib:= + virtual/libelf:= + caps? ( sys-libs/libcap:= ) +" +DEPEND=" + ${RDEPEND} + >=sys-kernel/linux-headers-5.8 +" +BDEPEND=" + ${LINUX_PATCH+dev-util/patchutils} + ${PYTHON_DEPS} + dev-python/docutils +" + +CONFIG_CHECK="~DEBUG_INFO_BTF" + +# src_unpack and src_prepare are copied from dev-util/perf since +# it's building from the same tarball, please keep it in sync with perf +src_unpack() { + local paths=( + tools/bpf kernel/bpf + tools/{arch,build,include,lib,perf,scripts} {scripts,include,lib} "arch/*/lib" + ) + + # We expect the tar implementation to support the -j option (both + # GNU tar and libarchive's tar support that). + echo ">>> Unpacking ${LINUX_SOURCES} (${paths[*]}) to ${PWD}" + tar --wildcards -xpf "${DISTDIR}"/${LINUX_SOURCES} \ + "${paths[@]/#/linux-${LINUX_VER}/}" || die + + if [[ -n ${LINUX_PATCH} ]] ; then + eshopts_push -o noglob + ebegin "Filtering partial source patch" + filterdiff -p1 ${paths[@]/#/-i } -z "${DISTDIR}"/${LINUX_PATCH} \ + > ${P}.patch + eend $? || die "filterdiff failed" + eshopts_pop + fi + + local a + for a in ${A}; do + [[ ${a} == ${LINUX_SOURCES} ]] && continue + [[ ${a} == ${LINUX_PATCH} ]] && continue + unpack ${a} + done +} + +src_prepare() { + default + + if [[ -n ${LINUX_PATCH} ]] ; then + pushd "${S_K}" >/dev/null || die + eapply "${WORKDIR}"/${P}.patch + popd || die + fi + + # dev-python/docutils installs rst2man.py, not rst2man + sed -i -e 's/rst2man/rst2man.py/g' Documentation/Makefile || die +} + +bpftool_make() { + local arch=$(tc-arch-kernel) + tc-export AR CC LD + + emake V=1 VF=1 \ + HOSTCC="$(tc-getBUILD_CC)" HOSTLD="$(tc-getBUILD_LD)" \ + EXTRA_CFLAGS="${CFLAGS}" ARCH="${arch}" BPFTOOL_VERSION="${MY_PV}" \ + prefix="${EPREFIX}"/usr \ + feature-libcap="$(usex caps 1 0)" \ + "$@" +} + +src_compile() { + bpftool_make + bpftool_make -C Documentation +} + +src_install() { + bpftool_make DESTDIR="${D}" install + bpftool_make mandir="${ED}"/usr/share/man -C Documentation install +} + +pkg_postinst() { + optfeature "clang-bpf-co-re support" sys-devel/clang[llvm_targets_BPF] +}