Hello community,

here is the log from the commit of package bpftrace for openSUSE:Factory 
checked in at 2020-11-19 11:59:25
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/bpftrace (Old)
 and      /work/SRC/openSUSE:Factory/.bpftrace.new.5913 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "bpftrace"

Thu Nov 19 11:59:25 2020 rev:8 rq:849216 version:0.11.4

Changes:
--------
--- /work/SRC/openSUSE:Factory/bpftrace/bpftrace.changes        2020-11-11 
20:47:21.891701801 +0100
+++ /work/SRC/openSUSE:Factory/.bpftrace.new.5913/bpftrace.changes      
2020-11-23 10:22:33.124825048 +0100
@@ -1,0 +2,9 @@
+Sat Nov 14 23:44:23 UTC 2020 - Aleksa Sarai <asa...@suse.com>
+
+- Update to bpftrace 0.11.4.
+    * Alpine build bug fix release
+       * bcc 0.17 support release
+- Remove upstreamed patches:
+  - detect-7-arg-bpf_attach_uprobe.patch
+
+-------------------------------------------------------------------

Old:
----
  bpftrace-0.11.2.tar.gz
  detect-7-arg-bpf_attach_uprobe.patch

New:
----
  bpftrace-0.11.4.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ bpftrace.spec ++++++
--- /var/tmp/diff_new_pack.byQlh4/_old  2020-11-23 10:22:33.696825695 +0100
+++ /var/tmp/diff_new_pack.byQlh4/_new  2020-11-23 10:22:33.696825695 +0100
@@ -17,15 +17,13 @@
 
 
 Name:           bpftrace
-Version:        0.11.2
+Version:        0.11.4
 Release:        0
 Summary:        High-level tracing language for Linux eBPF
 License:        Apache-2.0
 Group:          Development/Tools/Debuggers
 URL:            https://github.com/iovisor/bpftrace
 Source:         
https://github.com/iovisor/bpftrace/archive/v%{version}.tar.gz#/%{name}-%{version}.tar.gz
-# OPENSUSE-FIX-UPSTREAM: Backport of 
<https://github.com/iovisor/bpftrace/pull/1589>.
-Patch1:         detect-7-arg-bpf_attach_uprobe.patch
 BuildRequires:  binutils
 BuildRequires:  binutils-devel
 BuildRequires:  bison
@@ -62,7 +60,6 @@
 
 %prep
 %setup -q
-%patch1 -p1
 
 # Correct the #!-line to avoid rpmlint warnings.
 find tools -name '*.bt' -type f \

++++++ bpftrace-0.11.2.tar.gz -> bpftrace-0.11.4.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/bpftrace-0.11.2/.github/workflows/embedded.yml 
new/bpftrace-0.11.4/.github/workflows/embedded.yml
--- old/bpftrace-0.11.2/.github/workflows/embedded.yml  2020-10-30 
15:15:28.000000000 +0100
+++ new/bpftrace-0.11.4/.github/workflows/embedded.yml  2020-11-14 
02:16:51.000000000 +0100
@@ -1,6 +1,6 @@
 name: Embedded Builds
 
-on: push
+on: [push, pull_request]
 jobs:
   llvm_clang:
     runs-on: ubuntu-18.04
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/bpftrace-0.11.2/CHANGELOG.md 
new/bpftrace-0.11.4/CHANGELOG.md
--- old/bpftrace-0.11.2/CHANGELOG.md    2020-10-30 15:15:28.000000000 +0100
+++ new/bpftrace-0.11.4/CHANGELOG.md    2020-11-14 02:16:51.000000000 +0100
@@ -6,6 +6,19 @@
 and this project adheres to
 [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
 
+## [0.11.4] 2020-11-14
+
+Alpine build bug fix release
+
+## [0.11.3] 2020-11-13
+
+bcc 0.17 support release
+
+### Changed
+
+Detect 7 arg bpf_attach_uprobe() API
+- [#1589](https://github.com/iovisor/bpftrace/pull/1589)
+
 ## [0.11.2] 2020-10-30
 
 LLVM 11 support release
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/bpftrace-0.11.2/CMakeLists.txt 
new/bpftrace-0.11.4/CMakeLists.txt
--- old/bpftrace-0.11.2/CMakeLists.txt  2020-10-30 15:15:28.000000000 +0100
+++ new/bpftrace-0.11.4/CMakeLists.txt  2020-11-14 02:16:51.000000000 +0100
@@ -4,7 +4,7 @@
 # bpftrace version number components.
 set(bpftrace_VERSION_MAJOR 0)
 set(bpftrace_VERSION_MINOR 11)
-set(bpftrace_VERSION_PATCH 2)
+set(bpftrace_VERSION_PATCH 4)
 
 include(GNUInstallDirs)
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/bpftrace-0.11.2/cmake/FindLibBcc.cmake 
new/bpftrace-0.11.4/cmake/FindLibBcc.cmake
--- old/bpftrace-0.11.2/cmake/FindLibBcc.cmake  2020-10-30 15:15:28.000000000 
+0100
+++ new/bpftrace-0.11.4/cmake/FindLibBcc.cmake  2020-11-14 02:16:51.000000000 
+0100
@@ -7,6 +7,8 @@
 #  LIBBCC_DEFINITIONS - Compiler switches required for using libbcc
 #  LIBBCC_BPF_LIBRARY_STATIC - libbpf static library (for static compilation)
 #  LIBBCC_LOADER_LIBRARY_STATIC - libbcc helper static library (for static 
compilation)
+#  LIBBCC_ATTACH_KPROBE_SIX_ARGS_SIGNATURE
+#  LIBBCC_ATTACH_UPROBE_SEVEN_ARGS_SIGNATURE
 #
 # Note that the shared libbcc binary has libbpf and bcc_loader already 
compiled in but
 # the static doesn't. So when creating a static build those have to be 
included too.
@@ -70,3 +72,36 @@
 FIND_PACKAGE_HANDLE_STANDARD_ARGS(LibBcc "Please install the bcc library 
package, which is required. Depending on your distro, it may be called bpfcclib 
or bcclib (Ubuntu), bcc-devel (Fedora), or something else. If unavailable, 
install bcc from source (github.com/iovisor/bcc)."
   LIBBCC_LIBRARIES
   LIBBCC_INCLUDE_DIRS)
+
+# Check bpf_attach_kprobe signature
+if(${LIBBCC_FOUND})
+if(STATIC_LINKING)
+  # libbcc.a is not statically linked with libbpf.a, libelf.a, and libz.a.
+  # If we do a static bpftrace build, we must link them in.
+  find_package(LibBpf)
+  find_package(LibElf)
+  find_package(LibZ)
+  SET(CMAKE_REQUIRED_LIBRARIES ${LIBBCC_BPF_LIBRARY_STATIC} 
${LIBBPF_LIBRARIES} ${LIBELF_LIBRARIES} ${LIBZ_LIBRARIES})
+else()
+  SET(CMAKE_REQUIRED_LIBRARIES ${LIBBCC_LIBRARIES} ${LIBBPF_LIBRARIES})
+endif()
+INCLUDE(CheckCXXSourceCompiles)
+CHECK_CXX_SOURCE_COMPILES("
+#include <bcc/libbpf.h>
+
+int main(void) {
+  bpf_attach_kprobe(0, BPF_PROBE_ENTRY, \"\", \"\", 0, 0);
+  return 0;
+}
+" LIBBCC_ATTACH_KPROBE_SIX_ARGS_SIGNATURE)
+
+CHECK_CXX_SOURCE_COMPILES("
+#include <bcc/libbpf.h>
+
+int main(void) {
+  bpf_attach_uprobe(0, BPF_PROBE_ENTRY, \"\", \"\", 0, 0, 0);
+  return 0;
+}
+" LIBBCC_ATTACH_UPROBE_SEVEN_ARGS_SIGNATURE)
+SET(CMAKE_REQUIRED_LIBRARIES)
+endif()
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/bpftrace-0.11.2/cmake/FindLibBfd.cmake 
new/bpftrace-0.11.4/cmake/FindLibBfd.cmake
--- old/bpftrace-0.11.2/cmake/FindLibBfd.cmake  2020-10-30 15:15:28.000000000 
+0100
+++ new/bpftrace-0.11.4/cmake/FindLibBfd.cmake  2020-11-14 02:16:51.000000000 
+0100
@@ -51,22 +51,6 @@
     ENV LIBRARY_PATH
     ENV LD_LIBRARY_PATH)
 
-# libbfd.so is statically linked with libz.a but libbfd.a
-# is not. So if we do a static bpftrace build, we must link in
-# libz.a.
-find_library (LIBZ_LIBRARIES
-  NAMES
-    libz.a
-  PATHS
-    /lib
-    /usr/lib
-    /usr/local/lib
-    /opt/local/lib
-    /usr/lib/x86_64-linux-gnu/
-    /sw/lib
-    ENV LIBRARY_PATH
-    ENV LD_LIBRARY_PATH)
-
 include (FindPackageHandleStandardArgs)
 
 
@@ -84,6 +68,7 @@
 # do it. Furthermore, libbfd uses some libc symbols that we must manually
 # link against if we're not using static libc (which includes such symbols).
 if(STATIC_LINKING)
+  find_package(LibZ)
   list(APPEND CMAKE_REQUIRED_LIBRARIES ${LIBIBERTY_LIBRARIES} 
${LIBZ_LIBRARIES})
   if(NOT STATIC_LIBC)
     set(CMAKE_REQUIRED_FLAGS
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/bpftrace-0.11.2/cmake/FindLibZ.cmake 
new/bpftrace-0.11.4/cmake/FindLibZ.cmake
--- old/bpftrace-0.11.2/cmake/FindLibZ.cmake    1970-01-01 01:00:00.000000000 
+0100
+++ new/bpftrace-0.11.4/cmake/FindLibZ.cmake    2020-11-14 02:16:51.000000000 
+0100
@@ -0,0 +1,27 @@
+# - Try to find libz
+# Once done this will define
+#
+#  LIBZ_FOUND - system has libz
+#  LIBZ_LIBRARIES - Link these to use libz
+
+find_library(LIBZ_LIBRARIES
+  NAMES
+    libz.a
+  PATHS
+    /lib
+    /usr/lib
+    /usr/local/lib
+    /opt/local/lib
+    /usr/lib/x86_64-linux-gnu/
+    /sw/lib
+    ENV LIBRARY_PATH
+    ENV LD_LIBRARY_PATH)
+
+include (FindPackageHandleStandardArgs)
+
+
+# handle the QUIETLY and REQUIRED arguments and set LIBZ_FOUND to TRUE if all 
listed variables are TRUE
+FIND_PACKAGE_HANDLE_STANDARD_ARGS(LibZ "Please install the libz package"
+  LIBZ_LIBRARIES)
+
+mark_as_advanced(LIBZ_LIBRARIES)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/bpftrace-0.11.2/src/CMakeLists.txt 
new/bpftrace-0.11.4/src/CMakeLists.txt
--- old/bpftrace-0.11.2/src/CMakeLists.txt      2020-10-30 15:15:28.000000000 
+0100
+++ new/bpftrace-0.11.4/src/CMakeLists.txt      2020-11-14 02:16:51.000000000 
+0100
@@ -79,6 +79,12 @@
     target_link_libraries(bpftrace ${LIBOPCODES_LIBRARIES})
   endif(STATIC_LINKING)
 endif(HAVE_BFD_DISASM)
+if(LIBBCC_ATTACH_KPROBE_SIX_ARGS_SIGNATURE)
+  target_compile_definitions(bpftrace PRIVATE 
LIBBCC_ATTACH_KPROBE_SIX_ARGS_SIGNATURE)
+endif(LIBBCC_ATTACH_KPROBE_SIX_ARGS_SIGNATURE)
+if(LIBBCC_ATTACH_UPROBE_SEVEN_ARGS_SIGNATURE)
+  target_compile_definitions(bpftrace PRIVATE 
LIBBCC_ATTACH_UPROBE_SEVEN_ARGS_SIGNATURE)
+endif(LIBBCC_ATTACH_UPROBE_SEVEN_ARGS_SIGNATURE)
 
 if (ALLOW_UNSAFE_PROBE)
   target_compile_definitions(bpftrace PRIVATE HAVE_UNSAFE_PROBE)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/bpftrace-0.11.2/src/attached_probe.cpp 
new/bpftrace-0.11.4/src/attached_probe.cpp
--- old/bpftrace-0.11.2/src/attached_probe.cpp  2020-10-30 15:15:28.000000000 
+0100
+++ new/bpftrace-0.11.4/src/attached_probe.cpp  2020-11-14 02:16:51.000000000 
+0100
@@ -754,26 +754,23 @@
   }
 }
 
-// XXX(mmarchini): bcc changed the signature of bpf_attach_kprobe, adding a new
-// int parameter at the end. Since there's no reliable way to feature-detect
-// this, we create a function pointer with the long signature and cast
-// bpf_attach_kprobe to this function pointer. If we're on an older bcc
-// version, bpf_attach_kprobe call will be augmented with an extra register
-// being used for the last parameter, even though this register won't be used
-// inside the function. Since the register won't be used this is kinda safe,
-// although not ideal.
-typedef int (*attach_probe_wrapper_signature)(int, enum bpf_probe_attach_type, 
const char*, const char*, uint64_t, int);
-
 void AttachedProbe::attach_kprobe(bool safe_mode)
 {
   resolve_offset_kprobe(safe_mode);
-  int perf_event_fd = cast_signature<attach_probe_wrapper_signature>(
-      &bpf_attach_kprobe)(progfd_,
-                          attachtype(probe_.type),
-                          eventname().c_str(),
-                          probe_.attach_point.c_str(),
-                          offset_,
-                          0);
+#ifdef LIBBCC_ATTACH_KPROBE_SIX_ARGS_SIGNATURE
+  int perf_event_fd = bpf_attach_kprobe(progfd_,
+                                        attachtype(probe_.type),
+                                        eventname().c_str(),
+                                        probe_.attach_point.c_str(),
+                                        offset_,
+                                        0);
+#else
+  int perf_event_fd = bpf_attach_kprobe(progfd_,
+                                        attachtype(probe_.type),
+                                        eventname().c_str(),
+                                        probe_.attach_point.c_str(),
+                                        offset_);
+#endif
 
   if (perf_event_fd < 0) {
     if (probe_.orig_name != probe_.name) {
@@ -793,12 +790,23 @@
 {
   resolve_offset_uprobe(safe_mode);
 
-  int perf_event_fd = bpf_attach_uprobe(progfd_,
-                                        attachtype(probe_.type),
-                                        eventname().c_str(),
-                                        probe_.path.c_str(),
-                                        offset_,
-                                        probe_.pid);
+  int perf_event_fd =
+#ifdef LIBBCC_ATTACH_UPROBE_SEVEN_ARGS_SIGNATURE
+      bpf_attach_uprobe(progfd_,
+                        attachtype(probe_.type),
+                        eventname().c_str(),
+                        probe_.path.c_str(),
+                        offset_,
+                        probe_.pid,
+                        0);
+#else
+      bpf_attach_uprobe(progfd_,
+                        attachtype(probe_.type),
+                        eventname().c_str(),
+                        probe_.path.c_str(),
+                        offset_,
+                        probe_.pid);
+#endif // LIBBCC_ATTACH_UPROBE_SEVEN_ARGS_SIGNATURE
 
   if (perf_event_fd < 0)
     throw std::runtime_error("Error attaching probe: " + probe_.name);
@@ -907,8 +915,23 @@
 
   offset_ = resolve_offset(probe_.path, probe_.attach_point, probe_.loc);
 
-  int perf_event_fd = bpf_attach_uprobe(progfd_, attachtype(probe_.type),
-      eventname().c_str(), probe_.path.c_str(), offset_, pid == 0 ? -1 : pid);
+  int perf_event_fd =
+#ifdef LIBBCC_ATTACH_UPROBE_SEVEN_ARGS_SIGNATURE
+      bpf_attach_uprobe(progfd_,
+                        attachtype(probe_.type),
+                        eventname().c_str(),
+                        probe_.path.c_str(),
+                        offset_,
+                        pid == 0 ? -1 : pid,
+                        0);
+#else
+      bpf_attach_uprobe(progfd_,
+                        attachtype(probe_.type),
+                        eventname().c_str(),
+                        probe_.path.c_str(),
+                        offset_,
+                        pid == 0 ? -1 : pid);
+#endif // LIBBCC_ATTACH_UPROBE_SEVEN_ARGS_SIGNATURE
 
   if (perf_event_fd < 0)
   {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/bpftrace-0.11.2/src/main.cpp 
new/bpftrace-0.11.4/src/main.cpp
--- old/bpftrace-0.11.2/src/main.cpp    2020-10-30 15:15:28.000000000 +0100
+++ new/bpftrace-0.11.4/src/main.cpp    2020-11-14 02:16:51.000000000 +0100
@@ -156,6 +156,12 @@
 #else
             << "no" << std::endl;
 #endif
+  std::cerr << "  bcc bpf_attach_uprobe refcount: "
+#ifdef LIBBCC_ATTACH_UPROBE_SEVEN_ARGS_SIGNATURE
+            << "yes" << std::endl;
+#else
+            << "no" << std::endl;
+#endif
   std::cerr << "  libbpf: "
 #ifdef HAVE_LIBBPF
             << "yes" << std::endl;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/bpftrace-0.11.2/tests/CMakeLists.txt 
new/bpftrace-0.11.4/tests/CMakeLists.txt
--- old/bpftrace-0.11.2/tests/CMakeLists.txt    2020-10-30 15:15:28.000000000 
+0100
+++ new/bpftrace-0.11.4/tests/CMakeLists.txt    2020-11-14 02:16:51.000000000 
+0100
@@ -107,6 +107,12 @@
     target_link_libraries(bpftrace_test ${LIBOPCODES_LIBRARIES})
   endif(STATIC_LINKING)
 endif(HAVE_BFD_DISASM)
+if(LIBBCC_ATTACH_KPROBE_SIX_ARGS_SIGNATURE)
+  target_compile_definitions(bpftrace_test PRIVATE 
LIBBCC_ATTACH_KPROBE_SIX_ARGS_SIGNATURE)
+endif(LIBBCC_ATTACH_KPROBE_SIX_ARGS_SIGNATURE)
+if(LIBBCC_ATTACH_UPROBE_SEVEN_ARGS_SIGNATURE)
+  target_compile_definitions(bpftrace_test PRIVATE 
LIBBCC_ATTACH_UPROBE_SEVEN_ARGS_SIGNATURE)
+endif(LIBBCC_ATTACH_UPROBE_SEVEN_ARGS_SIGNATURE)
 
 target_link_libraries(bpftrace_test arch ast parser resources)
 
_______________________________________________
openSUSE Commits mailing list -- commit@lists.opensuse.org
To unsubscribe, email commit-le...@lists.opensuse.org
List Netiquette: https://en.opensuse.org/openSUSE:Mailing_list_netiquette
List Archives: 
https://lists.opensuse.org/archives/list/commit@lists.opensuse.org

Reply via email to