Add versioned libbpf, libbpf-dev package (Closes: #914428)

This commit is contained in:
Hilko Bengen 2018-11-28 09:50:39 +01:00
parent 4f1f7c5735
commit 9eeeda7c0d
8 changed files with 74 additions and 3 deletions

1
debian/.gitignore vendored
View File

@ -13,6 +13,7 @@
/control.md5sum /control.md5sum
/files /files
/hyperv-daemons/ /hyperv-daemons/
/libbpf*/
/libcpupower*/ /libcpupower*/
/liblockdep*/ /liblockdep*/
/libusbip-dev/ /libusbip-dev/

1
debian/changelog vendored
View File

@ -46,6 +46,7 @@ linux (4.19.8-1~exp1) UNRELEASED; urgency=medium
[ Hilko Bengen ] [ Hilko Bengen ]
* Add patches to build libbpf.so with SONAME, link against libelf * Add patches to build libbpf.so with SONAME, link against libelf
* Add versioned libbpf, libbpf-dev package (Closes: #914428)
-- Uwe Kleine-König <ukleinek@debian.org> Wed, 28 Nov 2018 12:20:46 +0100 -- Uwe Kleine-König <ukleinek@debian.org> Wed, 28 Nov 2018 12:20:46 +0100

3
debian/libbpf-dev.install vendored Normal file
View File

@ -0,0 +1,3 @@
usr/include/bpf
usr/lib/*/libbpf.a
usr/lib/*/libbpf.so

View File

@ -1,5 +1,6 @@
SUBDIRS = \ SUBDIRS = \
hv \ hv \
lib/bpf \
lib/lockdep \ lib/lockdep \
objtool \ objtool \
perf \ perf \

17
debian/rules.d/tools/lib/bpf/Makefile vendored Normal file
View File

@ -0,0 +1,17 @@
include $(top_rulesdir)/Makefile.inc
DEB_HOST_MULTIARCH := $(shell dpkg-architecture -qDEB_HOST_MULTIARCH)
# Catch use of missing kernel APIs early
CFLAGS += -Werror=implicit-function-declaration
MAKE_BPF := +$(MAKE) -C $(top_srcdir)/$(OUTDIR)
MAKE_BPF += prefix=/usr
MAKE_BPF += libdir_relative=lib/$(DEB_HOST_MULTIARCH)
MAKE_BPF += V=$(KBUILD_VERBOSE)
all:
$(MAKE_BPF)
install:
$(MAKE_BPF) install install_headers

32
debian/rules.real vendored
View File

@ -105,8 +105,8 @@ ifneq ($(DO_TOOLS_VERSIONED),False)
endif endif
endif endif
ifneq ($(DO_TOOLS_UNVERSIONED),False) ifneq ($(DO_TOOLS_UNVERSIONED),False)
build-arch-arch:build-usbip build-cpupower build-liblockdep build-arch-arch:build-usbip build-cpupower build-liblockdep build-libbpf
binary-arch-arch: install-usbip install-cpupower install-liblockdep binary-arch-arch: install-usbip install-cpupower install-liblockdep install-libbpf
ifneq ($(filter i386 amd64 x32,$(DEB_HOST_ARCH)),) ifneq ($(filter i386 amd64 x32,$(DEB_HOST_ARCH)),)
build-arch-arch: build-hyperv-daemons build-arch-arch: build-hyperv-daemons
binary-arch-arch: install-hyperv-daemons binary-arch-arch: install-hyperv-daemons
@ -770,6 +770,34 @@ endif
dh_md5sums dh_md5sums
dh_builddeb dh_builddeb
build-libbpf:
$(call make-tools,tools/lib/bpf)
install-libbpf: DH_OPTIONS = -plibbpf$(VERSION) -plibbpf-dev
install-libbpf: DIR = $(CURDIR)/debian/libbpf-tmp
install-libbpf: build-libbpf
dh_testdir
dh_testroot
dh_prep
$(call make-tools,tools/lib/bpf) install DESTDIR=$(DIR)
env -u DH_OPTIONS dh_install -plibbpf$(VERSION) --sourcedir=$(DIR) \
'usr/lib/*/libbpf.so.*'
dh_install --sourcedir=$(DIR)
dh_installchangelogs
ifeq (,$(filter nodoc,$(DEB_BUILD_PROFILES)))
dh_installdocs
endif
dh_strip
dh_compress
dh_fixperms
env -u DH_OPTIONS dh_makeshlibs -plibbpf$(VERSION) \
libbpf$(VERSION)
dh_installdeb
dh_shlibdeps
dh_gencontrol
dh_md5sums
dh_builddeb
build-liblockdep: build-liblockdep:
$(call make-tools,tools/lib/lockdep) $(call make-tools,tools/lib/lockdep)

View File

@ -28,7 +28,7 @@ Build-Depends-Arch:
libssl-dev:native <!stage1>, libssl-dev <!stage1 !pkg.linux.notools>, libssl-dev:native <!stage1>, libssl-dev <!stage1 !pkg.linux.notools>,
openssl (>= 1.1.0-1~) <!stage1>, openssl (>= 1.1.0-1~) <!stage1>,
# used by upstream to build objtool (native for amd64 images; host arch for # used by upstream to build objtool (native for amd64 images; host arch for
# linux-kbuild) and perf (host arch) # linux-kbuild), perf (host arch), libbpf (host arch)
libelf-dev:native [amd64] <!stage1>, libelf-dev <!stage1 !pkg.linux.notools>, libelf-dev:native [amd64] <!stage1>, libelf-dev <!stage1 !pkg.linux.notools>,
Rules-Requires-Root: no Rules-Requires-Root: no
Vcs-Git: https://salsa.debian.org/kernel-team/linux.git Vcs-Git: https://salsa.debian.org/kernel-team/linux.git

View File

@ -111,3 +111,23 @@ Multi-Arch: same
Description: Runtime locking correctness validator (development files) Description: Runtime locking correctness validator (development files)
liblockdep is a library for programs that use the pthreads API, which can liblockdep is a library for programs that use the pthreads API, which can
be used to detect actual and potential deadlocks and other locking bugs. be used to detect actual and potential deadlocks and other locking bugs.
Package: libbpf@version@
Build-Profiles: <!stage1 !pkg.linux.notools>
Architecture: linux-any
Depends: ${shlibs:Depends}, ${misc:Depends}
Section: libs
Multi-Arch: same
Description: eBPF helper library (shared library)
libbpf is a library for loading eBPF programs and reading and
manipulating eBPF objects from user-space.
Package: libbpf-dev
Build-Profiles: <!stage1 !pkg.linux.notools>
Architecture: linux-any
Depends: ${misc:Depends}, libbpf@version@ (= ${binary:Version})
Section: libdevel
Multi-Arch: same
Description: eBPF helper library (development files)
libbpf is a library for loading eBPF programs and reading and
manipulating eBPF objects from user-space.