aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBen Hutchings <ben@decadent.org.uk>2017-08-13 17:29:43 +0100
committerBen Hutchings <ben@decadent.org.uk>2017-08-13 17:42:32 +0100
commit8c896b2cbc18a678f9280c9288da623b694cdefd (patch)
tree9f0696220f9ab911224d68416e0e79eb40127f5e
parentc8e760ebac91647b8ac0302264ae32726fc59040 (diff)
downloadkernel_replicant_linux-8c896b2cbc18a678f9280c9288da623b694cdefd.tar.gz
kernel_replicant_linux-8c896b2cbc18a678f9280c9288da623b694cdefd.tar.bz2
kernel_replicant_linux-8c896b2cbc18a678f9280c9288da623b694cdefd.zip
liblockdep: Re-enable liblockdep packages following upstream fixes
This reverts commit 85b468262e78 "Remove unused liblockdep packaging" and 87d08943da4c "liblockdep: Stop trying to build packages, as it failed to build again", but doesn't restore the patches. All our patches, and further build fixes, were applied upstream as of v4.13-rc1.
-rw-r--r--debian/.gitignore2
-rw-r--r--debian/changelog1
-rw-r--r--debian/liblockdep-dev.README.Debian13
-rw-r--r--debian/liblockdep-dev.docs1
-rw-r--r--debian/liblockdep-dev.install3
-rw-r--r--debian/lockdep.dirs1
-rw-r--r--debian/rules.d/tools/Makefile1
-rw-r--r--debian/rules.d/tools/lib/lockdep/Makefile20
-rw-r--r--debian/rules.d/tools/lib/lockdep/lockdep.in2
-rw-r--r--debian/rules.real51
-rw-r--r--debian/templates/control.tools.in31
11 files changed, 125 insertions, 1 deletions
diff --git a/debian/.gitignore b/debian/.gitignore
index 26b537c303cf..d040fa3c7b73 100644
--- a/debian/.gitignore
+++ b/debian/.gitignore
@@ -14,10 +14,12 @@
/files
/hyperv-daemons/
/libcpupower*/
+/liblockdep*/
/libusbip-dev/
/linux-*
!/linux-cpupower.install
!/linux-cpupower.manpages
+/lockdep/
/po/
/rules.gen
/stamps/
diff --git a/debian/changelog b/debian/changelog
index 14115d41a93b..bed0ebae0625 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -7,6 +7,7 @@ linux (4.13~rc4-1~exp1) UNRELEASED; urgency=medium
x86_energy_perf_policy
* Remove support for upstream DocBook-based documentation, including the
linux-manual package
+ * liblockdep: Re-enable liblockdep packages following upstream fixes
-- Ben Hutchings <ben@decadent.org.uk> Sun, 13 Aug 2017 14:10:41 +0100
diff --git a/debian/liblockdep-dev.README.Debian b/debian/liblockdep-dev.README.Debian
new file mode 100644
index 000000000000..a0673a1707d7
--- /dev/null
+++ b/debian/liblockdep-dev.README.Debian
@@ -0,0 +1,13 @@
+liblockdep for Debian
+---------------------
+
+liblockdep does not have proper documentation, but these articles
+provide an introduction:
+
+ https://lwn.net/Articles/536363/
+ http://www.vctlabs.com/posts/2014/Jul/09/liblockdep/
+
+'lockdep-design.txt' explains some more detail about what lockdep
+does, both in the kernel and as liblockdep.
+
+ -- Ben Hutchings <ben@decadent.org.uk>, Fri, 14 Aug 2015 14:22:55 +0200
diff --git a/debian/liblockdep-dev.docs b/debian/liblockdep-dev.docs
new file mode 100644
index 000000000000..15b2bbe123e5
--- /dev/null
+++ b/debian/liblockdep-dev.docs
@@ -0,0 +1 @@
+Documentation/locking/lockdep-design.txt
diff --git a/debian/liblockdep-dev.install b/debian/liblockdep-dev.install
new file mode 100644
index 000000000000..bd857244bef9
--- /dev/null
+++ b/debian/liblockdep-dev.install
@@ -0,0 +1,3 @@
+usr/include/liblockdep
+usr/lib/*/liblockdep.a
+usr/lib/*/liblockdep.so
diff --git a/debian/lockdep.dirs b/debian/lockdep.dirs
new file mode 100644
index 000000000000..e77248175524
--- /dev/null
+++ b/debian/lockdep.dirs
@@ -0,0 +1 @@
+usr/bin
diff --git a/debian/rules.d/tools/Makefile b/debian/rules.d/tools/Makefile
index 1680e2f9d3ce..454aa671986f 100644
--- a/debian/rules.d/tools/Makefile
+++ b/debian/rules.d/tools/Makefile
@@ -1,5 +1,6 @@
SUBDIRS = \
hv \
+ lib/lockdep \
perf \
power \
usb/usbip
diff --git a/debian/rules.d/tools/lib/lockdep/Makefile b/debian/rules.d/tools/lib/lockdep/Makefile
new file mode 100644
index 000000000000..cb8c122f8512
--- /dev/null
+++ b/debian/rules.d/tools/lib/lockdep/Makefile
@@ -0,0 +1,20 @@
+include $(top_rulesdir)/Makefile.inc
+
+DEB_HOST_MULTIARCH := $(shell dpkg-architecture -qDEB_HOST_MULTIARCH)
+
+MAKE_LOCKDEP := +$(MAKE) -C $(top_srcdir)/$(OUTDIR) O=$(CURDIR) V=1 \
+ prefix=/usr libdir_relative=lib/$(DEB_HOST_MULTIARCH) \
+ LIBLOCKDEP_VERSION=$(VERSION) \
+ CONFIG_FLAGS='$(CFLAGS) $(filter -D%,$(CPPFLAGS))' LDFLAGS='$(LDFLAGS)'
+
+unexport CFLAGS
+
+all:
+ $(MAKE_LOCKDEP)
+
+install:
+ $(MAKE_LOCKDEP) install
+ mkdir -p $(DESTDIR)/usr/include
+ cp -R $(top_srcdir)/$(OUTDIR)/include/liblockdep $(DESTDIR)/usr/include/
+ ln -s liblockdep.so.$(VERSION) \
+ $(DESTDIR)/usr/lib/$(DEB_HOST_MULTIARCH)/liblockdep.so
diff --git a/debian/rules.d/tools/lib/lockdep/lockdep.in b/debian/rules.d/tools/lib/lockdep/lockdep.in
new file mode 100644
index 000000000000..4a0d03ac5211
--- /dev/null
+++ b/debian/rules.d/tools/lib/lockdep/lockdep.in
@@ -0,0 +1,2 @@
+#!/bin/sh
+LD_PRELOAD="liblockdep.so.@VERSION@ $LD_PRELOAD" exec "$@"
diff --git a/debian/rules.real b/debian/rules.real
index 758199330472..1668e8464d43 100644
--- a/debian/rules.real
+++ b/debian/rules.real
@@ -74,7 +74,7 @@ binary-indep: install-support
ifneq ($(DO_TOOLS),False)
build-arch-arch: $(STAMPS_DIR)/build-tools
- binary-arch-arch: install-kbuild install-usbip install-cpupower
+ binary-arch-arch: install-kbuild install-usbip install-liblockdep install-cpupower
ifneq ($(filter alpha amd64 arm64 armel armhf hppa i386 mips mips64 mips64el mipsel powerpc powerpcspe ppc64 ppc64el s390 s390x sh4 sparc sparc64,$(DEB_HOST_ARCH)),)
ifeq ($(filter nopython,$(DEB_BUILD_PROFILES)),)
binary-arch-arch: install-perf
@@ -83,6 +83,7 @@ ifneq ($(DO_TOOLS),False)
ifneq ($(filter i386 amd64 x32,$(DEB_HOST_ARCH)),)
binary-arch-arch: install-hyperv-daemons
endif
+ binary-indep: install-lockdep
endif
binary-indep-featureset: install-common-headers_$(FEATURESET)
@@ -675,4 +676,52 @@ endif
dh_md5sums
dh_builddeb
+install-liblockdep: DH_OPTIONS = -pliblockdep$(VERSION) -pliblockdep-dev
+install-liblockdep: DIR = $(CURDIR)/debian/liblockdep-tmp
+install-liblockdep: $(STAMPS_DIR)/build-tools
+ dh_testdir
+ dh_testroot
+ dh_prep
+ $(call make-tools,tools/lib/lockdep) install DESTDIR=$(DIR)
+ env -u DH_OPTIONS dh_install -pliblockdep$(VERSION) --sourcedir=$(DIR) \
+ 'usr/lib/*/liblockdep.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 -pliblockdep$(VERSION) \
+ liblockdep$(VERSION)
+ dh_installdeb
+ dh_shlibdeps
+ dh_gencontrol
+ dh_md5sums
+ dh_builddeb
+
+install-lockdep: PACKAGE_NAME = lockdep
+install-lockdep: DH_OPTIONS = -p$(PACKAGE_NAME)
+install-lockdep: DIR = $(CURDIR)/debian/$(PACKAGE_NAME)
+install-lockdep:
+ dh_testdir
+ dh_testroot
+ dh_prep
+ dh_installdirs
+# Upstream lockdep preload script is not suitable for installation
+ sed 's/@VERSION@/$(VERSION)/' debian/rules.d/tools/lib/lockdep/lockdep.in \
+ > $(DIR)/usr/bin/lockdep
+ chmod 755 $(DIR)/usr/bin/lockdep
+ dh_installchangelogs
+ifeq (,$(filter nodoc,$(DEB_BUILD_PROFILES)))
+ dh_installdocs
+endif
+ dh_compress
+ dh_fixperms
+ dh_installdeb
+ dh_gencontrol
+ dh_md5sums
+ dh_builddeb
+
# vim: filetype=make
diff --git a/debian/templates/control.tools.in b/debian/templates/control.tools.in
index ca245b7b1df5..e4433be03510 100644
--- a/debian/templates/control.tools.in
+++ b/debian/templates/control.tools.in
@@ -106,3 +106,34 @@ Description: Support daemons for Linux running on Hyper-V
.
hv_vss_daemon provides the volume shadow copy service (VSS), allowing
the host to freeze the guest filesystems while taking a snapshot.
+
+Package: lockdep
+Build-Profiles: <!stage1 !pkg.linux.notools>
+Architecture: all
+Depends: ${shlibs:Depends}, ${misc:Depends}, liblockdep@version@
+Recommends: liblockdep-dev
+Section: devel
+Multi-Arch: allowed
+Description: Runtime locking correctness validator
+ lockdep is a wrapper for programs that use the pthreads API, which detects
+ actual and potential deadlocks and other locking bugs.
+
+Package: liblockdep@version@
+Build-Profiles: <!stage1 !pkg.linux.notools>
+Architecture: linux-any
+Depends: ${shlibs:Depends}, ${misc:Depends}
+Section: libs
+Multi-Arch: same
+Description: Runtime locking correctness validator (shared library)
+ 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.
+
+Package: liblockdep-dev
+Build-Profiles: <!stage1 !pkg.linux.notools>
+Architecture: linux-any
+Depends: ${shlibs:Depends}, ${misc:Depends}, liblockdep@version@ (= ${binary:Version})
+Section: libdevel
+Multi-Arch: same
+Description: Runtime locking correctness validator (development files)
+ 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.