diff -Nru pkg-create-dbgsym-0.66~trusty/debian/changelog pkg-create-dbgsym-0.67~trusty/debian/changelog --- pkg-create-dbgsym-0.66~trusty/debian/changelog 2015-04-28 14:07:41.000000000 +0000 +++ pkg-create-dbgsym-0.67~trusty/debian/changelog 2015-04-30 14:12:48.000000000 +0000 @@ -1,8 +1,19 @@ -pkg-create-dbgsym (0.66~trusty) trusty-proposed; urgency=medium +pkg-create-dbgsym (0.67~trusty) trusty; urgency=medium * Backport to trusty. - -- Martin Pitt Tue, 28 Apr 2015 16:06:45 +0200 + -- Martin Pitt Thu, 30 Apr 2015 16:12:16 +0200 + +pkg-create-dbgsym (0.67) vivid; urgency=medium + + * testsuite: Add dhtest.customdbgsym for a package that produces its own + -dbgsym package, like our "linux" source package. Reproduces LP #1450464. + * pkg_create_dbgsym: When called with -B (i. e. from dh_strip), create a + marker for dh_gencontrol, so that the latter does not try to process + custom -dbgsym binaries. (LP: #1450464) + * dh_strip: Don't try to process *-dbgsym binaries. + + -- Martin Pitt Thu, 30 Apr 2015 16:12:05 +0200 pkg-create-dbgsym (0.66) vivid; urgency=medium diff -Nru pkg-create-dbgsym-0.66~trusty/dh_gencontrol pkg-create-dbgsym-0.67~trusty/dh_gencontrol --- pkg-create-dbgsym-0.66~trusty/dh_gencontrol 2015-04-28 07:35:19.000000000 +0000 +++ pkg-create-dbgsym-0.67~trusty/dh_gencontrol 2015-04-30 13:50:37.000000000 +0000 @@ -174,6 +174,13 @@ continue fi + auto_stamp=$ddebpkgdir/DEBIAN/auto.pkg-create-dbgsym + if [ ! -e $auto_stamp ]; then + dbg "$ddebpkgdir not produced by pkg_create_dbgsym dh_strip wrapper, skipping package $p" + continue + fi + rm $auto_stamp + dbg "processing package $p (pkgdir $pkgdir, ddeb package dir $ddebpkgdir)" # adjust ddeb version from deb, for dpkg-gencontrol's -v option diff -Nru pkg-create-dbgsym-0.66~trusty/dh_strip pkg-create-dbgsym-0.67~trusty/dh_strip --- pkg-create-dbgsym-0.66~trusty/dh_strip 2015-04-27 10:57:17.000000000 +0000 +++ pkg-create-dbgsym-0.67~trusty/dh_strip 2015-04-30 13:57:49.000000000 +0000 @@ -197,7 +197,7 @@ # process all packages for p in $actpkgs; do if in_list "$p" "$ignorepkgs" || - echo $p | grep -q -- '-dbg$' ; then + echo $p | grep -Eq -- '-(dbg|dbgsym)$' ; then continue fi diff -Nru pkg-create-dbgsym-0.66~trusty/pkg_create_dbgsym pkg-create-dbgsym-0.67~trusty/pkg_create_dbgsym --- pkg-create-dbgsym-0.66~trusty/pkg_create_dbgsym 2015-04-27 10:57:17.000000000 +0000 +++ pkg-create-dbgsym-0.67~trusty/pkg_create_dbgsym 2015-04-30 13:50:13.000000000 +0000 @@ -210,6 +210,8 @@ if [ "$build_ddeb" != "1" ]; then dbg "deferring build of .ddeb to dh_gencontrol" + # leave marker to tell dh_gencontrol to process this + touch $dp/DEBIAN/auto.pkg-create-dbgsym # leave marker for $add_to_files for dh_gencontrol to pick up if [ "$add_to_files" = "1" ]; then touch $dp/DEBIAN/add_to_files.pkg-create-dbgsym diff -Nru pkg-create-dbgsym-0.66~trusty/tests/dhtest.customdbgsym/debian/changelog pkg-create-dbgsym-0.67~trusty/tests/dhtest.customdbgsym/debian/changelog --- pkg-create-dbgsym-0.66~trusty/tests/dhtest.customdbgsym/debian/changelog 1970-01-01 00:00:00.000000000 +0000 +++ pkg-create-dbgsym-0.67~trusty/tests/dhtest.customdbgsym/debian/changelog 2015-04-30 13:17:47.000000000 +0000 @@ -0,0 +1,5 @@ +dhtest.customdbgsym (1:2.3-1) foo; urgency=low + + * Initial release. + + -- Martin Pitt Fri, 16 Jun 2006 10:49:56 +0200 diff -Nru pkg-create-dbgsym-0.66~trusty/tests/dhtest.customdbgsym/debian/compat pkg-create-dbgsym-0.67~trusty/tests/dhtest.customdbgsym/debian/compat --- pkg-create-dbgsym-0.66~trusty/tests/dhtest.customdbgsym/debian/compat 1970-01-01 00:00:00.000000000 +0000 +++ pkg-create-dbgsym-0.67~trusty/tests/dhtest.customdbgsym/debian/compat 2015-04-30 13:06:49.000000000 +0000 @@ -0,0 +1 @@ +5 diff -Nru pkg-create-dbgsym-0.66~trusty/tests/dhtest.customdbgsym/debian/control pkg-create-dbgsym-0.67~trusty/tests/dhtest.customdbgsym/debian/control --- pkg-create-dbgsym-0.66~trusty/tests/dhtest.customdbgsym/debian/control 1970-01-01 00:00:00.000000000 +0000 +++ pkg-create-dbgsym-0.67~trusty/tests/dhtest.customdbgsym/debian/control 2015-04-30 13:46:59.000000000 +0000 @@ -0,0 +1,18 @@ +Source: dhtest.customdbgsym +Section: utils +Priority: extra +Maintainer: Martin Pitt +Build-Depends: debhelper (>= 4.1.0) +Standards-Version: 3.7.2 + +Package: dhtest1 +Architecture: any +Depends: ${shlibs:Depends} +Description: crash with a SIGFPE + Test package + +Package: dhtest1-dbgsym +Architecture: any +Depends: dhtest1 (= ${binary:Version}) +Description: debug symbols for package dhtest1 + Test package (custom debug symbols) diff -Nru pkg-create-dbgsym-0.66~trusty/tests/dhtest.customdbgsym/debian/copyright pkg-create-dbgsym-0.67~trusty/tests/dhtest.customdbgsym/debian/copyright --- pkg-create-dbgsym-0.66~trusty/tests/dhtest.customdbgsym/debian/copyright 1970-01-01 00:00:00.000000000 +0000 +++ pkg-create-dbgsym-0.67~trusty/tests/dhtest.customdbgsym/debian/copyright 2015-04-30 13:06:49.000000000 +0000 @@ -0,0 +1 @@ +foo diff -Nru pkg-create-dbgsym-0.66~trusty/tests/dhtest.customdbgsym/debian/rules pkg-create-dbgsym-0.67~trusty/tests/dhtest.customdbgsym/debian/rules --- pkg-create-dbgsym-0.66~trusty/tests/dhtest.customdbgsym/debian/rules 1970-01-01 00:00:00.000000000 +0000 +++ pkg-create-dbgsym-0.67~trusty/tests/dhtest.customdbgsym/debian/rules 2015-04-30 13:38:32.000000000 +0000 @@ -0,0 +1,43 @@ +#!/usr/bin/make -f + +# Uncomment this to turn on verbose mode. +#export DH_VERBOSE=1 + +# This has to be exported to make some magic below work. +export DH_OPTIONS + +clean: + dh_testdir + dh_testroot + dh_clean + +install: install-arch + +install-arch: + dh_testdir + dh_testroot + dh_clean -k -s + dh_installdirs -s + install -d debian/dhtest1/lib/dhtest + echo 'sys64738' > debian/dhtest1/lib/dhtest/someprog + install -d debian/dhtest1-dbgsym/usr/lib/debug/ + echo 'debug sys64738' > debian/dhtest1-dbgsym/usr/lib/debug/someprog + +binary-arch: install-arch + dh_testdir + dh_testroot + dh_installchangelogs + dh_installdocs + dh_strip + dh_compress + dh_fixperms + dh_installdeb + dh_shlibdeps + dh_gencontrol + dh_md5sums + dh_builddeb + D=$$(ls ../dhtest1-dbgsym_*.deb); mv $$D $${D%deb}ddeb + sed -i '/^dhtest1-dbgsym/ s/\.deb/\.ddeb/' debian/files + +binary: binary-arch +.PHONY: build clean binary-indep binary-arch binary install install-indep install-arch diff -Nru pkg-create-dbgsym-0.66~trusty/tests/run pkg-create-dbgsym-0.67~trusty/tests/run --- pkg-create-dbgsym-0.66~trusty/tests/run 2015-04-28 07:39:33.000000000 +0000 +++ pkg-create-dbgsym-0.67~trusty/tests/run 2015-04-30 13:45:57.000000000 +0000 @@ -1,6 +1,6 @@ #!/bin/sh -e -TESTSOURCES="dhtest dhtest.doublestrip dhtest.samename dhtest.substvars dhtest.whitespace dhtest.nostrip dhtest.noargs dhtest.archspecific dhtest.tmpdirarg dhtest.compat1 dhtest.compat1override dhtest.compatenvvar dhtest.dbg dhtest.dbg.buildid dhtest.dbg2 dhtest.dbg3 dhtest.pydbg dhtest.dbg.empty dhtest.versionoverride cdbstest manualtest" +TESTSOURCES="dhtest dhtest.doublestrip dhtest.samename dhtest.substvars dhtest.whitespace dhtest.nostrip dhtest.noargs dhtest.archspecific dhtest.tmpdirarg dhtest.compat1 dhtest.compat1override dhtest.compatenvvar dhtest.dbg dhtest.dbg.buildid dhtest.dbg2 dhtest.dbg3 dhtest.pydbg dhtest.dbg.empty dhtest.versionoverride dhtest.customdbgsym cdbstest manualtest" print_result() { if [ -n "$fail" ]; then @@ -86,6 +86,11 @@ # check for leftovers check_command "diff -ur $s ../$s" "No leftover files after cleaning $s" + if [ "${s%customdbgsym*}" != "$s" ]; then + echo "skipping ddeb check for custom -dbgsym test" + continue + fi + dbg_pkgs='' for deb in *.deb; do