[Unstable][PATCH 1/6] UBUNTU: [Debian]: Remove hardcoded $(pkgdir) in debug symbols handling
Mauricio Faria de Oliveira
mfo at canonical.com
Wed Aug 28 12:25:59 UTC 2019
BugLink: https://bugs.launchpad.net/bugs/1840704
The 'find .ko | sed | while read module' loop has the $(pkgdir) path
hardcoded in a couple places to reconstruct the path 'sed' destroyed.
Remove that 'sed' expression to destroy the first components of the
absolute pathname and get its '/lib/modules/'-based path with shell.
This is needed for the next patch.
Signed-off-by: Mauricio Faria de Oliveira <mfo at canonical.com>
---
debian/rules.d/2-binary-arch.mk | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/debian/rules.d/2-binary-arch.mk b/debian/rules.d/2-binary-arch.mk
index 083b64772439..730373e93e53 100644
--- a/debian/rules.d/2-binary-arch.mk
+++ b/debian/rules.d/2-binary-arch.mk
@@ -282,16 +282,17 @@ ifneq ($(skipdbg),true)
INSTALL_MOD_PATH=$(dbgpkgdir)/usr/lib/debug
# Add .gnu_debuglink sections to each stripped .ko
# pointing to unstripped verson
- find $(pkgdir) -name '*.ko' | sed 's|$(pkgdir)||'| while read module ; do \
+ find $(pkgdir) -name '*.ko' | while read path_module ; do \
+ module="/lib/modules/$${path_module#*/lib/modules/}"; \
if [[ -f "$(dbgpkgdir)/usr/lib/debug/$$module" ]] ; then \
$(CROSS_COMPILE)objcopy \
--add-gnu-debuglink=$(dbgpkgdir)/usr/lib/debug/$$module \
- $(pkgdir)/$$module; \
+ $$path_module; \
if grep -q CONFIG_MODULE_SIG=y $(builddir)/build-$*/.config; then \
$(builddir)/build-$*/scripts/sign-file $(MODHASHALGO) \
$(MODSECKEY) \
$(MODPUBKEY) \
- $(pkgdir)/$$module; \
+ $$path_module; \
fi; \
fi; \
done
--
2.17.1
More information about the kernel-team
mailing list