From f760fe10ede565dacb6e4eba472fa70a62db42d36d7523336a7b46a18b88674d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Rostecki?= Date: Mon, 11 Apr 2022 08:50:50 +0000 Subject: [PATCH] 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 --- bpftool.changes | 5 +++++ bpftool.spec | 26 ++++++++++++++++++++------ 2 files changed, 25 insertions(+), 6 deletions(-) diff --git a/bpftool.changes b/bpftool.changes index b0d79e9..81f1505 100644 --- a/bpftool.changes +++ b/bpftool.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Fri Apr 8 15:15:39 UTC 2022 - Dirk Müller + +- add rebuild subpackage to ensure rebuild in TW + ------------------------------------------------------------------- Thu Oct 14 11:40:44 UTC 2021 - Shung-Hsi Yu diff --git a/bpftool.spec b/bpftool.spec index 1fb6161..df78c96 100644 --- a/bpftool.spec +++ b/bpftool.spec @@ -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