From 7e00fc1ddafeeb30f77f7d0dd77bcf469508c571 Mon Sep 17 00:00:00 2001 From: Brenden Blanco Date: Mon, 12 Oct 2015 11:13:48 -0700 Subject: [PATCH] Fixes for deb/rpm packaging These fixes are manually included in the released 0.1.7 packages, but will help with future builds. Signed-off-by: Brenden Blanco --- SPECS/bcc.spec | 12 +++++++++--- cmake/version.cmake | 4 +++- debian/{python-bpf.install => python-bcc.install} | 1 - debian/rules | 3 ++- 4 files changed, 14 insertions(+), 6 deletions(-) rename debian/{python-bpf.install => python-bcc.install} (50%) diff --git a/SPECS/bcc.spec b/SPECS/bcc.spec index de5427a..d2f728f 100644 --- a/SPECS/bcc.spec +++ b/SPECS/bcc.spec @@ -1,7 +1,7 @@ %define debug_package %{nil} Name: bcc -Version: 0.1.6 +Version: 0.1.7 Release: 1%{?dist} Summary: BPF Compiler Collection (BCC) @@ -25,7 +25,7 @@ userspace. mkdir build pushd build -cmake .. -DREVISION=%{version} -DCMAKE_INSTALL_PREFIX=/usr +cmake .. -DREVISION_LAST=%{version} -DREVISION=%{version} -DCMAKE_INSTALL_PREFIX=/usr make -j`grep -c ^process /proc/cpuinfo` popd @@ -34,6 +34,9 @@ pushd build make install/strip DESTDIR=%{buildroot} %changelog +* Mon Oct 12 2015 Brenden Blanco - 0.1.2-1 +- Add better version numbering into libbcc.so + * Fri Jul 03 2015 Brenden Blanco - 0.1.1-2 - Initial RPM Release @@ -55,7 +58,6 @@ Python bindings for BPF Compiler Collection (BCC) %files -n python-bcc %{python_sitelib}/bcc* -%exclude %{python_sitelib}/*.egg-info %files -n libbcc /usr/lib64/* @@ -64,3 +66,7 @@ Python bindings for BPF Compiler Collection (BCC) %files -n libbcc-examples /usr/share/bcc/examples/* +%exclude /usr/share/bcc/examples/*.pyc +%exclude /usr/share/bcc/examples/*.pyo +%exclude /usr/share/bcc/examples/*/*.pyc +%exclude /usr/share/bcc/examples/*/*.pyo diff --git a/cmake/version.cmake b/cmake/version.cmake index 1c43ae4..1455161 100644 --- a/cmake/version.cmake +++ b/cmake/version.cmake @@ -20,4 +20,6 @@ endif() # strip leading 'v', and make unique for the tag message(STATUS "Revision is ${REVISION}") # rpm/deb packaging uses this, only works on whole tag numbers -string(SUBSTRING "${GIT_TAG_LAST}" 1 -1 REVISION_LAST) +if(NOT REVISION_LAST) + string(SUBSTRING "${GIT_TAG_LAST}" 1 -1 REVISION_LAST) +endif() diff --git a/debian/python-bpf.install b/debian/python-bcc.install similarity index 50% rename from debian/python-bpf.install rename to debian/python-bcc.install index 552050d..607c065 100644 --- a/debian/python-bpf.install +++ b/debian/python-bcc.install @@ -1,2 +1 @@ usr/lib/python* -usr/bin/bpf-run diff --git a/debian/rules b/debian/rules index 21f5374..215bf45 100755 --- a/debian/rules +++ b/debian/rules @@ -11,5 +11,6 @@ UPSTREAM_VERSION := $(shell dpkg-parsechangelog | sed -rne "s,^Version: ([0-9.]+ %: dh $@ --buildsystem=cmake --parallel +# FIXME: LLVM_DEFINITIONS is broken somehow in LLVM cmake upstream override_dh_auto_configure: - dh_auto_configure -- -DREVISION=$(UPSTREAM_VERSION) + dh_auto_configure -- -DREVISION_LAST=$(UPSTREAM_VERSION) -DREVISION=$(UPSTREAM_VERSION) -DLLVM_DEFINITIONS="-D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS" -- 2.7.4