public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Jakov Smolić" <jsmolic@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-util/bpftool/
Date: Wed, 11 Oct 2023 21:07:08 +0000 (UTC)	[thread overview]
Message-ID: <1697058414.1024c7b3f3ecd9f92768dc2fb4ea7450221826d4.jsmolic@gentoo> (raw)

commit:     1024c7b3f3ecd9f92768dc2fb4ea7450221826d4
Author:     Jakov Smolić <jsmolic <AT> gentoo <DOT> org>
AuthorDate: Wed Oct 11 20:57:41 2023 +0000
Commit:     Jakov Smolić <jsmolic <AT> gentoo <DOT> org>
CommitDate: Wed Oct 11 21:06:54 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1024c7b3

dev-util/bpftool: add 6.5.7

Signed-off-by: Jakov Smolić <jsmolic <AT> gentoo.org>

 dev-util/bpftool/Manifest             |   2 +
 dev-util/bpftool/bpftool-6.5.7.ebuild | 118 ++++++++++++++++++++++++++++++++++
 2 files changed, 120 insertions(+)

diff --git a/dev-util/bpftool/Manifest b/dev-util/bpftool/Manifest
index ecc17649d6c1..dbd7cfaa98be 100644
--- a/dev-util/bpftool/Manifest
+++ b/dev-util/bpftool/Manifest
@@ -1,2 +1,4 @@
 DIST linux-6.3.tar.xz 136891752 BLAKE2B f1887c8924efa8d0cb14c4e604affd0b0168bcf20f56a37c027405c7bc11aba822a43fcb38ccb55a81a26f747d00e1ab5a6554818affbf1e1c7ef5220150fc69 SHA512 768979440f4907ba64d4481b383d6101faf208f27a0b897156123aa278c5743fe3c4f61945b2541429c532d45382aaee8899ea9d44a1d2895bfbb79bfd937f65
+DIST linux-6.5.tar.xz 138898084 BLAKE2B 2e641b79a080e8f4ce283bcf6b74e2c6f15a374367f1c4c875c663868dbe801317340824fb3adb46b3a51d3b7e1f67cc4e8144d367621ec43ffba5c4eb8abb39 SHA512 1b59dc5e65d4922c3217a8c8f19022dfd6595ae89747861d825bfeb51a4ae6c85449d05db69635a712bef7b355b80318195665582d8933b1fed6ba582f6ff257
 DIST patch-6.3.xz 8617176 BLAKE2B cab9b9b3e3a97c425e186e2390b7753e77740a8a7286ba8f8fd88527c1d2e6ee22b0d27510c5ea065e73161ac1f9a178251585ffa8d2648595c92e831cf1fee3 SHA512 4a7228e9d89633d3cb14af2dd7419eb625b765b70b95e4149ff1aff6367fb2490d5bd16d6399da33a0b85c32a8dafa2c2cb2e3695aec335f4d3a2813ca52c9f4
+DIST patch-6.5.7.xz 561404 BLAKE2B 98f6fe0a43562cc60ada3596443e56966742de6ec2ef243331d22a4f345ad5741a5fe136e03ae0a5016fec4234bb89e6a6262076d3e5a449c53bb78ee7fb1175 SHA512 4c77a595fa76e8b0a07aff0aa681af7ae3d91231964662158b6a484ba477679d85dae8e12152ea95893d0794c6cef4f1394f908b7da6d6bf34b59d8b33d8c392

diff --git a/dev-util/bpftool/bpftool-6.5.7.ebuild b/dev-util/bpftool/bpftool-6.5.7.ebuild
new file mode 100644
index 000000000000..8d18340895fc
--- /dev/null
+++ b/dev-util/bpftool/bpftool-6.5.7.ebuild
@@ -0,0 +1,118 @@
+# Copyright 2021-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{9..11} )
+inherit estack linux-info optfeature python-any-r1 bash-completion-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 ~arm ~arm64 ~loong ~ppc ~ppc64 ~riscv ~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}
+	app-arch/tar
+	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 and --wildcards option
+	echo ">>> Unpacking ${LINUX_SOURCES} (${paths[*]}) to ${PWD}"
+	gtar --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 \
+		bash_compdir="$(get_bashcompdir)" \
+		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]
+}


             reply	other threads:[~2023-10-11 21:07 UTC|newest]

Thread overview: 149+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-10-11 21:07 Jakov Smolić [this message]
  -- strict thread matches above, loose matches on Subject: below --
2024-11-03 18:02 [gentoo-commits] repo/gentoo:master commit in: dev-util/bpftool/ Sam James
2024-10-30 22:29 Sam James
2024-10-06 13:38 Jakov Smolić
2024-10-05  5:21 Sam James
2024-09-12  5:53 Joonas Niilola
2024-08-24 11:49 Sam James
2024-08-23 14:50 Sam James
2024-08-23 14:41 Sam James
2024-08-06 10:16 Guilherme Amadio
2024-08-06 10:16 Guilherme Amadio
2024-08-06 10:16 Guilherme Amadio
2024-07-21  7:30 Yixun Lan
2024-07-19 19:49 Jakov Smolić
2024-07-19 19:49 Jakov Smolić
2024-07-04 18:49 Arthur Zamarin
2024-07-04 18:49 Arthur Zamarin
2024-07-04 18:44 Arthur Zamarin
2024-07-04 18:44 Arthur Zamarin
2024-07-04 18:44 Arthur Zamarin
2024-07-04 18:43 Arthur Zamarin
2024-06-25 16:52 Jakov Smolić
2024-06-18 18:55 Jakov Smolić
2024-06-09 12:36 Arthur Zamarin
2024-06-09 12:28 Arthur Zamarin
2024-06-09 12:28 Arthur Zamarin
2024-06-09 11:27 Arthur Zamarin
2024-06-09 10:38 Jakov Smolić
2024-06-09 10:38 Jakov Smolić
2024-05-31 11:50 Guilherme Amadio
2024-05-29  7:28 Jakov Smolić
2024-04-30  7:16 Sam James
2024-04-29 18:55 Jakov Smolić
2024-04-29 18:49 Jakov Smolić
2024-04-29 18:49 Jakov Smolić
2024-04-29 18:49 Jakov Smolić
2024-03-13  4:48 Sam James
2024-03-10 23:21 Jakov Smolić
2024-03-10 20:00 Arthur Zamarin
2024-03-10 20:00 Arthur Zamarin
2024-03-10 19:52 Arthur Zamarin
2024-03-10 19:52 Arthur Zamarin
2024-02-24 21:30 Jakov Smolić
2024-02-24 19:25 Jakov Smolić
2024-02-24 19:25 Jakov Smolić
2024-02-24 12:40 Jakov Smolić
2023-12-27  0:20 Jakov Smolić
2023-11-22 17:10 Jakov Smolić
2023-11-17 12:07 Sam James
2023-07-11 11:03 WANG Xuerui
2023-07-05 21:41 Sam James
2023-07-05 21:41 Sam James
2023-06-10  5:22 Jakov Smolić
2023-06-09 17:39 Arthur Zamarin
2023-05-18 15:56 Jakov Smolić
2023-04-25 18:44 Jakov Smolić
2023-04-21  6:02 Jakov Smolić
2023-04-11 21:42 Jakov Smolić
2023-04-11 18:46 Arthur Zamarin
2023-03-06 19:19 Jakov Smolić
2023-03-06 19:19 Jakov Smolić
2023-03-06 13:44 Arthur Zamarin
2023-03-06 12:52 Arthur Zamarin
2023-03-04 22:22 Jakov Smolić
2023-01-25  6:44 Jakov Smolić
2023-01-18  0:46 Sam James
2023-01-13  5:51 Sam James
2023-01-08 17:06 Jakov Smolić
2023-01-08 17:00 Arthur Zamarin
2022-12-22 13:29 Jakov Smolić
2022-10-29 11:03 Jakov Smolić
2022-10-20 10:52 Jakov Smolić
2022-10-07 12:25 Jakov Smolić
2022-10-05 11:35 Sam James
2022-10-04 15:42 Jakov Smolić
2022-09-13 10:57 Jakov Smolić
2022-09-13 10:57 Jakov Smolić
2022-09-05  1:14 Sam James
2022-09-05  0:43 Sam James
2022-09-03 14:09 Jakov Smolić
2022-09-03 14:09 Jakov Smolić
2022-08-31  7:36 Jakov Smolić
2022-08-21 14:57 Jakov Smolić
2022-08-21 14:57 Jakov Smolić
2022-08-16 15:07 Sam James
2022-07-23 15:41 Jakov Smolić
2022-07-23 15:41 Jakov Smolić
2022-07-22 17:54 Sam James
2022-07-02 11:18 Jakov Smolić
2022-06-27 17:32 Jakov Smolić
2022-06-22 13:09 Jakov Smolić
2022-06-21 16:48 Jakov Smolić
2022-06-21 16:09 Jakov Smolić
2022-06-21 16:07 Jakov Smolić
2022-06-06  7:11 Jakov Smolić
2022-05-29 17:27 Jakov Smolić
2022-05-28 15:58 Jakov Smolić
2022-05-20 18:41 Jakov Smolić
2022-04-27 22:23 Jakov Smolić
2022-04-27 22:23 Jakov Smolić
2022-04-27 19:47 Jakov Smolić
2022-04-19  8:56 Jakov Smolić
2022-04-19  8:53 Jakov Smolić
2022-04-04 12:26 Jakov Smolić
2022-03-22 10:10 Jakov Smolić
2022-03-16 11:46 Jakov Smolić
2022-03-16 11:46 Jakov Smolić
2022-03-03 15:12 Jakov Smolić
2022-03-01 11:42 Jakov Smolić
2022-02-28 10:00 Jakov Smolić
2022-02-28 10:00 Jakov Smolić
2022-02-24 11:55 Jakov Smolić
2022-02-24 11:55 Jakov Smolić
2022-02-11 19:18 Jakov Smolić
2022-02-11 19:18 Jakov Smolić
2022-02-07  9:33 Jakov Smolić
2022-01-29 21:21 Jakov Smolić
2022-01-29 21:21 Jakov Smolić
2022-01-29 21:21 Jakov Smolić
2022-01-25 21:23 Sam James
2022-01-18 13:09 Jakov Smolić
2022-01-18 13:09 Jakov Smolić
2022-01-04 18:08 Jakov Smolić
2021-12-26  8:07 Agostino Sarubbo
2021-12-20 10:45 Jakov Smolić
2021-12-20 10:45 Jakov Smolić
2021-12-17 23:27 Jakov Smolić
2021-12-17 23:27 Jakov Smolić
2021-12-10  9:38 Jakov Smolić
2021-12-10  9:38 Jakov Smolić
2021-11-29 11:46 Jakov Smolić
2021-11-29 11:46 Jakov Smolić
2021-11-22 13:30 Jakov Smolić
2021-10-27  5:58 Jakov Smolić
2021-10-27  5:58 Jakov Smolić
2021-10-19 11:29 Jakov Smolić
2021-10-19 11:29 Jakov Smolić
2021-10-11 18:18 Jakov Smolić
2021-10-11 18:18 Jakov Smolić
2021-09-26 12:05 Jakov Smolić
2021-09-26 12:05 Jakov Smolić
2021-09-23  9:33 Jakov Smolić
2021-09-23  9:33 Jakov Smolić
2021-09-20  5:15 Jakov Smolić
2021-09-20  5:15 Jakov Smolić
2021-09-14 18:37 Jakov Smolić
2021-09-14 18:37 Jakov Smolić
2021-09-14  6:28 Jakov Smolić
2021-09-13 17:48 Jakov Smolić

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1697058414.1024c7b3f3ecd9f92768dc2fb4ea7450221826d4.jsmolic@gentoo \
    --to=jsmolic@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox