From 45f15f80b3ac10c24356679b03e8eca2a548b5b9 Mon Sep 17 00:00:00 2001 From: Rafael Fonseca Date: Aug 16 2018 11:47:45 +0000 Subject: Rebase to new release version - Fixes #1609485 - Update shebangs mangling to accommodate upstream changes - Use new ENABLE_LLVM_SHARED Signed-off-by: Rafael Fonseca --- diff --git a/.gitignore b/.gitignore index 57e0e93..9ec775d 100644 --- a/.gitignore +++ b/.gitignore @@ -4,3 +4,4 @@ /bcc-0.4.0.tar.gz /bcc-0.5.0.tar.gz /bcc-0.6.0.tar.gz +/bcc-0.6.1.tar.gz diff --git a/bcc.spec b/bcc.spec index 236e18a..6297281 100644 --- a/bcc.spec +++ b/bcc.spec @@ -5,8 +5,10 @@ %bcond_without lua %endif +%bcond_without llvm_static + Name: bcc -Version: 0.6.0 +Version: 0.6.1 Release: 1%{?dist} Summary: BPF Compiler Collection (BCC) License: ASL 2.0 @@ -20,7 +22,10 @@ ExclusiveArch: x86_64 %{power64} BuildRequires: bison, cmake >= 2.8.7, flex, libxml2-devel BuildRequires: python3-devel BuildRequires: elfutils-libelf-devel -BuildRequires: llvm-devel llvm-static clang-devel +BuildRequires: llvm-devel clang-devel +%if %{with llvm_static} +BuildRequires: llvm-static +%endif BuildRequires: ncurses-devel %if %{with lua} BuildRequires: pkgconfig(luajit) @@ -93,7 +98,8 @@ Command line tools for BPF Compiler Collection (BCC) %build %cmake . \ -DCMAKE_BUILD_TYPE=RelWithDebInfo \ - -DREVISION_LAST=%{version} -DREVISION=%{version} -DPYTHON_CMD=python3 + -DREVISION_LAST=%{version} -DREVISION=%{version} -DPYTHON_CMD=python3 \ + %{?with_llvm_shared:-DENABLE_LLVM_SHARED=1} %make_build @@ -101,21 +107,17 @@ Command line tools for BPF Compiler Collection (BCC) %make_install # Fix python shebangs -for i in `find %{buildroot}%{_datadir}/%{name}/tools/ -type f`; do - sed -i '1s=^#!/usr/bin/\(python\|env python\)[0-9.]*=#!%{__python3}=' $i -done - -for i in `find %{buildroot}%{_datadir}/%{name}/examples/ -type f`; do - sed -i '1s=^#!/usr/bin/\(python\|env python\)[0-9.]*=#!%{__python3}=' $i - sed -i '1s=^#!/usr/bin/env bcc-lua.*=#!/usr/bin/bcc-lua=' $i -done +find %{buildroot}%{_datadir}/%{name}/{tools,examples} -type f -exec \ + sed -i -e '1s=^#!/usr/bin/python\([0-9.]\+\)\?$=#!%{__python3}=' \ + -e '1s=^#!/usr/bin/env python\([0-9.]\+\)\?$=#!%{__python3}' \ + -e '1s=^#!/usr/bin/env bcc-lua$=#!/usr/bin/bcc-lua=' {} \; # Move man pages to the right location mkdir -p %{buildroot}%{_mandir} mv %{buildroot}%{_datadir}/%{name}/man/* %{buildroot}%{_mandir}/ # Avoid conflict with other manpages # https://bugzilla.redhat.com/show_bug.cgi?id=1517408 -for i in `find %{buildroot}%{_mandir} -name "*.8"`; do +for i in `find %{buildroot}%{_mandir} -name "*.gz"`; do tname=$(basename $i) rename $tname %{name}-$tname $i done @@ -130,7 +132,7 @@ mv %{buildroot}%{_datadir}/%{name}/examples %{buildroot}%{_docdir}/%{name}/ %files %doc README.md -%license LICENSE.txt COPYRIGHT.txt +%license LICENSE.txt %{_libdir}/lib%{name}.so.* %{_libdir}/libbpf.so.* @@ -163,6 +165,9 @@ mv %{buildroot}%{_datadir}/%{name}/examples %{buildroot}%{_docdir}/%{name}/ %changelog +* Thu Aug 16 2018 Rafael Fonseca - 0.6.1-1 +- Rebase to new released version (#1609485) + * Mon Jun 18 2018 Rafael dos Santos - 0.6.0-1 - Rebase to new released version (#1591989) diff --git a/sources b/sources index 816ff01..95061ea 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (bcc-0.6.0.tar.gz) = 1a8edf6da22f3119a74cf43f03ec83b97ed2f6fc18828d750d8a695ac1451b6b3209e5d2cf48bc87f53fa9447e8813a018a58d31588d477e4aa364a2d0217e80 +SHA512 (bcc-0.6.1.tar.gz) = 096fa1f8f612fdaa1fbe7b30e2d710b6e9b4dae5fe4a327baccce66589492007d81aa208d885efbfd77ffd97677e0af317f4088f955ffabceb41c8e93f44fa01