Accepting request 967868 from home:dirkmueller:Factory

- add rebuild subpackage to ensure rebuild in TW

OBS-URL: https://build.opensuse.org/request/show/967868
OBS-URL: https://build.opensuse.org/package/show/Base:System/bpftool?expand=0&rev=6
This commit is contained in:
Michał Rostecki 2022-04-11 08:50:50 +00:00 committed by Git OBS Bridge
parent 11b830a8e8
commit f760fe10ed
2 changed files with 25 additions and 6 deletions

View File

@ -1,3 +1,8 @@
-------------------------------------------------------------------
Fri Apr 8 15:15:39 UTC 2022 - Dirk Müller <dmueller@suse.com>
- add rebuild subpackage to ensure rebuild in TW
-------------------------------------------------------------------
Thu Oct 14 11:40:44 UTC 2021 - Shung-Hsi Yu <shung-hsi.yu@suse.com>

View File

@ -1,7 +1,7 @@
#
# spec file for package bpftool
#
# Copyright (c) 2021 SUSE LLC
# Copyright (c) 2022 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@ -16,14 +16,14 @@
#
Name: bpftool
%define version %(rpm -q --qf '%%{VERSION}' kernel-source)
Name: bpftool
Version: %{version}
Release: 0
Summary: Tool for inspection and manipulation of BPF programs and maps
License: GPL-2.0-only
Group: Development/Tools/Other
URL: http://www.kernel.org/
URL: https://www.kernel.org/
BuildRequires: binutils-devel
BuildRequires: docutils
BuildRequires: kernel-source
@ -33,14 +33,25 @@ BuildRequires: libelf-devel
bpftool allows for inspection and simple modification of BPF objects (programs
and maps) on the system.
%package rebuild
Summary: Empty package to ensure rebuilding bpftool in OBS
Group: System/Monitoring
%requires_eq kernel-source
%description rebuild
This is empty package that ensures bpftool is rebuilt every time
kernel-default is rebuilt in OBS.
There is no reason to install this package.
%prep
(cd /usr/src/linux ; tar -cf - COPYING CREDITS README tools include scripts Kbuild Makefile arch/*/{include,lib,Makefile} kernel/bpf lib) | tar -xf -
cp /usr/src/linux/LICENSES/preferred/GPL-2.0 .
(cd %{_prefix}/src/linux ; tar -cf - COPYING CREDITS README tools include scripts Kbuild Makefile arch/*/{include,lib,Makefile} kernel/bpf lib) | tar -xf -
cp %{_prefix}/src/linux/LICENSES/preferred/GPL-2.0 .
sed -i -e 's/CFLAGS += -O2/CFLAGS = $(RPM_OPT_FLAGS)/' Makefile
%build
cd tools/bpf/bpftool
%make_build V=1 \
%make_build \
feature-reallocarray=1 \
feature-libbfd-liberty=1 \
feature-disassembler-four-args=1 \
@ -57,4 +68,7 @@ make install doc-install DESTDIR=%{buildroot} prefix=%{_prefix} mandir=%{_mandir
%{_datadir}/bash-completion/completions/bpftool
%{_mandir}/man?/*.gz
%files rebuild
%license GPL-2.0
%changelog