From patchwork Fri Aug 22 13:56:07 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michal Marek X-Patchwork-Id: 4764341 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 350CA9F37E for ; Fri, 22 Aug 2014 13:56:41 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 60AAF20136 for ; Fri, 22 Aug 2014 13:56:40 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 89B3320127 for ; Fri, 22 Aug 2014 13:56:39 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756532AbaHVN4L (ORCPT ); Fri, 22 Aug 2014 09:56:11 -0400 Received: from cantor2.suse.de ([195.135.220.15]:59846 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756506AbaHVN4J (ORCPT ); Fri, 22 Aug 2014 09:56:09 -0400 Received: from relay1.suse.de (charybdis-ext.suse.de [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id 02F66AB07; Fri, 22 Aug 2014 13:56:07 +0000 (UTC) Received: by sepie.suse.cz (Postfix, from userid 10020) id E2839440B4; Fri, 22 Aug 2014 15:56:07 +0200 (CEST) Date: Fri, 22 Aug 2014 15:56:07 +0200 From: Michal Marek To: "Darrick J. Wong" Cc: linux-kernel@vger.kernel.org, linux-kbuild@vger.kernel.org Subject: Re: [PATCH] builddeb: put the dbg files into the correct directory Message-ID: <20140822135607.GA15255@sepie.suse.cz> References: <20140819054928.GO2808@birch.djwong.org> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20140819054928.GO2808@birch.djwong.org> User-Agent: Mutt/1.5.21 (2010-09-15) 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.6 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable 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 On Mon, Aug 18, 2014 at 10:49:28PM -0700, Darrick J. Wong wrote: > Since the conversion of objtree to use relative pathnames (commit > 7e1c04779e, "kbuild: Use relative path for $(objtree)"), the debug > info files have been ending up in /debian/dbgtmp/ in the regular > linux-image package instead of the debug files package. Fix up the > paths so that the debug files end up in the -dbg package. > > Signed-off-by: Darrick J. Wong > --- > scripts/package/builddeb | 7 ++++--- > 1 file changed, 4 insertions(+), 3 deletions(-) > > diff --git a/scripts/package/builddeb b/scripts/package/builddeb > index 5707466..0456322 100644 > --- a/scripts/package/builddeb > +++ b/scripts/package/builddeb > @@ -153,15 +153,16 @@ if grep -q '^CONFIG_MODULES=y' $KCONFIG_CONFIG ; then > fi > if [ -n "$BUILD_DEBUG" ] ; then > ( > + old_dir="$(pwd)" > cd $tmpdir Can you try the patch below? I'd rather get rid of the directory change, if possible. Michal Tested-by: Darrick J. Wong diff --git a/scripts/package/builddeb b/scripts/package/builddeb index 35d5a58..dcfdbda 100755 --- a/scripts/package/builddeb +++ b/scripts/package/builddeb @@ -152,18 +152,16 @@ 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 $(find $tmpdir/lib/modules/ -name *.ko -printf '%P\n'); do + module=lib/modules/$module + 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 $module + done fi fi