lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20140822171000.GA10183@birch.djwong.org>
Date:	Fri, 22 Aug 2014 10:10:00 -0700
From:	"Darrick J. Wong" <darrick.wong@...cle.com>
To:	Michal Marek <mmarek@...e.cz>
Cc:	linux-kernel@...r.kernel.org, linux-kbuild@...r.kernel.org
Subject: Re: [PATCH] builddeb: put the dbg files into the correct directory

On Fri, Aug 22, 2014 at 03:56:07PM +0200, Michal Marek wrote:
> 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 <darrick.wong@...cle.com>
> > ---
> >  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
> 
> 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

This should read:

$OBJCOPY --add-gnu-debuglink=$dbg_dir/usr/lib/debug/$module $tmpdir/$module

(The last argument needs "$tmpdir/".)

but otherwise it's ok, so you can add:
Tested-by: Darrick J. Wong <darrick.wong@...cle.com>

--D
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ