Skip to content

Commit

Permalink
dev-util/bcc: Make 0.9.0 work with <5.0 kernels, add maintainer
Browse files Browse the repository at this point in the history
The 0.9.0 release requires bpf.h from 5.0 kernels to compile, but will
otherwise work on 4.18+ kernels. This adds a patch that just patches in
the 5.0 version of bpf.h when linux-headers is less than 5.0.

Copyright: Sony Interactive Entertainment Inc.
Package-Manager: Portage-2.3.62, Repoman-2.3.12
Signed-off-by: Patrick McLean <[email protected]>
  • Loading branch information
patrick-mclean authored and chutz committed Mar 13, 2019
1 parent 29e02bb commit bf4fcee
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 1 deletion.
1 change: 1 addition & 0 deletions dev-util/bcc/Manifest
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
DIST bcc-0.6.0.tar.gz 1986593 BLAKE2B 514c2c781eb94d99560232d8050b5664ce3565622b236e78cd111be27b3482849965600a1d574f59243917672f00bb3cef65cab63103f6c4a5cf62024c683d9b SHA512 1a8edf6da22f3119a74cf43f03ec83b97ed2f6fc18828d750d8a695ac1451b6b3209e5d2cf48bc87f53fa9447e8813a018a58d31588d477e4aa364a2d0217e80
DIST bcc-0.7.0.tar.gz 2009289 BLAKE2B 370b553521289d983d1165633e76a5e405250b9b09dbf3e78c127d232908e73facce06097ce4dbf0bbccda929b6715a9b7460affe123556087c8ca00b8d62c0b SHA512 ebe6c4cbecba2d587c69af71ddc8cb451b2b8e1d49ef887f291c813320c2c60d49357500fc2751d5b418df2be1d02763c385d89de6efa6e10f049c25acf01b4e
DIST bcc-0.9.0-linux-5-bpf.patch.xz 28524 BLAKE2B f0369e50eabd7b1eb9a492b9652cd7647c7c7fda3b01db1e7f2bf716e76357d07d67193b31189b98309e26895ac3dd5c755d4cef6bc592e4674f40710c33539c SHA512 fc5b828a5826da2cf1e1a76758c635f5443d202aecbe3f269d78abcaa0117ad7658bea6c43e7b60e1ecc6bcc65bd19b100217758a1203d278ddb03c5837c43f1
DIST bcc-0.9.0.tar.gz 2036984 BLAKE2B cebbeb57f06af90442d28be1633a54c198bf796786c4fcca3a83dea03bc76949f958dd24f7d85feb2e3402576410f965754f3d031076486b7d378493c56035e8 SHA512 373080181380ec3bcb13469e29ff1f792e924a2df00a614da4647ed54060ad216525dd0f49c5d0afba7946a6d2f4e3475af97250a33db825945af3d165294091
11 changes: 10 additions & 1 deletion dev-util/bcc/bcc-0.9.0-r1.ebuild
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@ inherit cmake-utils linux-info python-single-r1 python-utils-r1
DESCRIPTION="Tools for BPF-based Linux IO analysis, networking, monitoring, and more"
HOMEPAGE="https://iovisor.github.io/bcc/"
EGIT_COMMIT="v${PV}"
SRC_URI="https://github.com/iovisor/bcc/archive/${EGIT_COMMIT}.tar.gz -> ${P}.tar.gz"
SRC_URI="https://github.com/iovisor/bcc/archive/${EGIT_COMMIT}.tar.gz -> ${P}.tar.gz
mirror://gentoo/bcc-0.9.0-linux-5-bpf.patch.xz"
RESTRICT="test"

LICENSE="Apache-2.0"
Expand Down Expand Up @@ -49,6 +50,14 @@ pkg_setup() {
python-single-r1_pkg_setup
}

src_prepare() {
# needs bpf.h from linux-5.0 to build
has_version '>=sys-kernel/linux-headers-5.0' || \
eapply "${WORKDIR}/bcc-0.9.0-linux-5-bpf.patch"

cmake-utils_src_prepare
}

src_configure() {
local mycmakeargs=(
-DREVISION=${PV%%_*}
Expand Down
3 changes: 3 additions & 0 deletions dev-util/bcc/metadata.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@
<maintainer type="person">
<email>[email protected]</email>
</maintainer>
<maintainer type="person">
<email>[email protected]</email>
</maintainer>
<upstream>
<remote-id type="github">iovisor/bcc</remote-id>
</upstream>
Expand Down

0 comments on commit bf4fcee

Please sign in to comment.