Merge lp:~tormodvolden/ubuntu/lucid/pkg-create-dbgsym/doublestrip into lp:ubuntu/lucid/pkg-create-dbgsym

Proposed by Tormod Volden
Status: Rejected
Rejected by: Martin Pitt
Proposed branch: lp:~tormodvolden/ubuntu/lucid/pkg-create-dbgsym/doublestrip
Merge into: lp:ubuntu/lucid/pkg-create-dbgsym
Diff against target: 4778 lines (+3968/-0) (has conflicts)
155 files modified
.bzrignore (+4/-0)
debian/changelog (+439/-0)
debian/compat (+1/-0)
debian/control (+22/-0)
debian/copyright (+24/-0)
debian/pkg-create-dbgsym.install (+2/-0)
debian/pkg-create-dbgsym.lintian-overrides (+1/-0)
debian/postrm (+19/-0)
debian/preinst (+19/-0)
debian/rules (+15/-0)
dh_strip (+205/-0)
pkg_create_dbgsym (+149/-0)
tests/cdbstest/Makefile (+18/-0)
tests/cdbstest/crash.c (+34/-0)
tests/cdbstest/crash2.c (+39/-0)
tests/cdbstest/debian/cdbstest1.install (+1/-0)
tests/cdbstest/debian/cdbstest2.install (+1/-0)
tests/cdbstest/debian/changelog (+5/-0)
tests/cdbstest/debian/compat (+1/-0)
tests/cdbstest/debian/control (+31/-0)
tests/cdbstest/debian/copyright (+1/-0)
tests/cdbstest/debian/rules (+10/-0)
tests/dhtest.archspecific/Makefile (+18/-0)
tests/dhtest.archspecific/crash.c (+34/-0)
tests/dhtest.archspecific/crash2.c (+39/-0)
tests/dhtest.archspecific/debian/changelog (+5/-0)
tests/dhtest.archspecific/debian/compat (+1/-0)
tests/dhtest.archspecific/debian/control (+31/-0)
tests/dhtest.archspecific/debian/copyright (+1/-0)
tests/dhtest.archspecific/debian/dhtest-i386.install (+1/-0)
tests/dhtest.archspecific/debian/dhtest-ppc.install (+1/-0)
tests/dhtest.archspecific/debian/dhtest64.install (+1/-0)
tests/dhtest.archspecific/debian/rules (+76/-0)
tests/dhtest.compat1/Makefile (+18/-0)
tests/dhtest.compat1/crash.c (+34/-0)
tests/dhtest.compat1/crash2.c (+39/-0)
tests/dhtest.compat1/debian/changelog (+5/-0)
tests/dhtest.compat1/debian/control (+25/-0)
tests/dhtest.compat1/debian/copyright (+1/-0)
tests/dhtest.compat1/debian/rules (+75/-0)
tests/dhtest.compat1override/Makefile (+18/-0)
tests/dhtest.compat1override/crash.c (+34/-0)
tests/dhtest.compat1override/crash2.c (+39/-0)
tests/dhtest.compat1override/debian/changelog (+5/-0)
tests/dhtest.compat1override/debian/compat (+1/-0)
tests/dhtest.compat1override/debian/control (+25/-0)
tests/dhtest.compat1override/debian/copyright (+1/-0)
tests/dhtest.compat1override/debian/rules (+77/-0)
tests/dhtest.compatenvvar/Makefile (+18/-0)
tests/dhtest.compatenvvar/crash.c (+34/-0)
tests/dhtest.compatenvvar/crash2.c (+39/-0)
tests/dhtest.compatenvvar/debian/changelog (+5/-0)
tests/dhtest.compatenvvar/debian/control (+13/-0)
tests/dhtest.compatenvvar/debian/copyright (+1/-0)
tests/dhtest.compatenvvar/debian/rules (+64/-0)
tests/dhtest.dbg/Makefile (+18/-0)
tests/dhtest.dbg/crash.c (+34/-0)
tests/dhtest.dbg/crash2.c (+39/-0)
tests/dhtest.dbg/debian/changelog (+5/-0)
tests/dhtest.dbg/debian/compat (+1/-0)
tests/dhtest.dbg/debian/control (+31/-0)
tests/dhtest.dbg/debian/copyright (+1/-0)
tests/dhtest.dbg/debian/dhtest1.install (+1/-0)
tests/dhtest.dbg/debian/dhtest2.install (+1/-0)
tests/dhtest.dbg/debian/rules (+87/-0)
tests/dhtest.dbg2/Makefile (+18/-0)
tests/dhtest.dbg2/crash.c (+34/-0)
tests/dhtest.dbg2/crash2.c (+39/-0)
tests/dhtest.dbg2/debian/changelog (+5/-0)
tests/dhtest.dbg2/debian/compat (+1/-0)
tests/dhtest.dbg2/debian/control (+37/-0)
tests/dhtest.dbg2/debian/copyright (+1/-0)
tests/dhtest.dbg2/debian/dhtest1.install (+1/-0)
tests/dhtest.dbg2/debian/dhtest2.install (+1/-0)
tests/dhtest.dbg2/debian/rules (+89/-0)
tests/dhtest.dbg3/Makefile (+18/-0)
tests/dhtest.dbg3/crash.c (+34/-0)
tests/dhtest.dbg3/crash2.c (+39/-0)
tests/dhtest.dbg3/debian/changelog (+5/-0)
tests/dhtest.dbg3/debian/compat (+1/-0)
tests/dhtest.dbg3/debian/control (+31/-0)
tests/dhtest.dbg3/debian/copyright (+1/-0)
tests/dhtest.dbg3/debian/dhtest1.install (+1/-0)
tests/dhtest.dbg3/debian/dhtest2.install (+1/-0)
tests/dhtest.dbg3/debian/rules (+86/-0)
tests/dhtest.noargs/Makefile (+19/-0)
tests/dhtest.noargs/crash.c (+34/-0)
tests/dhtest.noargs/crash2.c (+39/-0)
tests/dhtest.noargs/debian/changelog (+5/-0)
tests/dhtest.noargs/debian/compat (+1/-0)
tests/dhtest.noargs/debian/control (+29/-0)
tests/dhtest.noargs/debian/copyright (+1/-0)
tests/dhtest.noargs/debian/dhtest1.install (+1/-0)
tests/dhtest.noargs/debian/dhtest2.install (+1/-0)
tests/dhtest.noargs/debian/rules (+69/-0)
tests/dhtest.nostrip/Makefile (+19/-0)
tests/dhtest.nostrip/crash.c (+34/-0)
tests/dhtest.nostrip/crash2.c (+39/-0)
tests/dhtest.nostrip/debian/changelog (+5/-0)
tests/dhtest.nostrip/debian/compat (+1/-0)
tests/dhtest.nostrip/debian/control (+30/-0)
tests/dhtest.nostrip/debian/copyright (+1/-0)
tests/dhtest.nostrip/debian/dhtest1.install (+1/-0)
tests/dhtest.nostrip/debian/dhtest2-nostrip.install (+2/-0)
tests/dhtest.nostrip/debian/rules (+84/-0)
tests/dhtest.samename/Makefile (+18/-0)
tests/dhtest.samename/crash.c (+34/-0)
tests/dhtest.samename/crash2.c (+39/-0)
tests/dhtest.samename/debian/changelog (+5/-0)
tests/dhtest.samename/debian/compat (+1/-0)
tests/dhtest.samename/debian/control (+29/-0)
tests/dhtest.samename/debian/copyright (+1/-0)
tests/dhtest.samename/debian/dhtest.samename.install (+1/-0)
tests/dhtest.samename/debian/dhtest1.install (+1/-0)
tests/dhtest.samename/debian/rules (+76/-0)
tests/dhtest.tmpdirarg/Makefile (+18/-0)
tests/dhtest.tmpdirarg/crash.c (+34/-0)
tests/dhtest.tmpdirarg/crash2.c (+39/-0)
tests/dhtest.tmpdirarg/debian/changelog (+5/-0)
tests/dhtest.tmpdirarg/debian/compat (+1/-0)
tests/dhtest.tmpdirarg/debian/control (+12/-0)
tests/dhtest.tmpdirarg/debian/copyright (+1/-0)
tests/dhtest.tmpdirarg/debian/dhtest1.install (+1/-0)
tests/dhtest.tmpdirarg/debian/rules (+57/-0)
tests/dhtest.versionoverride/Makefile (+18/-0)
tests/dhtest.versionoverride/crash.c (+34/-0)
tests/dhtest.versionoverride/crash2.c (+39/-0)
tests/dhtest.versionoverride/debian/changelog (+5/-0)
tests/dhtest.versionoverride/debian/compat (+1/-0)
tests/dhtest.versionoverride/debian/control (+18/-0)
tests/dhtest.versionoverride/debian/copyright (+1/-0)
tests/dhtest.versionoverride/debian/dhtest1.install (+1/-0)
tests/dhtest.versionoverride/debian/dhtest2.install (+1/-0)
tests/dhtest.versionoverride/debian/rules (+57/-0)
tests/dhtest.whitespace/Makefile (+18/-0)
tests/dhtest.whitespace/crash.c (+34/-0)
tests/dhtest.whitespace/crash2.c (+39/-0)
tests/dhtest.whitespace/debian/changelog (+5/-0)
tests/dhtest.whitespace/debian/compat (+1/-0)
tests/dhtest.whitespace/debian/control (+35/-0)
tests/dhtest.whitespace/debian/copyright (+1/-0)
tests/dhtest.whitespace/debian/dhtest1.install (+1/-0)
tests/dhtest.whitespace/debian/dhtest2.install (+1/-0)
tests/dhtest.whitespace/debian/rules (+76/-0)
tests/dhtest/Makefile (+18/-0)
tests/dhtest/crash.c (+34/-0)
tests/dhtest/crash2.c (+39/-0)
tests/dhtest/debian/changelog (+5/-0)
tests/dhtest/debian/compat (+1/-0)
tests/dhtest/debian/control (+30/-0)
tests/dhtest/debian/copyright (+1/-0)
tests/dhtest/debian/dhtest1.install (+1/-0)
tests/dhtest/debian/dhtest2.install (+1/-0)
tests/dhtest/debian/rules (+76/-0)
tests/run (+107/-0)
Conflict adding file debian.  Moved existing file to debian.moved.
Conflict adding file dh_strip.  Moved existing file to dh_strip.moved.
Conflict adding file pkg_create_dbgsym.  Moved existing file to pkg_create_dbgsym.moved.
Conflict adding file tests.  Moved existing file to tests.moved.
To merge this branch: bzr merge lp:~tormodvolden/ubuntu/lucid/pkg-create-dbgsym/doublestrip
Reviewer Review Type Date Requested Status
Ubuntu branches Pending
Review via email: mp+23877@code.launchpad.net
To post a comment you must log in.
Revision history for this message
Martin Pitt (pitti) wrote :

Unmerged revisions

177. By Tormod Volden

add changelog entry

176. By Tormod Volden

do not strip an already stripped file

175. By Martin Pitt

releasing version 0.41

174. By Martin Pitt

dh_strip: Fix the "is this package in this list" grep to only match on
whitespace separation, not on e. g. dashes (which grep -w does). This
caused some ddebs like "libglib2.0-0-dbgsym" not to be built if dh_strip
was called with ignoring a similar package name (-Nlibglib2.0-0-refdbg).
To make this more robust, define a new shell function in_list() for this
and just implement it once. (LP: #566602)

173. By Martin Pitt

tests/dhtest.dbg2: Add a new package dhtest2-extra which we exclude from
dh_strip with -N. This causes dhtest2-dbgsym to not be generated and thus
reproduces LP #566602.

172. By Martin Pitt

releasing version 0.40

171. By Martin Pitt

Strip -O from options passed from dh not only for comparison but also for
processing them. (LP: #520767)

170. By Martin Pitt

releasing version 0.39

169. By Martin Pitt

Strip -O from options passed from dh (LP: #520767).

168. By Loïc Minier

Release 0.38

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== added file '.bzrignore'
--- .bzrignore 1970-01-01 00:00:00 +0000
+++ .bzrignore 2010-04-21 20:29:14 +0000
@@ -0,0 +1,4 @@
1/debian/files
2/debian/pkg-create-dbgsym/
3/debian/pkg-create-dbgsym.debhelper.log
4/debian/pkg-create-dbgsym.substvars
05
=== added directory 'debian'
=== renamed directory 'debian' => 'debian.moved'
=== added file 'debian/changelog'
--- debian/changelog 1970-01-01 00:00:00 +0000
+++ debian/changelog 2010-04-21 20:29:14 +0000
@@ -0,0 +1,439 @@
1pkg-create-dbgsym (0.42) lucid; urgency=low
2
3 * Do not strip a binary which for any reason is already stripped.
4 It will make a useless debug file, potentially overwriting
5 a good one, and also overwrite the debug link. (LP: 562418)
6
7 -- Tormod Volden <debian.tormod@gmail.com> Wed, 21 Apr 2010 21:29:51 +0200
8
9pkg-create-dbgsym (0.41) lucid; urgency=low
10
11 * tests/dhtest.dbg2: Add a new package dhtest2-extra which we exclude from
12 dh_strip with -N. This causes dhtest2-dbgsym to not be generated and thus
13 reproduces LP #566602.
14 * dh_strip: Fix the "is this package in this list" grep to only match on
15 whitespace separation, not on e. g. dashes (which grep -w does). This
16 caused some ddebs like "libglib2.0-0-dbgsym" not to be built if dh_strip
17 was called with ignoring a similar package name (-Nlibglib2.0-0-refdbg).
18 To make this more robust, define a new shell function in_list() for this
19 and just implement it once. (LP: #566602)
20
21 -- Martin Pitt <martin.pitt@ubuntu.com> Tue, 20 Apr 2010 11:01:37 +0200
22
23pkg-create-dbgsym (0.40) lucid; urgency=low
24
25 * Strip -O from options passed from dh not only for comparison but also for
26 processing them. (LP: #520767)
27
28 -- Michael Bienia <geser@ubuntu.com> Thu, 08 Apr 2010 10:35:01 +0200
29
30pkg-create-dbgsym (0.39) lucid; urgency=low
31
32 * Strip -O from options passed from dh (LP: #520767).
33
34 -- Michael Bienia <geser@ubuntu.com> Mon, 15 Feb 2010 12:22:05 +0100
35
36pkg-create-dbgsym (0.38) lucid; urgency=low
37
38 * tests/run: set the new var PKG_IGNORE_CURRENTLY_BUILDING=1 instead of
39 NO_PKG_MANGLE=1 since pkg-create-dbgsym also disables itself when setting
40 NO_PKG_MANGLE=1 and this breaks the testsuite; build-conflict with
41 pkgbinarymangler << 66~. Also, unset NO_PKG_MANGLE as it's set by buildds
42 and will cause the same issue.
43 * dh_strip: if PKG_IGNORE_CURRENTLY_BUILDING is set to 1 don't read
44 /CurrentlyBuilding to decided whether or not to build -dbgsym packages but
45 build them unconditionally.
46 * Build-depend on gdb for the testsuite and on cdbs for the cdbstest
47 package.
48
49 -- Loïc Minier <loic.minier@ubuntu.com> Sat, 16 Jan 2010 18:34:20 +0100
50
51pkg-create-dbgsym (0.37) lucid; urgency=low
52
53 * tests/run: set NO_PKG_MANGLE=1 in the env when calling dpkg-buildpackage
54 to build test packages as to avoid pkgbinarymangler's pkgsanitychecks to
55 fail the build when it notices another package than the /CurrentlyBuilding
56 one is being built. Ideally, we'd also hook into dpkg-buildpackage or
57 some other place to detect what is being built.
58
59 -- Loïc Minier <loic.minier@ubuntu.com> Fri, 15 Jan 2010 01:44:56 +0100
60
61pkg-create-dbgsym (0.36) lucid; urgency=low
62
63 * Drop XB-Python-Version from the headers we copy over from debian/control
64 for -dbgsym packages: it's usually set to ${python:Versions} -- but the
65 -dbgsym package has no such substvar -- and the -dbgsym isn't a python-
66 lib anyway.
67 * Add ${misc:Depends}.
68 * Bump debhelper build-dep to >= 7 for dh_prep.
69 * Rewrite rules using "dh" since we need debhelper 7 anyway.
70 * Also test for presence of tests/testsuite.tmp to fail clean:.
71 * Adapt dh_strip to test whether it's looping trying to run itself and also
72 to try running /usr/bin/dh_strip in the case where pkg-create-dbgsym is
73 not installed in the build environment (but debhelper is); this allows
74 running the testsuite during build, so do that.
75 * Bump debhelper build-dep to >= 7.0.50~ for overrides.
76
77 -- Loïc Minier <loic.minier@ubuntu.com> Thu, 14 Jan 2010 18:09:17 +0100
78
79pkg-create-dbgsym (0.35) lucid; urgency=low
80
81 * Add -k as an alias option name for --keep-debug. Thanks to Michael Bienia!
82
83 -- Martin Pitt <martin.pitt@ubuntu.com> Mon, 30 Nov 2009 22:15:43 +0100
84
85pkg-create-dbgsym (0.34) lucid; urgency=low
86
87 * Also skip over XB-Python-Version header when generating the new control
88 file; this avoids the "unknown substitution variable ${python:Versions}"
89 warning when generating the -dbgsym packages; thanks Michael Bienia.
90
91 -- Loïc Minier <loic.minier@ubuntu.com> Sat, 28 Nov 2009 18:10:52 +0100
92
93pkg-create-dbgsym (0.33) lucid; urgency=low
94
95 * Invert the logic which dh_strip used to pass the "don't add ddebs to
96 .changes" down to pkg_create_dbgsym. This prevents packages which don't
97 use debhelper, but call pkg_create_dbgsym directly from suddenly adding
98 ddebs to .changes (which makes Soyuz unhappy).
99
100 -- Martin Pitt <martin.pitt@ubuntu.com> Wed, 18 Nov 2009 19:21:54 -0600
101
102pkg-create-dbgsym (0.32) lucid; urgency=low
103
104 [ Loïc Minier ]
105 * Fix Vcs-Bzr, it's /ubuntu, not /trunk
106
107 [ Martin Pitt ]
108 * Add Source: field to ddebs whose original name had the same name as the
109 source. Soyuz does not like those. Thanks to William Grant for the patch!
110 (LP: #429782)
111 * Add ddebs to .changes file now, since Soyuz will support that soon. Check
112 /CurrentlyBuilding for the Build-Debug-Symbols flag, and fall back to the
113 old logic if it does not exist. Thanks to William Grant! (LP: #429796,
114 #429793)
115
116 -- Martin Pitt <martin.pitt@ubuntu.com> Sun, 15 Nov 2009 06:36:58 -0600
117
118pkg-create-dbgsym (0.31) karmic; urgency=low
119
120 [ Loïc Minier ]
121 * Add lintian override for lack of dh_strip manpage (dh_strip is diverted);
122 bump debhelper build-dep to >= 6.0.7~ for dh_lintian.
123 * Move debhelper to build-deps instead of build-deps-indep for clean:.
124 * Bump debhelper compat level to 5.
125 * Bump up Standards-Version to 3.8.3; no change needed.
126 * Use dh_prep instead of dh_clean -k; update debhelper build-dep to
127 >= 6.0.13~.
128 * Pass -i to dh_* in binary-indep.
129 * Use dh_install to install the binaries, dh_fixperms will set them +x.
130
131 [ Martin Pitt ]
132 * dhtest.archspecific: Add a package with "Architecture: kfreebsd-i386
133 kfreebsd-amd64". This reproduces the current glib2.0 FTBFS on i386/amd64.
134 * dh_clean: Fix grepping of Architecture field to only match space separated
135 words, instead of using -w; the latter matches e. g. kfreebsd-i386 on
136 i386.
137
138 -- Martin Pitt <martin.pitt@ubuntu.com> Thu, 24 Sep 2009 20:09:36 +0200
139
140pkg-create-dbgsym (0.30) karmic; urgency=low
141
142 * Add Vcs-Bzr in control.
143 * Set NO_PKG_MANGLE when building the -dbgsym .debs as running
144 pkgstriptranslations etc. when -dbgsyms are created results in nasty side
145 effects; use dpkg-deb --build instead of dpkg --build for clarity.
146 * Add README mentionning how to run the tests before upload.
147
148 -- Loïc Minier <loic.minier@ubuntu.com> Tue, 15 Sep 2009 12:54:24 +0200
149
150pkg-create-dbgsym (0.29) karmic; urgency=low
151
152 * Add tests/dhtest.whitespace: Test odd whitespace in debian/control:
153 - Using tabs instead of spaces for multi-line dependency fields. This
154 replicates the mplayer issue (LP #384597).
155 - Putting Description: in the middle and ending the package record with a
156 dependency field. This replicates the new dictd FTBFS.
157 * tests/run: Ensure that all other dependency fields get stripped.
158 * pkg_create_dbgsym: Unbreak fix from 0.28: Only look ahead for space and
159 tab, not for all whitespace; \s also catches \n. This caused the dictd
160 FTBFS.
161 * Bump Standards-Version to 3.8.1 (no changes necessary).
162
163 -- Martin Pitt <martin.pitt@ubuntu.com> Thu, 11 Jun 2009 11:13:07 +0200
164
165pkg-create-dbgsym (0.28) karmic; urgency=low
166
167 * Fix multi-line depends parsing if one field evaluates to be empty. Thanks
168 to Michael Biena! (LP: #384597)
169
170 -- Martin Pitt <martin.pitt@ubuntu.com> Mon, 08 Jun 2009 07:57:42 +0200
171
172pkg-create-dbgsym (0.27) karmic; urgency=low
173
174 * Make dh_strip actually abort correctly if debhelper isn't installed.
175
176 -- Adam Conrad <adconrad@ubuntu.com> Tue, 05 May 2009 16:27:55 -0600
177
178pkg-create-dbgsym (0.26) intrepid; urgency=low
179
180 * dh_strip: Recognize "export DH_COMPAT := x" syntax, too. Thanks, Michael
181 Biena!
182
183 -- Martin Pitt <martin.pitt@ubuntu.com> Tue, 03 Jun 2008 12:41:58 +0200
184
185pkg-create-dbgsym (0.25) hardy; urgency=low
186
187 * tests/dhtest.nostrip: Add another test case for dh_strip blacklisting with
188 a space between -X and the argument. This reproduces the followup problem
189 in LP #180364.
190 * dh_strip: Fix option parsing to get along with spaces between -X and the
191 argument. (LP: #180364)
192
193 -- Martin Pitt <martin.pitt@ubuntu.com> Tue, 26 Feb 2008 16:05:28 +0100
194
195pkg-create-dbgsym (0.24) hardy; urgency=low
196
197 * Add tests/dhtest.nostrip: Ignore crash2 for dh_strip, and add an assertion
198 that the file isn't touched by dh_strip. This reproduces LP #180364.
199 * Parse dh_strip's -X options in the wrapper and pass them to
200 pkg_create_dbgsym. Do not touch any files which match these patterns. This
201 avoids adding GNU debuglinks to ELF binaries which must not be touched at
202 all, like Ocaml bytecode. (LP: #180364)
203 * tests/run: Do not expect a dbgsym package for test .debs with 'nostrip' in
204 the name (as used by the tests/dhtest.nostrip test case).
205
206 -- Martin Pitt <martin.pitt@ubuntu.com> Thu, 21 Feb 2008 17:55:07 +0100
207
208pkg-create-dbgsym (0.23) hardy; urgency=low
209
210 * Also disable pkg-create-dbgsym if Archive Purpose is PPA.
211
212 -- Adam Conrad <adconrad@ubuntu.com> Tue, 18 Dec 2007 16:01:24 -0700
213
214pkg-create-dbgsym (0.22) hardy; urgency=low
215
216 * Disable symbol extraction if *-autotest is found in Suite in the
217 buildd's /CurrentlyBuilding file; requires a modified sbuild.
218
219 -- Adam Conrad <adconrad@ubuntu.com> Fri, 14 Dec 2007 15:18:37 -0700
220
221pkg-create-dbgsym (0.21) hardy; urgency=low
222
223 * Add tests/dhtest.compat1override/: Declare debian/compat '4', but override
224 it in debian/rules with DH_COMPAT=1. Reproduces the FTBFS of dvi2tty,
225 flexml, and gtk-engines-mono.
226 * dh_strip: Fix debhelper compatibility level detection so that DH_COMPAT
227 overrides debian/compat. (LP: #173631)
228
229 -- Martin Pitt <martin.pitt@ubuntu.com> Tue, 04 Dec 2007 11:58:19 +0100
230
231pkg-create-dbgsym (0.20) feisty; urgency=low
232
233 * Move test suite into tests/ to unclutter source root directory.
234 * Add tests/dhtest.versionoverride: Test case for overriding the version of
235 a particular binary. This replicates LP #92747. However, since this is
236 unfixable without major changes (dh_strip is called before dh_gencontrol
237 usually), we do not run the test case for now.
238 * pkg_create_dbgsym: Do not generate conflicts to python dbg packages.
239 (LP: #88695)
240
241 -- Martin Pitt <martin.pitt@ubuntu.com> Tue, 3 Apr 2007 10:58:17 +0200
242
243pkg-create-dbgsym (0.19) feisty; urgency=low
244
245 * dh_strip: Explicitly unset $pkg before parsing debian/control.
246 Packages with a debian/rules that happen to set this variable FTBFS
247 otherwise (like sim).
248
249 -- Martin Pitt <martin.pitt@ubuntu.com> Fri, 2 Feb 2007 13:07:34 +0100
250
251pkg-create-dbgsym (0.18) feisty; urgency=low
252
253 * testsuite: Check that all ddebs conflict to all built -dbg packages.
254 * pkg_create_dbgsym: Determine set of -dbg packages and add Conflicts: to
255 them. Closes: LP#68268
256
257 -- Martin Pitt <martin.pitt@ubuntu.com> Fri, 15 Dec 2006 11:15:33 +0100
258
259pkg-create-dbgsym (0.17) feisty; urgency=low
260
261 * Revert Debian #386246 workaround of 0.16 again, we should now fix the
262 actually broken packages.
263
264 -- Martin Pitt <martin.pitt@ubuntu.com> Thu, 14 Dec 2006 08:35:25 +0100
265
266pkg-create-dbgsym (0.16) edgy; urgency=low
267
268 * pkg_create_dbgsym: If package build directory does not exist, only whine
269 and exit successfully instead of failing. This makes us bug-compatible to
270 Debian #386246, right before Edgy release it is impractical to fix all
271 broken packages for that. This will be reverted early in Edgy+1.
272
273 -- Martin Pitt <martin.pitt@ubuntu.com> Thu, 12 Oct 2006 14:01:58 +0200
274
275pkg-create-dbgsym (0.15) edgy; urgency=low
276
277 * Fix (harmless) find error message on arch-specific packages without any
278 ELF files at all.
279 * Add dhtest.dbg3: Call dh_strip with --dbg-package dhtest (without the '='
280 in between, as prescribed by the manpage). This reproduces the current
281 libtasn-1-3 FTBFS.
282 * dh_strip: Relax --dbg-package parameter parsing a bit to accept
283 '--dbg-package pkgname' syntax.
284
285 -- Martin Pitt <martin.pitt@ubuntu.com> Thu, 12 Oct 2006 11:55:35 +0200
286
287pkg-create-dbgsym (0.14) edgy; urgency=low
288
289 * Use more elaborate test crash programs with a three-function deep stack,
290 so that gdb's current 'Could not find the frame base' failure in the
291 topmost function does not completely break the test suite.
292 * Add dhtest.dbg2 test case: Use dh_strip --keep-debug and manually move
293 around the debug symbols to dhtest1-dbg. This replicates the current FTBFS
294 of opal.
295 * dh_strip: Handle --keep-debug option gracefully to err on the safe side.
296 Fixes current opal FTBFS.
297
298 -- Martin Pitt <martin.pitt@ubuntu.com> Thu, 21 Sep 2006 20:51:28 +0200
299
300pkg-create-dbgsym (0.13) edgy; urgency=low
301
302 * *test/crash2.c: Test for isinf() and explicitly raise a SIGFPE, to get
303 a crash on powerpc, too.
304 * dhtest.archspecific: Add powerpc package so that the package builds at all
305 on powerpc.
306 * cdbstest/debian/rules: Explicitly set CFLAGS to -O0 to avoid optimizing
307 out function arguments and thus failing the test suite.
308 * dhtest.noargs/debian/control: Add Pre-Depends field and multiline
309 dependency field to reproduce current dpkg FTBFS.
310 * pkg_create_dbgsym:
311 - Properly handle continuation lines in Dependency fields.
312 - Also filter out Pre-Depends:.
313
314 -- Martin Pitt <martin.pitt@ubuntu.com> Sun, 20 Aug 2006 17:19:46 +0200
315
316pkg-create-dbgsym (0.12) edgy; urgency=low
317
318 * Add dhtest.tmpdirarg/: Test suite check for a source package which uses
319 the -P/--tmpdir= debhelper option. This recreates the current cdrtools
320 FTBFS.
321 * dh_strip: Respect -P/--tmpdir arguments.
322 * pkg_create_dbgsym: Do not assume that the temporary package build
323 directory is directly below debian/.
324
325 -- Martin Pitt <martin.pitt@ubuntu.com> Thu, 17 Aug 2006 12:47:13 +0200
326
327pkg-create-dbgsym (0.11) edgy; urgency=low
328
329 * dhtest/debian/control: Add Suggests: to ${bar}-core to recreate current
330 FTBFS of caudium.
331 * pkg-create-dbgsym: Filter out dependency fields before passing them to
332 dpkg-gencontrol. Doing it afterwards is too late since dpkg-gencontrol
333 does not have variable substitutions at that point, which can mess up the
334 dependencies to become unparseable.
335
336 -- Martin Pitt <martin.pitt@ubuntu.com> Wed, 16 Aug 2006 09:40:57 +0200
337
338pkg-create-dbgsym (0.10) edgy; urgency=low
339
340 * Add dhtest.archspecific/: Test suite check for a source package with
341 architecture specific binaries.
342 * dh_strip: Evaluate DEB_BUILD_ARCH and ignore architecture specific
343 packages which are not built on the current platform.
344 * testsuite: If we encounter a -dbg package, check that it produces a good
345 backtrace with the corresponding deb, in order to verify that the -dbgsym
346 package did not break the debug link.
347
348 -- Martin Pitt <martin.pitt@ubuntu.com> Tue, 15 Aug 2006 18:51:35 +0200
349
350pkg-create-dbgsym (0.9) edgy; urgency=low
351
352 * Ignore *.o files, too. Through some mysterious chain of events, adding GNU
353 debuglinks to libc6-dev's /usr/lib/*crt*.o files causes unwanted
354 debuglinks in gcc-produced binaries. This breaks dh_strip for all source
355 packages which build a -dbg binary. Closes: LP#55880
356
357 -- Martin Pitt <martin.pitt@ubuntu.com> Thu, 10 Aug 2006 19:37:05 +0200
358
359pkg-create-dbgsym (0.8) edgy; urgency=low
360
361 * Remove the Essential: flag for -dbgsym package control records and fix
362 Priority: to extra.
363 * dhtest.noargs/Makefile: Add GNU debuglink to generated crash file; it's
364 not entirely unreasonable for upstream or package build systems to do this
365 without using dh_strip --dbg-package.
366 * pkg_create_dbgsym: Remove GNU debuglink before adding our own, to not
367 break if the binary already has its own. Remove the 'more than one
368 hardlink' special case again, since it is now obsolete.
369
370 -- Martin Pitt <martin.pitt@ubuntu.com> Thu, 10 Aug 2006 16:07:32 +0200
371
372pkg-create-dbgsym (0.7) edgy; urgency=low
373
374 * dh_strip: Call the real dh_strip if NO_PKG_MANGLE is given.
375
376 -- Martin Pitt <martin.pitt@ubuntu.com> Mon, 7 Aug 2006 10:34:55 +0200
377
378pkg-create-dbgsym (0.6) edgy; urgency=low
379
380 * dhtest/debian/control: Add Replaces: and Breaks: fields with substitution
381 variable as well.
382 * Filter out Replaces: from original package's control record.
383 * debian/copyright: Update FSF address.
384
385 -- Martin Pitt <martin.pitt@ubuntu.com> Tue, 1 Aug 2006 11:03:03 +0200
386
387pkg-create-dbgsym (0.5) edgy; urgency=low
388
389 * dhtest: Add Depends/Recommends/Suggests/Conflicts with a substitution
390 variable, to recreate the current openoffice.org FTBFS.
391 * Filter out Recommends:, Suggests:, Conflicts:, Provides:, and Breaks: from
392 original package's control record, since they are not necessary and just
393 potentially break the build.
394
395 -- Martin Pitt <martin.pitt@ubuntu.com> Mon, 31 Jul 2006 22:01:34 +0200
396
397pkg-create-dbgsym (0.4) edgy; urgency=low
398
399 * Do not add .ddebs to the .changes file until Soyuz is able to process
400 them. With that, we can already install this package into the buildd
401 chroots to fix remaining FTBFSes induced by this package, and it even
402 opens up the possibility to put the resulting .ddebs to some inofficial
403 place.
404
405 -- Martin Pitt <martin.pitt@ubuntu.com> Mon, 31 Jul 2006 11:22:06 +0200
406
407pkg-create-dbgsym (0.3) edgy; urgency=low
408
409 * debian/copyright: Fix copy & paste leftovers.
410 * Add dhtest.compatenvvar/: Test suite check for debhelper packages using
411 $DH_COMPAT instead of debian/compat.
412 * Respect DH_COMPAT setting in debian/rules (fixes build of unifdef).
413 * dhtest.compatenvvar/: Install a hardlink to an existing binary to check
414 whether this is handled correctly (since objcopy --add-gnu-debuglink is
415 not idempotent).
416 * Ignore objcopy --add-gnu-debuglink failures if target file's hard link
417 count is not 1 (fixes build of sudo).
418
419 -- Martin Pitt <martin.pitt@ubuntu.com> Tue, 18 Jul 2006 15:30:18 +0200
420
421pkg-create-dbgsym (0.2) edgy; urgency=low
422
423 * Add debug output if objcopy --only-keep-debug or --add-gnu-debuglink
424 fails.
425 * Do not generate debug symbols for *.a (static libraries), since they
426 sometimes break objcopy and are not generally useful.
427
428 -- Martin Pitt <martin.pitt@ubuntu.com> Thu, 6 Jul 2006 13:47:20 +0200
429
430pkg-create-dbgsym (0.1) edgy; urgency=low
431
432 * Initial release:
433 - pkg_create_dbgsym: build a debug symbol ddeb for a given package in a
434 built source tree
435 - dh_strip: Divert and wrap debhelper's dh_strip which automatically calls
436 pkg_create_dbgsym for all packages dh_strip is asked to act on.
437 - Implements distro side of https://wiki.ubuntu.com/AptElfDebugSymbols.
438
439 -- Martin Pitt <martin.pitt@ubuntu.com> Fri, 23 Jun 2006 12:46:24 +0200
0440
=== added file 'debian/compat'
--- debian/compat 1970-01-01 00:00:00 +0000
+++ debian/compat 2010-04-21 20:29:14 +0000
@@ -0,0 +1,1 @@
17
02
=== added file 'debian/control'
--- debian/control 1970-01-01 00:00:00 +0000
+++ debian/control 2010-04-21 20:29:14 +0000
@@ -0,0 +1,22 @@
1Source: pkg-create-dbgsym
2Section: devel
3Priority: extra
4Build-Depends: debhelper (>= 7.0.50~),
5 gdb,
6 cdbs
7Maintainer: Martin Pitt <martin.pitt@ubuntu.com>
8Standards-Version: 3.8.3
9Vcs-Bzr: http://bazaar.launchpad.net/~ubuntu-core-dev/pkg-create-dbgsym/ubuntu
10Build-Conflicts: pkgbinarymangler (<< 66~)
11
12Package: pkg-create-dbgsym
13Architecture: all
14Depends: ${misc:Depends}
15Description: automatically build debug symbol ddeb packages
16 pkg_create_dbgsym builds a debug symbol ddeb for a given package in a
17 built source tree and adds it to debian/files.
18 .
19 This package diverts and wraps debhelper's dh_strip. It automatically
20 calls pkg_create_dbgsym for all packages dh_strip is asked to act on.
21 As a result, by merely installing this package on buildds, all
22 packages will automatically get ddebs built.
023
=== added file 'debian/copyright'
--- debian/copyright 1970-01-01 00:00:00 +0000
+++ debian/copyright 2010-04-21 20:29:14 +0000
@@ -0,0 +1,24 @@
1pkg-create-dbgsym is written and maintained by Martin Pitt
2<martin.pitt@ubuntu.com>.
3
4The original source can always be found at:
5 http://archive.ubuntu.com/ubuntu/pool/main/p/pkg-create-dbgsym/
6
7Copyright (C) 2006 Canonical Ltd.
8
9 This program is free software; you can redistribute it and/or modify
10 it under the terms of the GNU General Public License as published by
11 the Free Software Foundation; either version 2 of the License, or
12 (at your option) any later version.
13
14 This program is distributed in the hope that it will be useful,
15 but WITHOUT ANY WARRANTY; without even the implied warranty of
16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 GNU General Public License for more details.
18
19 You should have received a copy of the GNU General Public License
20 along with this program; if not, write to the Free Software
21 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
22
23On Debian systems, the complete text of the GNU General
24Public License can be found in `/usr/share/common-licenses/GPL'.
025
=== added file 'debian/pkg-create-dbgsym.install'
--- debian/pkg-create-dbgsym.install 1970-01-01 00:00:00 +0000
+++ debian/pkg-create-dbgsym.install 2010-04-21 20:29:14 +0000
@@ -0,0 +1,2 @@
1dh_strip usr/bin
2pkg_create_dbgsym usr/bin
03
=== added file 'debian/pkg-create-dbgsym.lintian-overrides'
--- debian/pkg-create-dbgsym.lintian-overrides 1970-01-01 00:00:00 +0000
+++ debian/pkg-create-dbgsym.lintian-overrides 2010-04-21 20:29:14 +0000
@@ -0,0 +1,1 @@
1pkg-create-dbgsym: binary-without-manpage usr/bin/dh_strip
02
=== added file 'debian/postrm'
--- debian/postrm 1970-01-01 00:00:00 +0000
+++ debian/postrm 2010-04-21 20:29:14 +0000
@@ -0,0 +1,19 @@
1#! /bin/sh -e
2
3case "$1" in
4 remove|purge)
5 # Remove our diversion
6 dpkg-divert --remove --rename --package pkg-create-dbgsym --divert /usr/bin/dh_strip.pkg-create-dbgsym /usr/bin/dh_strip > /dev/null
7 ;;
8
9 upgrade|failed-upgrade|abort-install|abort-upgrade|disappear)
10 ;;
11
12 *)
13 echo "postrm called with unknown argument \`$1'" >&2
14 exit 0
15esac
16
17#DEBHELPER#
18
19exit 0
020
=== added file 'debian/preinst'
--- debian/preinst 1970-01-01 00:00:00 +0000
+++ debian/preinst 2010-04-21 20:29:14 +0000
@@ -0,0 +1,19 @@
1#! /bin/sh -e
2
3case "$1" in
4 install|upgrade)
5 dpkg-divert --add --rename --package pkg-create-dbgsym --divert /usr/bin/dh_strip.pkg-create-dbgsym /usr/bin/dh_strip > /dev/null
6 ;;
7
8 abort-upgrade)
9 ;;
10
11 *)
12 echo "postinst called with unknown argument \`$1'" >&2
13 exit 0
14 ;;
15esac
16
17#DEBHELPER#
18
19exit 0
020
=== added file 'debian/rules'
--- debian/rules 1970-01-01 00:00:00 +0000
+++ debian/rules 2010-04-21 20:29:14 +0000
@@ -0,0 +1,15 @@
1#!/usr/bin/make -f
2
3override_dh_auto_clean:
4 if [ -d testsuite.tmp ] || [ -d tests/testsuite.tmp ]; then \
5 echo "testsuite.tmp or tests/testsuite.tmp still exists, please clean up and check test suite"; \
6 exit 1; \
7 fi
8 dh_auto_clean
9
10override_dh_auto_test:
11 tests/run
12
13%:
14 dh $*
15
016
=== added file 'dh_strip'
--- dh_strip 1970-01-01 00:00:00 +0000
+++ dh_strip 2010-04-21 20:29:14 +0000
@@ -0,0 +1,205 @@
1#!/bin/sh -e
2
3# wrapper around dh_strip that generates packages with external debug symbols
4#
5# Author: Martin Pitt <martin.pitt@ubuntu.com>
6# (C) 2006 Canonical Ltd.
7#
8#
9# This program is free software; you can redistribute it and/or modify
10# it under the terms of the GNU General Public License as published by
11# the Free Software Foundation; either version 2 of the License, or
12# (at your option) any later version.
13#
14# This program is distributed in the hope that it will be useful,
15# but WITHOUT ANY WARRANTY; without even the implied warranty of
16# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17# GNU General Public License for more details.
18#
19# You should have received a copy of the GNU General Public License
20# along with this program; if not, write to the Free Software
21# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
22
23DEBUG=1
24
25if [ -x /usr/bin/dh_strip.pkg-create-dbgsym ]; then
26 REAL_DHSTRIP=/usr/bin/dh_strip.pkg-create-dbgsym
27elif [ "$0" != /usr/bin/dh_strip ]; then
28 # called as "dh_strip" somewhere before /usr/bin in the PATH, e.g. from the
29 # testsuite during package build
30 REAL_DHSTRIP=/usr/bin/dh_strip
31 if ! [ -x "$REAL_DHSTRIP" ]; then
32 echo "FATAL: Can't run /usr/bin/dh_strip; is debhelper installed?" >&2
33 exit 1
34 fi
35else
36 echo "FATAL: Can't find the diverted original dh_strip and /usr/bin/dh_strip loops back to myself!" >&2
37 exit 1
38fi
39
40BUILDARCH=`dpkg-architecture -qDEB_BUILD_ARCH`
41
42# print debug message
43dbg() {
44 [ -n "$DEBUG" ] || return 0
45 echo "dh_strip debug symbol extraction: $@"
46}
47
48# return 0 if $1 is in the string list $2, otherwise return 1
49in_list()
50{
51 echo "$2" | egrep -q "(^|[[:space:]])$1(\$|[[:space:]])"
52}
53
54if [ "$PKG_IGNORE_CURRENTLY_BUILDING" = 1 ]; then
55 addtofiles="-a"
56elif grep -qs '^Build-Debug-Symbols: yes$' /CurrentlyBuilding; then
57 addtofiles="-a"
58else
59 # If sbuild hasn't explicitly told us to build debug symbols, we will
60 # avoid doing so if this is a rebuild or PPA build.
61 if grep -qs '^Suite: [a-z]*-autotest' /CurrentlyBuilding; then
62 NO_PKG_MANGLE=1
63 dbg "disabling for archive rebuild test"
64 fi
65 if grep -qs '^Purpose: PPA' /CurrentlyBuilding; then
66 NO_PKG_MANGLE=1
67 dbg "disabling for PPA build"
68 fi
69
70 # If /CurrentlyBuilding exists but Build-Debug-Symbols isn't set,
71 # we don't know if Soyuz can handle ddebs yet. We don't want to
72 # upload ddebs unless we really know that Soyuz can handle them, so
73 # we tell pkg_create_dbgsym to avoid adding them to the changes
74 # file.
75 [ -f /CurrentlyBuilding ] || addtofiles="-a"
76fi
77
78if [ -n "$NO_PKG_MANGLE" ]; then
79 dbg "not doing anything since NO_PKG_MANGLE is given"
80 exec $REAL_DHSTRIP "$@"
81 exit 0
82fi
83
84# get set of all architecture dependent packages from debian/control
85packages=$(
86 unset pkg
87 egrep '^(Package|Architecture):' debian/control | while read key val; do
88 if [ "$key" = Package: ]; then
89 [ -z "$pkg" ] || {
90 echo "Error: Package: and Architecture: do not alternate in debian/control" >&2
91 exit 1
92 }
93 pkg="$val"
94 fi
95 if [ "$key" = Architecture: ]; then
96 [ -n "$pkg" ] || {
97 echo "Error: Package: and Architecture: do not alternate in debian/control" >&2
98 exit 1
99 }
100 if [ "$val" = any ] || echo "$val" | grep -qE "([[:space:]]|^)$BUILDARCH([[:space:]]|\$)"; then
101 printf "$pkg "
102 fi
103 unset pkg
104 fi
105 done
106)
107dbg "all non-arch-all packages for this build platform $BUILDARCH: $packages"
108
109# parse command line to determine set of packages to act on
110for p in $DH_OPTIONS $@; do
111 if [ -n "$next_arg_is_xopt" ]; then
112 xopts="$xopts -X$p"
113 unset next_arg_is_xopt
114 continue
115 fi
116
117 p=${p#-O}
118 case "$p" in
119 -i|--indep)
120 unset actpkgs
121 optsel=1
122 ;;
123 -a|--arch|-s|--same-arch)
124 actpkgs="$packages"
125 optsel=1
126 ;;
127 -p*|--package=*)
128 pkg=${p#--package=}
129 pkg=${pkg#-p}
130 if ! in_list "$pkg" "$actpkgs" && in_list "$pkg" "$packages"; then
131 actpkgs="$pkg $actpkgs"
132 fi
133 optsel=1
134 ;;
135 -N*|--no-package=*)
136 pkg=${p#--no-package=}
137 pkg=${pkg#-N}
138 if ! in_list "$pkg" "$ignorepkgs"; then
139 ignorepkgs="$pkg $ignorepkgs"
140 fi
141 ;;
142 --dbg-package*)
143 dbg "not adding gnu debuglinks since --dbg-package is given"
144 nodebuglink=1
145 ;;
146 -k|--keep-debug)
147 dbg "not adding gnu debuglinks since --keep-debug is given"
148 nodebuglink=1
149 ;;
150 -P*|--tmpdir=*)
151 pkgdirarg=${p#--tmpdir=}
152 pkgdirarg=${pkgdirarg#-P}
153 dbg "-P/--tmpdir option: setting temporary package dir to $pkgdirarg"
154 ;;
155 -X)
156 next_arg_is_xopt=1
157 ;;
158 -X*)
159 xopts="$xopts $p"
160 ;;
161 esac
162done
163
164[ -n "$optsel" ] || actpkgs="$packages"
165
166dbg "packages to act on: $actpkgs"
167dbg "ignored packages: $ignorepkgs"
168
169# check for debhelper compat level 1
170dhcompat1=1
171if [ -e debian/compat ]; then
172 if [ "`cat debian/compat`" != 1 ]; then
173 unset dhcompat1
174 fi
175fi
176if grep -q '^[[:space:]]*\(export[[:space:]]*\)\?DH_COMPAT[[:space:]]*:\?=[[:space:]]*[2-9]\>' debian/rules; then
177 unset dhcompat1
178elif grep -q '^[[:space:]]*\(export[[:space:]]*\)\?DH_COMPAT[[:space:]]*:\?=[[:space:]]*1\>' debian/rules; then
179 dhcompat1=1
180fi
181
182if [ -n "$dhcompat1" ]; then
183 first_control_pkg="`grep -m 1 ^Package debian/control | cut -f2- -d\ `"
184 dbg "using obsolete debhelper compat mode 1"
185fi
186
187# process all packages
188for p in $actpkgs; do
189 if in_list "$p" "$ignorepkgs" ||
190 echo $p | grep -q -- '-dbg$' ; then
191 continue
192 fi
193
194 if [ -n "$pkgdirarg" ]; then
195 pkgdir="$pkgdirarg"
196 elif [ -n "$dhcompat1" -a $p = "$first_control_pkg" ]; then
197 pkgdir=debian/tmp
198 else
199 pkgdir=debian/$p
200 fi
201
202 pkg_create_dbgsym $addtofiles $xopts $p $pkgdir "$nodebuglink"
203done
204
205exec $REAL_DHSTRIP "$@"
0206
=== renamed file 'dh_strip' => 'dh_strip.moved'
=== added file 'pkg_create_dbgsym'
--- pkg_create_dbgsym 1970-01-01 00:00:00 +0000
+++ pkg_create_dbgsym 2010-04-21 20:29:14 +0000
@@ -0,0 +1,149 @@
1#!/bin/sh -e
2
3# generate debug symbol package for a given binary package within a built
4# debian source tree.
5#
6# Author: Martin Pitt <martin.pitt@ubuntu.com>
7# (C) 2006 Canonical Ltd.
8#
9#
10# This program is free software; you can redistribute it and/or modify
11# it under the terms of the GNU General Public License as published by
12# the Free Software Foundation; either version 2 of the License, or
13# (at your option) any later version.
14#
15# This program is distributed in the hope that it will be useful,
16# but WITHOUT ANY WARRANTY; without even the implied warranty of
17# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18# GNU General Public License for more details.
19#
20# You should have received a copy of the GNU General Public License
21# along with this program; if not, write to the Free Software
22# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
23
24# evaluate options
25blacklist=""
26add_to_files=0
27
28for p; do
29 case $p in
30 -X*)
31 blacklist=`/bin/echo -e "${p#-X}\n$blacklist"`
32 shift
33 ;;
34 -a)
35 add_to_files=1
36 shift
37 ;;
38 *)
39 break
40 ;;
41 esac
42done
43
44pkgname="$1"
45pkgpath="$2"
46nodebuglink="$3"
47
48[ -n "$pkgpath" ] || pkgpath="debian/$pkgname"
49
50[ -d "$pkgpath" ] || {
51 if [ -z "$pkgname" ]; then
52 echo "Usage: $0 [-Xitem] [-n] <binary package name> [<package path>] [nodebuglink]"
53 else
54 echo "Directory $pkgpath does not exist, aborting" >&2
55 fi
56 exit 1
57}
58
59p=`readlink -f "$pkgpath"` # original package path
60dp="debian/${pkgname}-dbgsym" # debug package path
61dp=`readlink -f "$dp"` # debug package path
62
63# find all ELF files and extract their debug symbols; also add debug links
64# to original files
65origdir=`pwd`
66cd $p
67find -type f | while read f; do
68 # ignore static libraries
69 if echo "$f" | grep -q '\.[ao]$'; then continue; fi
70 # ignore non-ELF files
71 readelf -h "$f" > /dev/null 2>&1 || continue
72 # check blacklist
73 if [ -n "$blacklist" ]; then
74 if echo "$f" | fgrep -q "$blacklist"; then continue; fi
75 fi
76 # ignore already stripped files
77 file "$f" | grep -q "not stripped" || continue
78
79 mkdir -p $dp/usr/lib/debug/`dirname "$f"`
80 objcopy --only-keep-debug "$f" "$dp/usr/lib/debug/$f" || {
81 echo "objcopy --only-keep-debug failed on `readlink -f $f`" >&2
82 exit 1
83 }
84 [ -n "$nodebuglink" ] || objcopy -R .gnu_debuglink --add-gnu-debuglink="$dp/usr/lib/debug/$f" "$f" || {
85 echo "objcopy --add-gnu-debuglink failed on `readlink -f $f`" >&2
86 exit 1
87 }
88done
89cd $origdir
90
91if [ ! -d "$dp" ] || [ -z "`find $dp -type f`" ]; then
92 rm -rf $dp
93 exit 0
94fi
95
96mkdir -p $dp/DEBIAN
97
98# determine set of -dbg packages, which we need to conflict to
99conflicts=
100for p in `grep '^Package:.*-dbg' debian/control | cut -f 2 -d\ `; do
101 # do not conflict to python dbg packages
102 [ "$p" = "${p#python-}" ] || continue
103 if [ -z "$conflicts" ]; then
104 conflicts="$p"
105 else
106 conflicts="$conflicts, $p"
107 fi
108done
109[ -z "$conflicts" ] || conflicts="\nConflicts: $conflicts"
110
111# generate a control file for current package (since it is usually not yet
112# existing) and adapt it to be suitable for the dbgsym package
113perl -p000 -e 's/^(?:Pre-Depends|Depends|Recommends|Suggests|Conflicts|Provides|Replaces|Breaks|Essential):.*?\n(?![ \t])//msg' debian/control |
114 dpkg-gencontrol -c- -fdhstrip-dummy-debian-files -p$pkgname -is -ip -Pdebian/$pkgname-dbgsym -O |
115 sed "s/^Priority:.*$/Priority: extra/;
116 s/^Version: \(.*\)$/&\nDepends: $pkgname (= \1)$conflicts/;
117 s/^Package:.*$/&-dbgsym/;
118 s/^Description:.*$/Description: debug symbols for package $pkgname/" \
119 > $dp/DEBIAN/control
120rm -f dhstrip-dummy-debian-files
121
122# binaries named the same as the source will lack a Source field.
123# since we are renaming binaries, we might need to add one.
124if [ -z "`grep ^Source: $dp/DEBIAN/control`" ]; then
125 sed -i "s/^Package:.*$/&\nSource: $pkgname/" $dp/DEBIAN/control
126fi
127
128# extract package name, version, architecture
129ddebname=${pkgname}-dbgsym
130ddebversion=`grep '^Version:' $dp/DEBIAN/control | cut -f2- -d\ `
131ddebversion=${ddebversion#*:} # strip off epoch
132ddebarch=`grep '^Architecture:' $dp/DEBIAN/control | cut -f2- -d\ `
133ddebsection=`grep '^Section:' $dp/DEBIAN/control | cut -f2- -d\ `
134ddebpriority=`grep '^Priority:' $dp/DEBIAN/control | cut -f2- -d\ `
135
136[ -n "$ddebsection" -a -n "$ddebpriority" ] || {
137 echo "Error: parsed ddeb section or priority is empty" >&2
138 exit 1
139}
140ddeb="${ddebname}_${ddebversion}_${ddebarch}.ddeb"
141
142# build .ddeb and add it to debian/files
143NO_PKG_MANGLE=1 dpkg-deb --build $dp ../$ddeb
144if [ "$add_to_files" = "1" ]; then
145 dpkg-distaddfile "$ddeb" "$ddebsection" "$ddebpriority"
146fi
147
148# clean up, since this package does not appear in debian/control
149rm -rf $dp
0150
=== renamed file 'pkg_create_dbgsym' => 'pkg_create_dbgsym.moved'
=== added directory 'tests'
=== renamed directory 'tests' => 'tests.moved'
=== added directory 'tests/cdbstest'
=== added file 'tests/cdbstest/Makefile'
--- tests/cdbstest/Makefile 1970-01-01 00:00:00 +0000
+++ tests/cdbstest/Makefile 2010-04-21 20:29:14 +0000
@@ -0,0 +1,18 @@
1CFLAGS= -g -Wall -W -O0
2
3LIBNAME=crashrep
4
5all: crash crash2
6
7crash: crash.o
8 $(CC) $^ -o $@
9
10crash2: crash2.o
11 $(CC) $^ -o $@
12
13clean:
14 rm -f *.o crash crash2
15
16install: all
17 install -d $(DESTDIR)/usr/bin
18 install crash crash2 $(DESTDIR)/usr/bin
019
=== added file 'tests/cdbstest/crash.c'
--- tests/cdbstest/crash.c 1970-01-01 00:00:00 +0000
+++ tests/cdbstest/crash.c 2010-04-21 20:29:14 +0000
@@ -0,0 +1,34 @@
1/* crash.c - demo program for libcrashreport
2
3 (c) 2004 Martin Pitt <martin@piware.de>
4
5 This file is public domain.
6*/
7
8#include <stdio.h>
9
10void h(char* p) {
11 p[1] = 'a';
12}
13
14int g( int x, int y )
15{
16 char* s = NULL;
17 h(s);
18 return x+y;
19}
20
21int f( int x )
22{
23 return g( x, 42 );
24}
25
26int
27main()
28{
29 int x;
30
31 x = f(1);
32 printf( "x = %i, terminating normally now.\n", x );
33 return 0;
34}
035
=== added file 'tests/cdbstest/crash2.c'
--- tests/cdbstest/crash2.c 1970-01-01 00:00:00 +0000
+++ tests/cdbstest/crash2.c 2010-04-21 20:29:14 +0000
@@ -0,0 +1,39 @@
1/* crash.c - demo program for libcrashreport
2
3 (c) 2004 Martin Pitt <martin@piware.de>
4
5 This file is public domain.
6*/
7
8#include <stdio.h>
9#include <math.h>
10#include <signal.h>
11
12double h()
13{
14 double a = 1./0;
15 if (isinf(a))
16 raise(SIGFPE);
17 return a;
18}
19
20int g( int x, int y )
21{
22
23 return x+y+(int) h();
24}
25
26int f( int x )
27{
28 return g( x, 42 );
29}
30
31int
32main()
33{
34 int x;
35
36 x = f(1);
37 printf( "x = %i, terminating normally now.\n", x );
38 return 0;
39}
040
=== added directory 'tests/cdbstest/debian'
=== added file 'tests/cdbstest/debian/cdbstest1.install'
--- tests/cdbstest/debian/cdbstest1.install 1970-01-01 00:00:00 +0000
+++ tests/cdbstest/debian/cdbstest1.install 2010-04-21 20:29:14 +0000
@@ -0,0 +1,1 @@
1/usr/bin/crash
02
=== added file 'tests/cdbstest/debian/cdbstest2.install'
--- tests/cdbstest/debian/cdbstest2.install 1970-01-01 00:00:00 +0000
+++ tests/cdbstest/debian/cdbstest2.install 2010-04-21 20:29:14 +0000
@@ -0,0 +1,1 @@
1/usr/bin/crash2
02
=== added file 'tests/cdbstest/debian/changelog'
--- tests/cdbstest/debian/changelog 1970-01-01 00:00:00 +0000
+++ tests/cdbstest/debian/changelog 2010-04-21 20:29:14 +0000
@@ -0,0 +1,5 @@
1cdbstest (2.3-1) foo; urgency=low
2
3 * Initial release.
4
5 -- Martin Pitt <martin.pitt@ubuntu.com> Fri, 16 Jun 2006 10:49:56 +0200
06
=== added file 'tests/cdbstest/debian/compat'
--- tests/cdbstest/debian/compat 1970-01-01 00:00:00 +0000
+++ tests/cdbstest/debian/compat 2010-04-21 20:29:14 +0000
@@ -0,0 +1,1 @@
15
02
=== added file 'tests/cdbstest/debian/control'
--- tests/cdbstest/debian/control 1970-01-01 00:00:00 +0000
+++ tests/cdbstest/debian/control 2010-04-21 20:29:14 +0000
@@ -0,0 +1,31 @@
1Source: cdbstest
2Section: utils
3Priority: extra
4Maintainer: Martin Pitt <martin.pitt@ubuntu.com>
5Build-Depends: cdbs, debhelper (>= 4.1.0)
6Standards-Version: 3.7.2
7
8Package: cdbstest1
9Architecture: any
10Depends: ${shlibs:Depends}
11Description: crash with a SIGSEGV
12 Test package
13
14Package: cdbstest2
15Architecture: any
16Depends: ${shlibs:Depends}
17Description: crash with a SIGFPE
18 Test package
19
20Package: cdbstestempty
21Architecture: any
22Depends: ${shlibs:Depends}
23Description: dummy arch-any package
24 Test package
25
26Package: cdbstestall
27Architecture: all
28Depends: ${shlibs:Depends}
29Description: dummy arch-all package
30 Test package
31
032
=== added file 'tests/cdbstest/debian/copyright'
--- tests/cdbstest/debian/copyright 1970-01-01 00:00:00 +0000
+++ tests/cdbstest/debian/copyright 2010-04-21 20:29:14 +0000
@@ -0,0 +1,1 @@
1foo
02
=== added file 'tests/cdbstest/debian/rules'
--- tests/cdbstest/debian/rules 1970-01-01 00:00:00 +0000
+++ tests/cdbstest/debian/rules 2010-04-21 20:29:14 +0000
@@ -0,0 +1,10 @@
1#!/usr/bin/make -f
2include /usr/share/cdbs/1/rules/debhelper.mk
3include /usr/share/cdbs/1/class/makefile.mk
4
5CFLAGS := -O0 -g
6
7DEB_DH_INSTALL_SOURCEDIR=debian/tmp
8DEB_MAKE_BUILD_TARGET=all
9DEB_MAKE_CLEAN_TARGET=clean
10DEB_MAKE_INSTALL_TARGET=install DESTDIR=$(DEB_DESTDIR)
011
=== added directory 'tests/dhtest'
=== added directory 'tests/dhtest.archspecific'
=== added file 'tests/dhtest.archspecific/Makefile'
--- tests/dhtest.archspecific/Makefile 1970-01-01 00:00:00 +0000
+++ tests/dhtest.archspecific/Makefile 2010-04-21 20:29:14 +0000
@@ -0,0 +1,18 @@
1CFLAGS= -g -Wall -W -O0
2
3LIBNAME=crashrep
4
5all: crash crash2
6
7crash: crash.o
8 $(CC) $^ -o $@
9
10crash2: crash2.o
11 $(CC) $^ -o $@
12
13clean:
14 rm -f *.o crash crash2
15
16install: all
17 install -d $(DESTDIR)/usr/bin
18 install crash crash2 $(DESTDIR)/usr/bin
019
=== added file 'tests/dhtest.archspecific/crash.c'
--- tests/dhtest.archspecific/crash.c 1970-01-01 00:00:00 +0000
+++ tests/dhtest.archspecific/crash.c 2010-04-21 20:29:14 +0000
@@ -0,0 +1,34 @@
1/* crash.c - demo program for libcrashreport
2
3 (c) 2004 Martin Pitt <martin@piware.de>
4
5 This file is public domain.
6*/
7
8#include <stdio.h>
9
10void h(char* p) {
11 p[1] = 'a';
12}
13
14int g( int x, int y )
15{
16 char* s = NULL;
17 h(s);
18 return x+y;
19}
20
21int f( int x )
22{
23 return g( x, 42 );
24}
25
26int
27main()
28{
29 int x;
30
31 x = f(1);
32 printf( "x = %i, terminating normally now.\n", x );
33 return 0;
34}
035
=== added file 'tests/dhtest.archspecific/crash2.c'
--- tests/dhtest.archspecific/crash2.c 1970-01-01 00:00:00 +0000
+++ tests/dhtest.archspecific/crash2.c 2010-04-21 20:29:14 +0000
@@ -0,0 +1,39 @@
1/* crash.c - demo program for libcrashreport
2
3 (c) 2004 Martin Pitt <martin@piware.de>
4
5 This file is public domain.
6*/
7
8#include <stdio.h>
9#include <math.h>
10#include <signal.h>
11
12double h()
13{
14 double a = 1./0;
15 if (isinf(a))
16 raise(SIGFPE);
17 return a;
18}
19
20int g( int x, int y )
21{
22
23 return x+y+(int) h();
24}
25
26int f( int x )
27{
28 return g( x, 42 );
29}
30
31int
32main()
33{
34 int x;
35
36 x = f(1);
37 printf( "x = %i, terminating normally now.\n", x );
38 return 0;
39}
040
=== added directory 'tests/dhtest.archspecific/debian'
=== added file 'tests/dhtest.archspecific/debian/changelog'
--- tests/dhtest.archspecific/debian/changelog 1970-01-01 00:00:00 +0000
+++ tests/dhtest.archspecific/debian/changelog 2010-04-21 20:29:14 +0000
@@ -0,0 +1,5 @@
1dhtest.archspecific (1) foo; urgency=low
2
3 * Initial release.
4
5 -- Martin Pitt <martin.pitt@ubuntu.com> Tue, 15 Aug 2006 17:14:42 +0200
06
=== added file 'tests/dhtest.archspecific/debian/compat'
--- tests/dhtest.archspecific/debian/compat 1970-01-01 00:00:00 +0000
+++ tests/dhtest.archspecific/debian/compat 2010-04-21 20:29:14 +0000
@@ -0,0 +1,1 @@
15
02
=== added file 'tests/dhtest.archspecific/debian/control'
--- tests/dhtest.archspecific/debian/control 1970-01-01 00:00:00 +0000
+++ tests/dhtest.archspecific/debian/control 2010-04-21 20:29:14 +0000
@@ -0,0 +1,31 @@
1Source: dhtest.archspecific
2Section: utils
3Priority: extra
4Maintainer: Martin Pitt <martin.pitt@ubuntu.com>
5Build-Depends: debhelper (>= 4.1.0)
6Standards-Version: 3.7.2
7
8Package: dhtest-i386
9Architecture: i386
10Depends: ${shlibs:Depends}
11Description: crash with a SIGSEGV
12 Test package
13
14Package: dhtest64
15Architecture: amd64 sparc64
16Depends: ${shlibs:Depends}
17Description: crash with a SIGFPE
18 Test package
19
20Package: dhtest-ppc
21Architecture: powerpc
22Depends: ${shlibs:Depends}
23Description: crash with a SIGSEGV
24 Test package
25
26Package: dhtest-bsd
27Architecture: kfreebsd-i386 kfreebsd-amd64
28Depends: ${shlibs:Depends}
29Description: crash with a SIGSEGV
30 Test package
31
032
=== added file 'tests/dhtest.archspecific/debian/copyright'
--- tests/dhtest.archspecific/debian/copyright 1970-01-01 00:00:00 +0000
+++ tests/dhtest.archspecific/debian/copyright 2010-04-21 20:29:14 +0000
@@ -0,0 +1,1 @@
1foo
02
=== added file 'tests/dhtest.archspecific/debian/dhtest-i386.install'
--- tests/dhtest.archspecific/debian/dhtest-i386.install 1970-01-01 00:00:00 +0000
+++ tests/dhtest.archspecific/debian/dhtest-i386.install 2010-04-21 20:29:14 +0000
@@ -0,0 +1,1 @@
1/usr/bin/crash
02
=== added file 'tests/dhtest.archspecific/debian/dhtest-ppc.install'
--- tests/dhtest.archspecific/debian/dhtest-ppc.install 1970-01-01 00:00:00 +0000
+++ tests/dhtest.archspecific/debian/dhtest-ppc.install 2010-04-21 20:29:14 +0000
@@ -0,0 +1,1 @@
1/usr/bin/crash
02
=== added file 'tests/dhtest.archspecific/debian/dhtest64.install'
--- tests/dhtest.archspecific/debian/dhtest64.install 1970-01-01 00:00:00 +0000
+++ tests/dhtest.archspecific/debian/dhtest64.install 2010-04-21 20:29:14 +0000
@@ -0,0 +1,1 @@
1/usr/bin/crash2
02
=== added file 'tests/dhtest.archspecific/debian/rules'
--- tests/dhtest.archspecific/debian/rules 1970-01-01 00:00:00 +0000
+++ tests/dhtest.archspecific/debian/rules 2010-04-21 20:29:14 +0000
@@ -0,0 +1,76 @@
1#!/usr/bin/make -f
2
3# Uncomment this to turn on verbose mode.
4#export DH_VERBOSE=1
5
6# This has to be exported to make some magic below work.
7export DH_OPTIONS
8
9CFLAGS = -Wall -g
10
11ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
12 CFLAGS += -O0
13else
14 CFLAGS += -O2
15endif
16
17#Architecture
18build: build-arch build-indep
19
20build-arch: build-arch-stamp
21build-arch-stamp:
22 $(MAKE)
23 touch build-arch-stamp
24
25build-indep:
26
27clean:
28 dh_testdir
29 dh_testroot
30 rm -f build-arch-stamp build-indep-stamp
31 -$(MAKE) clean
32 dh_clean
33
34install: install-indep install-arch
35install-indep:
36 dh_testdir
37 dh_testroot
38 dh_clean -k -i
39 dh_installdirs -i
40 dh_install -i --sourcedir=debian/tmp
41
42install-arch:
43 dh_testdir
44 dh_testroot
45 dh_clean -k -s
46 dh_installdirs -s
47 $(MAKE) install DESTDIR=$(CURDIR)/debian/tmp
48 dh_install -s --sourcedir=debian/tmp
49
50# Must not depend on anything. This is to be called by
51# binary-arch/binary-indep
52# in another 'make' thread.
53binary-common:
54 dh_testdir
55 dh_testroot
56 dh_installchangelogs
57 dh_installdocs
58 dh_strip
59 dh_compress
60 dh_fixperms
61 dh_installdeb
62 dh_shlibdeps
63 dh_gencontrol
64 dh_md5sums
65 dh_builddeb
66
67# Build architecture independant packages using the common target.
68binary-indep: build-indep install-indep
69 $(MAKE) -f debian/rules DH_OPTIONS=-i binary-common
70
71# Build architecture dependant packages using the common target.
72binary-arch: build-arch install-arch
73 $(MAKE) -f debian/rules DH_OPTIONS=-s binary-common
74
75binary: binary-arch binary-indep
76.PHONY: build clean binary-indep binary-arch binary install install-indep install-arch
077
=== added directory 'tests/dhtest.compat1'
=== added file 'tests/dhtest.compat1/Makefile'
--- tests/dhtest.compat1/Makefile 1970-01-01 00:00:00 +0000
+++ tests/dhtest.compat1/Makefile 2010-04-21 20:29:14 +0000
@@ -0,0 +1,18 @@
1CFLAGS= -g -Wall -W -O0
2
3LIBNAME=crashrep
4
5all: crash crash2
6
7crash: crash.o
8 $(CC) $^ -o $@
9
10crash2: crash2.o
11 $(CC) $^ -o $@
12
13clean:
14 rm -f *.o crash crash2
15
16install: all
17 install -d $(DESTDIR)/usr/bin
18 install crash crash2 $(DESTDIR)/usr/bin
019
=== added file 'tests/dhtest.compat1/crash.c'
--- tests/dhtest.compat1/crash.c 1970-01-01 00:00:00 +0000
+++ tests/dhtest.compat1/crash.c 2010-04-21 20:29:14 +0000
@@ -0,0 +1,34 @@
1/* crash.c - demo program for libcrashreport
2
3 (c) 2004 Martin Pitt <martin@piware.de>
4
5 This file is public domain.
6*/
7
8#include <stdio.h>
9
10void h(char* p) {
11 p[1] = 'a';
12}
13
14int g( int x, int y )
15{
16 char* s = NULL;
17 h(s);
18 return x+y;
19}
20
21int f( int x )
22{
23 return g( x, 42 );
24}
25
26int
27main()
28{
29 int x;
30
31 x = f(1);
32 printf( "x = %i, terminating normally now.\n", x );
33 return 0;
34}
035
=== added file 'tests/dhtest.compat1/crash2.c'
--- tests/dhtest.compat1/crash2.c 1970-01-01 00:00:00 +0000
+++ tests/dhtest.compat1/crash2.c 2010-04-21 20:29:14 +0000
@@ -0,0 +1,39 @@
1/* crash.c - demo program for libcrashreport
2
3 (c) 2004 Martin Pitt <martin@piware.de>
4
5 This file is public domain.
6*/
7
8#include <stdio.h>
9#include <math.h>
10#include <signal.h>
11
12double h()
13{
14 double a = 1./0;
15 if (isinf(a))
16 raise(SIGFPE);
17 return a;
18}
19
20int g( int x, int y )
21{
22
23 return x+y+(int) h();
24}
25
26int f( int x )
27{
28 return g( x, 42 );
29}
30
31int
32main()
33{
34 int x;
35
36 x = f(1);
37 printf( "x = %i, terminating normally now.\n", x );
38 return 0;
39}
040
=== added directory 'tests/dhtest.compat1/debian'
=== added file 'tests/dhtest.compat1/debian/changelog'
--- tests/dhtest.compat1/debian/changelog 1970-01-01 00:00:00 +0000
+++ tests/dhtest.compat1/debian/changelog 2010-04-21 20:29:14 +0000
@@ -0,0 +1,5 @@
1dhtest.compat1 (2:3.4) foo; urgency=low
2
3 * Initial release.
4
5 -- Martin Pitt <martin.pitt@ubuntu.com> Fri, 16 Jun 2006 10:49:56 +0200
06
=== added file 'tests/dhtest.compat1/debian/control'
--- tests/dhtest.compat1/debian/control 1970-01-01 00:00:00 +0000
+++ tests/dhtest.compat1/debian/control 2010-04-21 20:29:14 +0000
@@ -0,0 +1,25 @@
1Source: dhtest.compat1
2Section: utils
3Priority: extra
4Maintainer: Martin Pitt <martin.pitt@ubuntu.com>
5Build-Depends: debhelper (>= 4.1.0)
6Standards-Version: 3.7.2
7
8Package: dhtest1
9Architecture: any
10Depends: ${shlibs:Depends}
11Description: crash with a SIGSEGV
12 Test package
13
14Package: dhtest2
15Architecture: any
16Depends: ${shlibs:Depends}
17Description: crash with a SIGFPE
18 Test package
19
20Package: dhtestall
21Architecture: all
22Depends: ${shlibs:Depends}
23Description: dummy arch-all package
24 Test package
25
026
=== added file 'tests/dhtest.compat1/debian/copyright'
--- tests/dhtest.compat1/debian/copyright 1970-01-01 00:00:00 +0000
+++ tests/dhtest.compat1/debian/copyright 2010-04-21 20:29:14 +0000
@@ -0,0 +1,1 @@
1foo
02
=== added file 'tests/dhtest.compat1/debian/rules'
--- tests/dhtest.compat1/debian/rules 1970-01-01 00:00:00 +0000
+++ tests/dhtest.compat1/debian/rules 2010-04-21 20:29:14 +0000
@@ -0,0 +1,75 @@
1#!/usr/bin/make -f
2
3# Uncomment this to turn on verbose mode.
4#export DH_VERBOSE=1
5
6# This has to be exported to make some magic below work.
7export DH_OPTIONS
8
9CFLAGS = -Wall -g
10
11ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
12 CFLAGS += -O0
13else
14 CFLAGS += -O2
15endif
16
17#Architecture
18build: build-arch build-indep
19
20build-arch: build-arch-stamp
21build-arch-stamp:
22 $(MAKE)
23 touch build-arch-stamp
24
25build-indep:
26
27clean:
28 dh_testdir
29 dh_testroot
30 rm -f build-arch-stamp build-indep-stamp
31 -$(MAKE) clean
32 dh_clean
33
34install: install-indep install-arch
35install-indep:
36 dh_testdir
37 dh_testroot
38 dh_clean -k -i
39 dh_installdirs -i
40
41install-arch:
42 dh_testdir
43 dh_testroot
44 dh_clean -k -s
45 dh_installdirs -s
46 install -D -m 755 crash debian/tmp/usr/bin/crash
47 install -D -m 755 crash2 debian/dhtest2/usr/bin/crash2
48
49# Must not depend on anything. This is to be called by
50# binary-arch/binary-indep
51# in another 'make' thread.
52binary-common:
53 dh_testdir
54 dh_testroot
55 dh_installchangelogs
56 dh_installdocs
57 dh_strip
58 dh_compress
59 dh_fixperms
60 dh_installdeb
61 dh_shlibdeps
62 dh_gencontrol
63 dh_md5sums
64 dh_builddeb
65
66# Build architecture independant packages using the common target.
67binary-indep: build-indep install-indep
68 $(MAKE) -f debian/rules DH_OPTIONS=-i binary-common
69
70# Build architecture dependant packages using the common target.
71binary-arch: build-arch install-arch
72 $(MAKE) -f debian/rules DH_OPTIONS=-a binary-common
73
74binary: binary-arch binary-indep
75.PHONY: build clean binary-indep binary-arch binary install install-indep install-arch
076
=== added directory 'tests/dhtest.compat1override'
=== added file 'tests/dhtest.compat1override/Makefile'
--- tests/dhtest.compat1override/Makefile 1970-01-01 00:00:00 +0000
+++ tests/dhtest.compat1override/Makefile 2010-04-21 20:29:14 +0000
@@ -0,0 +1,18 @@
1CFLAGS= -g -Wall -W -O0
2
3LIBNAME=crashrep
4
5all: crash crash2
6
7crash: crash.o
8 $(CC) $^ -o $@
9
10crash2: crash2.o
11 $(CC) $^ -o $@
12
13clean:
14 rm -f *.o crash crash2
15
16install: all
17 install -d $(DESTDIR)/usr/bin
18 install crash crash2 $(DESTDIR)/usr/bin
019
=== added file 'tests/dhtest.compat1override/crash.c'
--- tests/dhtest.compat1override/crash.c 1970-01-01 00:00:00 +0000
+++ tests/dhtest.compat1override/crash.c 2010-04-21 20:29:14 +0000
@@ -0,0 +1,34 @@
1/* crash.c - demo program for libcrashreport
2
3 (c) 2004 Martin Pitt <martin@piware.de>
4
5 This file is public domain.
6*/
7
8#include <stdio.h>
9
10void h(char* p) {
11 p[1] = 'a';
12}
13
14int g( int x, int y )
15{
16 char* s = NULL;
17 h(s);
18 return x+y;
19}
20
21int f( int x )
22{
23 return g( x, 42 );
24}
25
26int
27main()
28{
29 int x;
30
31 x = f(1);
32 printf( "x = %i, terminating normally now.\n", x );
33 return 0;
34}
035
=== added file 'tests/dhtest.compat1override/crash2.c'
--- tests/dhtest.compat1override/crash2.c 1970-01-01 00:00:00 +0000
+++ tests/dhtest.compat1override/crash2.c 2010-04-21 20:29:14 +0000
@@ -0,0 +1,39 @@
1/* crash.c - demo program for libcrashreport
2
3 (c) 2004 Martin Pitt <martin@piware.de>
4
5 This file is public domain.
6*/
7
8#include <stdio.h>
9#include <math.h>
10#include <signal.h>
11
12double h()
13{
14 double a = 1./0;
15 if (isinf(a))
16 raise(SIGFPE);
17 return a;
18}
19
20int g( int x, int y )
21{
22
23 return x+y+(int) h();
24}
25
26int f( int x )
27{
28 return g( x, 42 );
29}
30
31int
32main()
33{
34 int x;
35
36 x = f(1);
37 printf( "x = %i, terminating normally now.\n", x );
38 return 0;
39}
040
=== added directory 'tests/dhtest.compat1override/debian'
=== added file 'tests/dhtest.compat1override/debian/changelog'
--- tests/dhtest.compat1override/debian/changelog 1970-01-01 00:00:00 +0000
+++ tests/dhtest.compat1override/debian/changelog 2010-04-21 20:29:14 +0000
@@ -0,0 +1,5 @@
1dhtest.compat1override (2:3.4) foo; urgency=low
2
3 * Initial release.
4
5 -- Martin Pitt <martin.pitt@ubuntu.com> Fri, 16 Jun 2006 10:49:56 +0200
06
=== added file 'tests/dhtest.compat1override/debian/compat'
--- tests/dhtest.compat1override/debian/compat 1970-01-01 00:00:00 +0000
+++ tests/dhtest.compat1override/debian/compat 2010-04-21 20:29:14 +0000
@@ -0,0 +1,1 @@
14
02
=== added file 'tests/dhtest.compat1override/debian/control'
--- tests/dhtest.compat1override/debian/control 1970-01-01 00:00:00 +0000
+++ tests/dhtest.compat1override/debian/control 2010-04-21 20:29:14 +0000
@@ -0,0 +1,25 @@
1Source: dhtest.compat1override
2Section: utils
3Priority: extra
4Maintainer: Martin Pitt <martin.pitt@ubuntu.com>
5Build-Depends: debhelper (>= 4.1.0)
6Standards-Version: 3.7.2
7
8Package: dhtest1
9Architecture: any
10Depends: ${shlibs:Depends}
11Description: crash with a SIGSEGV
12 Test package
13
14Package: dhtest2
15Architecture: any
16Depends: ${shlibs:Depends}
17Description: crash with a SIGFPE
18 Test package
19
20Package: dhtestall
21Architecture: all
22Depends: ${shlibs:Depends}
23Description: dummy arch-all package
24 Test package
25
026
=== added file 'tests/dhtest.compat1override/debian/copyright'
--- tests/dhtest.compat1override/debian/copyright 1970-01-01 00:00:00 +0000
+++ tests/dhtest.compat1override/debian/copyright 2010-04-21 20:29:14 +0000
@@ -0,0 +1,1 @@
1foo
02
=== added file 'tests/dhtest.compat1override/debian/rules'
--- tests/dhtest.compat1override/debian/rules 1970-01-01 00:00:00 +0000
+++ tests/dhtest.compat1override/debian/rules 2010-04-21 20:29:14 +0000
@@ -0,0 +1,77 @@
1#!/usr/bin/make -f
2
3# Uncomment this to turn on verbose mode.
4#export DH_VERBOSE=1
5
6# This has to be exported to make some magic below work.
7export DH_OPTIONS
8
9export DH_COMPAT=1
10
11CFLAGS = -Wall -g
12
13ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
14 CFLAGS += -O0
15else
16 CFLAGS += -O2
17endif
18
19#Architecture
20build: build-arch build-indep
21
22build-arch: build-arch-stamp
23build-arch-stamp:
24 $(MAKE)
25 touch build-arch-stamp
26
27build-indep:
28
29clean:
30 dh_testdir
31 dh_testroot
32 rm -f build-arch-stamp build-indep-stamp
33 -$(MAKE) clean
34 dh_clean
35
36install: install-indep install-arch
37install-indep:
38 dh_testdir
39 dh_testroot
40 dh_clean -k -i
41 dh_installdirs -i
42
43install-arch:
44 dh_testdir
45 dh_testroot
46 dh_clean -k -s
47 dh_installdirs -s
48 install -D -m 755 crash debian/tmp/usr/bin/crash
49 install -D -m 755 crash2 debian/dhtest2/usr/bin/crash2
50
51# Must not depend on anything. This is to be called by
52# binary-arch/binary-indep
53# in another 'make' thread.
54binary-common:
55 dh_testdir
56 dh_testroot
57 dh_installchangelogs
58 dh_installdocs
59 dh_strip
60 dh_compress
61 dh_fixperms
62 dh_installdeb
63 dh_shlibdeps
64 dh_gencontrol
65 dh_md5sums
66 dh_builddeb
67
68# Build architecture independant packages using the common target.
69binary-indep: build-indep install-indep
70 $(MAKE) -f debian/rules DH_OPTIONS=-i binary-common
71
72# Build architecture dependant packages using the common target.
73binary-arch: build-arch install-arch
74 $(MAKE) -f debian/rules DH_OPTIONS=-a binary-common
75
76binary: binary-arch binary-indep
77.PHONY: build clean binary-indep binary-arch binary install install-indep install-arch
078
=== added directory 'tests/dhtest.compatenvvar'
=== added file 'tests/dhtest.compatenvvar/Makefile'
--- tests/dhtest.compatenvvar/Makefile 1970-01-01 00:00:00 +0000
+++ tests/dhtest.compatenvvar/Makefile 2010-04-21 20:29:14 +0000
@@ -0,0 +1,18 @@
1CFLAGS= -g -Wall -W -O0
2
3LIBNAME=crashrep
4
5all: crash crash2
6
7crash: crash.o
8 $(CC) $^ -o $@
9
10crash2: crash2.o
11 $(CC) $^ -o $@
12
13clean:
14 rm -f *.o crash crash2
15
16install: all
17 install -d $(DESTDIR)/usr/bin
18 install crash crash2 $(DESTDIR)/usr/bin
019
=== added file 'tests/dhtest.compatenvvar/crash.c'
--- tests/dhtest.compatenvvar/crash.c 1970-01-01 00:00:00 +0000
+++ tests/dhtest.compatenvvar/crash.c 2010-04-21 20:29:14 +0000
@@ -0,0 +1,34 @@
1/* crash.c - demo program for libcrashreport
2
3 (c) 2004 Martin Pitt <martin@piware.de>
4
5 This file is public domain.
6*/
7
8#include <stdio.h>
9
10void h(char* p) {
11 p[1] = 'a';
12}
13
14int g( int x, int y )
15{
16 char* s = NULL;
17 h(s);
18 return x+y;
19}
20
21int f( int x )
22{
23 return g( x, 42 );
24}
25
26int
27main()
28{
29 int x;
30
31 x = f(1);
32 printf( "x = %i, terminating normally now.\n", x );
33 return 0;
34}
035
=== added file 'tests/dhtest.compatenvvar/crash2.c'
--- tests/dhtest.compatenvvar/crash2.c 1970-01-01 00:00:00 +0000
+++ tests/dhtest.compatenvvar/crash2.c 2010-04-21 20:29:14 +0000
@@ -0,0 +1,39 @@
1/* crash.c - demo program for libcrashreport
2
3 (c) 2004 Martin Pitt <martin@piware.de>
4
5 This file is public domain.
6*/
7
8#include <stdio.h>
9#include <math.h>
10#include <signal.h>
11
12double h()
13{
14 double a = 1./0;
15 if (isinf(a))
16 raise(SIGFPE);
17 return a;
18}
19
20int g( int x, int y )
21{
22
23 return x+y+(int) h();
24}
25
26int f( int x )
27{
28 return g( x, 42 );
29}
30
31int
32main()
33{
34 int x;
35
36 x = f(1);
37 printf( "x = %i, terminating normally now.\n", x );
38 return 0;
39}
040
=== added directory 'tests/dhtest.compatenvvar/debian'
=== added file 'tests/dhtest.compatenvvar/debian/changelog'
--- tests/dhtest.compatenvvar/debian/changelog 1970-01-01 00:00:00 +0000
+++ tests/dhtest.compatenvvar/debian/changelog 2010-04-21 20:29:14 +0000
@@ -0,0 +1,5 @@
1dhtest.compatenvvar (1:2.3-1) foo; urgency=low
2
3 * Initial release.
4
5 -- Martin Pitt <martin.pitt@ubuntu.com> Fri, 16 Jun 2006 10:49:56 +0200
06
=== added file 'tests/dhtest.compatenvvar/debian/control'
--- tests/dhtest.compatenvvar/debian/control 1970-01-01 00:00:00 +0000
+++ tests/dhtest.compatenvvar/debian/control 2010-04-21 20:29:14 +0000
@@ -0,0 +1,13 @@
1Source: dhtest.compatenvvar
2Section: utils
3Priority: extra
4Maintainer: Martin Pitt <martin.pitt@ubuntu.com>
5Build-Depends: debhelper (>= 4.1.0)
6Standards-Version: 3.7.2
7
8Package: dhtest1
9Architecture: any
10Depends: ${shlibs:Depends}
11Description: crash with a SIGSEGV
12 Test package
13
014
=== added file 'tests/dhtest.compatenvvar/debian/copyright'
--- tests/dhtest.compatenvvar/debian/copyright 1970-01-01 00:00:00 +0000
+++ tests/dhtest.compatenvvar/debian/copyright 2010-04-21 20:29:14 +0000
@@ -0,0 +1,1 @@
1foo
02
=== added file 'tests/dhtest.compatenvvar/debian/rules'
--- tests/dhtest.compatenvvar/debian/rules 1970-01-01 00:00:00 +0000
+++ tests/dhtest.compatenvvar/debian/rules 2010-04-21 20:29:14 +0000
@@ -0,0 +1,64 @@
1#!/usr/bin/make -f
2
3# Uncomment this to turn on verbose mode.
4#export DH_VERBOSE=1
5
6export DH_COMPAT=3
7
8# This has to be exported to make some magic below work.
9export DH_OPTIONS
10
11CFLAGS = -Wall -g
12
13ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
14 CFLAGS += -O0
15else
16 CFLAGS += -O2
17endif
18
19#Architecture
20build: build-arch build-indep
21
22build-arch: build-arch-stamp
23build-arch-stamp:
24 $(MAKE)
25 touch build-arch-stamp
26
27build-indep:
28
29clean:
30 dh_testdir
31 dh_testroot
32 rm -f build-arch-stamp build-indep-stamp
33 -$(MAKE) clean
34 dh_clean
35
36install: install-arch
37
38install-arch:
39 dh_testdir
40 dh_testroot
41 dh_clean -k -s
42 dh_installdirs -s
43 $(MAKE) install DESTDIR=$(CURDIR)/debian/dhtest1
44
45 # install hardlink
46 ln debian/dhtest1/usr/bin/crash debian/dhtest1/usr/bin/crashl
47
48# Build architecture dependant packages using the common target.
49binary-arch: build-arch install-arch
50 dh_testdir
51 dh_testroot
52 dh_installchangelogs
53 dh_installdocs
54 dh_strip
55 dh_compress
56 dh_fixperms
57 dh_installdeb
58 dh_shlibdeps
59 dh_gencontrol
60 dh_md5sums
61 dh_builddeb
62
63binary: binary-arch binary-indep
64.PHONY: build clean binary-indep binary-arch binary install install-indep install-arch
065
=== added directory 'tests/dhtest.dbg'
=== added file 'tests/dhtest.dbg/Makefile'
--- tests/dhtest.dbg/Makefile 1970-01-01 00:00:00 +0000
+++ tests/dhtest.dbg/Makefile 2010-04-21 20:29:14 +0000
@@ -0,0 +1,18 @@
1CFLAGS= -g -Wall -W -O0
2
3LIBNAME=crashrep
4
5all: crash crash2
6
7crash: crash.o
8 $(CC) $^ -o $@
9
10crash2: crash2.o
11 $(CC) $^ -o $@
12
13clean:
14 rm -f *.o crash crash2
15
16install: all
17 install -d $(DESTDIR)/usr/bin
18 install crash crash2 $(DESTDIR)/usr/bin
019
=== added file 'tests/dhtest.dbg/crash.c'
--- tests/dhtest.dbg/crash.c 1970-01-01 00:00:00 +0000
+++ tests/dhtest.dbg/crash.c 2010-04-21 20:29:14 +0000
@@ -0,0 +1,34 @@
1/* crash.c - demo program for libcrashreport
2
3 (c) 2004 Martin Pitt <martin@piware.de>
4
5 This file is public domain.
6*/
7
8#include <stdio.h>
9
10void h(char* p) {
11 p[1] = 'a';
12}
13
14int g( int x, int y )
15{
16 char* s = NULL;
17 h(s);
18 return x+y;
19}
20
21int f( int x )
22{
23 return g( x, 42 );
24}
25
26int
27main()
28{
29 int x;
30
31 x = f(1);
32 printf( "x = %i, terminating normally now.\n", x );
33 return 0;
34}
035
=== added file 'tests/dhtest.dbg/crash2.c'
--- tests/dhtest.dbg/crash2.c 1970-01-01 00:00:00 +0000
+++ tests/dhtest.dbg/crash2.c 2010-04-21 20:29:14 +0000
@@ -0,0 +1,39 @@
1/* crash.c - demo program for libcrashreport
2
3 (c) 2004 Martin Pitt <martin@piware.de>
4
5 This file is public domain.
6*/
7
8#include <stdio.h>
9#include <math.h>
10#include <signal.h>
11
12double h()
13{
14 double a = 1./0;
15 if (isinf(a))
16 raise(SIGFPE);
17 return a;
18}
19
20int g( int x, int y )
21{
22
23 return x+y+(int) h();
24}
25
26int f( int x )
27{
28 return g( x, 42 );
29}
30
31int
32main()
33{
34 int x;
35
36 x = f(1);
37 printf( "x = %i, terminating normally now.\n", x );
38 return 0;
39}
040
=== added directory 'tests/dhtest.dbg/debian'
=== added file 'tests/dhtest.dbg/debian/changelog'
--- tests/dhtest.dbg/debian/changelog 1970-01-01 00:00:00 +0000
+++ tests/dhtest.dbg/debian/changelog 2010-04-21 20:29:14 +0000
@@ -0,0 +1,5 @@
1dhtest.dbg (2) foo; urgency=low
2
3 * Initial release.
4
5 -- Martin Pitt <martin.pitt@ubuntu.com> Fri, 16 Jun 2006 10:49:56 +0200
06
=== added file 'tests/dhtest.dbg/debian/compat'
--- tests/dhtest.dbg/debian/compat 1970-01-01 00:00:00 +0000
+++ tests/dhtest.dbg/debian/compat 2010-04-21 20:29:14 +0000
@@ -0,0 +1,1 @@
15
02
=== added file 'tests/dhtest.dbg/debian/control'
--- tests/dhtest.dbg/debian/control 1970-01-01 00:00:00 +0000
+++ tests/dhtest.dbg/debian/control 2010-04-21 20:29:14 +0000
@@ -0,0 +1,31 @@
1Source: dhtest.dbg
2Section: utils
3Priority: extra
4Maintainer: Martin Pitt <martin.pitt@ubuntu.com>
5Build-Depends: debhelper (>= 4.1.0)
6Standards-Version: 3.7.2
7
8Package: dhtest1
9Architecture: any
10Depends: ${shlibs:Depends}
11Description: crash with a SIGSEGV
12 Test package
13
14Package: dhtest1-dbg
15Architecture: any
16Depends: dhtest1 (= ${Source-Version})
17Description: crash with a SIGSEGV (debug symbols)
18 Test package (debug symbols)
19
20Package: dhtest2
21Architecture: any
22Depends: ${shlibs:Depends}
23Description: crash with a SIGFPE
24 Test package
25
26Package: dhtestall
27Architecture: all
28Depends: ${shlibs:Depends}
29Description: dummy arch-all package
30 Test package
31
032
=== added file 'tests/dhtest.dbg/debian/copyright'
--- tests/dhtest.dbg/debian/copyright 1970-01-01 00:00:00 +0000
+++ tests/dhtest.dbg/debian/copyright 2010-04-21 20:29:14 +0000
@@ -0,0 +1,1 @@
1foo
02
=== added file 'tests/dhtest.dbg/debian/dhtest1.install'
--- tests/dhtest.dbg/debian/dhtest1.install 1970-01-01 00:00:00 +0000
+++ tests/dhtest.dbg/debian/dhtest1.install 2010-04-21 20:29:14 +0000
@@ -0,0 +1,1 @@
1/usr/bin/crash
02
=== added file 'tests/dhtest.dbg/debian/dhtest2.install'
--- tests/dhtest.dbg/debian/dhtest2.install 1970-01-01 00:00:00 +0000
+++ tests/dhtest.dbg/debian/dhtest2.install 2010-04-21 20:29:14 +0000
@@ -0,0 +1,1 @@
1/usr/bin/crash2
02
=== added file 'tests/dhtest.dbg/debian/rules'
--- tests/dhtest.dbg/debian/rules 1970-01-01 00:00:00 +0000
+++ tests/dhtest.dbg/debian/rules 2010-04-21 20:29:14 +0000
@@ -0,0 +1,87 @@
1#!/usr/bin/make -f
2
3# Uncomment this to turn on verbose mode.
4#export DH_VERBOSE=1
5
6# This has to be exported to make some magic below work.
7export DH_OPTIONS
8
9CFLAGS = -Wall -g
10
11ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
12 CFLAGS += -O0
13else
14 CFLAGS += -O2
15endif
16
17#Architecture
18build: build-arch build-indep
19
20build-arch: build-arch-stamp
21build-arch-stamp:
22 $(MAKE)
23 touch build-arch-stamp
24
25build-indep:
26
27clean:
28 dh_testdir
29 dh_testroot
30 rm -f build-arch-stamp build-indep-stamp
31 -$(MAKE) clean
32 dh_clean
33
34install: install-indep install-arch
35install-indep:
36 dh_testdir
37 dh_testroot
38 dh_clean -k -i
39 dh_installdirs -i
40 dh_install -i --sourcedir=debian/tmp
41
42install-arch:
43 dh_testdir
44 dh_testroot
45 dh_clean -k -s
46 dh_installdirs -s
47 $(MAKE) install DESTDIR=$(CURDIR)/debian/tmp
48 dh_install -s --sourcedir=debian/tmp
49
50# Must not depend on anything. This is to be called by
51# binary-arch/binary-indep
52# in another 'make' thread.
53binary-common:
54
55# Build architecture independant packages using the common target.
56binary-indep: build-indep install-indep
57 dh_testdir -i
58 dh_testroot -i
59 dh_installchangelogs -i
60 dh_installdocs -i
61 dh_strip -i
62 dh_compress -i
63 dh_fixperms -i
64 dh_installdeb -i
65 dh_shlibdeps -i
66 dh_gencontrol -i
67 dh_md5sums -i
68 dh_builddeb -i
69
70# Build architecture dependant packages using the common target.
71binary-arch: build-arch install-arch
72 dh_testdir -a
73 dh_testroot -a
74 dh_installchangelogs -a
75 dh_installdocs -a
76 dh_strip -Ndhtest1 -a
77 dh_strip -pdhtest1 --dbg-package=dhtest1-dbg
78 dh_compress -a
79 dh_fixperms -a
80 dh_installdeb -a
81 dh_shlibdeps -a
82 dh_gencontrol -a
83 dh_md5sums -a
84 dh_builddeb -a
85
86binary: binary-arch binary-indep
87.PHONY: build clean binary-indep binary-arch binary install install-indep install-arch
088
=== added directory 'tests/dhtest.dbg2'
=== added file 'tests/dhtest.dbg2/Makefile'
--- tests/dhtest.dbg2/Makefile 1970-01-01 00:00:00 +0000
+++ tests/dhtest.dbg2/Makefile 2010-04-21 20:29:14 +0000
@@ -0,0 +1,18 @@
1CFLAGS= -g -Wall -W -O0
2
3LIBNAME=crashrep
4
5all: crash crash2
6
7crash: crash.o
8 $(CC) $^ -o $@
9
10crash2: crash2.o
11 $(CC) $^ -o $@
12
13clean:
14 rm -f *.o crash crash2
15
16install: all
17 install -d $(DESTDIR)/usr/bin
18 install crash crash2 $(DESTDIR)/usr/bin
019
=== added file 'tests/dhtest.dbg2/crash.c'
--- tests/dhtest.dbg2/crash.c 1970-01-01 00:00:00 +0000
+++ tests/dhtest.dbg2/crash.c 2010-04-21 20:29:14 +0000
@@ -0,0 +1,34 @@
1/* crash.c - demo program for libcrashreport
2
3 (c) 2004 Martin Pitt <martin@piware.de>
4
5 This file is public domain.
6*/
7
8#include <stdio.h>
9
10void h(char* p) {
11 p[1] = 'a';
12}
13
14int g( int x, int y )
15{
16 char* s = NULL;
17 h(s);
18 return x+y;
19}
20
21int f( int x )
22{
23 return g( x, 42 );
24}
25
26int
27main()
28{
29 int x;
30
31 x = f(1);
32 printf( "x = %i, terminating normally now.\n", x );
33 return 0;
34}
035
=== added file 'tests/dhtest.dbg2/crash2.c'
--- tests/dhtest.dbg2/crash2.c 1970-01-01 00:00:00 +0000
+++ tests/dhtest.dbg2/crash2.c 2010-04-21 20:29:14 +0000
@@ -0,0 +1,39 @@
1/* crash.c - demo program for libcrashreport
2
3 (c) 2004 Martin Pitt <martin@piware.de>
4
5 This file is public domain.
6*/
7
8#include <stdio.h>
9#include <math.h>
10#include <signal.h>
11
12double h()
13{
14 double a = 1./0;
15 if (isinf(a))
16 raise(SIGFPE);
17 return a;
18}
19
20int g( int x, int y )
21{
22
23 return x+y+(int) h();
24}
25
26int f( int x )
27{
28 return g( x, 42 );
29}
30
31int
32main()
33{
34 int x;
35
36 x = f(1);
37 printf( "x = %i, terminating normally now.\n", x );
38 return 0;
39}
040
=== added directory 'tests/dhtest.dbg2/debian'
=== added file 'tests/dhtest.dbg2/debian/changelog'
--- tests/dhtest.dbg2/debian/changelog 1970-01-01 00:00:00 +0000
+++ tests/dhtest.dbg2/debian/changelog 2010-04-21 20:29:14 +0000
@@ -0,0 +1,5 @@
1dhtest.dbg2 (2) foo; urgency=low
2
3 * Initial release.
4
5 -- Martin Pitt <martin.pitt@ubuntu.com> Fri, 16 Jun 2006 10:49:56 +0200
06
=== added file 'tests/dhtest.dbg2/debian/compat'
--- tests/dhtest.dbg2/debian/compat 1970-01-01 00:00:00 +0000
+++ tests/dhtest.dbg2/debian/compat 2010-04-21 20:29:14 +0000
@@ -0,0 +1,1 @@
15
02
=== added file 'tests/dhtest.dbg2/debian/control'
--- tests/dhtest.dbg2/debian/control 1970-01-01 00:00:00 +0000
+++ tests/dhtest.dbg2/debian/control 2010-04-21 20:29:14 +0000
@@ -0,0 +1,37 @@
1Source: dhtest.dbg2
2Section: utils
3Priority: extra
4Maintainer: Martin Pitt <martin.pitt@ubuntu.com>
5Build-Depends: debhelper (>= 4.1.0)
6Standards-Version: 3.7.2
7
8Package: dhtest1
9Architecture: any
10Depends: ${shlibs:Depends}
11Description: crash with a SIGSEGV
12 Test package
13
14Package: dhtest1-dbg
15Architecture: any
16Depends: dhtest1 (= ${Source-Version})
17Description: crash with a SIGSEGV (debug symbols)
18 Test package (debug symbols)
19
20Package: dhtest2
21Architecture: any
22Depends: ${shlibs:Depends}
23Description: crash with a SIGFPE
24 Test package
25
26Package: dhtest2-extra
27Architecture: any
28Depends: ${shlibs:Depends}
29Description: crash with a SIGSEGV -- extra stuff
30 Test package
31
32Package: dhtestall
33Architecture: all
34Depends: ${shlibs:Depends}
35Description: dummy arch-all package
36 Test package
37
038
=== added file 'tests/dhtest.dbg2/debian/copyright'
--- tests/dhtest.dbg2/debian/copyright 1970-01-01 00:00:00 +0000
+++ tests/dhtest.dbg2/debian/copyright 2010-04-21 20:29:14 +0000
@@ -0,0 +1,1 @@
1foo
02
=== added file 'tests/dhtest.dbg2/debian/dhtest1.install'
--- tests/dhtest.dbg2/debian/dhtest1.install 1970-01-01 00:00:00 +0000
+++ tests/dhtest.dbg2/debian/dhtest1.install 2010-04-21 20:29:14 +0000
@@ -0,0 +1,1 @@
1/usr/bin/crash
02
=== added file 'tests/dhtest.dbg2/debian/dhtest2.install'
--- tests/dhtest.dbg2/debian/dhtest2.install 1970-01-01 00:00:00 +0000
+++ tests/dhtest.dbg2/debian/dhtest2.install 2010-04-21 20:29:14 +0000
@@ -0,0 +1,1 @@
1/usr/bin/crash2
02
=== added file 'tests/dhtest.dbg2/debian/rules'
--- tests/dhtest.dbg2/debian/rules 1970-01-01 00:00:00 +0000
+++ tests/dhtest.dbg2/debian/rules 2010-04-21 20:29:14 +0000
@@ -0,0 +1,89 @@
1#!/usr/bin/make -f
2
3# Uncomment this to turn on verbose mode.
4#export DH_VERBOSE=1
5
6# This has to be exported to make some magic below work.
7export DH_OPTIONS
8
9CFLAGS = -Wall -g
10
11ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
12 CFLAGS += -O0
13else
14 CFLAGS += -O2
15endif
16
17#Architecture
18build: build-arch build-indep
19
20build-arch: build-arch-stamp
21build-arch-stamp:
22 $(MAKE)
23 touch build-arch-stamp
24
25build-indep:
26
27clean:
28 dh_testdir
29 dh_testroot
30 rm -f build-arch-stamp build-indep-stamp
31 -$(MAKE) clean
32 dh_clean
33
34install: install-indep install-arch
35install-indep:
36 dh_testdir
37 dh_testroot
38 dh_clean -k -i
39 dh_installdirs -i
40 dh_install -i --sourcedir=debian/tmp
41
42install-arch:
43 dh_testdir
44 dh_testroot
45 dh_clean -k -s
46 dh_installdirs -s
47 $(MAKE) install DESTDIR=$(CURDIR)/debian/tmp
48 dh_install -s --sourcedir=debian/tmp
49
50# Must not depend on anything. This is to be called by
51# binary-arch/binary-indep
52# in another 'make' thread.
53binary-common:
54
55# Build architecture independant packages using the common target.
56binary-indep: build-indep install-indep
57 dh_testdir -i
58 dh_testroot -i
59 dh_installchangelogs -i
60 dh_installdocs -i
61 dh_strip -i
62 dh_compress -i
63 dh_fixperms -i
64 dh_installdeb -i
65 dh_shlibdeps -i
66 dh_gencontrol -i
67 dh_md5sums -i
68 dh_builddeb -i
69
70# Build architecture dependant packages using the common target.
71binary-arch: build-arch install-arch
72 dh_testdir -a
73 dh_testroot -a
74 dh_installchangelogs -a
75 dh_installdocs -a
76 dh_strip -Ndhtest1 -Ndhtest2-extra -a
77 dh_strip -pdhtest1 --keep-debug
78 install -d debian/dhtest1-dbg/usr/lib/
79 mv debian/dhtest1/usr/lib/debug debian/dhtest1-dbg/usr/lib/
80 dh_compress -a
81 dh_fixperms -a
82 dh_installdeb -a
83 dh_shlibdeps -a
84 dh_gencontrol -a
85 dh_md5sums -a
86 dh_builddeb -a
87
88binary: binary-arch binary-indep
89.PHONY: build clean binary-indep binary-arch binary install install-indep install-arch
090
=== added directory 'tests/dhtest.dbg3'
=== added file 'tests/dhtest.dbg3/Makefile'
--- tests/dhtest.dbg3/Makefile 1970-01-01 00:00:00 +0000
+++ tests/dhtest.dbg3/Makefile 2010-04-21 20:29:14 +0000
@@ -0,0 +1,18 @@
1CFLAGS= -g -Wall -W -O0
2
3LIBNAME=crashrep
4
5all: crash crash2
6
7crash: crash.o
8 $(CC) $^ -o $@
9
10crash2: crash2.o
11 $(CC) $^ -o $@
12
13clean:
14 rm -f *.o crash crash2
15
16install: all
17 install -d $(DESTDIR)/usr/bin
18 install crash crash2 $(DESTDIR)/usr/bin
019
=== added file 'tests/dhtest.dbg3/crash.c'
--- tests/dhtest.dbg3/crash.c 1970-01-01 00:00:00 +0000
+++ tests/dhtest.dbg3/crash.c 2010-04-21 20:29:14 +0000
@@ -0,0 +1,34 @@
1/* crash.c - demo program for libcrashreport
2
3 (c) 2004 Martin Pitt <martin@piware.de>
4
5 This file is public domain.
6*/
7
8#include <stdio.h>
9
10void h(char* p) {
11 p[1] = 'a';
12}
13
14int g( int x, int y )
15{
16 char* s = NULL;
17 h(s);
18 return x+y;
19}
20
21int f( int x )
22{
23 return g( x, 42 );
24}
25
26int
27main()
28{
29 int x;
30
31 x = f(1);
32 printf( "x = %i, terminating normally now.\n", x );
33 return 0;
34}
035
=== added file 'tests/dhtest.dbg3/crash2.c'
--- tests/dhtest.dbg3/crash2.c 1970-01-01 00:00:00 +0000
+++ tests/dhtest.dbg3/crash2.c 2010-04-21 20:29:14 +0000
@@ -0,0 +1,39 @@
1/* crash.c - demo program for libcrashreport
2
3 (c) 2004 Martin Pitt <martin@piware.de>
4
5 This file is public domain.
6*/
7
8#include <stdio.h>
9#include <math.h>
10#include <signal.h>
11
12double h()
13{
14 double a = 1./0;
15 if (isinf(a))
16 raise(SIGFPE);
17 return a;
18}
19
20int g( int x, int y )
21{
22
23 return x+y+(int) h();
24}
25
26int f( int x )
27{
28 return g( x, 42 );
29}
30
31int
32main()
33{
34 int x;
35
36 x = f(1);
37 printf( "x = %i, terminating normally now.\n", x );
38 return 0;
39}
040
=== added directory 'tests/dhtest.dbg3/debian'
=== added file 'tests/dhtest.dbg3/debian/changelog'
--- tests/dhtest.dbg3/debian/changelog 1970-01-01 00:00:00 +0000
+++ tests/dhtest.dbg3/debian/changelog 2010-04-21 20:29:14 +0000
@@ -0,0 +1,5 @@
1dhtest.dbg3 (2) foo; urgency=low
2
3 * Initial release.
4
5 -- Martin Pitt <martin.pitt@ubuntu.com> Fri, 16 Jun 2006 10:49:56 +0200
06
=== added file 'tests/dhtest.dbg3/debian/compat'
--- tests/dhtest.dbg3/debian/compat 1970-01-01 00:00:00 +0000
+++ tests/dhtest.dbg3/debian/compat 2010-04-21 20:29:14 +0000
@@ -0,0 +1,1 @@
15
02
=== added file 'tests/dhtest.dbg3/debian/control'
--- tests/dhtest.dbg3/debian/control 1970-01-01 00:00:00 +0000
+++ tests/dhtest.dbg3/debian/control 2010-04-21 20:29:14 +0000
@@ -0,0 +1,31 @@
1Source: dhtest.dbg3
2Section: utils
3Priority: extra
4Maintainer: Martin Pitt <martin.pitt@ubuntu.com>
5Build-Depends: debhelper (>= 4.1.0)
6Standards-Version: 3.7.2
7
8Package: dhtest1
9Architecture: any
10Depends: ${shlibs:Depends}
11Description: crash with a SIGSEGV
12 Test package
13
14Package: dhtest1-dbg
15Architecture: any
16Depends: dhtest1 (= ${Source-Version})
17Description: crash with a SIGSEGV (debug symbols)
18 Test package (debug symbols)
19
20Package: dhtest2
21Architecture: any
22Depends: ${shlibs:Depends}
23Description: crash with a SIGFPE
24 Test package
25
26Package: dhtestall
27Architecture: all
28Depends: ${shlibs:Depends}
29Description: dummy arch-all package
30 Test package
31
032
=== added file 'tests/dhtest.dbg3/debian/copyright'
--- tests/dhtest.dbg3/debian/copyright 1970-01-01 00:00:00 +0000
+++ tests/dhtest.dbg3/debian/copyright 2010-04-21 20:29:14 +0000
@@ -0,0 +1,1 @@
1foo
02
=== added file 'tests/dhtest.dbg3/debian/dhtest1.install'
--- tests/dhtest.dbg3/debian/dhtest1.install 1970-01-01 00:00:00 +0000
+++ tests/dhtest.dbg3/debian/dhtest1.install 2010-04-21 20:29:14 +0000
@@ -0,0 +1,1 @@
1/usr/bin/crash
02
=== added file 'tests/dhtest.dbg3/debian/dhtest2.install'
--- tests/dhtest.dbg3/debian/dhtest2.install 1970-01-01 00:00:00 +0000
+++ tests/dhtest.dbg3/debian/dhtest2.install 2010-04-21 20:29:14 +0000
@@ -0,0 +1,1 @@
1/usr/bin/crash2
02
=== added file 'tests/dhtest.dbg3/debian/rules'
--- tests/dhtest.dbg3/debian/rules 1970-01-01 00:00:00 +0000
+++ tests/dhtest.dbg3/debian/rules 2010-04-21 20:29:14 +0000
@@ -0,0 +1,86 @@
1#!/usr/bin/make -f
2
3# Uncomment this to turn on verbose mode.
4#export DH_VERBOSE=1
5
6# This has to be exported to make some magic below work.
7export DH_OPTIONS
8
9CFLAGS = -Wall -g
10
11ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
12 CFLAGS += -O0
13else
14 CFLAGS += -O2
15endif
16
17#Architecture
18build: build-arch build-indep
19
20build-arch: build-arch-stamp
21build-arch-stamp:
22 $(MAKE)
23 touch build-arch-stamp
24
25build-indep:
26
27clean:
28 dh_testdir
29 dh_testroot
30 rm -f build-arch-stamp build-indep-stamp
31 -$(MAKE) clean
32 dh_clean
33
34install: install-indep install-arch
35install-indep:
36 dh_testdir
37 dh_testroot
38 dh_clean -k -i
39 dh_installdirs -i
40 dh_install -i --sourcedir=debian/tmp
41
42install-arch:
43 dh_testdir
44 dh_testroot
45 dh_clean -k -s
46 dh_installdirs -s
47 $(MAKE) install DESTDIR=$(CURDIR)/debian/tmp
48 dh_install -s --sourcedir=debian/tmp
49
50# Must not depend on anything. This is to be called by
51# binary-arch/binary-indep
52# in another 'make' thread.
53binary-common:
54
55# Build architecture independant packages using the common target.
56binary-indep: build-indep install-indep
57 dh_testdir -i
58 dh_testroot -i
59 dh_installchangelogs -i
60 dh_installdocs -i
61 dh_strip -i
62 dh_compress -i
63 dh_fixperms -i
64 dh_installdeb -i
65 dh_shlibdeps -i
66 dh_gencontrol -i
67 dh_md5sums -i
68 dh_builddeb -i
69
70# Build architecture dependant packages using the common target.
71binary-arch: build-arch install-arch
72 dh_testdir -a
73 dh_testroot -a
74 dh_installchangelogs -a
75 dh_installdocs -a
76 dh_strip -a --dbg-package dhtest1-dbg
77 dh_compress -a
78 dh_fixperms -a
79 dh_installdeb -a
80 dh_shlibdeps -a
81 dh_gencontrol -a
82 dh_md5sums -a
83 dh_builddeb -a
84
85binary: binary-arch binary-indep
86.PHONY: build clean binary-indep binary-arch binary install install-indep install-arch
087
=== added directory 'tests/dhtest.noargs'
=== added file 'tests/dhtest.noargs/Makefile'
--- tests/dhtest.noargs/Makefile 1970-01-01 00:00:00 +0000
+++ tests/dhtest.noargs/Makefile 2010-04-21 20:29:14 +0000
@@ -0,0 +1,19 @@
1CFLAGS= -g -Wall -W -O0
2
3LIBNAME=crashrep
4
5all: crash crash2
6
7crash: crash.o
8 $(CC) $^ -o $@
9 objcopy --add-gnu-debuglink=$@ $@
10
11crash2: crash2.o
12 $(CC) $^ -o $@
13
14clean:
15 rm -f *.o crash crash2
16
17install: all
18 install -d $(DESTDIR)/usr/bin
19 install crash crash2 $(DESTDIR)/usr/bin
020
=== added file 'tests/dhtest.noargs/crash.c'
--- tests/dhtest.noargs/crash.c 1970-01-01 00:00:00 +0000
+++ tests/dhtest.noargs/crash.c 2010-04-21 20:29:14 +0000
@@ -0,0 +1,34 @@
1/* crash.c - demo program for libcrashreport
2
3 (c) 2004 Martin Pitt <martin@piware.de>
4
5 This file is public domain.
6*/
7
8#include <stdio.h>
9
10void h(char* p) {
11 p[1] = 'a';
12}
13
14int g( int x, int y )
15{
16 char* s = NULL;
17 h(s);
18 return x+y;
19}
20
21int f( int x )
22{
23 return g( x, 42 );
24}
25
26int
27main()
28{
29 int x;
30
31 x = f(1);
32 printf( "x = %i, terminating normally now.\n", x );
33 return 0;
34}
035
=== added file 'tests/dhtest.noargs/crash2.c'
--- tests/dhtest.noargs/crash2.c 1970-01-01 00:00:00 +0000
+++ tests/dhtest.noargs/crash2.c 2010-04-21 20:29:14 +0000
@@ -0,0 +1,39 @@
1/* crash.c - demo program for libcrashreport
2
3 (c) 2004 Martin Pitt <martin@piware.de>
4
5 This file is public domain.
6*/
7
8#include <stdio.h>
9#include <math.h>
10#include <signal.h>
11
12double h()
13{
14 double a = 1./0;
15 if (isinf(a))
16 raise(SIGFPE);
17 return a;
18}
19
20int g( int x, int y )
21{
22
23 return x+y+(int) h();
24}
25
26int f( int x )
27{
28 return g( x, 42 );
29}
30
31int
32main()
33{
34 int x;
35
36 x = f(1);
37 printf( "x = %i, terminating normally now.\n", x );
38 return 0;
39}
040
=== added directory 'tests/dhtest.noargs/debian'
=== added file 'tests/dhtest.noargs/debian/changelog'
--- tests/dhtest.noargs/debian/changelog 1970-01-01 00:00:00 +0000
+++ tests/dhtest.noargs/debian/changelog 2010-04-21 20:29:14 +0000
@@ -0,0 +1,5 @@
1dhtest.noargs (3.14) foo; urgency=low
2
3 * Initial release.
4
5 -- Martin Pitt <martin.pitt@ubuntu.com> Fri, 16 Jun 2006 10:49:56 +0200
06
=== added file 'tests/dhtest.noargs/debian/compat'
--- tests/dhtest.noargs/debian/compat 1970-01-01 00:00:00 +0000
+++ tests/dhtest.noargs/debian/compat 2010-04-21 20:29:14 +0000
@@ -0,0 +1,1 @@
15
02
=== added file 'tests/dhtest.noargs/debian/control'
--- tests/dhtest.noargs/debian/control 1970-01-01 00:00:00 +0000
+++ tests/dhtest.noargs/debian/control 2010-04-21 20:29:14 +0000
@@ -0,0 +1,29 @@
1Source: dhtest.noargs
2Section: utils
3Priority: extra
4Maintainer: Martin Pitt <martin.pitt@ubuntu.com>
5Build-Depends: debhelper (>= 4.1.0)
6Standards-Version: 3.7.2
7
8Package: dhtest1
9Architecture: any
10Pre-Depends: coreutils (>= 1)
11Depends: ${shlibs:Depends}
12Suggests: foo (<< 1),
13 bar (>= 0), baz,
14 zip
15Description: crash with a SIGSEGV
16 Test package
17
18Package: dhtest2
19Architecture: any
20Depends: ${shlibs:Depends}
21Description: crash with a SIGFPE
22 Test package
23
24Package: dhtestall
25Architecture: all
26Depends: ${shlibs:Depends}
27Description: dummy arch-all package
28 Test package
29
030
=== added file 'tests/dhtest.noargs/debian/copyright'
--- tests/dhtest.noargs/debian/copyright 1970-01-01 00:00:00 +0000
+++ tests/dhtest.noargs/debian/copyright 2010-04-21 20:29:14 +0000
@@ -0,0 +1,1 @@
1foo
02
=== added file 'tests/dhtest.noargs/debian/dhtest1.install'
--- tests/dhtest.noargs/debian/dhtest1.install 1970-01-01 00:00:00 +0000
+++ tests/dhtest.noargs/debian/dhtest1.install 2010-04-21 20:29:14 +0000
@@ -0,0 +1,1 @@
1/usr/bin/crash
02
=== added file 'tests/dhtest.noargs/debian/dhtest2.install'
--- tests/dhtest.noargs/debian/dhtest2.install 1970-01-01 00:00:00 +0000
+++ tests/dhtest.noargs/debian/dhtest2.install 2010-04-21 20:29:14 +0000
@@ -0,0 +1,1 @@
1/usr/bin/crash2
02
=== added file 'tests/dhtest.noargs/debian/rules'
--- tests/dhtest.noargs/debian/rules 1970-01-01 00:00:00 +0000
+++ tests/dhtest.noargs/debian/rules 2010-04-21 20:29:14 +0000
@@ -0,0 +1,69 @@
1#!/usr/bin/make -f
2
3# Uncomment this to turn on verbose mode.
4#export DH_VERBOSE=1
5
6# This has to be exported to make some magic below work.
7export DH_OPTIONS
8
9CFLAGS = -Wall -g
10
11ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
12 CFLAGS += -O0
13else
14 CFLAGS += -O2
15endif
16
17#Architecture
18build: build-arch build-indep
19
20build-arch: build-arch-stamp
21build-arch-stamp:
22 $(MAKE)
23 touch build-arch-stamp
24
25build-indep:
26
27clean:
28 dh_testdir
29 dh_testroot
30 rm -f build-arch-stamp build-indep-stamp
31 -$(MAKE) clean
32 dh_clean
33
34install: install-indep install-arch
35install-indep:
36 dh_testdir
37 dh_testroot
38 dh_clean -k -i
39 dh_installdirs -i
40 dh_install -i --sourcedir=debian/tmp
41
42install-arch:
43 dh_testdir
44 dh_testroot
45 dh_clean -k -s
46 dh_installdirs -s
47 $(MAKE) install DESTDIR=$(CURDIR)/debian/tmp
48 dh_install -s --sourcedir=debian/tmp
49
50# Build architecture independant packages using the common target.
51binary-indep: build-indep install-indep
52
53# Build architecture dependant packages using the common target.
54binary-arch: build-arch install-arch
55 dh_testdir
56 dh_testroot
57 dh_installchangelogs
58 dh_installdocs
59 dh_strip
60 dh_compress
61 dh_fixperms
62 dh_installdeb
63 dh_shlibdeps
64 dh_gencontrol
65 dh_md5sums
66 dh_builddeb
67
68binary: binary-arch binary-indep
69.PHONY: build clean binary-indep binary-arch binary install install-indep install-arch
070
=== added directory 'tests/dhtest.nostrip'
=== added file 'tests/dhtest.nostrip/Makefile'
--- tests/dhtest.nostrip/Makefile 1970-01-01 00:00:00 +0000
+++ tests/dhtest.nostrip/Makefile 2010-04-21 20:29:14 +0000
@@ -0,0 +1,19 @@
1CFLAGS= -g -Wall -W -O0
2
3LIBNAME=crashrep
4
5all: crash crash2
6
7crash: crash.o
8 $(CC) $^ -o $@
9
10crash2: crash2.o
11 $(CC) $^ -o $@
12
13clean:
14 rm -f *.o crash crash2
15
16install: all
17 install -d $(DESTDIR)/usr/bin
18 install crash crash2 $(DESTDIR)/usr/bin
19 cp -a $(DESTDIR)/usr/bin/crash2 $(DESTDIR)/usr/bin/crash3
020
=== added file 'tests/dhtest.nostrip/crash.c'
--- tests/dhtest.nostrip/crash.c 1970-01-01 00:00:00 +0000
+++ tests/dhtest.nostrip/crash.c 2010-04-21 20:29:14 +0000
@@ -0,0 +1,34 @@
1/* crash.c - demo program for libcrashreport
2
3 (c) 2004 Martin Pitt <martin@piware.de>
4
5 This file is public domain.
6*/
7
8#include <stdio.h>
9
10void h(char* p) {
11 p[1] = 'a';
12}
13
14int g( int x, int y )
15{
16 char* s = NULL;
17 h(s);
18 return x+y;
19}
20
21int f( int x )
22{
23 return g( x, 42 );
24}
25
26int
27main()
28{
29 int x;
30
31 x = f(1);
32 printf( "x = %i, terminating normally now.\n", x );
33 return 0;
34}
035
=== added file 'tests/dhtest.nostrip/crash2.c'
--- tests/dhtest.nostrip/crash2.c 1970-01-01 00:00:00 +0000
+++ tests/dhtest.nostrip/crash2.c 2010-04-21 20:29:14 +0000
@@ -0,0 +1,39 @@
1/* crash.c - demo program for libcrashreport
2
3 (c) 2004 Martin Pitt <martin@piware.de>
4
5 This file is public domain.
6*/
7
8#include <stdio.h>
9#include <math.h>
10#include <signal.h>
11
12double h()
13{
14 double a = 1./0;
15 if (isinf(a))
16 raise(SIGFPE);
17 return a;
18}
19
20int g( int x, int y )
21{
22
23 return x+y+(int) h();
24}
25
26int f( int x )
27{
28 return g( x, 42 );
29}
30
31int
32main()
33{
34 int x;
35
36 x = f(1);
37 printf( "x = %i, terminating normally now.\n", x );
38 return 0;
39}
040
=== added directory 'tests/dhtest.nostrip/debian'
=== added file 'tests/dhtest.nostrip/debian/changelog'
--- tests/dhtest.nostrip/debian/changelog 1970-01-01 00:00:00 +0000
+++ tests/dhtest.nostrip/debian/changelog 2010-04-21 20:29:14 +0000
@@ -0,0 +1,5 @@
1dhtest.nostrip (1:2.3-1) foo; urgency=low
2
3 * Initial release.
4
5 -- Martin Pitt <martin.pitt@ubuntu.com> Fri, 16 Jun 2006 10:49:56 +0200
06
=== added file 'tests/dhtest.nostrip/debian/compat'
--- tests/dhtest.nostrip/debian/compat 1970-01-01 00:00:00 +0000
+++ tests/dhtest.nostrip/debian/compat 2010-04-21 20:29:14 +0000
@@ -0,0 +1,1 @@
15
02
=== added file 'tests/dhtest.nostrip/debian/control'
--- tests/dhtest.nostrip/debian/control 1970-01-01 00:00:00 +0000
+++ tests/dhtest.nostrip/debian/control 2010-04-21 20:29:14 +0000
@@ -0,0 +1,30 @@
1Source: dhtest.nostrip
2Section: utils
3Priority: extra
4Maintainer: Martin Pitt <martin.pitt@ubuntu.com>
5Build-Depends: debhelper (>= 4.1.0)
6Standards-Version: 3.7.2
7
8Package: dhtest1
9Architecture: any
10Depends: ${shlibs:Depends}, coreutils (>> ${foo})
11Recommends: dhtest2 (>> ${foo})
12Suggests: dhtestall (>= ${foo}), ${bar}-core
13Conflicts: dhtestall (<< ${foo})
14Replaces: dhtestall (<< ${foo})
15Breaks: dhtestall (<< ${foo})
16Description: crash with a SIGSEGV
17 Test package
18
19Package: dhtest2-nostrip
20Architecture: any
21Depends: ${shlibs:Depends}
22Description: crash with a SIGFPE
23 Test package
24
25Package: dhtestall
26Architecture: all
27Depends: ${shlibs:Depends}
28Description: dummy arch-all package
29 Test package
30
031
=== added file 'tests/dhtest.nostrip/debian/copyright'
--- tests/dhtest.nostrip/debian/copyright 1970-01-01 00:00:00 +0000
+++ tests/dhtest.nostrip/debian/copyright 2010-04-21 20:29:14 +0000
@@ -0,0 +1,1 @@
1foo
02
=== added file 'tests/dhtest.nostrip/debian/dhtest1.install'
--- tests/dhtest.nostrip/debian/dhtest1.install 1970-01-01 00:00:00 +0000
+++ tests/dhtest.nostrip/debian/dhtest1.install 2010-04-21 20:29:14 +0000
@@ -0,0 +1,1 @@
1/usr/bin/crash
02
=== added file 'tests/dhtest.nostrip/debian/dhtest2-nostrip.install'
--- tests/dhtest.nostrip/debian/dhtest2-nostrip.install 1970-01-01 00:00:00 +0000
+++ tests/dhtest.nostrip/debian/dhtest2-nostrip.install 2010-04-21 20:29:14 +0000
@@ -0,0 +1,2 @@
1/usr/bin/crash2
2/usr/bin/crash3
03
=== added file 'tests/dhtest.nostrip/debian/rules'
--- tests/dhtest.nostrip/debian/rules 1970-01-01 00:00:00 +0000
+++ tests/dhtest.nostrip/debian/rules 2010-04-21 20:29:14 +0000
@@ -0,0 +1,84 @@
1#!/usr/bin/make -f
2
3# Uncomment this to turn on verbose mode.
4#export DH_VERBOSE=1
5
6# This has to be exported to make some magic below work.
7export DH_OPTIONS
8
9CFLAGS = -Wall -g
10
11ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
12 CFLAGS += -O0
13else
14 CFLAGS += -O2
15endif
16
17#Architecture
18build: build-arch build-indep
19
20build-arch: build-arch-stamp
21build-arch-stamp:
22 $(MAKE)
23 touch build-arch-stamp
24
25build-indep:
26
27clean:
28 dh_testdir
29 dh_testroot
30 rm -f build-arch-stamp build-indep-stamp
31 -$(MAKE) clean
32 dh_clean
33
34install: install-indep install-arch
35install-indep:
36 dh_testdir
37 dh_testroot
38 dh_clean -k -i
39 dh_installdirs -i
40 dh_install -i --sourcedir=debian/tmp
41
42install-arch:
43 dh_testdir
44 dh_testroot
45 dh_clean -k -s
46 dh_installdirs -s
47 $(MAKE) install DESTDIR=$(CURDIR)/debian/tmp
48 dh_install -s --sourcedir=debian/tmp
49
50# Must not depend on anything. This is to be called by
51# binary-arch/binary-indep
52# in another 'make' thread.
53binary-common:
54 dh_testdir
55 dh_testroot
56 dh_installchangelogs
57 dh_installdocs
58 dh_strip -Xcrash2 -X crash3
59 dh_compress
60 dh_fixperms
61 dh_installdeb
62 dh_shlibdeps
63 dh_gencontrol -u'-Vfoo=1 -Vbar=lsb'
64 dh_md5sums
65 dh_builddeb
66
67# Build architecture independant packages using the common target.
68binary-indep: build-indep install-indep
69 $(MAKE) -f debian/rules DH_OPTIONS=-i binary-common
70
71# Build architecture dependant packages using the common target.
72binary-arch: build-arch install-arch
73 $(MAKE) -f debian/rules DH_OPTIONS=-a binary-common
74 if ! cmp -s ./crash2 debian/dhtest2-nostrip/usr/bin/crash2; then \
75 echo "crash2 was invalidly touched" >&2; \
76 exit 1; \
77 fi
78 if ! cmp -s ./crash2 debian/dhtest2-nostrip/usr/bin/crash3; then \
79 echo "crash3 was invalidly touched" >&2; \
80 exit 1; \
81 fi
82
83binary: binary-arch binary-indep
84.PHONY: build clean binary-indep binary-arch binary install install-indep install-arch
085
=== added directory 'tests/dhtest.samename'
=== added file 'tests/dhtest.samename/Makefile'
--- tests/dhtest.samename/Makefile 1970-01-01 00:00:00 +0000
+++ tests/dhtest.samename/Makefile 2010-04-21 20:29:14 +0000
@@ -0,0 +1,18 @@
1CFLAGS= -g -Wall -W -O0
2
3LIBNAME=crashrep
4
5all: crash crash2
6
7crash: crash.o
8 $(CC) $^ -o $@
9
10crash2: crash2.o
11 $(CC) $^ -o $@
12
13clean:
14 rm -f *.o crash crash2
15
16install: all
17 install -d $(DESTDIR)/usr/bin
18 install crash crash2 $(DESTDIR)/usr/bin
019
=== added file 'tests/dhtest.samename/crash.c'
--- tests/dhtest.samename/crash.c 1970-01-01 00:00:00 +0000
+++ tests/dhtest.samename/crash.c 2010-04-21 20:29:14 +0000
@@ -0,0 +1,34 @@
1/* crash.c - demo program for libcrashreport
2
3 (c) 2004 Martin Pitt <martin@piware.de>
4
5 This file is public domain.
6*/
7
8#include <stdio.h>
9
10void h(char* p) {
11 p[1] = 'a';
12}
13
14int g( int x, int y )
15{
16 char* s = NULL;
17 h(s);
18 return x+y;
19}
20
21int f( int x )
22{
23 return g( x, 42 );
24}
25
26int
27main()
28{
29 int x;
30
31 x = f(1);
32 printf( "x = %i, terminating normally now.\n", x );
33 return 0;
34}
035
=== added file 'tests/dhtest.samename/crash2.c'
--- tests/dhtest.samename/crash2.c 1970-01-01 00:00:00 +0000
+++ tests/dhtest.samename/crash2.c 2010-04-21 20:29:14 +0000
@@ -0,0 +1,39 @@
1/* crash.c - demo program for libcrashreport
2
3 (c) 2004 Martin Pitt <martin@piware.de>
4
5 This file is public domain.
6*/
7
8#include <stdio.h>
9#include <math.h>
10#include <signal.h>
11
12double h()
13{
14 double a = 1./0;
15 if (isinf(a))
16 raise(SIGFPE);
17 return a;
18}
19
20int g( int x, int y )
21{
22
23 return x+y+(int) h();
24}
25
26int f( int x )
27{
28 return g( x, 42 );
29}
30
31int
32main()
33{
34 int x;
35
36 x = f(1);
37 printf( "x = %i, terminating normally now.\n", x );
38 return 0;
39}
040
=== added directory 'tests/dhtest.samename/debian'
=== added file 'tests/dhtest.samename/debian/changelog'
--- tests/dhtest.samename/debian/changelog 1970-01-01 00:00:00 +0000
+++ tests/dhtest.samename/debian/changelog 2010-04-21 20:29:14 +0000
@@ -0,0 +1,5 @@
1dhtest.samename (1:2.3-1) foo; urgency=low
2
3 * Initial release.
4
5 -- Martin Pitt <martin.pitt@ubuntu.com> Fri, 16 Jun 2006 10:49:56 +0200
06
=== added file 'tests/dhtest.samename/debian/compat'
--- tests/dhtest.samename/debian/compat 1970-01-01 00:00:00 +0000
+++ tests/dhtest.samename/debian/compat 2010-04-21 20:29:14 +0000
@@ -0,0 +1,1 @@
15
02
=== added file 'tests/dhtest.samename/debian/control'
--- tests/dhtest.samename/debian/control 1970-01-01 00:00:00 +0000
+++ tests/dhtest.samename/debian/control 2010-04-21 20:29:14 +0000
@@ -0,0 +1,29 @@
1Source: dhtest.samename
2Section: utils
3Priority: extra
4Maintainer: Martin Pitt <martin.pitt@ubuntu.com>
5Build-Depends: debhelper (>= 4.1.0)
6Standards-Version: 3.7.2
7
8Package: dhtest
9Architecture: any
10Depends: ${shlibs:Depends}, coreutils (>> ${foo})
11Recommends: dhtest.samename (>> ${foo})
12Suggests: dhtestall (>= ${foo}), ${bar}-core
13Conflicts: dhtestall (<< ${foo})
14Replaces: dhtestall (<< ${foo})
15Breaks: dhtestall (<< ${foo})
16Description: crash with a SIGSEGV
17 Test package
18
19Package: dhtest.samename
20Architecture: any
21Depends: ${shlibs:Depends}
22Description: crash with a SIGFPE
23 Test package
24
25Package: dhtestall
26Architecture: all
27Depends: ${shlibs:Depends}
28Description: dummy arch-all package
29 Test package
030
=== added file 'tests/dhtest.samename/debian/copyright'
--- tests/dhtest.samename/debian/copyright 1970-01-01 00:00:00 +0000
+++ tests/dhtest.samename/debian/copyright 2010-04-21 20:29:14 +0000
@@ -0,0 +1,1 @@
1foo
02
=== added file 'tests/dhtest.samename/debian/dhtest.samename.install'
--- tests/dhtest.samename/debian/dhtest.samename.install 1970-01-01 00:00:00 +0000
+++ tests/dhtest.samename/debian/dhtest.samename.install 2010-04-21 20:29:14 +0000
@@ -0,0 +1,1 @@
1/usr/bin/crash2
02
=== added file 'tests/dhtest.samename/debian/dhtest1.install'
--- tests/dhtest.samename/debian/dhtest1.install 1970-01-01 00:00:00 +0000
+++ tests/dhtest.samename/debian/dhtest1.install 2010-04-21 20:29:14 +0000
@@ -0,0 +1,1 @@
1/usr/bin/crash
02
=== added file 'tests/dhtest.samename/debian/rules'
--- tests/dhtest.samename/debian/rules 1970-01-01 00:00:00 +0000
+++ tests/dhtest.samename/debian/rules 2010-04-21 20:29:14 +0000
@@ -0,0 +1,76 @@
1#!/usr/bin/make -f
2
3# Uncomment this to turn on verbose mode.
4#export DH_VERBOSE=1
5
6# This has to be exported to make some magic below work.
7export DH_OPTIONS
8
9CFLAGS = -Wall -g
10
11ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
12 CFLAGS += -O0
13else
14 CFLAGS += -O2
15endif
16
17#Architecture
18build: build-arch build-indep
19
20build-arch: build-arch-stamp
21build-arch-stamp:
22 $(MAKE)
23 touch build-arch-stamp
24
25build-indep:
26
27clean:
28 dh_testdir
29 dh_testroot
30 rm -f build-arch-stamp build-indep-stamp
31 -$(MAKE) clean
32 dh_clean
33
34install: install-indep install-arch
35install-indep:
36 dh_testdir
37 dh_testroot
38 dh_clean -k -i
39 dh_installdirs -i
40 dh_install -i --sourcedir=debian/tmp
41
42install-arch:
43 dh_testdir
44 dh_testroot
45 dh_clean -k -s
46 dh_installdirs -s
47 $(MAKE) install DESTDIR=$(CURDIR)/debian/tmp
48 dh_install -s --sourcedir=debian/tmp
49
50# Must not depend on anything. This is to be called by
51# binary-arch/binary-indep
52# in another 'make' thread.
53binary-common:
54 dh_testdir
55 dh_testroot
56 dh_installchangelogs
57 dh_installdocs
58 dh_strip
59 dh_compress
60 dh_fixperms
61 dh_installdeb
62 dh_shlibdeps
63 dh_gencontrol -u'-Vfoo=1 -Vbar=lsb'
64 dh_md5sums
65 dh_builddeb
66
67# Build architecture independant packages using the common target.
68binary-indep: build-indep install-indep
69 $(MAKE) -f debian/rules DH_OPTIONS=-i binary-common
70
71# Build architecture dependant packages using the common target.
72binary-arch: build-arch install-arch
73 $(MAKE) -f debian/rules DH_OPTIONS=-a binary-common
74
75binary: binary-arch binary-indep
76.PHONY: build clean binary-indep binary-arch binary install install-indep install-arch
077
=== added directory 'tests/dhtest.tmpdirarg'
=== added file 'tests/dhtest.tmpdirarg/Makefile'
--- tests/dhtest.tmpdirarg/Makefile 1970-01-01 00:00:00 +0000
+++ tests/dhtest.tmpdirarg/Makefile 2010-04-21 20:29:14 +0000
@@ -0,0 +1,18 @@
1CFLAGS= -g -Wall -W -O0
2
3LIBNAME=crashrep
4
5all: crash crash2
6
7crash: crash.o
8 $(CC) $^ -o $@
9
10crash2: crash2.o
11 $(CC) $^ -o $@
12
13clean:
14 rm -f *.o crash crash2
15
16install: all
17 install -d $(DESTDIR)/usr/bin
18 install crash crash2 $(DESTDIR)/usr/bin
019
=== added file 'tests/dhtest.tmpdirarg/crash.c'
--- tests/dhtest.tmpdirarg/crash.c 1970-01-01 00:00:00 +0000
+++ tests/dhtest.tmpdirarg/crash.c 2010-04-21 20:29:14 +0000
@@ -0,0 +1,34 @@
1/* crash.c - demo program for libcrashreport
2
3 (c) 2004 Martin Pitt <martin@piware.de>
4
5 This file is public domain.
6*/
7
8#include <stdio.h>
9
10void h(char* p) {
11 p[1] = 'a';
12}
13
14int g( int x, int y )
15{
16 char* s = NULL;
17 h(s);
18 return x+y;
19}
20
21int f( int x )
22{
23 return g( x, 42 );
24}
25
26int
27main()
28{
29 int x;
30
31 x = f(1);
32 printf( "x = %i, terminating normally now.\n", x );
33 return 0;
34}
035
=== added file 'tests/dhtest.tmpdirarg/crash2.c'
--- tests/dhtest.tmpdirarg/crash2.c 1970-01-01 00:00:00 +0000
+++ tests/dhtest.tmpdirarg/crash2.c 2010-04-21 20:29:14 +0000
@@ -0,0 +1,39 @@
1/* crash.c - demo program for libcrashreport
2
3 (c) 2004 Martin Pitt <martin@piware.de>
4
5 This file is public domain.
6*/
7
8#include <stdio.h>
9#include <math.h>
10#include <signal.h>
11
12double h()
13{
14 double a = 1./0;
15 if (isinf(a))
16 raise(SIGFPE);
17 return a;
18}
19
20int g( int x, int y )
21{
22
23 return x+y+(int) h();
24}
25
26int f( int x )
27{
28 return g( x, 42 );
29}
30
31int
32main()
33{
34 int x;
35
36 x = f(1);
37 printf( "x = %i, terminating normally now.\n", x );
38 return 0;
39}
040
=== added directory 'tests/dhtest.tmpdirarg/debian'
=== added file 'tests/dhtest.tmpdirarg/debian/changelog'
--- tests/dhtest.tmpdirarg/debian/changelog 1970-01-01 00:00:00 +0000
+++ tests/dhtest.tmpdirarg/debian/changelog 2010-04-21 20:29:14 +0000
@@ -0,0 +1,5 @@
1dhtest.tmpdirarg (1) foo; urgency=low
2
3 * Initial release.
4
5 -- Martin Pitt <martin.pitt@ubuntu.com> Fri, 16 Jun 2006 10:49:56 +0200
06
=== added file 'tests/dhtest.tmpdirarg/debian/compat'
--- tests/dhtest.tmpdirarg/debian/compat 1970-01-01 00:00:00 +0000
+++ tests/dhtest.tmpdirarg/debian/compat 2010-04-21 20:29:14 +0000
@@ -0,0 +1,1 @@
15
02
=== added file 'tests/dhtest.tmpdirarg/debian/control'
--- tests/dhtest.tmpdirarg/debian/control 1970-01-01 00:00:00 +0000
+++ tests/dhtest.tmpdirarg/debian/control 2010-04-21 20:29:14 +0000
@@ -0,0 +1,12 @@
1Source: dhtest.tmpdirarg
2Section: utils
3Priority: extra
4Maintainer: Martin Pitt <martin.pitt@ubuntu.com>
5Build-Depends: debhelper (>= 4.1.0)
6Standards-Version: 3.7.2
7
8Package: dhtest1
9Architecture: any
10Depends: ${shlibs:Depends}
11Description: crash with a SIGSEGV
12 Test package
013
=== added file 'tests/dhtest.tmpdirarg/debian/copyright'
--- tests/dhtest.tmpdirarg/debian/copyright 1970-01-01 00:00:00 +0000
+++ tests/dhtest.tmpdirarg/debian/copyright 2010-04-21 20:29:14 +0000
@@ -0,0 +1,1 @@
1foo
02
=== added file 'tests/dhtest.tmpdirarg/debian/dhtest1.install'
--- tests/dhtest.tmpdirarg/debian/dhtest1.install 1970-01-01 00:00:00 +0000
+++ tests/dhtest.tmpdirarg/debian/dhtest1.install 2010-04-21 20:29:14 +0000
@@ -0,0 +1,1 @@
1/usr/bin/crash
02
=== added file 'tests/dhtest.tmpdirarg/debian/rules'
--- tests/dhtest.tmpdirarg/debian/rules 1970-01-01 00:00:00 +0000
+++ tests/dhtest.tmpdirarg/debian/rules 2010-04-21 20:29:14 +0000
@@ -0,0 +1,57 @@
1#!/usr/bin/make -f
2
3# Uncomment this to turn on verbose mode.
4#export DH_VERBOSE=1
5
6# This has to be exported to make some magic below work.
7export DH_OPTIONS
8
9CFLAGS = -Wall -g
10
11ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
12 CFLAGS += -O0
13else
14 CFLAGS += -O2
15endif
16
17build: build-arch
18build-arch: build-arch-stamp
19build-arch-stamp:
20 $(MAKE)
21 touch build-arch-stamp
22
23clean:
24 dh_testdir
25 dh_testroot
26 rm -f build-arch-stamp
27 -$(MAKE) clean
28 dh_clean -Pdebian/build/pkgdir
29 rmdir debian/build 2>/dev/null || true
30
31install: install-arch
32
33install-arch:
34 dh_testdir
35 dh_testroot
36 dh_clean -k -s
37 dh_installdirs -s -Pdebian/build/pkgdir
38 $(MAKE) install DESTDIR=$(CURDIR)/debian/tmp
39 dh_install -s -Pdebian/build/pkgdir --sourcedir=debian/tmp
40
41# Build architecture dependant packages using the common target.
42binary-arch: build-arch install-arch
43 dh_testdir -a -Pdebian/build/pkgdir
44 dh_testroot -a -Pdebian/build/pkgdir
45 dh_installchangelogs -a -Pdebian/build/pkgdir
46 dh_installdocs -a -Pdebian/build/pkgdir
47 dh_strip -a -Pdebian/build/pkgdir
48 dh_compress -a -Pdebian/build/pkgdir
49 dh_fixperms -a -Pdebian/build/pkgdir
50 dh_installdeb -a -Pdebian/build/pkgdir
51 dh_shlibdeps -a -Pdebian/build/pkgdir
52 dh_gencontrol -a -Pdebian/build/pkgdir
53 dh_md5sums -a -Pdebian/build/pkgdir
54 dh_builddeb -a -Pdebian/build/pkgdir
55
56binary: binary-arch binary-indep
57.PHONY: build clean binary-indep binary-arch binary install install-indep install-arch
058
=== added directory 'tests/dhtest.versionoverride'
=== added file 'tests/dhtest.versionoverride/Makefile'
--- tests/dhtest.versionoverride/Makefile 1970-01-01 00:00:00 +0000
+++ tests/dhtest.versionoverride/Makefile 2010-04-21 20:29:14 +0000
@@ -0,0 +1,18 @@
1CFLAGS= -g -Wall -W -O0
2
3LIBNAME=crashrep
4
5all: crash crash2
6
7crash: crash.o
8 $(CC) $^ -o $@
9
10crash2: crash2.o
11 $(CC) $^ -o $@
12
13clean:
14 rm -f *.o crash crash2
15
16install: all
17 install -d $(DESTDIR)/usr/bin
18 install crash crash2 $(DESTDIR)/usr/bin
019
=== added file 'tests/dhtest.versionoverride/crash.c'
--- tests/dhtest.versionoverride/crash.c 1970-01-01 00:00:00 +0000
+++ tests/dhtest.versionoverride/crash.c 2010-04-21 20:29:14 +0000
@@ -0,0 +1,34 @@
1/* crash.c - demo program for libcrashreport
2
3 (c) 2004 Martin Pitt <martin@piware.de>
4
5 This file is public domain.
6*/
7
8#include <stdio.h>
9
10void h(char* p) {
11 p[1] = 'a';
12}
13
14int g( int x, int y )
15{
16 char* s = NULL;
17 h(s);
18 return x+y;
19}
20
21int f( int x )
22{
23 return g( x, 42 );
24}
25
26int
27main()
28{
29 int x;
30
31 x = f(1);
32 printf( "x = %i, terminating normally now.\n", x );
33 return 0;
34}
035
=== added file 'tests/dhtest.versionoverride/crash2.c'
--- tests/dhtest.versionoverride/crash2.c 1970-01-01 00:00:00 +0000
+++ tests/dhtest.versionoverride/crash2.c 2010-04-21 20:29:14 +0000
@@ -0,0 +1,39 @@
1/* crash.c - demo program for libcrashreport
2
3 (c) 2004 Martin Pitt <martin@piware.de>
4
5 This file is public domain.
6*/
7
8#include <stdio.h>
9#include <math.h>
10#include <signal.h>
11
12double h()
13{
14 double a = 1./0;
15 if (isinf(a))
16 raise(SIGFPE);
17 return a;
18}
19
20int g( int x, int y )
21{
22
23 return x+y+(int) h();
24}
25
26int f( int x )
27{
28 return g( x, 42 );
29}
30
31int
32main()
33{
34 int x;
35
36 x = f(1);
37 printf( "x = %i, terminating normally now.\n", x );
38 return 0;
39}
040
=== added directory 'tests/dhtest.versionoverride/debian'
=== added file 'tests/dhtest.versionoverride/debian/changelog'
--- tests/dhtest.versionoverride/debian/changelog 1970-01-01 00:00:00 +0000
+++ tests/dhtest.versionoverride/debian/changelog 2010-04-21 20:29:14 +0000
@@ -0,0 +1,5 @@
1dhtest.versionoverride (1) foo; urgency=low
2
3 * Initial release.
4
5 -- Martin Pitt <martin.pitt@ubuntu.com> Fri, 16 Jun 2006 10:49:56 +0200
06
=== added file 'tests/dhtest.versionoverride/debian/compat'
--- tests/dhtest.versionoverride/debian/compat 1970-01-01 00:00:00 +0000
+++ tests/dhtest.versionoverride/debian/compat 2010-04-21 20:29:14 +0000
@@ -0,0 +1,1 @@
15
02
=== added file 'tests/dhtest.versionoverride/debian/control'
--- tests/dhtest.versionoverride/debian/control 1970-01-01 00:00:00 +0000
+++ tests/dhtest.versionoverride/debian/control 2010-04-21 20:29:14 +0000
@@ -0,0 +1,18 @@
1Source: dhtest.versionoverride
2Section: utils
3Priority: extra
4Maintainer: Martin Pitt <martin.pitt@ubuntu.com>
5Build-Depends: debhelper (>= 4.1.0)
6Standards-Version: 3.7.2
7
8Package: dhtest1
9Architecture: any
10Depends: ${shlibs:Depends}
11Description: crash with a SIGSEGV
12 Test package
13
14Package: dhtest2
15Architecture: any
16Depends: ${shlibs:Depends}
17Description: crash with a SIGFPE
18 Test package
019
=== added file 'tests/dhtest.versionoverride/debian/copyright'
--- tests/dhtest.versionoverride/debian/copyright 1970-01-01 00:00:00 +0000
+++ tests/dhtest.versionoverride/debian/copyright 2010-04-21 20:29:14 +0000
@@ -0,0 +1,1 @@
1foo
02
=== added file 'tests/dhtest.versionoverride/debian/dhtest1.install'
--- tests/dhtest.versionoverride/debian/dhtest1.install 1970-01-01 00:00:00 +0000
+++ tests/dhtest.versionoverride/debian/dhtest1.install 2010-04-21 20:29:14 +0000
@@ -0,0 +1,1 @@
1/usr/bin/crash
02
=== added file 'tests/dhtest.versionoverride/debian/dhtest2.install'
--- tests/dhtest.versionoverride/debian/dhtest2.install 1970-01-01 00:00:00 +0000
+++ tests/dhtest.versionoverride/debian/dhtest2.install 2010-04-21 20:29:14 +0000
@@ -0,0 +1,1 @@
1/usr/bin/crash2
02
=== added file 'tests/dhtest.versionoverride/debian/rules'
--- tests/dhtest.versionoverride/debian/rules 1970-01-01 00:00:00 +0000
+++ tests/dhtest.versionoverride/debian/rules 2010-04-21 20:29:14 +0000
@@ -0,0 +1,57 @@
1#!/usr/bin/make -f
2
3# Uncomment this to turn on verbose mode.
4#export DH_VERBOSE=1
5
6# This has to be exported to make some magic below work.
7export DH_OPTIONS
8
9CFLAGS = -Wall -g
10
11ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
12 CFLAGS += -O0
13else
14 CFLAGS += -O2
15endif
16
17#Architecture
18build: build-arch
19
20build-arch: build-arch-stamp
21build-arch-stamp:
22 $(MAKE)
23 touch build-arch-stamp
24
25clean:
26 dh_testdir
27 dh_testroot
28 rm -f build-arch-stamp
29 -$(MAKE) clean
30 dh_clean
31
32install-arch:
33 dh_testdir
34 dh_testroot
35 dh_clean -k -s
36 dh_installdirs -s
37 $(MAKE) install DESTDIR=$(CURDIR)/debian/tmp
38 dh_install -s --sourcedir=debian/tmp
39
40# Build architecture dependant packages using the common target.
41binary-arch: build-arch install-arch
42 dh_testdir
43 dh_testroot
44 dh_installchangelogs -a
45 dh_installdocs -a
46 dh_strip -a
47 dh_compress -a
48 dh_fixperms -a
49 dh_installdeb -a
50 dh_shlibdeps -a
51 dh_gencontrol -pdhtest1
52 dh_gencontrol -pdhtest2 -- -v1:42
53 dh_md5sums -a
54 dh_builddeb -a
55
56binary: binary-arch
57.PHONY: build clean binary-indep binary-arch binary install install-indep install-arch
058
=== added directory 'tests/dhtest.whitespace'
=== added file 'tests/dhtest.whitespace/Makefile'
--- tests/dhtest.whitespace/Makefile 1970-01-01 00:00:00 +0000
+++ tests/dhtest.whitespace/Makefile 2010-04-21 20:29:14 +0000
@@ -0,0 +1,18 @@
1CFLAGS= -g -Wall -W -O0
2
3LIBNAME=crashrep
4
5all: crash crash2
6
7crash: crash.o
8 $(CC) $^ -o $@
9
10crash2: crash2.o
11 $(CC) $^ -o $@
12
13clean:
14 rm -f *.o crash crash2
15
16install: all
17 install -d $(DESTDIR)/usr/bin
18 install crash crash2 $(DESTDIR)/usr/bin
019
=== added file 'tests/dhtest.whitespace/crash.c'
--- tests/dhtest.whitespace/crash.c 1970-01-01 00:00:00 +0000
+++ tests/dhtest.whitespace/crash.c 2010-04-21 20:29:14 +0000
@@ -0,0 +1,34 @@
1/* crash.c - demo program for libcrashreport
2
3 (c) 2004 Martin Pitt <martin@piware.de>
4
5 This file is public domain.
6*/
7
8#include <stdio.h>
9
10void h(char* p) {
11 p[1] = 'a';
12}
13
14int g( int x, int y )
15{
16 char* s = NULL;
17 h(s);
18 return x+y;
19}
20
21int f( int x )
22{
23 return g( x, 42 );
24}
25
26int
27main()
28{
29 int x;
30
31 x = f(1);
32 printf( "x = %i, terminating normally now.\n", x );
33 return 0;
34}
035
=== added file 'tests/dhtest.whitespace/crash2.c'
--- tests/dhtest.whitespace/crash2.c 1970-01-01 00:00:00 +0000
+++ tests/dhtest.whitespace/crash2.c 2010-04-21 20:29:14 +0000
@@ -0,0 +1,39 @@
1/* crash.c - demo program for libcrashreport
2
3 (c) 2004 Martin Pitt <martin@piware.de>
4
5 This file is public domain.
6*/
7
8#include <stdio.h>
9#include <math.h>
10#include <signal.h>
11
12double h()
13{
14 double a = 1./0;
15 if (isinf(a))
16 raise(SIGFPE);
17 return a;
18}
19
20int g( int x, int y )
21{
22
23 return x+y+(int) h();
24}
25
26int f( int x )
27{
28 return g( x, 42 );
29}
30
31int
32main()
33{
34 int x;
35
36 x = f(1);
37 printf( "x = %i, terminating normally now.\n", x );
38 return 0;
39}
040
=== added directory 'tests/dhtest.whitespace/debian'
=== added file 'tests/dhtest.whitespace/debian/changelog'
--- tests/dhtest.whitespace/debian/changelog 1970-01-01 00:00:00 +0000
+++ tests/dhtest.whitespace/debian/changelog 2010-04-21 20:29:14 +0000
@@ -0,0 +1,5 @@
1dhtest.whitespace (1:2.3-1) foo; urgency=low
2
3 * Initial release.
4
5 -- Martin Pitt <martin.pitt@ubuntu.com> Fri, 16 Jun 2006 10:49:56 +0200
06
=== added file 'tests/dhtest.whitespace/debian/compat'
--- tests/dhtest.whitespace/debian/compat 1970-01-01 00:00:00 +0000
+++ tests/dhtest.whitespace/debian/compat 2010-04-21 20:29:14 +0000
@@ -0,0 +1,1 @@
15
02
=== added file 'tests/dhtest.whitespace/debian/control'
--- tests/dhtest.whitespace/debian/control 1970-01-01 00:00:00 +0000
+++ tests/dhtest.whitespace/debian/control 2010-04-21 20:29:14 +0000
@@ -0,0 +1,35 @@
1Source: dhtest.whitespace
2Section: utils
3Priority: extra
4Maintainer: Martin Pitt <martin.pitt@ubuntu.com>
5Build-Depends: debhelper (>= 4.1.0)
6Standards-Version: 3.7.2
7
8Package: dhtest1
9Architecture: any
10Description: crash with a SIGSEGV
11 Test package
12Depends: ${shlibs:Depends},
13 coreutils (>> ${foo})
14Recommends: dhtest2 (>> ${foo})
15Suggests: dhtestall (>= ${foo}), ${bar}-core
16Conflicts: dhtestall (<< ${foo})
17Breaks: dhtestall (<< ${foo})
18Replaces: dhtestall (<< ${foo})
19
20Package: dhtest2
21Architecture: any
22Description: crash with a SIGFPE
23 Test package
24Depends: ${shlibs:Depends},
25 coreutils,
26 bash
27
28Package: dhtestall
29Architecture: all
30Depends: ${shlibs:Depends}
31Description: dummy arch-all package
32 Test package
33Pre-Depends: coreutils,
34 bash,
35 findutils
036
=== added file 'tests/dhtest.whitespace/debian/copyright'
--- tests/dhtest.whitespace/debian/copyright 1970-01-01 00:00:00 +0000
+++ tests/dhtest.whitespace/debian/copyright 2010-04-21 20:29:14 +0000
@@ -0,0 +1,1 @@
1foo
02
=== added file 'tests/dhtest.whitespace/debian/dhtest1.install'
--- tests/dhtest.whitespace/debian/dhtest1.install 1970-01-01 00:00:00 +0000
+++ tests/dhtest.whitespace/debian/dhtest1.install 2010-04-21 20:29:14 +0000
@@ -0,0 +1,1 @@
1/usr/bin/crash
02
=== added file 'tests/dhtest.whitespace/debian/dhtest2.install'
--- tests/dhtest.whitespace/debian/dhtest2.install 1970-01-01 00:00:00 +0000
+++ tests/dhtest.whitespace/debian/dhtest2.install 2010-04-21 20:29:14 +0000
@@ -0,0 +1,1 @@
1/usr/bin/crash2
02
=== added file 'tests/dhtest.whitespace/debian/rules'
--- tests/dhtest.whitespace/debian/rules 1970-01-01 00:00:00 +0000
+++ tests/dhtest.whitespace/debian/rules 2010-04-21 20:29:14 +0000
@@ -0,0 +1,76 @@
1#!/usr/bin/make -f
2
3# Uncomment this to turn on verbose mode.
4#export DH_VERBOSE=1
5
6# This has to be exported to make some magic below work.
7export DH_OPTIONS
8
9CFLAGS = -Wall -g
10
11ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
12 CFLAGS += -O0
13else
14 CFLAGS += -O2
15endif
16
17#Architecture
18build: build-arch build-indep
19
20build-arch: build-arch-stamp
21build-arch-stamp:
22 $(MAKE)
23 touch build-arch-stamp
24
25build-indep:
26
27clean:
28 dh_testdir
29 dh_testroot
30 rm -f build-arch-stamp build-indep-stamp
31 -$(MAKE) clean
32 dh_clean
33
34install: install-indep install-arch
35install-indep:
36 dh_testdir
37 dh_testroot
38 dh_clean -k -i
39 dh_installdirs -i
40 dh_install -i --sourcedir=debian/tmp
41
42install-arch:
43 dh_testdir
44 dh_testroot
45 dh_clean -k -s
46 dh_installdirs -s
47 $(MAKE) install DESTDIR=$(CURDIR)/debian/tmp
48 dh_install -s --sourcedir=debian/tmp
49
50# Must not depend on anything. This is to be called by
51# binary-arch/binary-indep
52# in another 'make' thread.
53binary-common:
54 dh_testdir
55 dh_testroot
56 dh_installchangelogs
57 dh_installdocs
58 dh_strip
59 dh_compress
60 dh_fixperms
61 dh_installdeb
62 dh_shlibdeps
63 dh_gencontrol -u'-Vfoo=1 -Vbar=lsb'
64 dh_md5sums
65 dh_builddeb
66
67# Build architecture independant packages using the common target.
68binary-indep: build-indep install-indep
69 $(MAKE) -f debian/rules DH_OPTIONS=-i binary-common
70
71# Build architecture dependant packages using the common target.
72binary-arch: build-arch install-arch
73 $(MAKE) -f debian/rules DH_OPTIONS=-a binary-common
74
75binary: binary-arch binary-indep
76.PHONY: build clean binary-indep binary-arch binary install install-indep install-arch
077
=== added file 'tests/dhtest/Makefile'
--- tests/dhtest/Makefile 1970-01-01 00:00:00 +0000
+++ tests/dhtest/Makefile 2010-04-21 20:29:14 +0000
@@ -0,0 +1,18 @@
1CFLAGS= -g -Wall -W -O0
2
3LIBNAME=crashrep
4
5all: crash crash2
6
7crash: crash.o
8 $(CC) $^ -o $@
9
10crash2: crash2.o
11 $(CC) $^ -o $@
12
13clean:
14 rm -f *.o crash crash2
15
16install: all
17 install -d $(DESTDIR)/usr/bin
18 install crash crash2 $(DESTDIR)/usr/bin
019
=== added file 'tests/dhtest/crash.c'
--- tests/dhtest/crash.c 1970-01-01 00:00:00 +0000
+++ tests/dhtest/crash.c 2010-04-21 20:29:14 +0000
@@ -0,0 +1,34 @@
1/* crash.c - demo program for libcrashreport
2
3 (c) 2004 Martin Pitt <martin@piware.de>
4
5 This file is public domain.
6*/
7
8#include <stdio.h>
9
10void h(char* p) {
11 p[1] = 'a';
12}
13
14int g( int x, int y )
15{
16 char* s = NULL;
17 h(s);
18 return x+y;
19}
20
21int f( int x )
22{
23 return g( x, 42 );
24}
25
26int
27main()
28{
29 int x;
30
31 x = f(1);
32 printf( "x = %i, terminating normally now.\n", x );
33 return 0;
34}
035
=== added file 'tests/dhtest/crash2.c'
--- tests/dhtest/crash2.c 1970-01-01 00:00:00 +0000
+++ tests/dhtest/crash2.c 2010-04-21 20:29:14 +0000
@@ -0,0 +1,39 @@
1/* crash.c - demo program for libcrashreport
2
3 (c) 2004 Martin Pitt <martin@piware.de>
4
5 This file is public domain.
6*/
7
8#include <stdio.h>
9#include <math.h>
10#include <signal.h>
11
12double h()
13{
14 double a = 1./0;
15 if (isinf(a))
16 raise(SIGFPE);
17 return a;
18}
19
20int g( int x, int y )
21{
22
23 return x+y+(int) h();
24}
25
26int f( int x )
27{
28 return g( x, 42 );
29}
30
31int
32main()
33{
34 int x;
35
36 x = f(1);
37 printf( "x = %i, terminating normally now.\n", x );
38 return 0;
39}
040
=== added directory 'tests/dhtest/debian'
=== added file 'tests/dhtest/debian/changelog'
--- tests/dhtest/debian/changelog 1970-01-01 00:00:00 +0000
+++ tests/dhtest/debian/changelog 2010-04-21 20:29:14 +0000
@@ -0,0 +1,5 @@
1dhtest (1:2.3-1) foo; urgency=low
2
3 * Initial release.
4
5 -- Martin Pitt <martin.pitt@ubuntu.com> Fri, 16 Jun 2006 10:49:56 +0200
06
=== added file 'tests/dhtest/debian/compat'
--- tests/dhtest/debian/compat 1970-01-01 00:00:00 +0000
+++ tests/dhtest/debian/compat 2010-04-21 20:29:14 +0000
@@ -0,0 +1,1 @@
15
02
=== added file 'tests/dhtest/debian/control'
--- tests/dhtest/debian/control 1970-01-01 00:00:00 +0000
+++ tests/dhtest/debian/control 2010-04-21 20:29:14 +0000
@@ -0,0 +1,30 @@
1Source: dhtest
2Section: utils
3Priority: extra
4Maintainer: Martin Pitt <martin.pitt@ubuntu.com>
5Build-Depends: debhelper (>= 4.1.0)
6Standards-Version: 3.7.2
7
8Package: dhtest1
9Architecture: any
10Depends: ${shlibs:Depends}, coreutils (>> ${foo})
11Recommends: dhtest2 (>> ${foo})
12Suggests: dhtestall (>= ${foo}), ${bar}-core
13Conflicts: dhtestall (<< ${foo})
14Replaces: dhtestall (<< ${foo})
15Breaks: dhtestall (<< ${foo})
16Description: crash with a SIGSEGV
17 Test package
18
19Package: dhtest2
20Architecture: any
21Depends: ${shlibs:Depends}
22Description: crash with a SIGFPE
23 Test package
24
25Package: dhtestall
26Architecture: all
27Depends: ${shlibs:Depends}
28Description: dummy arch-all package
29 Test package
30
031
=== added file 'tests/dhtest/debian/copyright'
--- tests/dhtest/debian/copyright 1970-01-01 00:00:00 +0000
+++ tests/dhtest/debian/copyright 2010-04-21 20:29:14 +0000
@@ -0,0 +1,1 @@
1foo
02
=== added file 'tests/dhtest/debian/dhtest1.install'
--- tests/dhtest/debian/dhtest1.install 1970-01-01 00:00:00 +0000
+++ tests/dhtest/debian/dhtest1.install 2010-04-21 20:29:14 +0000
@@ -0,0 +1,1 @@
1/usr/bin/crash
02
=== added file 'tests/dhtest/debian/dhtest2.install'
--- tests/dhtest/debian/dhtest2.install 1970-01-01 00:00:00 +0000
+++ tests/dhtest/debian/dhtest2.install 2010-04-21 20:29:14 +0000
@@ -0,0 +1,1 @@
1/usr/bin/crash2
02
=== added file 'tests/dhtest/debian/rules'
--- tests/dhtest/debian/rules 1970-01-01 00:00:00 +0000
+++ tests/dhtest/debian/rules 2010-04-21 20:29:14 +0000
@@ -0,0 +1,76 @@
1#!/usr/bin/make -f
2
3# Uncomment this to turn on verbose mode.
4#export DH_VERBOSE=1
5
6# This has to be exported to make some magic below work.
7export DH_OPTIONS
8
9CFLAGS = -Wall -g
10
11ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
12 CFLAGS += -O0
13else
14 CFLAGS += -O2
15endif
16
17#Architecture
18build: build-arch build-indep
19
20build-arch: build-arch-stamp
21build-arch-stamp:
22 $(MAKE)
23 touch build-arch-stamp
24
25build-indep:
26
27clean:
28 dh_testdir
29 dh_testroot
30 rm -f build-arch-stamp build-indep-stamp
31 -$(MAKE) clean
32 dh_clean
33
34install: install-indep install-arch
35install-indep:
36 dh_testdir
37 dh_testroot
38 dh_clean -k -i
39 dh_installdirs -i
40 dh_install -i --sourcedir=debian/tmp
41
42install-arch:
43 dh_testdir
44 dh_testroot
45 dh_clean -k -s
46 dh_installdirs -s
47 $(MAKE) install DESTDIR=$(CURDIR)/debian/tmp
48 dh_install -s --sourcedir=debian/tmp
49
50# Must not depend on anything. This is to be called by
51# binary-arch/binary-indep
52# in another 'make' thread.
53binary-common:
54 dh_testdir
55 dh_testroot
56 dh_installchangelogs
57 dh_installdocs
58 dh_strip
59 dh_compress
60 dh_fixperms
61 dh_installdeb
62 dh_shlibdeps
63 dh_gencontrol -u'-Vfoo=1 -Vbar=lsb'
64 dh_md5sums
65 dh_builddeb
66
67# Build architecture independant packages using the common target.
68binary-indep: build-indep install-indep
69 $(MAKE) -f debian/rules DH_OPTIONS=-i binary-common
70
71# Build architecture dependant packages using the common target.
72binary-arch: build-arch install-arch
73 $(MAKE) -f debian/rules DH_OPTIONS=-a binary-common
74
75binary: binary-arch binary-indep
76.PHONY: build clean binary-indep binary-arch binary install install-indep install-arch
077
=== added file 'tests/run'
--- tests/run 1970-01-01 00:00:00 +0000
+++ tests/run 2010-04-21 20:29:14 +0000
@@ -0,0 +1,107 @@
1#!/bin/sh -e
2
3TESTSOURCES="dhtest dhtest.samename dhtest.whitespace dhtest.nostrip dhtest.noargs dhtest.archspecific dhtest.tmpdirarg dhtest.compat1 dhtest.compat1override dhtest.compatenvvar dhtest.dbg dhtest.dbg2 dhtest.dbg3 cdbstest"
4
5print_result() {
6 if [ -n "$fail" ]; then
7 echo "FAIL: $1"
8 echo "Output:"
9 echo '---------------------------------------------------------------------'
10 echo "$2"
11 echo '---------------------------------------------------------------------'
12 echo Please remove testsuite.tmp after examination
13 exit 1
14 else
15 echo "PASS: $1"
16 fi
17 unset fail
18 return 0
19}
20
21# Arguments: <command> <test suite description>
22# execute given command, pass test if it exits successfully, fail test if not.
23# In the latter case, print command output and abort
24check_command() {
25 out=`$1 2>&1` || fail=1
26 print_result "$2" "$out"
27}
28
29# Arguments: <application deb> <corresponding dbgsym deb>
30check_pkg_pair() {
31 deb="$1"
32 ddeb="$2"
33 mkdir unpacked
34 dpkg -x $deb unpacked
35 dpkg -x $ddeb unpacked
36
37 for bin in unpacked/usr/bin/*; do
38 # check for debuglink section
39 objdump -j .gnu_debuglink -s $bin | grep -q .gnu_debuglink || fail=1
40 print_result "$bin has .gnu_debuglink section" "`objdump -j .gnu_debuglink -s $bin`"
41
42 # check for good backtrace
43 bt=`gdb --batch -ex "symbol-file unpacked/usr/lib/debug/${bin##unpacked/}" -ex run -ex 'bt' $bin`
44 echo "$bt" | grep -q 'g (x=1, y=42)' || fail=1
45 print_result "$bin: executable and debug symbols produce good backtrace" "$bt"
46 done
47 rm -rf unpacked
48}
49
50ROOTDIR=$(readlink -f `dirname $0`/..)
51cd $ROOTDIR/tests
52ORIGDIR=`pwd`
53mkdir testsuite.tmp
54cd testsuite.tmp
55
56for s in $TESTSOURCES; do
57 rm -rf *
58
59 # copy source package into test directory
60 cp -r ../$s .
61
62 # build it
63 cd $s
64 check_command "env -u NO_PKG_MANGLE PATH=$ROOTDIR:$PATH PKG_IGNORE_CURRENTLY_BUILDING=1 fakeroot dpkg-buildpackage -us -uc -b" "Building source package $s"
65 # clean it
66 check_command "fakeroot debian/rules clean" "Cleaning source package $s"
67 cd ..
68 # check for leftovers
69 check_command "diff -ur $s ../$s" "No leftover files after cleaning $s"
70
71 for deb in *.deb; do
72 pkg=`echo $deb|cut -d_ -f1`
73 version=`echo $deb|cut -d_ -f2`
74 version=${version#*:} # strip off epoch
75 arch=`echo ${deb%.deb}|cut -d_ -f3`
76
77 if echo $pkg | grep -q -- '-dbg$'; then
78 check_pkg_pair "${pkg%-dbg}_${version}_${arch}.deb" "${pkg}_${version}_${arch}.deb"
79 else
80 if dpkg -c $deb | grep -q usr/bin && ! echo $deb | grep -q nostrip; then
81 check_command "test -f ${pkg}-dbgsym_${version}_${arch}.ddeb" "dbgsym ddeb for $deb exists"
82 check_pkg_pair "${pkg}_${version}_${arch}.deb" "${pkg}-dbgsym_${version}_${arch}.ddeb"
83 else
84 check_command "test ! -f ${pkg}-dbgsym_${version}_${arch}.ddeb" "No dbgsym ddeb for $deb"
85 fi
86 fi
87 done
88
89 # check that all existing -dbg packages are conflicted to in -dbgsym, and
90 # that they have all other dependency fields stripped
91 dbg_pkgs=`ls *-dbg_*deb 2>/dev/null| cut -f1 -d_`
92 for ddeb in *.ddeb; do
93 dpkg -I $ddeb | egrep -q '^[[:space:]]*(Pre-Depends|Recommends|Suggests|Provides|Replaces|Breaks|Essential):' && fail=1 || true
94 print_result "$ddeb has other dependencies stripped" "`dpkg -I $ddeb`"
95
96 for c in $dbg_pkgs; do
97 dpkg -I $ddeb | grep '^[[:space:]]*Conflicts: ' | grep -qw $c || fail=1
98 print_result "$ddeb conflicts to $c" "`dpkg -I $ddeb`"
99 done
100
101 dpkg -I $ddeb | grep -q "^[[:space:]]*Source: $s\$" || fail=1
102 print_result "$ddeb has a correct Source field"
103 done
104done
105
106cd "$ORIGDIR"
107rm -r testsuite.tmp

Subscribers

People subscribed via source and target branches

to all changes: