Rebase to new release version

- Fixes #1609485
- Update shebangs mangling to accommodate upstream changes
- Use new ENABLE_LLVM_SHARED

Signed-off-by: Rafael dos Santos <rdossant@redhat.com>
This commit is contained in:
Rafael dos Santos 2018-08-16 13:54:29 +02:00 committed by Rafael Fonseca
parent 1e75eee2c1
commit 1b1b2ecd02
3 changed files with 21 additions and 15 deletions

1
.gitignore vendored
View File

@ -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

View File

@ -5,9 +5,11 @@
%bcond_without lua
%endif
%bcond_without llvm_static
Name: bcc
Version: 0.6.0
Release: 3%{?dist}
Version: 0.6.1
Release: 1%{?dist}
Summary: BPF Compiler Collection (BCC)
License: ASL 2.0
URL: https://github.com/iovisor/bcc
@ -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 <r4f4rfs@gmail.com> - 0.6.1-1
- Rebase to new released version (#1609485)
* Thu Jul 12 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0.6.0-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild

View File

@ -1 +1 @@
SHA512 (bcc-0.6.0.tar.gz) = 1a8edf6da22f3119a74cf43f03ec83b97ed2f6fc18828d750d8a695ac1451b6b3209e5d2cf48bc87f53fa9447e8813a018a58d31588d477e4aa364a2d0217e80
SHA512 (bcc-0.6.1.tar.gz) = 096fa1f8f612fdaa1fbe7b30e2d710b6e9b4dae5fe4a327baccce66589492007d81aa208d885efbfd77ffd97677e0af317f4088f955ffabceb41c8e93f44fa01