Skip to content

Commit

Permalink
Build master
Browse files Browse the repository at this point in the history
  • Loading branch information
fbs committed Sep 11, 2020
1 parent c37b4c3 commit f3cc803
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 3 deletions.
24 changes: 24 additions & 0 deletions bpftrace/0001-Don-t-require-libbpf-for-build.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
From f760115e6a32cc81e342cf06fb753ac4f106ccd2 Mon Sep 17 00:00:00 2001
From: bas smit <[email protected]>
Date: Fri, 21 Aug 2020 17:23:57 +0200
Subject: [PATCH] Don't require libbpf for build

---
cmake/FindLibBcc.cmake | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/cmake/FindLibBcc.cmake b/cmake/FindLibBcc.cmake
index d1be5551..d1d5a1fa 100644
--- a/cmake/FindLibBcc.cmake
+++ b/cmake/FindLibBcc.cmake
@@ -79,7 +79,7 @@ if(STATIC_LINKING)
find_package(LibBpf)
find_package(LibElf)
find_package(LibZ)
- SET(CMAKE_REQUIRED_LIBRARIES ${LIBBCC_BPF_LIBRARY_STATIC} ${LIBBPF_LIBRARIES} ${LIBELF_LIBRARIES} ${LIBZ_LIBRARIES})
+ SET(CMAKE_REQUIRED_LIBRARIES ${LIBBCC_BPF_LIBRARY_STATIC} ${LIBELF_LIBRARIES} ${LIBZ_LIBRARIES})
else()
SET(CMAKE_REQUIRED_LIBRARIES ${LIBBCC_LIBRARIES})
endif()
--
2.27.0
4 changes: 2 additions & 2 deletions bpftrace/0001-tools-Patch-for-RHEL7.patch
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ index 357f09d..a5103f0 100755
-tracepoint:syscalls:sys_enter_execve
+kprobe:SyS_execve
{
printf("%-10u %-5d ", elapsed / 1000000, pid);
printf("%-10u %-5d ", elapsed / 1e6, pid);
- join(args->argv);
+ join(arg1);
}
Expand Down Expand Up @@ -59,7 +59,7 @@ index a1ac1b2..435b519 100755
+uretprobe:/usr/lib64/libc.so.6:gethostbyname2
/@start[tid]/
{
$latms = (nsecs - @start[tid]) / 1000000;
$latms = (nsecs - @start[tid]) / 1e6;
@@ -45,3 +45,4 @@ uretprobe:/lib/x86_64-linux-gnu/libc.so.6:gethostbyname2
delete(@start[tid]);
delete(@name[tid]);
Expand Down
8 changes: 7 additions & 1 deletion bpftrace/bpftrace.spec
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
%global pkgname bpftrace
%global commitid 2476917

# The static build is a bit of a hack and
# doesn't build th docs and tools package
Expand All @@ -13,7 +14,7 @@
Name: %{pkgname}
Version: 0.11.0
%if "%{?commitid}" != ""
Release: 1.%{?commitid}%{?dist}
Release: 2.%{?commitid}%{?dist}
%else
Release: 1%{?dist}
%endif
Expand All @@ -28,6 +29,7 @@ Patch2: 0001-tools-Patch-for-RHEL7.patch

Patch100: 0001-build-Force-disable-optimization.patch
Patch101: 0001-Do-not-require-libbpf-for-static-build.patch
Patch102: 0001-Don-t-require-libbpf-for-build.patch


ExclusiveArch: x86_64
Expand Down Expand Up @@ -93,6 +95,7 @@ git checkout %{commitid}
%patch2 -p1
%patch100 -p1
%patch101 -p1
%patch102 -p1
%else
%autosetup -p1 -n bpftrace-%{version}
%endif
Expand Down Expand Up @@ -134,6 +137,9 @@ find %{buildroot}%{_datadir}/%{pkgname}/tools -type f -exec \
%{_datadir}/%{pkgname}/tools/doc/*.txt

%changelog
* Fri Aug 21 2020 bas smit - 0.11.0-2
- bpftrace 0.11 2476917

* Thu Jul 16 2020 bas smit - 0.11.0-1
- bpftrace 0.11!

Expand Down

0 comments on commit f3cc803

Please sign in to comment.