diff --git a/debian/changelog b/debian/changelog index 578a893fb..83d54a0de 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,10 @@ +linux (4.3.3-7) unstable; urgency=medium + + * linux-image-dbg: Don't rely on upstream makefile to make .build-id + links to vDSO debuginfo (fixes FTBFS on arm64, s390) + + -- Ben Hutchings Tue, 19 Jan 2016 17:29:21 +0000 + linux (4.3.3-6) unstable; urgency=medium [ Ben Hutchings ] diff --git a/debian/rules.real b/debian/rules.real index 9a284baa4..a2db24504 100644 --- a/debian/rules.real +++ b/debian/rules.real @@ -431,14 +431,15 @@ ifeq ($(MODULES),True) endif ifeq ($(VDSO),True) +$(MAKE_CLEAN) -C $(DIR) vdso_install INSTALL_MOD_PATH='$(CURDIR)'/$(DEBUG_DIR) -# Fix .build-id links - find $(DEBUG_DIR)/lib/modules/$(REAL_VERSION)/vdso/.build-id -name '*.debug' | while read link; do \ - rel_path="$${link#$(DEBUG_DIR)/lib/modules/$(REAL_VERSION)/vdso/.build-id/}" && \ - mkdir -p "$(DEBUG_DIR)/.build-id/$$(dirname "$$rel_path")" && \ - ln -s -r -L "$$link" "$(DEBUG_DIR)/.build-id/$$rel_path" || \ - exit; \ +# Create .build-id links. Some architectures already do so, but in the +# wrong place, so delete those first. + rm -rf $(DEBUG_DIR)/lib/modules/$(REAL_VERSION)/vdso/.build-id + find $(DEBUG_DIR)/lib/modules/$(REAL_VERSION)/vdso/ -type f | while read vdso; do \ + if buildid="$$(readelf -n "$$vdso" | sed -rne 's/^\s+Build ID: (.*)$$/\1/p')" && [ "$$buildid" ]; then \ + mkdir -p "$(DEBUG_DIR)/.build-id/$${buildid:0:2}"; \ + ln -s -r "$$vdso" "$(DEBUG_DIR)/.build-id/$${buildid:0:2}/$${buildid:2}.debug"; \ + fi; \ done - rm -r $(DEBUG_DIR)/lib/modules/$(REAL_VERSION)/vdso/.build-id endif # Add symlinks to vmlinux from the locations expected by kdump-tools, # systemtap and others