From patchwork Fri Oct 10 17:49:43 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anthony DeRobertis X-Patchwork-Id: 5066841 Return-Path: X-Original-To: patchwork-linux-kbuild@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 7C9BB9F295 for ; Fri, 10 Oct 2014 18:34:41 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id B3C18200F2 for ; Fri, 10 Oct 2014 18:34:40 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id CB6B620220 for ; Fri, 10 Oct 2014 18:34:38 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751866AbaJJSei (ORCPT ); Fri, 10 Oct 2014 14:34:38 -0400 Received: from maxwell.derobert.net ([72.83.229.69]:49331 "EHLO Maxwell.derobert.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751765AbaJJSei (ORCPT ); Fri, 10 Oct 2014 14:34:38 -0400 X-Greylist: delayed 2554 seconds by postgrey-1.27 at vger.kernel.org; Fri, 10 Oct 2014 14:34:37 EDT Received: from anthony by Maxwell.derobert.net with local (Exim 3.36 #1 (Debian)) id 1XceJz-0006kP-00; Fri, 10 Oct 2014 13:49:43 -0400 Date: Fri, 10 Oct 2014 13:49:43 -0400 From: Anthony DeRobertis To: Michal Marek Cc: linux-kbuild@vger.kernel.org Subject: [PATCH] deb-pkg: Another fix for relative paths. Message-ID: <20141010174943.GQ19800@derobert.net> Mail-Followup-To: Anthony DeRobertis , linux-kbuild@vger.kernel.org Mime-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.9i Sender: linux-kbuild-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kbuild@vger.kernel.org X-Spam-Status: No, score=-7.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Similar to a765a7ce293aa0a072728790ce11088b2f7030e2, the -dbg package build did a cd, breaking relative paths. This resulted in the debug symbols being part of the kernel image package and further installed under /debian instead of /. Signed-off-by: Anthony DeRobertis --- scripts/package/builddeb | 21 +++++++++------------ 1 file changed, 9 insertions(+), 12 deletions(-) diff --git a/scripts/package/builddeb b/scripts/package/builddeb index 35d5a58..e6d70d8 100644 --- a/scripts/package/builddeb +++ b/scripts/package/builddeb @@ -152,18 +152,15 @@ if grep -q '^CONFIG_MODULES=y' $KCONFIG_CONFIG ; then rmdir "$tmpdir/lib/modules/$version" fi if [ -n "$BUILD_DEBUG" ] ; then - ( - cd $tmpdir - for module in $(find lib/modules/ -name *.ko); do - mkdir -p $(dirname $dbg_dir/usr/lib/debug/$module) - # only keep debug symbols in the debug file - $OBJCOPY --only-keep-debug $module $dbg_dir/usr/lib/debug/$module - # strip original module from debug symbols - $OBJCOPY --strip-debug $module - # then add a link to those - $OBJCOPY --add-gnu-debuglink=$dbg_dir/usr/lib/debug/$module $module - done - ) + for module in $(cd $tmpdir && find lib/modules/ -name *.ko); do + mkdir -p $(dirname $dbg_dir/usr/lib/debug/$module) + # only keep debug symbols in the debug file + $OBJCOPY --only-keep-debug $tmpdir/$module $dbg_dir/usr/lib/debug/$module + # strip original module from debug symbols + $OBJCOPY --strip-debug $tmpdir/$module + # then add a link to those + $OBJCOPY --add-gnu-debuglink=$dbg_dir/usr/lib/debug/$module $tmpdir/$module + done fi fi