Merge lp:~tormodvolden/ubuntu/lucid/pkg-create-dbgsym/doublestrip into lp:ubuntu/lucid/pkg-create-dbgsym
- Lucid (10.04)
- doublestrip
- Merge into lucid
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 |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Ubuntu branches | Pending | ||
Review via email: mp+23877@code.launchpad.net |
Commit message
Description of the change
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
1 | === added file '.bzrignore' |
2 | --- .bzrignore 1970-01-01 00:00:00 +0000 |
3 | +++ .bzrignore 2010-04-21 20:29:14 +0000 |
4 | @@ -0,0 +1,4 @@ |
5 | +/debian/files |
6 | +/debian/pkg-create-dbgsym/ |
7 | +/debian/pkg-create-dbgsym.debhelper.log |
8 | +/debian/pkg-create-dbgsym.substvars |
9 | |
10 | === added directory 'debian' |
11 | === renamed directory 'debian' => 'debian.moved' |
12 | === added file 'debian/changelog' |
13 | --- debian/changelog 1970-01-01 00:00:00 +0000 |
14 | +++ debian/changelog 2010-04-21 20:29:14 +0000 |
15 | @@ -0,0 +1,439 @@ |
16 | +pkg-create-dbgsym (0.42) lucid; urgency=low |
17 | + |
18 | + * Do not strip a binary which for any reason is already stripped. |
19 | + It will make a useless debug file, potentially overwriting |
20 | + a good one, and also overwrite the debug link. (LP: 562418) |
21 | + |
22 | + -- Tormod Volden <debian.tormod@gmail.com> Wed, 21 Apr 2010 21:29:51 +0200 |
23 | + |
24 | +pkg-create-dbgsym (0.41) lucid; urgency=low |
25 | + |
26 | + * tests/dhtest.dbg2: Add a new package dhtest2-extra which we exclude from |
27 | + dh_strip with -N. This causes dhtest2-dbgsym to not be generated and thus |
28 | + reproduces LP #566602. |
29 | + * dh_strip: Fix the "is this package in this list" grep to only match on |
30 | + whitespace separation, not on e. g. dashes (which grep -w does). This |
31 | + caused some ddebs like "libglib2.0-0-dbgsym" not to be built if dh_strip |
32 | + was called with ignoring a similar package name (-Nlibglib2.0-0-refdbg). |
33 | + To make this more robust, define a new shell function in_list() for this |
34 | + and just implement it once. (LP: #566602) |
35 | + |
36 | + -- Martin Pitt <martin.pitt@ubuntu.com> Tue, 20 Apr 2010 11:01:37 +0200 |
37 | + |
38 | +pkg-create-dbgsym (0.40) lucid; urgency=low |
39 | + |
40 | + * Strip -O from options passed from dh not only for comparison but also for |
41 | + processing them. (LP: #520767) |
42 | + |
43 | + -- Michael Bienia <geser@ubuntu.com> Thu, 08 Apr 2010 10:35:01 +0200 |
44 | + |
45 | +pkg-create-dbgsym (0.39) lucid; urgency=low |
46 | + |
47 | + * Strip -O from options passed from dh (LP: #520767). |
48 | + |
49 | + -- Michael Bienia <geser@ubuntu.com> Mon, 15 Feb 2010 12:22:05 +0100 |
50 | + |
51 | +pkg-create-dbgsym (0.38) lucid; urgency=low |
52 | + |
53 | + * tests/run: set the new var PKG_IGNORE_CURRENTLY_BUILDING=1 instead of |
54 | + NO_PKG_MANGLE=1 since pkg-create-dbgsym also disables itself when setting |
55 | + NO_PKG_MANGLE=1 and this breaks the testsuite; build-conflict with |
56 | + pkgbinarymangler << 66~. Also, unset NO_PKG_MANGLE as it's set by buildds |
57 | + and will cause the same issue. |
58 | + * dh_strip: if PKG_IGNORE_CURRENTLY_BUILDING is set to 1 don't read |
59 | + /CurrentlyBuilding to decided whether or not to build -dbgsym packages but |
60 | + build them unconditionally. |
61 | + * Build-depend on gdb for the testsuite and on cdbs for the cdbstest |
62 | + package. |
63 | + |
64 | + -- Loïc Minier <loic.minier@ubuntu.com> Sat, 16 Jan 2010 18:34:20 +0100 |
65 | + |
66 | +pkg-create-dbgsym (0.37) lucid; urgency=low |
67 | + |
68 | + * tests/run: set NO_PKG_MANGLE=1 in the env when calling dpkg-buildpackage |
69 | + to build test packages as to avoid pkgbinarymangler's pkgsanitychecks to |
70 | + fail the build when it notices another package than the /CurrentlyBuilding |
71 | + one is being built. Ideally, we'd also hook into dpkg-buildpackage or |
72 | + some other place to detect what is being built. |
73 | + |
74 | + -- Loïc Minier <loic.minier@ubuntu.com> Fri, 15 Jan 2010 01:44:56 +0100 |
75 | + |
76 | +pkg-create-dbgsym (0.36) lucid; urgency=low |
77 | + |
78 | + * Drop XB-Python-Version from the headers we copy over from debian/control |
79 | + for -dbgsym packages: it's usually set to ${python:Versions} -- but the |
80 | + -dbgsym package has no such substvar -- and the -dbgsym isn't a python- |
81 | + lib anyway. |
82 | + * Add ${misc:Depends}. |
83 | + * Bump debhelper build-dep to >= 7 for dh_prep. |
84 | + * Rewrite rules using "dh" since we need debhelper 7 anyway. |
85 | + * Also test for presence of tests/testsuite.tmp to fail clean:. |
86 | + * Adapt dh_strip to test whether it's looping trying to run itself and also |
87 | + to try running /usr/bin/dh_strip in the case where pkg-create-dbgsym is |
88 | + not installed in the build environment (but debhelper is); this allows |
89 | + running the testsuite during build, so do that. |
90 | + * Bump debhelper build-dep to >= 7.0.50~ for overrides. |
91 | + |
92 | + -- Loïc Minier <loic.minier@ubuntu.com> Thu, 14 Jan 2010 18:09:17 +0100 |
93 | + |
94 | +pkg-create-dbgsym (0.35) lucid; urgency=low |
95 | + |
96 | + * Add -k as an alias option name for --keep-debug. Thanks to Michael Bienia! |
97 | + |
98 | + -- Martin Pitt <martin.pitt@ubuntu.com> Mon, 30 Nov 2009 22:15:43 +0100 |
99 | + |
100 | +pkg-create-dbgsym (0.34) lucid; urgency=low |
101 | + |
102 | + * Also skip over XB-Python-Version header when generating the new control |
103 | + file; this avoids the "unknown substitution variable ${python:Versions}" |
104 | + warning when generating the -dbgsym packages; thanks Michael Bienia. |
105 | + |
106 | + -- Loïc Minier <loic.minier@ubuntu.com> Sat, 28 Nov 2009 18:10:52 +0100 |
107 | + |
108 | +pkg-create-dbgsym (0.33) lucid; urgency=low |
109 | + |
110 | + * Invert the logic which dh_strip used to pass the "don't add ddebs to |
111 | + .changes" down to pkg_create_dbgsym. This prevents packages which don't |
112 | + use debhelper, but call pkg_create_dbgsym directly from suddenly adding |
113 | + ddebs to .changes (which makes Soyuz unhappy). |
114 | + |
115 | + -- Martin Pitt <martin.pitt@ubuntu.com> Wed, 18 Nov 2009 19:21:54 -0600 |
116 | + |
117 | +pkg-create-dbgsym (0.32) lucid; urgency=low |
118 | + |
119 | + [ Loïc Minier ] |
120 | + * Fix Vcs-Bzr, it's /ubuntu, not /trunk |
121 | + |
122 | + [ Martin Pitt ] |
123 | + * Add Source: field to ddebs whose original name had the same name as the |
124 | + source. Soyuz does not like those. Thanks to William Grant for the patch! |
125 | + (LP: #429782) |
126 | + * Add ddebs to .changes file now, since Soyuz will support that soon. Check |
127 | + /CurrentlyBuilding for the Build-Debug-Symbols flag, and fall back to the |
128 | + old logic if it does not exist. Thanks to William Grant! (LP: #429796, |
129 | + #429793) |
130 | + |
131 | + -- Martin Pitt <martin.pitt@ubuntu.com> Sun, 15 Nov 2009 06:36:58 -0600 |
132 | + |
133 | +pkg-create-dbgsym (0.31) karmic; urgency=low |
134 | + |
135 | + [ Loïc Minier ] |
136 | + * Add lintian override for lack of dh_strip manpage (dh_strip is diverted); |
137 | + bump debhelper build-dep to >= 6.0.7~ for dh_lintian. |
138 | + * Move debhelper to build-deps instead of build-deps-indep for clean:. |
139 | + * Bump debhelper compat level to 5. |
140 | + * Bump up Standards-Version to 3.8.3; no change needed. |
141 | + * Use dh_prep instead of dh_clean -k; update debhelper build-dep to |
142 | + >= 6.0.13~. |
143 | + * Pass -i to dh_* in binary-indep. |
144 | + * Use dh_install to install the binaries, dh_fixperms will set them +x. |
145 | + |
146 | + [ Martin Pitt ] |
147 | + * dhtest.archspecific: Add a package with "Architecture: kfreebsd-i386 |
148 | + kfreebsd-amd64". This reproduces the current glib2.0 FTBFS on i386/amd64. |
149 | + * dh_clean: Fix grepping of Architecture field to only match space separated |
150 | + words, instead of using -w; the latter matches e. g. kfreebsd-i386 on |
151 | + i386. |
152 | + |
153 | + -- Martin Pitt <martin.pitt@ubuntu.com> Thu, 24 Sep 2009 20:09:36 +0200 |
154 | + |
155 | +pkg-create-dbgsym (0.30) karmic; urgency=low |
156 | + |
157 | + * Add Vcs-Bzr in control. |
158 | + * Set NO_PKG_MANGLE when building the -dbgsym .debs as running |
159 | + pkgstriptranslations etc. when -dbgsyms are created results in nasty side |
160 | + effects; use dpkg-deb --build instead of dpkg --build for clarity. |
161 | + * Add README mentionning how to run the tests before upload. |
162 | + |
163 | + -- Loïc Minier <loic.minier@ubuntu.com> Tue, 15 Sep 2009 12:54:24 +0200 |
164 | + |
165 | +pkg-create-dbgsym (0.29) karmic; urgency=low |
166 | + |
167 | + * Add tests/dhtest.whitespace: Test odd whitespace in debian/control: |
168 | + - Using tabs instead of spaces for multi-line dependency fields. This |
169 | + replicates the mplayer issue (LP #384597). |
170 | + - Putting Description: in the middle and ending the package record with a |
171 | + dependency field. This replicates the new dictd FTBFS. |
172 | + * tests/run: Ensure that all other dependency fields get stripped. |
173 | + * pkg_create_dbgsym: Unbreak fix from 0.28: Only look ahead for space and |
174 | + tab, not for all whitespace; \s also catches \n. This caused the dictd |
175 | + FTBFS. |
176 | + * Bump Standards-Version to 3.8.1 (no changes necessary). |
177 | + |
178 | + -- Martin Pitt <martin.pitt@ubuntu.com> Thu, 11 Jun 2009 11:13:07 +0200 |
179 | + |
180 | +pkg-create-dbgsym (0.28) karmic; urgency=low |
181 | + |
182 | + * Fix multi-line depends parsing if one field evaluates to be empty. Thanks |
183 | + to Michael Biena! (LP: #384597) |
184 | + |
185 | + -- Martin Pitt <martin.pitt@ubuntu.com> Mon, 08 Jun 2009 07:57:42 +0200 |
186 | + |
187 | +pkg-create-dbgsym (0.27) karmic; urgency=low |
188 | + |
189 | + * Make dh_strip actually abort correctly if debhelper isn't installed. |
190 | + |
191 | + -- Adam Conrad <adconrad@ubuntu.com> Tue, 05 May 2009 16:27:55 -0600 |
192 | + |
193 | +pkg-create-dbgsym (0.26) intrepid; urgency=low |
194 | + |
195 | + * dh_strip: Recognize "export DH_COMPAT := x" syntax, too. Thanks, Michael |
196 | + Biena! |
197 | + |
198 | + -- Martin Pitt <martin.pitt@ubuntu.com> Tue, 03 Jun 2008 12:41:58 +0200 |
199 | + |
200 | +pkg-create-dbgsym (0.25) hardy; urgency=low |
201 | + |
202 | + * tests/dhtest.nostrip: Add another test case for dh_strip blacklisting with |
203 | + a space between -X and the argument. This reproduces the followup problem |
204 | + in LP #180364. |
205 | + * dh_strip: Fix option parsing to get along with spaces between -X and the |
206 | + argument. (LP: #180364) |
207 | + |
208 | + -- Martin Pitt <martin.pitt@ubuntu.com> Tue, 26 Feb 2008 16:05:28 +0100 |
209 | + |
210 | +pkg-create-dbgsym (0.24) hardy; urgency=low |
211 | + |
212 | + * Add tests/dhtest.nostrip: Ignore crash2 for dh_strip, and add an assertion |
213 | + that the file isn't touched by dh_strip. This reproduces LP #180364. |
214 | + * Parse dh_strip's -X options in the wrapper and pass them to |
215 | + pkg_create_dbgsym. Do not touch any files which match these patterns. This |
216 | + avoids adding GNU debuglinks to ELF binaries which must not be touched at |
217 | + all, like Ocaml bytecode. (LP: #180364) |
218 | + * tests/run: Do not expect a dbgsym package for test .debs with 'nostrip' in |
219 | + the name (as used by the tests/dhtest.nostrip test case). |
220 | + |
221 | + -- Martin Pitt <martin.pitt@ubuntu.com> Thu, 21 Feb 2008 17:55:07 +0100 |
222 | + |
223 | +pkg-create-dbgsym (0.23) hardy; urgency=low |
224 | + |
225 | + * Also disable pkg-create-dbgsym if Archive Purpose is PPA. |
226 | + |
227 | + -- Adam Conrad <adconrad@ubuntu.com> Tue, 18 Dec 2007 16:01:24 -0700 |
228 | + |
229 | +pkg-create-dbgsym (0.22) hardy; urgency=low |
230 | + |
231 | + * Disable symbol extraction if *-autotest is found in Suite in the |
232 | + buildd's /CurrentlyBuilding file; requires a modified sbuild. |
233 | + |
234 | + -- Adam Conrad <adconrad@ubuntu.com> Fri, 14 Dec 2007 15:18:37 -0700 |
235 | + |
236 | +pkg-create-dbgsym (0.21) hardy; urgency=low |
237 | + |
238 | + * Add tests/dhtest.compat1override/: Declare debian/compat '4', but override |
239 | + it in debian/rules with DH_COMPAT=1. Reproduces the FTBFS of dvi2tty, |
240 | + flexml, and gtk-engines-mono. |
241 | + * dh_strip: Fix debhelper compatibility level detection so that DH_COMPAT |
242 | + overrides debian/compat. (LP: #173631) |
243 | + |
244 | + -- Martin Pitt <martin.pitt@ubuntu.com> Tue, 04 Dec 2007 11:58:19 +0100 |
245 | + |
246 | +pkg-create-dbgsym (0.20) feisty; urgency=low |
247 | + |
248 | + * Move test suite into tests/ to unclutter source root directory. |
249 | + * Add tests/dhtest.versionoverride: Test case for overriding the version of |
250 | + a particular binary. This replicates LP #92747. However, since this is |
251 | + unfixable without major changes (dh_strip is called before dh_gencontrol |
252 | + usually), we do not run the test case for now. |
253 | + * pkg_create_dbgsym: Do not generate conflicts to python dbg packages. |
254 | + (LP: #88695) |
255 | + |
256 | + -- Martin Pitt <martin.pitt@ubuntu.com> Tue, 3 Apr 2007 10:58:17 +0200 |
257 | + |
258 | +pkg-create-dbgsym (0.19) feisty; urgency=low |
259 | + |
260 | + * dh_strip: Explicitly unset $pkg before parsing debian/control. |
261 | + Packages with a debian/rules that happen to set this variable FTBFS |
262 | + otherwise (like sim). |
263 | + |
264 | + -- Martin Pitt <martin.pitt@ubuntu.com> Fri, 2 Feb 2007 13:07:34 +0100 |
265 | + |
266 | +pkg-create-dbgsym (0.18) feisty; urgency=low |
267 | + |
268 | + * testsuite: Check that all ddebs conflict to all built -dbg packages. |
269 | + * pkg_create_dbgsym: Determine set of -dbg packages and add Conflicts: to |
270 | + them. Closes: LP#68268 |
271 | + |
272 | + -- Martin Pitt <martin.pitt@ubuntu.com> Fri, 15 Dec 2006 11:15:33 +0100 |
273 | + |
274 | +pkg-create-dbgsym (0.17) feisty; urgency=low |
275 | + |
276 | + * Revert Debian #386246 workaround of 0.16 again, we should now fix the |
277 | + actually broken packages. |
278 | + |
279 | + -- Martin Pitt <martin.pitt@ubuntu.com> Thu, 14 Dec 2006 08:35:25 +0100 |
280 | + |
281 | +pkg-create-dbgsym (0.16) edgy; urgency=low |
282 | + |
283 | + * pkg_create_dbgsym: If package build directory does not exist, only whine |
284 | + and exit successfully instead of failing. This makes us bug-compatible to |
285 | + Debian #386246, right before Edgy release it is impractical to fix all |
286 | + broken packages for that. This will be reverted early in Edgy+1. |
287 | + |
288 | + -- Martin Pitt <martin.pitt@ubuntu.com> Thu, 12 Oct 2006 14:01:58 +0200 |
289 | + |
290 | +pkg-create-dbgsym (0.15) edgy; urgency=low |
291 | + |
292 | + * Fix (harmless) find error message on arch-specific packages without any |
293 | + ELF files at all. |
294 | + * Add dhtest.dbg3: Call dh_strip with --dbg-package dhtest (without the '=' |
295 | + in between, as prescribed by the manpage). This reproduces the current |
296 | + libtasn-1-3 FTBFS. |
297 | + * dh_strip: Relax --dbg-package parameter parsing a bit to accept |
298 | + '--dbg-package pkgname' syntax. |
299 | + |
300 | + -- Martin Pitt <martin.pitt@ubuntu.com> Thu, 12 Oct 2006 11:55:35 +0200 |
301 | + |
302 | +pkg-create-dbgsym (0.14) edgy; urgency=low |
303 | + |
304 | + * Use more elaborate test crash programs with a three-function deep stack, |
305 | + so that gdb's current 'Could not find the frame base' failure in the |
306 | + topmost function does not completely break the test suite. |
307 | + * Add dhtest.dbg2 test case: Use dh_strip --keep-debug and manually move |
308 | + around the debug symbols to dhtest1-dbg. This replicates the current FTBFS |
309 | + of opal. |
310 | + * dh_strip: Handle --keep-debug option gracefully to err on the safe side. |
311 | + Fixes current opal FTBFS. |
312 | + |
313 | + -- Martin Pitt <martin.pitt@ubuntu.com> Thu, 21 Sep 2006 20:51:28 +0200 |
314 | + |
315 | +pkg-create-dbgsym (0.13) edgy; urgency=low |
316 | + |
317 | + * *test/crash2.c: Test for isinf() and explicitly raise a SIGFPE, to get |
318 | + a crash on powerpc, too. |
319 | + * dhtest.archspecific: Add powerpc package so that the package builds at all |
320 | + on powerpc. |
321 | + * cdbstest/debian/rules: Explicitly set CFLAGS to -O0 to avoid optimizing |
322 | + out function arguments and thus failing the test suite. |
323 | + * dhtest.noargs/debian/control: Add Pre-Depends field and multiline |
324 | + dependency field to reproduce current dpkg FTBFS. |
325 | + * pkg_create_dbgsym: |
326 | + - Properly handle continuation lines in Dependency fields. |
327 | + - Also filter out Pre-Depends:. |
328 | + |
329 | + -- Martin Pitt <martin.pitt@ubuntu.com> Sun, 20 Aug 2006 17:19:46 +0200 |
330 | + |
331 | +pkg-create-dbgsym (0.12) edgy; urgency=low |
332 | + |
333 | + * Add dhtest.tmpdirarg/: Test suite check for a source package which uses |
334 | + the -P/--tmpdir= debhelper option. This recreates the current cdrtools |
335 | + FTBFS. |
336 | + * dh_strip: Respect -P/--tmpdir arguments. |
337 | + * pkg_create_dbgsym: Do not assume that the temporary package build |
338 | + directory is directly below debian/. |
339 | + |
340 | + -- Martin Pitt <martin.pitt@ubuntu.com> Thu, 17 Aug 2006 12:47:13 +0200 |
341 | + |
342 | +pkg-create-dbgsym (0.11) edgy; urgency=low |
343 | + |
344 | + * dhtest/debian/control: Add Suggests: to ${bar}-core to recreate current |
345 | + FTBFS of caudium. |
346 | + * pkg-create-dbgsym: Filter out dependency fields before passing them to |
347 | + dpkg-gencontrol. Doing it afterwards is too late since dpkg-gencontrol |
348 | + does not have variable substitutions at that point, which can mess up the |
349 | + dependencies to become unparseable. |
350 | + |
351 | + -- Martin Pitt <martin.pitt@ubuntu.com> Wed, 16 Aug 2006 09:40:57 +0200 |
352 | + |
353 | +pkg-create-dbgsym (0.10) edgy; urgency=low |
354 | + |
355 | + * Add dhtest.archspecific/: Test suite check for a source package with |
356 | + architecture specific binaries. |
357 | + * dh_strip: Evaluate DEB_BUILD_ARCH and ignore architecture specific |
358 | + packages which are not built on the current platform. |
359 | + * testsuite: If we encounter a -dbg package, check that it produces a good |
360 | + backtrace with the corresponding deb, in order to verify that the -dbgsym |
361 | + package did not break the debug link. |
362 | + |
363 | + -- Martin Pitt <martin.pitt@ubuntu.com> Tue, 15 Aug 2006 18:51:35 +0200 |
364 | + |
365 | +pkg-create-dbgsym (0.9) edgy; urgency=low |
366 | + |
367 | + * Ignore *.o files, too. Through some mysterious chain of events, adding GNU |
368 | + debuglinks to libc6-dev's /usr/lib/*crt*.o files causes unwanted |
369 | + debuglinks in gcc-produced binaries. This breaks dh_strip for all source |
370 | + packages which build a -dbg binary. Closes: LP#55880 |
371 | + |
372 | + -- Martin Pitt <martin.pitt@ubuntu.com> Thu, 10 Aug 2006 19:37:05 +0200 |
373 | + |
374 | +pkg-create-dbgsym (0.8) edgy; urgency=low |
375 | + |
376 | + * Remove the Essential: flag for -dbgsym package control records and fix |
377 | + Priority: to extra. |
378 | + * dhtest.noargs/Makefile: Add GNU debuglink to generated crash file; it's |
379 | + not entirely unreasonable for upstream or package build systems to do this |
380 | + without using dh_strip --dbg-package. |
381 | + * pkg_create_dbgsym: Remove GNU debuglink before adding our own, to not |
382 | + break if the binary already has its own. Remove the 'more than one |
383 | + hardlink' special case again, since it is now obsolete. |
384 | + |
385 | + -- Martin Pitt <martin.pitt@ubuntu.com> Thu, 10 Aug 2006 16:07:32 +0200 |
386 | + |
387 | +pkg-create-dbgsym (0.7) edgy; urgency=low |
388 | + |
389 | + * dh_strip: Call the real dh_strip if NO_PKG_MANGLE is given. |
390 | + |
391 | + -- Martin Pitt <martin.pitt@ubuntu.com> Mon, 7 Aug 2006 10:34:55 +0200 |
392 | + |
393 | +pkg-create-dbgsym (0.6) edgy; urgency=low |
394 | + |
395 | + * dhtest/debian/control: Add Replaces: and Breaks: fields with substitution |
396 | + variable as well. |
397 | + * Filter out Replaces: from original package's control record. |
398 | + * debian/copyright: Update FSF address. |
399 | + |
400 | + -- Martin Pitt <martin.pitt@ubuntu.com> Tue, 1 Aug 2006 11:03:03 +0200 |
401 | + |
402 | +pkg-create-dbgsym (0.5) edgy; urgency=low |
403 | + |
404 | + * dhtest: Add Depends/Recommends/Suggests/Conflicts with a substitution |
405 | + variable, to recreate the current openoffice.org FTBFS. |
406 | + * Filter out Recommends:, Suggests:, Conflicts:, Provides:, and Breaks: from |
407 | + original package's control record, since they are not necessary and just |
408 | + potentially break the build. |
409 | + |
410 | + -- Martin Pitt <martin.pitt@ubuntu.com> Mon, 31 Jul 2006 22:01:34 +0200 |
411 | + |
412 | +pkg-create-dbgsym (0.4) edgy; urgency=low |
413 | + |
414 | + * Do not add .ddebs to the .changes file until Soyuz is able to process |
415 | + them. With that, we can already install this package into the buildd |
416 | + chroots to fix remaining FTBFSes induced by this package, and it even |
417 | + opens up the possibility to put the resulting .ddebs to some inofficial |
418 | + place. |
419 | + |
420 | + -- Martin Pitt <martin.pitt@ubuntu.com> Mon, 31 Jul 2006 11:22:06 +0200 |
421 | + |
422 | +pkg-create-dbgsym (0.3) edgy; urgency=low |
423 | + |
424 | + * debian/copyright: Fix copy & paste leftovers. |
425 | + * Add dhtest.compatenvvar/: Test suite check for debhelper packages using |
426 | + $DH_COMPAT instead of debian/compat. |
427 | + * Respect DH_COMPAT setting in debian/rules (fixes build of unifdef). |
428 | + * dhtest.compatenvvar/: Install a hardlink to an existing binary to check |
429 | + whether this is handled correctly (since objcopy --add-gnu-debuglink is |
430 | + not idempotent). |
431 | + * Ignore objcopy --add-gnu-debuglink failures if target file's hard link |
432 | + count is not 1 (fixes build of sudo). |
433 | + |
434 | + -- Martin Pitt <martin.pitt@ubuntu.com> Tue, 18 Jul 2006 15:30:18 +0200 |
435 | + |
436 | +pkg-create-dbgsym (0.2) edgy; urgency=low |
437 | + |
438 | + * Add debug output if objcopy --only-keep-debug or --add-gnu-debuglink |
439 | + fails. |
440 | + * Do not generate debug symbols for *.a (static libraries), since they |
441 | + sometimes break objcopy and are not generally useful. |
442 | + |
443 | + -- Martin Pitt <martin.pitt@ubuntu.com> Thu, 6 Jul 2006 13:47:20 +0200 |
444 | + |
445 | +pkg-create-dbgsym (0.1) edgy; urgency=low |
446 | + |
447 | + * Initial release: |
448 | + - pkg_create_dbgsym: build a debug symbol ddeb for a given package in a |
449 | + built source tree |
450 | + - dh_strip: Divert and wrap debhelper's dh_strip which automatically calls |
451 | + pkg_create_dbgsym for all packages dh_strip is asked to act on. |
452 | + - Implements distro side of https://wiki.ubuntu.com/AptElfDebugSymbols. |
453 | + |
454 | + -- Martin Pitt <martin.pitt@ubuntu.com> Fri, 23 Jun 2006 12:46:24 +0200 |
455 | |
456 | === added file 'debian/compat' |
457 | --- debian/compat 1970-01-01 00:00:00 +0000 |
458 | +++ debian/compat 2010-04-21 20:29:14 +0000 |
459 | @@ -0,0 +1,1 @@ |
460 | +7 |
461 | |
462 | === added file 'debian/control' |
463 | --- debian/control 1970-01-01 00:00:00 +0000 |
464 | +++ debian/control 2010-04-21 20:29:14 +0000 |
465 | @@ -0,0 +1,22 @@ |
466 | +Source: pkg-create-dbgsym |
467 | +Section: devel |
468 | +Priority: extra |
469 | +Build-Depends: debhelper (>= 7.0.50~), |
470 | + gdb, |
471 | + cdbs |
472 | +Maintainer: Martin Pitt <martin.pitt@ubuntu.com> |
473 | +Standards-Version: 3.8.3 |
474 | +Vcs-Bzr: http://bazaar.launchpad.net/~ubuntu-core-dev/pkg-create-dbgsym/ubuntu |
475 | +Build-Conflicts: pkgbinarymangler (<< 66~) |
476 | + |
477 | +Package: pkg-create-dbgsym |
478 | +Architecture: all |
479 | +Depends: ${misc:Depends} |
480 | +Description: automatically build debug symbol ddeb packages |
481 | + pkg_create_dbgsym builds a debug symbol ddeb for a given package in a |
482 | + built source tree and adds it to debian/files. |
483 | + . |
484 | + This package diverts and wraps debhelper's dh_strip. It automatically |
485 | + calls pkg_create_dbgsym for all packages dh_strip is asked to act on. |
486 | + As a result, by merely installing this package on buildds, all |
487 | + packages will automatically get ddebs built. |
488 | |
489 | === added file 'debian/copyright' |
490 | --- debian/copyright 1970-01-01 00:00:00 +0000 |
491 | +++ debian/copyright 2010-04-21 20:29:14 +0000 |
492 | @@ -0,0 +1,24 @@ |
493 | +pkg-create-dbgsym is written and maintained by Martin Pitt |
494 | +<martin.pitt@ubuntu.com>. |
495 | + |
496 | +The original source can always be found at: |
497 | + http://archive.ubuntu.com/ubuntu/pool/main/p/pkg-create-dbgsym/ |
498 | + |
499 | +Copyright (C) 2006 Canonical Ltd. |
500 | + |
501 | + This program is free software; you can redistribute it and/or modify |
502 | + it under the terms of the GNU General Public License as published by |
503 | + the Free Software Foundation; either version 2 of the License, or |
504 | + (at your option) any later version. |
505 | + |
506 | + This program is distributed in the hope that it will be useful, |
507 | + but WITHOUT ANY WARRANTY; without even the implied warranty of |
508 | + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
509 | + GNU General Public License for more details. |
510 | + |
511 | + You should have received a copy of the GNU General Public License |
512 | + along with this program; if not, write to the Free Software |
513 | + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA |
514 | + |
515 | +On Debian systems, the complete text of the GNU General |
516 | +Public License can be found in `/usr/share/common-licenses/GPL'. |
517 | |
518 | === added file 'debian/pkg-create-dbgsym.install' |
519 | --- debian/pkg-create-dbgsym.install 1970-01-01 00:00:00 +0000 |
520 | +++ debian/pkg-create-dbgsym.install 2010-04-21 20:29:14 +0000 |
521 | @@ -0,0 +1,2 @@ |
522 | +dh_strip usr/bin |
523 | +pkg_create_dbgsym usr/bin |
524 | |
525 | === added file 'debian/pkg-create-dbgsym.lintian-overrides' |
526 | --- debian/pkg-create-dbgsym.lintian-overrides 1970-01-01 00:00:00 +0000 |
527 | +++ debian/pkg-create-dbgsym.lintian-overrides 2010-04-21 20:29:14 +0000 |
528 | @@ -0,0 +1,1 @@ |
529 | +pkg-create-dbgsym: binary-without-manpage usr/bin/dh_strip |
530 | |
531 | === added file 'debian/postrm' |
532 | --- debian/postrm 1970-01-01 00:00:00 +0000 |
533 | +++ debian/postrm 2010-04-21 20:29:14 +0000 |
534 | @@ -0,0 +1,19 @@ |
535 | +#! /bin/sh -e |
536 | + |
537 | +case "$1" in |
538 | + remove|purge) |
539 | + # Remove our diversion |
540 | + dpkg-divert --remove --rename --package pkg-create-dbgsym --divert /usr/bin/dh_strip.pkg-create-dbgsym /usr/bin/dh_strip > /dev/null |
541 | + ;; |
542 | + |
543 | + upgrade|failed-upgrade|abort-install|abort-upgrade|disappear) |
544 | + ;; |
545 | + |
546 | + *) |
547 | + echo "postrm called with unknown argument \`$1'" >&2 |
548 | + exit 0 |
549 | +esac |
550 | + |
551 | +#DEBHELPER# |
552 | + |
553 | +exit 0 |
554 | |
555 | === added file 'debian/preinst' |
556 | --- debian/preinst 1970-01-01 00:00:00 +0000 |
557 | +++ debian/preinst 2010-04-21 20:29:14 +0000 |
558 | @@ -0,0 +1,19 @@ |
559 | +#! /bin/sh -e |
560 | + |
561 | +case "$1" in |
562 | + install|upgrade) |
563 | + dpkg-divert --add --rename --package pkg-create-dbgsym --divert /usr/bin/dh_strip.pkg-create-dbgsym /usr/bin/dh_strip > /dev/null |
564 | + ;; |
565 | + |
566 | + abort-upgrade) |
567 | + ;; |
568 | + |
569 | + *) |
570 | + echo "postinst called with unknown argument \`$1'" >&2 |
571 | + exit 0 |
572 | + ;; |
573 | +esac |
574 | + |
575 | +#DEBHELPER# |
576 | + |
577 | +exit 0 |
578 | |
579 | === added file 'debian/rules' |
580 | --- debian/rules 1970-01-01 00:00:00 +0000 |
581 | +++ debian/rules 2010-04-21 20:29:14 +0000 |
582 | @@ -0,0 +1,15 @@ |
583 | +#!/usr/bin/make -f |
584 | + |
585 | +override_dh_auto_clean: |
586 | + if [ -d testsuite.tmp ] || [ -d tests/testsuite.tmp ]; then \ |
587 | + echo "testsuite.tmp or tests/testsuite.tmp still exists, please clean up and check test suite"; \ |
588 | + exit 1; \ |
589 | + fi |
590 | + dh_auto_clean |
591 | + |
592 | +override_dh_auto_test: |
593 | + tests/run |
594 | + |
595 | +%: |
596 | + dh $* |
597 | + |
598 | |
599 | === added file 'dh_strip' |
600 | --- dh_strip 1970-01-01 00:00:00 +0000 |
601 | +++ dh_strip 2010-04-21 20:29:14 +0000 |
602 | @@ -0,0 +1,205 @@ |
603 | +#!/bin/sh -e |
604 | + |
605 | +# wrapper around dh_strip that generates packages with external debug symbols |
606 | +# |
607 | +# Author: Martin Pitt <martin.pitt@ubuntu.com> |
608 | +# (C) 2006 Canonical Ltd. |
609 | +# |
610 | +# |
611 | +# This program is free software; you can redistribute it and/or modify |
612 | +# it under the terms of the GNU General Public License as published by |
613 | +# the Free Software Foundation; either version 2 of the License, or |
614 | +# (at your option) any later version. |
615 | +# |
616 | +# This program is distributed in the hope that it will be useful, |
617 | +# but WITHOUT ANY WARRANTY; without even the implied warranty of |
618 | +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
619 | +# GNU General Public License for more details. |
620 | +# |
621 | +# You should have received a copy of the GNU General Public License |
622 | +# along with this program; if not, write to the Free Software |
623 | +# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA |
624 | + |
625 | +DEBUG=1 |
626 | + |
627 | +if [ -x /usr/bin/dh_strip.pkg-create-dbgsym ]; then |
628 | + REAL_DHSTRIP=/usr/bin/dh_strip.pkg-create-dbgsym |
629 | +elif [ "$0" != /usr/bin/dh_strip ]; then |
630 | + # called as "dh_strip" somewhere before /usr/bin in the PATH, e.g. from the |
631 | + # testsuite during package build |
632 | + REAL_DHSTRIP=/usr/bin/dh_strip |
633 | + if ! [ -x "$REAL_DHSTRIP" ]; then |
634 | + echo "FATAL: Can't run /usr/bin/dh_strip; is debhelper installed?" >&2 |
635 | + exit 1 |
636 | + fi |
637 | +else |
638 | + echo "FATAL: Can't find the diverted original dh_strip and /usr/bin/dh_strip loops back to myself!" >&2 |
639 | + exit 1 |
640 | +fi |
641 | + |
642 | +BUILDARCH=`dpkg-architecture -qDEB_BUILD_ARCH` |
643 | + |
644 | +# print debug message |
645 | +dbg() { |
646 | + [ -n "$DEBUG" ] || return 0 |
647 | + echo "dh_strip debug symbol extraction: $@" |
648 | +} |
649 | + |
650 | +# return 0 if $1 is in the string list $2, otherwise return 1 |
651 | +in_list() |
652 | +{ |
653 | + echo "$2" | egrep -q "(^|[[:space:]])$1(\$|[[:space:]])" |
654 | +} |
655 | + |
656 | +if [ "$PKG_IGNORE_CURRENTLY_BUILDING" = 1 ]; then |
657 | + addtofiles="-a" |
658 | +elif grep -qs '^Build-Debug-Symbols: yes$' /CurrentlyBuilding; then |
659 | + addtofiles="-a" |
660 | +else |
661 | + # If sbuild hasn't explicitly told us to build debug symbols, we will |
662 | + # avoid doing so if this is a rebuild or PPA build. |
663 | + if grep -qs '^Suite: [a-z]*-autotest' /CurrentlyBuilding; then |
664 | + NO_PKG_MANGLE=1 |
665 | + dbg "disabling for archive rebuild test" |
666 | + fi |
667 | + if grep -qs '^Purpose: PPA' /CurrentlyBuilding; then |
668 | + NO_PKG_MANGLE=1 |
669 | + dbg "disabling for PPA build" |
670 | + fi |
671 | + |
672 | + # If /CurrentlyBuilding exists but Build-Debug-Symbols isn't set, |
673 | + # we don't know if Soyuz can handle ddebs yet. We don't want to |
674 | + # upload ddebs unless we really know that Soyuz can handle them, so |
675 | + # we tell pkg_create_dbgsym to avoid adding them to the changes |
676 | + # file. |
677 | + [ -f /CurrentlyBuilding ] || addtofiles="-a" |
678 | +fi |
679 | + |
680 | +if [ -n "$NO_PKG_MANGLE" ]; then |
681 | + dbg "not doing anything since NO_PKG_MANGLE is given" |
682 | + exec $REAL_DHSTRIP "$@" |
683 | + exit 0 |
684 | +fi |
685 | + |
686 | +# get set of all architecture dependent packages from debian/control |
687 | +packages=$( |
688 | + unset pkg |
689 | + egrep '^(Package|Architecture):' debian/control | while read key val; do |
690 | + if [ "$key" = Package: ]; then |
691 | + [ -z "$pkg" ] || { |
692 | + echo "Error: Package: and Architecture: do not alternate in debian/control" >&2 |
693 | + exit 1 |
694 | + } |
695 | + pkg="$val" |
696 | + fi |
697 | + if [ "$key" = Architecture: ]; then |
698 | + [ -n "$pkg" ] || { |
699 | + echo "Error: Package: and Architecture: do not alternate in debian/control" >&2 |
700 | + exit 1 |
701 | + } |
702 | + if [ "$val" = any ] || echo "$val" | grep -qE "([[:space:]]|^)$BUILDARCH([[:space:]]|\$)"; then |
703 | + printf "$pkg " |
704 | + fi |
705 | + unset pkg |
706 | + fi |
707 | + done |
708 | +) |
709 | +dbg "all non-arch-all packages for this build platform $BUILDARCH: $packages" |
710 | + |
711 | +# parse command line to determine set of packages to act on |
712 | +for p in $DH_OPTIONS $@; do |
713 | + if [ -n "$next_arg_is_xopt" ]; then |
714 | + xopts="$xopts -X$p" |
715 | + unset next_arg_is_xopt |
716 | + continue |
717 | + fi |
718 | + |
719 | + p=${p#-O} |
720 | + case "$p" in |
721 | + -i|--indep) |
722 | + unset actpkgs |
723 | + optsel=1 |
724 | + ;; |
725 | + -a|--arch|-s|--same-arch) |
726 | + actpkgs="$packages" |
727 | + optsel=1 |
728 | + ;; |
729 | + -p*|--package=*) |
730 | + pkg=${p#--package=} |
731 | + pkg=${pkg#-p} |
732 | + if ! in_list "$pkg" "$actpkgs" && in_list "$pkg" "$packages"; then |
733 | + actpkgs="$pkg $actpkgs" |
734 | + fi |
735 | + optsel=1 |
736 | + ;; |
737 | + -N*|--no-package=*) |
738 | + pkg=${p#--no-package=} |
739 | + pkg=${pkg#-N} |
740 | + if ! in_list "$pkg" "$ignorepkgs"; then |
741 | + ignorepkgs="$pkg $ignorepkgs" |
742 | + fi |
743 | + ;; |
744 | + --dbg-package*) |
745 | + dbg "not adding gnu debuglinks since --dbg-package is given" |
746 | + nodebuglink=1 |
747 | + ;; |
748 | + -k|--keep-debug) |
749 | + dbg "not adding gnu debuglinks since --keep-debug is given" |
750 | + nodebuglink=1 |
751 | + ;; |
752 | + -P*|--tmpdir=*) |
753 | + pkgdirarg=${p#--tmpdir=} |
754 | + pkgdirarg=${pkgdirarg#-P} |
755 | + dbg "-P/--tmpdir option: setting temporary package dir to $pkgdirarg" |
756 | + ;; |
757 | + -X) |
758 | + next_arg_is_xopt=1 |
759 | + ;; |
760 | + -X*) |
761 | + xopts="$xopts $p" |
762 | + ;; |
763 | + esac |
764 | +done |
765 | + |
766 | +[ -n "$optsel" ] || actpkgs="$packages" |
767 | + |
768 | +dbg "packages to act on: $actpkgs" |
769 | +dbg "ignored packages: $ignorepkgs" |
770 | + |
771 | +# check for debhelper compat level 1 |
772 | +dhcompat1=1 |
773 | +if [ -e debian/compat ]; then |
774 | + if [ "`cat debian/compat`" != 1 ]; then |
775 | + unset dhcompat1 |
776 | + fi |
777 | +fi |
778 | +if grep -q '^[[:space:]]*\(export[[:space:]]*\)\?DH_COMPAT[[:space:]]*:\?=[[:space:]]*[2-9]\>' debian/rules; then |
779 | + unset dhcompat1 |
780 | +elif grep -q '^[[:space:]]*\(export[[:space:]]*\)\?DH_COMPAT[[:space:]]*:\?=[[:space:]]*1\>' debian/rules; then |
781 | + dhcompat1=1 |
782 | +fi |
783 | + |
784 | +if [ -n "$dhcompat1" ]; then |
785 | + first_control_pkg="`grep -m 1 ^Package debian/control | cut -f2- -d\ `" |
786 | + dbg "using obsolete debhelper compat mode 1" |
787 | +fi |
788 | + |
789 | +# process all packages |
790 | +for p in $actpkgs; do |
791 | + if in_list "$p" "$ignorepkgs" || |
792 | + echo $p | grep -q -- '-dbg$' ; then |
793 | + continue |
794 | + fi |
795 | + |
796 | + if [ -n "$pkgdirarg" ]; then |
797 | + pkgdir="$pkgdirarg" |
798 | + elif [ -n "$dhcompat1" -a $p = "$first_control_pkg" ]; then |
799 | + pkgdir=debian/tmp |
800 | + else |
801 | + pkgdir=debian/$p |
802 | + fi |
803 | + |
804 | + pkg_create_dbgsym $addtofiles $xopts $p $pkgdir "$nodebuglink" |
805 | +done |
806 | + |
807 | +exec $REAL_DHSTRIP "$@" |
808 | |
809 | === renamed file 'dh_strip' => 'dh_strip.moved' |
810 | === added file 'pkg_create_dbgsym' |
811 | --- pkg_create_dbgsym 1970-01-01 00:00:00 +0000 |
812 | +++ pkg_create_dbgsym 2010-04-21 20:29:14 +0000 |
813 | @@ -0,0 +1,149 @@ |
814 | +#!/bin/sh -e |
815 | + |
816 | +# generate debug symbol package for a given binary package within a built |
817 | +# debian source tree. |
818 | +# |
819 | +# Author: Martin Pitt <martin.pitt@ubuntu.com> |
820 | +# (C) 2006 Canonical Ltd. |
821 | +# |
822 | +# |
823 | +# This program is free software; you can redistribute it and/or modify |
824 | +# it under the terms of the GNU General Public License as published by |
825 | +# the Free Software Foundation; either version 2 of the License, or |
826 | +# (at your option) any later version. |
827 | +# |
828 | +# This program is distributed in the hope that it will be useful, |
829 | +# but WITHOUT ANY WARRANTY; without even the implied warranty of |
830 | +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
831 | +# GNU General Public License for more details. |
832 | +# |
833 | +# You should have received a copy of the GNU General Public License |
834 | +# along with this program; if not, write to the Free Software |
835 | +# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA |
836 | + |
837 | +# evaluate options |
838 | +blacklist="" |
839 | +add_to_files=0 |
840 | + |
841 | +for p; do |
842 | + case $p in |
843 | + -X*) |
844 | + blacklist=`/bin/echo -e "${p#-X}\n$blacklist"` |
845 | + shift |
846 | + ;; |
847 | + -a) |
848 | + add_to_files=1 |
849 | + shift |
850 | + ;; |
851 | + *) |
852 | + break |
853 | + ;; |
854 | + esac |
855 | +done |
856 | + |
857 | +pkgname="$1" |
858 | +pkgpath="$2" |
859 | +nodebuglink="$3" |
860 | + |
861 | +[ -n "$pkgpath" ] || pkgpath="debian/$pkgname" |
862 | + |
863 | +[ -d "$pkgpath" ] || { |
864 | + if [ -z "$pkgname" ]; then |
865 | + echo "Usage: $0 [-Xitem] [-n] <binary package name> [<package path>] [nodebuglink]" |
866 | + else |
867 | + echo "Directory $pkgpath does not exist, aborting" >&2 |
868 | + fi |
869 | + exit 1 |
870 | +} |
871 | + |
872 | +p=`readlink -f "$pkgpath"` # original package path |
873 | +dp="debian/${pkgname}-dbgsym" # debug package path |
874 | +dp=`readlink -f "$dp"` # debug package path |
875 | + |
876 | +# find all ELF files and extract their debug symbols; also add debug links |
877 | +# to original files |
878 | +origdir=`pwd` |
879 | +cd $p |
880 | +find -type f | while read f; do |
881 | + # ignore static libraries |
882 | + if echo "$f" | grep -q '\.[ao]$'; then continue; fi |
883 | + # ignore non-ELF files |
884 | + readelf -h "$f" > /dev/null 2>&1 || continue |
885 | + # check blacklist |
886 | + if [ -n "$blacklist" ]; then |
887 | + if echo "$f" | fgrep -q "$blacklist"; then continue; fi |
888 | + fi |
889 | + # ignore already stripped files |
890 | + file "$f" | grep -q "not stripped" || continue |
891 | + |
892 | + mkdir -p $dp/usr/lib/debug/`dirname "$f"` |
893 | + objcopy --only-keep-debug "$f" "$dp/usr/lib/debug/$f" || { |
894 | + echo "objcopy --only-keep-debug failed on `readlink -f $f`" >&2 |
895 | + exit 1 |
896 | + } |
897 | + [ -n "$nodebuglink" ] || objcopy -R .gnu_debuglink --add-gnu-debuglink="$dp/usr/lib/debug/$f" "$f" || { |
898 | + echo "objcopy --add-gnu-debuglink failed on `readlink -f $f`" >&2 |
899 | + exit 1 |
900 | + } |
901 | +done |
902 | +cd $origdir |
903 | + |
904 | +if [ ! -d "$dp" ] || [ -z "`find $dp -type f`" ]; then |
905 | + rm -rf $dp |
906 | + exit 0 |
907 | +fi |
908 | + |
909 | +mkdir -p $dp/DEBIAN |
910 | + |
911 | +# determine set of -dbg packages, which we need to conflict to |
912 | +conflicts= |
913 | +for p in `grep '^Package:.*-dbg' debian/control | cut -f 2 -d\ `; do |
914 | + # do not conflict to python dbg packages |
915 | + [ "$p" = "${p#python-}" ] || continue |
916 | + if [ -z "$conflicts" ]; then |
917 | + conflicts="$p" |
918 | + else |
919 | + conflicts="$conflicts, $p" |
920 | + fi |
921 | +done |
922 | +[ -z "$conflicts" ] || conflicts="\nConflicts: $conflicts" |
923 | + |
924 | +# generate a control file for current package (since it is usually not yet |
925 | +# existing) and adapt it to be suitable for the dbgsym package |
926 | +perl -p000 -e 's/^(?:Pre-Depends|Depends|Recommends|Suggests|Conflicts|Provides|Replaces|Breaks|Essential):.*?\n(?![ \t])//msg' debian/control | |
927 | + dpkg-gencontrol -c- -fdhstrip-dummy-debian-files -p$pkgname -is -ip -Pdebian/$pkgname-dbgsym -O | |
928 | + sed "s/^Priority:.*$/Priority: extra/; |
929 | + s/^Version: \(.*\)$/&\nDepends: $pkgname (= \1)$conflicts/; |
930 | + s/^Package:.*$/&-dbgsym/; |
931 | + s/^Description:.*$/Description: debug symbols for package $pkgname/" \ |
932 | + > $dp/DEBIAN/control |
933 | +rm -f dhstrip-dummy-debian-files |
934 | + |
935 | +# binaries named the same as the source will lack a Source field. |
936 | +# since we are renaming binaries, we might need to add one. |
937 | +if [ -z "`grep ^Source: $dp/DEBIAN/control`" ]; then |
938 | + sed -i "s/^Package:.*$/&\nSource: $pkgname/" $dp/DEBIAN/control |
939 | +fi |
940 | + |
941 | +# extract package name, version, architecture |
942 | +ddebname=${pkgname}-dbgsym |
943 | +ddebversion=`grep '^Version:' $dp/DEBIAN/control | cut -f2- -d\ ` |
944 | +ddebversion=${ddebversion#*:} # strip off epoch |
945 | +ddebarch=`grep '^Architecture:' $dp/DEBIAN/control | cut -f2- -d\ ` |
946 | +ddebsection=`grep '^Section:' $dp/DEBIAN/control | cut -f2- -d\ ` |
947 | +ddebpriority=`grep '^Priority:' $dp/DEBIAN/control | cut -f2- -d\ ` |
948 | + |
949 | +[ -n "$ddebsection" -a -n "$ddebpriority" ] || { |
950 | + echo "Error: parsed ddeb section or priority is empty" >&2 |
951 | + exit 1 |
952 | +} |
953 | +ddeb="${ddebname}_${ddebversion}_${ddebarch}.ddeb" |
954 | + |
955 | +# build .ddeb and add it to debian/files |
956 | +NO_PKG_MANGLE=1 dpkg-deb --build $dp ../$ddeb |
957 | +if [ "$add_to_files" = "1" ]; then |
958 | + dpkg-distaddfile "$ddeb" "$ddebsection" "$ddebpriority" |
959 | +fi |
960 | + |
961 | +# clean up, since this package does not appear in debian/control |
962 | +rm -rf $dp |
963 | |
964 | === renamed file 'pkg_create_dbgsym' => 'pkg_create_dbgsym.moved' |
965 | === added directory 'tests' |
966 | === renamed directory 'tests' => 'tests.moved' |
967 | === added directory 'tests/cdbstest' |
968 | === added file 'tests/cdbstest/Makefile' |
969 | --- tests/cdbstest/Makefile 1970-01-01 00:00:00 +0000 |
970 | +++ tests/cdbstest/Makefile 2010-04-21 20:29:14 +0000 |
971 | @@ -0,0 +1,18 @@ |
972 | +CFLAGS= -g -Wall -W -O0 |
973 | + |
974 | +LIBNAME=crashrep |
975 | + |
976 | +all: crash crash2 |
977 | + |
978 | +crash: crash.o |
979 | + $(CC) $^ -o $@ |
980 | + |
981 | +crash2: crash2.o |
982 | + $(CC) $^ -o $@ |
983 | + |
984 | +clean: |
985 | + rm -f *.o crash crash2 |
986 | + |
987 | +install: all |
988 | + install -d $(DESTDIR)/usr/bin |
989 | + install crash crash2 $(DESTDIR)/usr/bin |
990 | |
991 | === added file 'tests/cdbstest/crash.c' |
992 | --- tests/cdbstest/crash.c 1970-01-01 00:00:00 +0000 |
993 | +++ tests/cdbstest/crash.c 2010-04-21 20:29:14 +0000 |
994 | @@ -0,0 +1,34 @@ |
995 | +/* crash.c - demo program for libcrashreport |
996 | + |
997 | + (c) 2004 Martin Pitt <martin@piware.de> |
998 | + |
999 | + This file is public domain. |
1000 | +*/ |
1001 | + |
1002 | +#include <stdio.h> |
1003 | + |
1004 | +void h(char* p) { |
1005 | + p[1] = 'a'; |
1006 | +} |
1007 | + |
1008 | +int g( int x, int y ) |
1009 | +{ |
1010 | + char* s = NULL; |
1011 | + h(s); |
1012 | + return x+y; |
1013 | +} |
1014 | + |
1015 | +int f( int x ) |
1016 | +{ |
1017 | + return g( x, 42 ); |
1018 | +} |
1019 | + |
1020 | +int |
1021 | +main() |
1022 | +{ |
1023 | + int x; |
1024 | + |
1025 | + x = f(1); |
1026 | + printf( "x = %i, terminating normally now.\n", x ); |
1027 | + return 0; |
1028 | +} |
1029 | |
1030 | === added file 'tests/cdbstest/crash2.c' |
1031 | --- tests/cdbstest/crash2.c 1970-01-01 00:00:00 +0000 |
1032 | +++ tests/cdbstest/crash2.c 2010-04-21 20:29:14 +0000 |
1033 | @@ -0,0 +1,39 @@ |
1034 | +/* crash.c - demo program for libcrashreport |
1035 | + |
1036 | + (c) 2004 Martin Pitt <martin@piware.de> |
1037 | + |
1038 | + This file is public domain. |
1039 | +*/ |
1040 | + |
1041 | +#include <stdio.h> |
1042 | +#include <math.h> |
1043 | +#include <signal.h> |
1044 | + |
1045 | +double h() |
1046 | +{ |
1047 | + double a = 1./0; |
1048 | + if (isinf(a)) |
1049 | + raise(SIGFPE); |
1050 | + return a; |
1051 | +} |
1052 | + |
1053 | +int g( int x, int y ) |
1054 | +{ |
1055 | + |
1056 | + return x+y+(int) h(); |
1057 | +} |
1058 | + |
1059 | +int f( int x ) |
1060 | +{ |
1061 | + return g( x, 42 ); |
1062 | +} |
1063 | + |
1064 | +int |
1065 | +main() |
1066 | +{ |
1067 | + int x; |
1068 | + |
1069 | + x = f(1); |
1070 | + printf( "x = %i, terminating normally now.\n", x ); |
1071 | + return 0; |
1072 | +} |
1073 | |
1074 | === added directory 'tests/cdbstest/debian' |
1075 | === added file 'tests/cdbstest/debian/cdbstest1.install' |
1076 | --- tests/cdbstest/debian/cdbstest1.install 1970-01-01 00:00:00 +0000 |
1077 | +++ tests/cdbstest/debian/cdbstest1.install 2010-04-21 20:29:14 +0000 |
1078 | @@ -0,0 +1,1 @@ |
1079 | +/usr/bin/crash |
1080 | |
1081 | === added file 'tests/cdbstest/debian/cdbstest2.install' |
1082 | --- tests/cdbstest/debian/cdbstest2.install 1970-01-01 00:00:00 +0000 |
1083 | +++ tests/cdbstest/debian/cdbstest2.install 2010-04-21 20:29:14 +0000 |
1084 | @@ -0,0 +1,1 @@ |
1085 | +/usr/bin/crash2 |
1086 | |
1087 | === added file 'tests/cdbstest/debian/changelog' |
1088 | --- tests/cdbstest/debian/changelog 1970-01-01 00:00:00 +0000 |
1089 | +++ tests/cdbstest/debian/changelog 2010-04-21 20:29:14 +0000 |
1090 | @@ -0,0 +1,5 @@ |
1091 | +cdbstest (2.3-1) foo; urgency=low |
1092 | + |
1093 | + * Initial release. |
1094 | + |
1095 | + -- Martin Pitt <martin.pitt@ubuntu.com> Fri, 16 Jun 2006 10:49:56 +0200 |
1096 | |
1097 | === added file 'tests/cdbstest/debian/compat' |
1098 | --- tests/cdbstest/debian/compat 1970-01-01 00:00:00 +0000 |
1099 | +++ tests/cdbstest/debian/compat 2010-04-21 20:29:14 +0000 |
1100 | @@ -0,0 +1,1 @@ |
1101 | +5 |
1102 | |
1103 | === added file 'tests/cdbstest/debian/control' |
1104 | --- tests/cdbstest/debian/control 1970-01-01 00:00:00 +0000 |
1105 | +++ tests/cdbstest/debian/control 2010-04-21 20:29:14 +0000 |
1106 | @@ -0,0 +1,31 @@ |
1107 | +Source: cdbstest |
1108 | +Section: utils |
1109 | +Priority: extra |
1110 | +Maintainer: Martin Pitt <martin.pitt@ubuntu.com> |
1111 | +Build-Depends: cdbs, debhelper (>= 4.1.0) |
1112 | +Standards-Version: 3.7.2 |
1113 | + |
1114 | +Package: cdbstest1 |
1115 | +Architecture: any |
1116 | +Depends: ${shlibs:Depends} |
1117 | +Description: crash with a SIGSEGV |
1118 | + Test package |
1119 | + |
1120 | +Package: cdbstest2 |
1121 | +Architecture: any |
1122 | +Depends: ${shlibs:Depends} |
1123 | +Description: crash with a SIGFPE |
1124 | + Test package |
1125 | + |
1126 | +Package: cdbstestempty |
1127 | +Architecture: any |
1128 | +Depends: ${shlibs:Depends} |
1129 | +Description: dummy arch-any package |
1130 | + Test package |
1131 | + |
1132 | +Package: cdbstestall |
1133 | +Architecture: all |
1134 | +Depends: ${shlibs:Depends} |
1135 | +Description: dummy arch-all package |
1136 | + Test package |
1137 | + |
1138 | |
1139 | === added file 'tests/cdbstest/debian/copyright' |
1140 | --- tests/cdbstest/debian/copyright 1970-01-01 00:00:00 +0000 |
1141 | +++ tests/cdbstest/debian/copyright 2010-04-21 20:29:14 +0000 |
1142 | @@ -0,0 +1,1 @@ |
1143 | +foo |
1144 | |
1145 | === added file 'tests/cdbstest/debian/rules' |
1146 | --- tests/cdbstest/debian/rules 1970-01-01 00:00:00 +0000 |
1147 | +++ tests/cdbstest/debian/rules 2010-04-21 20:29:14 +0000 |
1148 | @@ -0,0 +1,10 @@ |
1149 | +#!/usr/bin/make -f |
1150 | +include /usr/share/cdbs/1/rules/debhelper.mk |
1151 | +include /usr/share/cdbs/1/class/makefile.mk |
1152 | + |
1153 | +CFLAGS := -O0 -g |
1154 | + |
1155 | +DEB_DH_INSTALL_SOURCEDIR=debian/tmp |
1156 | +DEB_MAKE_BUILD_TARGET=all |
1157 | +DEB_MAKE_CLEAN_TARGET=clean |
1158 | +DEB_MAKE_INSTALL_TARGET=install DESTDIR=$(DEB_DESTDIR) |
1159 | |
1160 | === added directory 'tests/dhtest' |
1161 | === added directory 'tests/dhtest.archspecific' |
1162 | === added file 'tests/dhtest.archspecific/Makefile' |
1163 | --- tests/dhtest.archspecific/Makefile 1970-01-01 00:00:00 +0000 |
1164 | +++ tests/dhtest.archspecific/Makefile 2010-04-21 20:29:14 +0000 |
1165 | @@ -0,0 +1,18 @@ |
1166 | +CFLAGS= -g -Wall -W -O0 |
1167 | + |
1168 | +LIBNAME=crashrep |
1169 | + |
1170 | +all: crash crash2 |
1171 | + |
1172 | +crash: crash.o |
1173 | + $(CC) $^ -o $@ |
1174 | + |
1175 | +crash2: crash2.o |
1176 | + $(CC) $^ -o $@ |
1177 | + |
1178 | +clean: |
1179 | + rm -f *.o crash crash2 |
1180 | + |
1181 | +install: all |
1182 | + install -d $(DESTDIR)/usr/bin |
1183 | + install crash crash2 $(DESTDIR)/usr/bin |
1184 | |
1185 | === added file 'tests/dhtest.archspecific/crash.c' |
1186 | --- tests/dhtest.archspecific/crash.c 1970-01-01 00:00:00 +0000 |
1187 | +++ tests/dhtest.archspecific/crash.c 2010-04-21 20:29:14 +0000 |
1188 | @@ -0,0 +1,34 @@ |
1189 | +/* crash.c - demo program for libcrashreport |
1190 | + |
1191 | + (c) 2004 Martin Pitt <martin@piware.de> |
1192 | + |
1193 | + This file is public domain. |
1194 | +*/ |
1195 | + |
1196 | +#include <stdio.h> |
1197 | + |
1198 | +void h(char* p) { |
1199 | + p[1] = 'a'; |
1200 | +} |
1201 | + |
1202 | +int g( int x, int y ) |
1203 | +{ |
1204 | + char* s = NULL; |
1205 | + h(s); |
1206 | + return x+y; |
1207 | +} |
1208 | + |
1209 | +int f( int x ) |
1210 | +{ |
1211 | + return g( x, 42 ); |
1212 | +} |
1213 | + |
1214 | +int |
1215 | +main() |
1216 | +{ |
1217 | + int x; |
1218 | + |
1219 | + x = f(1); |
1220 | + printf( "x = %i, terminating normally now.\n", x ); |
1221 | + return 0; |
1222 | +} |
1223 | |
1224 | === added file 'tests/dhtest.archspecific/crash2.c' |
1225 | --- tests/dhtest.archspecific/crash2.c 1970-01-01 00:00:00 +0000 |
1226 | +++ tests/dhtest.archspecific/crash2.c 2010-04-21 20:29:14 +0000 |
1227 | @@ -0,0 +1,39 @@ |
1228 | +/* crash.c - demo program for libcrashreport |
1229 | + |
1230 | + (c) 2004 Martin Pitt <martin@piware.de> |
1231 | + |
1232 | + This file is public domain. |
1233 | +*/ |
1234 | + |
1235 | +#include <stdio.h> |
1236 | +#include <math.h> |
1237 | +#include <signal.h> |
1238 | + |
1239 | +double h() |
1240 | +{ |
1241 | + double a = 1./0; |
1242 | + if (isinf(a)) |
1243 | + raise(SIGFPE); |
1244 | + return a; |
1245 | +} |
1246 | + |
1247 | +int g( int x, int y ) |
1248 | +{ |
1249 | + |
1250 | + return x+y+(int) h(); |
1251 | +} |
1252 | + |
1253 | +int f( int x ) |
1254 | +{ |
1255 | + return g( x, 42 ); |
1256 | +} |
1257 | + |
1258 | +int |
1259 | +main() |
1260 | +{ |
1261 | + int x; |
1262 | + |
1263 | + x = f(1); |
1264 | + printf( "x = %i, terminating normally now.\n", x ); |
1265 | + return 0; |
1266 | +} |
1267 | |
1268 | === added directory 'tests/dhtest.archspecific/debian' |
1269 | === added file 'tests/dhtest.archspecific/debian/changelog' |
1270 | --- tests/dhtest.archspecific/debian/changelog 1970-01-01 00:00:00 +0000 |
1271 | +++ tests/dhtest.archspecific/debian/changelog 2010-04-21 20:29:14 +0000 |
1272 | @@ -0,0 +1,5 @@ |
1273 | +dhtest.archspecific (1) foo; urgency=low |
1274 | + |
1275 | + * Initial release. |
1276 | + |
1277 | + -- Martin Pitt <martin.pitt@ubuntu.com> Tue, 15 Aug 2006 17:14:42 +0200 |
1278 | |
1279 | === added file 'tests/dhtest.archspecific/debian/compat' |
1280 | --- tests/dhtest.archspecific/debian/compat 1970-01-01 00:00:00 +0000 |
1281 | +++ tests/dhtest.archspecific/debian/compat 2010-04-21 20:29:14 +0000 |
1282 | @@ -0,0 +1,1 @@ |
1283 | +5 |
1284 | |
1285 | === added file 'tests/dhtest.archspecific/debian/control' |
1286 | --- tests/dhtest.archspecific/debian/control 1970-01-01 00:00:00 +0000 |
1287 | +++ tests/dhtest.archspecific/debian/control 2010-04-21 20:29:14 +0000 |
1288 | @@ -0,0 +1,31 @@ |
1289 | +Source: dhtest.archspecific |
1290 | +Section: utils |
1291 | +Priority: extra |
1292 | +Maintainer: Martin Pitt <martin.pitt@ubuntu.com> |
1293 | +Build-Depends: debhelper (>= 4.1.0) |
1294 | +Standards-Version: 3.7.2 |
1295 | + |
1296 | +Package: dhtest-i386 |
1297 | +Architecture: i386 |
1298 | +Depends: ${shlibs:Depends} |
1299 | +Description: crash with a SIGSEGV |
1300 | + Test package |
1301 | + |
1302 | +Package: dhtest64 |
1303 | +Architecture: amd64 sparc64 |
1304 | +Depends: ${shlibs:Depends} |
1305 | +Description: crash with a SIGFPE |
1306 | + Test package |
1307 | + |
1308 | +Package: dhtest-ppc |
1309 | +Architecture: powerpc |
1310 | +Depends: ${shlibs:Depends} |
1311 | +Description: crash with a SIGSEGV |
1312 | + Test package |
1313 | + |
1314 | +Package: dhtest-bsd |
1315 | +Architecture: kfreebsd-i386 kfreebsd-amd64 |
1316 | +Depends: ${shlibs:Depends} |
1317 | +Description: crash with a SIGSEGV |
1318 | + Test package |
1319 | + |
1320 | |
1321 | === added file 'tests/dhtest.archspecific/debian/copyright' |
1322 | --- tests/dhtest.archspecific/debian/copyright 1970-01-01 00:00:00 +0000 |
1323 | +++ tests/dhtest.archspecific/debian/copyright 2010-04-21 20:29:14 +0000 |
1324 | @@ -0,0 +1,1 @@ |
1325 | +foo |
1326 | |
1327 | === added file 'tests/dhtest.archspecific/debian/dhtest-i386.install' |
1328 | --- tests/dhtest.archspecific/debian/dhtest-i386.install 1970-01-01 00:00:00 +0000 |
1329 | +++ tests/dhtest.archspecific/debian/dhtest-i386.install 2010-04-21 20:29:14 +0000 |
1330 | @@ -0,0 +1,1 @@ |
1331 | +/usr/bin/crash |
1332 | |
1333 | === added file 'tests/dhtest.archspecific/debian/dhtest-ppc.install' |
1334 | --- tests/dhtest.archspecific/debian/dhtest-ppc.install 1970-01-01 00:00:00 +0000 |
1335 | +++ tests/dhtest.archspecific/debian/dhtest-ppc.install 2010-04-21 20:29:14 +0000 |
1336 | @@ -0,0 +1,1 @@ |
1337 | +/usr/bin/crash |
1338 | |
1339 | === added file 'tests/dhtest.archspecific/debian/dhtest64.install' |
1340 | --- tests/dhtest.archspecific/debian/dhtest64.install 1970-01-01 00:00:00 +0000 |
1341 | +++ tests/dhtest.archspecific/debian/dhtest64.install 2010-04-21 20:29:14 +0000 |
1342 | @@ -0,0 +1,1 @@ |
1343 | +/usr/bin/crash2 |
1344 | |
1345 | === added file 'tests/dhtest.archspecific/debian/rules' |
1346 | --- tests/dhtest.archspecific/debian/rules 1970-01-01 00:00:00 +0000 |
1347 | +++ tests/dhtest.archspecific/debian/rules 2010-04-21 20:29:14 +0000 |
1348 | @@ -0,0 +1,76 @@ |
1349 | +#!/usr/bin/make -f |
1350 | + |
1351 | +# Uncomment this to turn on verbose mode. |
1352 | +#export DH_VERBOSE=1 |
1353 | + |
1354 | +# This has to be exported to make some magic below work. |
1355 | +export DH_OPTIONS |
1356 | + |
1357 | +CFLAGS = -Wall -g |
1358 | + |
1359 | +ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS))) |
1360 | + CFLAGS += -O0 |
1361 | +else |
1362 | + CFLAGS += -O2 |
1363 | +endif |
1364 | + |
1365 | +#Architecture |
1366 | +build: build-arch build-indep |
1367 | + |
1368 | +build-arch: build-arch-stamp |
1369 | +build-arch-stamp: |
1370 | + $(MAKE) |
1371 | + touch build-arch-stamp |
1372 | + |
1373 | +build-indep: |
1374 | + |
1375 | +clean: |
1376 | + dh_testdir |
1377 | + dh_testroot |
1378 | + rm -f build-arch-stamp build-indep-stamp |
1379 | + -$(MAKE) clean |
1380 | + dh_clean |
1381 | + |
1382 | +install: install-indep install-arch |
1383 | +install-indep: |
1384 | + dh_testdir |
1385 | + dh_testroot |
1386 | + dh_clean -k -i |
1387 | + dh_installdirs -i |
1388 | + dh_install -i --sourcedir=debian/tmp |
1389 | + |
1390 | +install-arch: |
1391 | + dh_testdir |
1392 | + dh_testroot |
1393 | + dh_clean -k -s |
1394 | + dh_installdirs -s |
1395 | + $(MAKE) install DESTDIR=$(CURDIR)/debian/tmp |
1396 | + dh_install -s --sourcedir=debian/tmp |
1397 | + |
1398 | +# Must not depend on anything. This is to be called by |
1399 | +# binary-arch/binary-indep |
1400 | +# in another 'make' thread. |
1401 | +binary-common: |
1402 | + dh_testdir |
1403 | + dh_testroot |
1404 | + dh_installchangelogs |
1405 | + dh_installdocs |
1406 | + dh_strip |
1407 | + dh_compress |
1408 | + dh_fixperms |
1409 | + dh_installdeb |
1410 | + dh_shlibdeps |
1411 | + dh_gencontrol |
1412 | + dh_md5sums |
1413 | + dh_builddeb |
1414 | + |
1415 | +# Build architecture independant packages using the common target. |
1416 | +binary-indep: build-indep install-indep |
1417 | + $(MAKE) -f debian/rules DH_OPTIONS=-i binary-common |
1418 | + |
1419 | +# Build architecture dependant packages using the common target. |
1420 | +binary-arch: build-arch install-arch |
1421 | + $(MAKE) -f debian/rules DH_OPTIONS=-s binary-common |
1422 | + |
1423 | +binary: binary-arch binary-indep |
1424 | +.PHONY: build clean binary-indep binary-arch binary install install-indep install-arch |
1425 | |
1426 | === added directory 'tests/dhtest.compat1' |
1427 | === added file 'tests/dhtest.compat1/Makefile' |
1428 | --- tests/dhtest.compat1/Makefile 1970-01-01 00:00:00 +0000 |
1429 | +++ tests/dhtest.compat1/Makefile 2010-04-21 20:29:14 +0000 |
1430 | @@ -0,0 +1,18 @@ |
1431 | +CFLAGS= -g -Wall -W -O0 |
1432 | + |
1433 | +LIBNAME=crashrep |
1434 | + |
1435 | +all: crash crash2 |
1436 | + |
1437 | +crash: crash.o |
1438 | + $(CC) $^ -o $@ |
1439 | + |
1440 | +crash2: crash2.o |
1441 | + $(CC) $^ -o $@ |
1442 | + |
1443 | +clean: |
1444 | + rm -f *.o crash crash2 |
1445 | + |
1446 | +install: all |
1447 | + install -d $(DESTDIR)/usr/bin |
1448 | + install crash crash2 $(DESTDIR)/usr/bin |
1449 | |
1450 | === added file 'tests/dhtest.compat1/crash.c' |
1451 | --- tests/dhtest.compat1/crash.c 1970-01-01 00:00:00 +0000 |
1452 | +++ tests/dhtest.compat1/crash.c 2010-04-21 20:29:14 +0000 |
1453 | @@ -0,0 +1,34 @@ |
1454 | +/* crash.c - demo program for libcrashreport |
1455 | + |
1456 | + (c) 2004 Martin Pitt <martin@piware.de> |
1457 | + |
1458 | + This file is public domain. |
1459 | +*/ |
1460 | + |
1461 | +#include <stdio.h> |
1462 | + |
1463 | +void h(char* p) { |
1464 | + p[1] = 'a'; |
1465 | +} |
1466 | + |
1467 | +int g( int x, int y ) |
1468 | +{ |
1469 | + char* s = NULL; |
1470 | + h(s); |
1471 | + return x+y; |
1472 | +} |
1473 | + |
1474 | +int f( int x ) |
1475 | +{ |
1476 | + return g( x, 42 ); |
1477 | +} |
1478 | + |
1479 | +int |
1480 | +main() |
1481 | +{ |
1482 | + int x; |
1483 | + |
1484 | + x = f(1); |
1485 | + printf( "x = %i, terminating normally now.\n", x ); |
1486 | + return 0; |
1487 | +} |
1488 | |
1489 | === added file 'tests/dhtest.compat1/crash2.c' |
1490 | --- tests/dhtest.compat1/crash2.c 1970-01-01 00:00:00 +0000 |
1491 | +++ tests/dhtest.compat1/crash2.c 2010-04-21 20:29:14 +0000 |
1492 | @@ -0,0 +1,39 @@ |
1493 | +/* crash.c - demo program for libcrashreport |
1494 | + |
1495 | + (c) 2004 Martin Pitt <martin@piware.de> |
1496 | + |
1497 | + This file is public domain. |
1498 | +*/ |
1499 | + |
1500 | +#include <stdio.h> |
1501 | +#include <math.h> |
1502 | +#include <signal.h> |
1503 | + |
1504 | +double h() |
1505 | +{ |
1506 | + double a = 1./0; |
1507 | + if (isinf(a)) |
1508 | + raise(SIGFPE); |
1509 | + return a; |
1510 | +} |
1511 | + |
1512 | +int g( int x, int y ) |
1513 | +{ |
1514 | + |
1515 | + return x+y+(int) h(); |
1516 | +} |
1517 | + |
1518 | +int f( int x ) |
1519 | +{ |
1520 | + return g( x, 42 ); |
1521 | +} |
1522 | + |
1523 | +int |
1524 | +main() |
1525 | +{ |
1526 | + int x; |
1527 | + |
1528 | + x = f(1); |
1529 | + printf( "x = %i, terminating normally now.\n", x ); |
1530 | + return 0; |
1531 | +} |
1532 | |
1533 | === added directory 'tests/dhtest.compat1/debian' |
1534 | === added file 'tests/dhtest.compat1/debian/changelog' |
1535 | --- tests/dhtest.compat1/debian/changelog 1970-01-01 00:00:00 +0000 |
1536 | +++ tests/dhtest.compat1/debian/changelog 2010-04-21 20:29:14 +0000 |
1537 | @@ -0,0 +1,5 @@ |
1538 | +dhtest.compat1 (2:3.4) foo; urgency=low |
1539 | + |
1540 | + * Initial release. |
1541 | + |
1542 | + -- Martin Pitt <martin.pitt@ubuntu.com> Fri, 16 Jun 2006 10:49:56 +0200 |
1543 | |
1544 | === added file 'tests/dhtest.compat1/debian/control' |
1545 | --- tests/dhtest.compat1/debian/control 1970-01-01 00:00:00 +0000 |
1546 | +++ tests/dhtest.compat1/debian/control 2010-04-21 20:29:14 +0000 |
1547 | @@ -0,0 +1,25 @@ |
1548 | +Source: dhtest.compat1 |
1549 | +Section: utils |
1550 | +Priority: extra |
1551 | +Maintainer: Martin Pitt <martin.pitt@ubuntu.com> |
1552 | +Build-Depends: debhelper (>= 4.1.0) |
1553 | +Standards-Version: 3.7.2 |
1554 | + |
1555 | +Package: dhtest1 |
1556 | +Architecture: any |
1557 | +Depends: ${shlibs:Depends} |
1558 | +Description: crash with a SIGSEGV |
1559 | + Test package |
1560 | + |
1561 | +Package: dhtest2 |
1562 | +Architecture: any |
1563 | +Depends: ${shlibs:Depends} |
1564 | +Description: crash with a SIGFPE |
1565 | + Test package |
1566 | + |
1567 | +Package: dhtestall |
1568 | +Architecture: all |
1569 | +Depends: ${shlibs:Depends} |
1570 | +Description: dummy arch-all package |
1571 | + Test package |
1572 | + |
1573 | |
1574 | === added file 'tests/dhtest.compat1/debian/copyright' |
1575 | --- tests/dhtest.compat1/debian/copyright 1970-01-01 00:00:00 +0000 |
1576 | +++ tests/dhtest.compat1/debian/copyright 2010-04-21 20:29:14 +0000 |
1577 | @@ -0,0 +1,1 @@ |
1578 | +foo |
1579 | |
1580 | === added file 'tests/dhtest.compat1/debian/rules' |
1581 | --- tests/dhtest.compat1/debian/rules 1970-01-01 00:00:00 +0000 |
1582 | +++ tests/dhtest.compat1/debian/rules 2010-04-21 20:29:14 +0000 |
1583 | @@ -0,0 +1,75 @@ |
1584 | +#!/usr/bin/make -f |
1585 | + |
1586 | +# Uncomment this to turn on verbose mode. |
1587 | +#export DH_VERBOSE=1 |
1588 | + |
1589 | +# This has to be exported to make some magic below work. |
1590 | +export DH_OPTIONS |
1591 | + |
1592 | +CFLAGS = -Wall -g |
1593 | + |
1594 | +ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS))) |
1595 | + CFLAGS += -O0 |
1596 | +else |
1597 | + CFLAGS += -O2 |
1598 | +endif |
1599 | + |
1600 | +#Architecture |
1601 | +build: build-arch build-indep |
1602 | + |
1603 | +build-arch: build-arch-stamp |
1604 | +build-arch-stamp: |
1605 | + $(MAKE) |
1606 | + touch build-arch-stamp |
1607 | + |
1608 | +build-indep: |
1609 | + |
1610 | +clean: |
1611 | + dh_testdir |
1612 | + dh_testroot |
1613 | + rm -f build-arch-stamp build-indep-stamp |
1614 | + -$(MAKE) clean |
1615 | + dh_clean |
1616 | + |
1617 | +install: install-indep install-arch |
1618 | +install-indep: |
1619 | + dh_testdir |
1620 | + dh_testroot |
1621 | + dh_clean -k -i |
1622 | + dh_installdirs -i |
1623 | + |
1624 | +install-arch: |
1625 | + dh_testdir |
1626 | + dh_testroot |
1627 | + dh_clean -k -s |
1628 | + dh_installdirs -s |
1629 | + install -D -m 755 crash debian/tmp/usr/bin/crash |
1630 | + install -D -m 755 crash2 debian/dhtest2/usr/bin/crash2 |
1631 | + |
1632 | +# Must not depend on anything. This is to be called by |
1633 | +# binary-arch/binary-indep |
1634 | +# in another 'make' thread. |
1635 | +binary-common: |
1636 | + dh_testdir |
1637 | + dh_testroot |
1638 | + dh_installchangelogs |
1639 | + dh_installdocs |
1640 | + dh_strip |
1641 | + dh_compress |
1642 | + dh_fixperms |
1643 | + dh_installdeb |
1644 | + dh_shlibdeps |
1645 | + dh_gencontrol |
1646 | + dh_md5sums |
1647 | + dh_builddeb |
1648 | + |
1649 | +# Build architecture independant packages using the common target. |
1650 | +binary-indep: build-indep install-indep |
1651 | + $(MAKE) -f debian/rules DH_OPTIONS=-i binary-common |
1652 | + |
1653 | +# Build architecture dependant packages using the common target. |
1654 | +binary-arch: build-arch install-arch |
1655 | + $(MAKE) -f debian/rules DH_OPTIONS=-a binary-common |
1656 | + |
1657 | +binary: binary-arch binary-indep |
1658 | +.PHONY: build clean binary-indep binary-arch binary install install-indep install-arch |
1659 | |
1660 | === added directory 'tests/dhtest.compat1override' |
1661 | === added file 'tests/dhtest.compat1override/Makefile' |
1662 | --- tests/dhtest.compat1override/Makefile 1970-01-01 00:00:00 +0000 |
1663 | +++ tests/dhtest.compat1override/Makefile 2010-04-21 20:29:14 +0000 |
1664 | @@ -0,0 +1,18 @@ |
1665 | +CFLAGS= -g -Wall -W -O0 |
1666 | + |
1667 | +LIBNAME=crashrep |
1668 | + |
1669 | +all: crash crash2 |
1670 | + |
1671 | +crash: crash.o |
1672 | + $(CC) $^ -o $@ |
1673 | + |
1674 | +crash2: crash2.o |
1675 | + $(CC) $^ -o $@ |
1676 | + |
1677 | +clean: |
1678 | + rm -f *.o crash crash2 |
1679 | + |
1680 | +install: all |
1681 | + install -d $(DESTDIR)/usr/bin |
1682 | + install crash crash2 $(DESTDIR)/usr/bin |
1683 | |
1684 | === added file 'tests/dhtest.compat1override/crash.c' |
1685 | --- tests/dhtest.compat1override/crash.c 1970-01-01 00:00:00 +0000 |
1686 | +++ tests/dhtest.compat1override/crash.c 2010-04-21 20:29:14 +0000 |
1687 | @@ -0,0 +1,34 @@ |
1688 | +/* crash.c - demo program for libcrashreport |
1689 | + |
1690 | + (c) 2004 Martin Pitt <martin@piware.de> |
1691 | + |
1692 | + This file is public domain. |
1693 | +*/ |
1694 | + |
1695 | +#include <stdio.h> |
1696 | + |
1697 | +void h(char* p) { |
1698 | + p[1] = 'a'; |
1699 | +} |
1700 | + |
1701 | +int g( int x, int y ) |
1702 | +{ |
1703 | + char* s = NULL; |
1704 | + h(s); |
1705 | + return x+y; |
1706 | +} |
1707 | + |
1708 | +int f( int x ) |
1709 | +{ |
1710 | + return g( x, 42 ); |
1711 | +} |
1712 | + |
1713 | +int |
1714 | +main() |
1715 | +{ |
1716 | + int x; |
1717 | + |
1718 | + x = f(1); |
1719 | + printf( "x = %i, terminating normally now.\n", x ); |
1720 | + return 0; |
1721 | +} |
1722 | |
1723 | === added file 'tests/dhtest.compat1override/crash2.c' |
1724 | --- tests/dhtest.compat1override/crash2.c 1970-01-01 00:00:00 +0000 |
1725 | +++ tests/dhtest.compat1override/crash2.c 2010-04-21 20:29:14 +0000 |
1726 | @@ -0,0 +1,39 @@ |
1727 | +/* crash.c - demo program for libcrashreport |
1728 | + |
1729 | + (c) 2004 Martin Pitt <martin@piware.de> |
1730 | + |
1731 | + This file is public domain. |
1732 | +*/ |
1733 | + |
1734 | +#include <stdio.h> |
1735 | +#include <math.h> |
1736 | +#include <signal.h> |
1737 | + |
1738 | +double h() |
1739 | +{ |
1740 | + double a = 1./0; |
1741 | + if (isinf(a)) |
1742 | + raise(SIGFPE); |
1743 | + return a; |
1744 | +} |
1745 | + |
1746 | +int g( int x, int y ) |
1747 | +{ |
1748 | + |
1749 | + return x+y+(int) h(); |
1750 | +} |
1751 | + |
1752 | +int f( int x ) |
1753 | +{ |
1754 | + return g( x, 42 ); |
1755 | +} |
1756 | + |
1757 | +int |
1758 | +main() |
1759 | +{ |
1760 | + int x; |
1761 | + |
1762 | + x = f(1); |
1763 | + printf( "x = %i, terminating normally now.\n", x ); |
1764 | + return 0; |
1765 | +} |
1766 | |
1767 | === added directory 'tests/dhtest.compat1override/debian' |
1768 | === added file 'tests/dhtest.compat1override/debian/changelog' |
1769 | --- tests/dhtest.compat1override/debian/changelog 1970-01-01 00:00:00 +0000 |
1770 | +++ tests/dhtest.compat1override/debian/changelog 2010-04-21 20:29:14 +0000 |
1771 | @@ -0,0 +1,5 @@ |
1772 | +dhtest.compat1override (2:3.4) foo; urgency=low |
1773 | + |
1774 | + * Initial release. |
1775 | + |
1776 | + -- Martin Pitt <martin.pitt@ubuntu.com> Fri, 16 Jun 2006 10:49:56 +0200 |
1777 | |
1778 | === added file 'tests/dhtest.compat1override/debian/compat' |
1779 | --- tests/dhtest.compat1override/debian/compat 1970-01-01 00:00:00 +0000 |
1780 | +++ tests/dhtest.compat1override/debian/compat 2010-04-21 20:29:14 +0000 |
1781 | @@ -0,0 +1,1 @@ |
1782 | +4 |
1783 | |
1784 | === added file 'tests/dhtest.compat1override/debian/control' |
1785 | --- tests/dhtest.compat1override/debian/control 1970-01-01 00:00:00 +0000 |
1786 | +++ tests/dhtest.compat1override/debian/control 2010-04-21 20:29:14 +0000 |
1787 | @@ -0,0 +1,25 @@ |
1788 | +Source: dhtest.compat1override |
1789 | +Section: utils |
1790 | +Priority: extra |
1791 | +Maintainer: Martin Pitt <martin.pitt@ubuntu.com> |
1792 | +Build-Depends: debhelper (>= 4.1.0) |
1793 | +Standards-Version: 3.7.2 |
1794 | + |
1795 | +Package: dhtest1 |
1796 | +Architecture: any |
1797 | +Depends: ${shlibs:Depends} |
1798 | +Description: crash with a SIGSEGV |
1799 | + Test package |
1800 | + |
1801 | +Package: dhtest2 |
1802 | +Architecture: any |
1803 | +Depends: ${shlibs:Depends} |
1804 | +Description: crash with a SIGFPE |
1805 | + Test package |
1806 | + |
1807 | +Package: dhtestall |
1808 | +Architecture: all |
1809 | +Depends: ${shlibs:Depends} |
1810 | +Description: dummy arch-all package |
1811 | + Test package |
1812 | + |
1813 | |
1814 | === added file 'tests/dhtest.compat1override/debian/copyright' |
1815 | --- tests/dhtest.compat1override/debian/copyright 1970-01-01 00:00:00 +0000 |
1816 | +++ tests/dhtest.compat1override/debian/copyright 2010-04-21 20:29:14 +0000 |
1817 | @@ -0,0 +1,1 @@ |
1818 | +foo |
1819 | |
1820 | === added file 'tests/dhtest.compat1override/debian/rules' |
1821 | --- tests/dhtest.compat1override/debian/rules 1970-01-01 00:00:00 +0000 |
1822 | +++ tests/dhtest.compat1override/debian/rules 2010-04-21 20:29:14 +0000 |
1823 | @@ -0,0 +1,77 @@ |
1824 | +#!/usr/bin/make -f |
1825 | + |
1826 | +# Uncomment this to turn on verbose mode. |
1827 | +#export DH_VERBOSE=1 |
1828 | + |
1829 | +# This has to be exported to make some magic below work. |
1830 | +export DH_OPTIONS |
1831 | + |
1832 | +export DH_COMPAT=1 |
1833 | + |
1834 | +CFLAGS = -Wall -g |
1835 | + |
1836 | +ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS))) |
1837 | + CFLAGS += -O0 |
1838 | +else |
1839 | + CFLAGS += -O2 |
1840 | +endif |
1841 | + |
1842 | +#Architecture |
1843 | +build: build-arch build-indep |
1844 | + |
1845 | +build-arch: build-arch-stamp |
1846 | +build-arch-stamp: |
1847 | + $(MAKE) |
1848 | + touch build-arch-stamp |
1849 | + |
1850 | +build-indep: |
1851 | + |
1852 | +clean: |
1853 | + dh_testdir |
1854 | + dh_testroot |
1855 | + rm -f build-arch-stamp build-indep-stamp |
1856 | + -$(MAKE) clean |
1857 | + dh_clean |
1858 | + |
1859 | +install: install-indep install-arch |
1860 | +install-indep: |
1861 | + dh_testdir |
1862 | + dh_testroot |
1863 | + dh_clean -k -i |
1864 | + dh_installdirs -i |
1865 | + |
1866 | +install-arch: |
1867 | + dh_testdir |
1868 | + dh_testroot |
1869 | + dh_clean -k -s |
1870 | + dh_installdirs -s |
1871 | + install -D -m 755 crash debian/tmp/usr/bin/crash |
1872 | + install -D -m 755 crash2 debian/dhtest2/usr/bin/crash2 |
1873 | + |
1874 | +# Must not depend on anything. This is to be called by |
1875 | +# binary-arch/binary-indep |
1876 | +# in another 'make' thread. |
1877 | +binary-common: |
1878 | + dh_testdir |
1879 | + dh_testroot |
1880 | + dh_installchangelogs |
1881 | + dh_installdocs |
1882 | + dh_strip |
1883 | + dh_compress |
1884 | + dh_fixperms |
1885 | + dh_installdeb |
1886 | + dh_shlibdeps |
1887 | + dh_gencontrol |
1888 | + dh_md5sums |
1889 | + dh_builddeb |
1890 | + |
1891 | +# Build architecture independant packages using the common target. |
1892 | +binary-indep: build-indep install-indep |
1893 | + $(MAKE) -f debian/rules DH_OPTIONS=-i binary-common |
1894 | + |
1895 | +# Build architecture dependant packages using the common target. |
1896 | +binary-arch: build-arch install-arch |
1897 | + $(MAKE) -f debian/rules DH_OPTIONS=-a binary-common |
1898 | + |
1899 | +binary: binary-arch binary-indep |
1900 | +.PHONY: build clean binary-indep binary-arch binary install install-indep install-arch |
1901 | |
1902 | === added directory 'tests/dhtest.compatenvvar' |
1903 | === added file 'tests/dhtest.compatenvvar/Makefile' |
1904 | --- tests/dhtest.compatenvvar/Makefile 1970-01-01 00:00:00 +0000 |
1905 | +++ tests/dhtest.compatenvvar/Makefile 2010-04-21 20:29:14 +0000 |
1906 | @@ -0,0 +1,18 @@ |
1907 | +CFLAGS= -g -Wall -W -O0 |
1908 | + |
1909 | +LIBNAME=crashrep |
1910 | + |
1911 | +all: crash crash2 |
1912 | + |
1913 | +crash: crash.o |
1914 | + $(CC) $^ -o $@ |
1915 | + |
1916 | +crash2: crash2.o |
1917 | + $(CC) $^ -o $@ |
1918 | + |
1919 | +clean: |
1920 | + rm -f *.o crash crash2 |
1921 | + |
1922 | +install: all |
1923 | + install -d $(DESTDIR)/usr/bin |
1924 | + install crash crash2 $(DESTDIR)/usr/bin |
1925 | |
1926 | === added file 'tests/dhtest.compatenvvar/crash.c' |
1927 | --- tests/dhtest.compatenvvar/crash.c 1970-01-01 00:00:00 +0000 |
1928 | +++ tests/dhtest.compatenvvar/crash.c 2010-04-21 20:29:14 +0000 |
1929 | @@ -0,0 +1,34 @@ |
1930 | +/* crash.c - demo program for libcrashreport |
1931 | + |
1932 | + (c) 2004 Martin Pitt <martin@piware.de> |
1933 | + |
1934 | + This file is public domain. |
1935 | +*/ |
1936 | + |
1937 | +#include <stdio.h> |
1938 | + |
1939 | +void h(char* p) { |
1940 | + p[1] = 'a'; |
1941 | +} |
1942 | + |
1943 | +int g( int x, int y ) |
1944 | +{ |
1945 | + char* s = NULL; |
1946 | + h(s); |
1947 | + return x+y; |
1948 | +} |
1949 | + |
1950 | +int f( int x ) |
1951 | +{ |
1952 | + return g( x, 42 ); |
1953 | +} |
1954 | + |
1955 | +int |
1956 | +main() |
1957 | +{ |
1958 | + int x; |
1959 | + |
1960 | + x = f(1); |
1961 | + printf( "x = %i, terminating normally now.\n", x ); |
1962 | + return 0; |
1963 | +} |
1964 | |
1965 | === added file 'tests/dhtest.compatenvvar/crash2.c' |
1966 | --- tests/dhtest.compatenvvar/crash2.c 1970-01-01 00:00:00 +0000 |
1967 | +++ tests/dhtest.compatenvvar/crash2.c 2010-04-21 20:29:14 +0000 |
1968 | @@ -0,0 +1,39 @@ |
1969 | +/* crash.c - demo program for libcrashreport |
1970 | + |
1971 | + (c) 2004 Martin Pitt <martin@piware.de> |
1972 | + |
1973 | + This file is public domain. |
1974 | +*/ |
1975 | + |
1976 | +#include <stdio.h> |
1977 | +#include <math.h> |
1978 | +#include <signal.h> |
1979 | + |
1980 | +double h() |
1981 | +{ |
1982 | + double a = 1./0; |
1983 | + if (isinf(a)) |
1984 | + raise(SIGFPE); |
1985 | + return a; |
1986 | +} |
1987 | + |
1988 | +int g( int x, int y ) |
1989 | +{ |
1990 | + |
1991 | + return x+y+(int) h(); |
1992 | +} |
1993 | + |
1994 | +int f( int x ) |
1995 | +{ |
1996 | + return g( x, 42 ); |
1997 | +} |
1998 | + |
1999 | +int |
2000 | +main() |
2001 | +{ |
2002 | + int x; |
2003 | + |
2004 | + x = f(1); |
2005 | + printf( "x = %i, terminating normally now.\n", x ); |
2006 | + return 0; |
2007 | +} |
2008 | |
2009 | === added directory 'tests/dhtest.compatenvvar/debian' |
2010 | === added file 'tests/dhtest.compatenvvar/debian/changelog' |
2011 | --- tests/dhtest.compatenvvar/debian/changelog 1970-01-01 00:00:00 +0000 |
2012 | +++ tests/dhtest.compatenvvar/debian/changelog 2010-04-21 20:29:14 +0000 |
2013 | @@ -0,0 +1,5 @@ |
2014 | +dhtest.compatenvvar (1:2.3-1) foo; urgency=low |
2015 | + |
2016 | + * Initial release. |
2017 | + |
2018 | + -- Martin Pitt <martin.pitt@ubuntu.com> Fri, 16 Jun 2006 10:49:56 +0200 |
2019 | |
2020 | === added file 'tests/dhtest.compatenvvar/debian/control' |
2021 | --- tests/dhtest.compatenvvar/debian/control 1970-01-01 00:00:00 +0000 |
2022 | +++ tests/dhtest.compatenvvar/debian/control 2010-04-21 20:29:14 +0000 |
2023 | @@ -0,0 +1,13 @@ |
2024 | +Source: dhtest.compatenvvar |
2025 | +Section: utils |
2026 | +Priority: extra |
2027 | +Maintainer: Martin Pitt <martin.pitt@ubuntu.com> |
2028 | +Build-Depends: debhelper (>= 4.1.0) |
2029 | +Standards-Version: 3.7.2 |
2030 | + |
2031 | +Package: dhtest1 |
2032 | +Architecture: any |
2033 | +Depends: ${shlibs:Depends} |
2034 | +Description: crash with a SIGSEGV |
2035 | + Test package |
2036 | + |
2037 | |
2038 | === added file 'tests/dhtest.compatenvvar/debian/copyright' |
2039 | --- tests/dhtest.compatenvvar/debian/copyright 1970-01-01 00:00:00 +0000 |
2040 | +++ tests/dhtest.compatenvvar/debian/copyright 2010-04-21 20:29:14 +0000 |
2041 | @@ -0,0 +1,1 @@ |
2042 | +foo |
2043 | |
2044 | === added file 'tests/dhtest.compatenvvar/debian/rules' |
2045 | --- tests/dhtest.compatenvvar/debian/rules 1970-01-01 00:00:00 +0000 |
2046 | +++ tests/dhtest.compatenvvar/debian/rules 2010-04-21 20:29:14 +0000 |
2047 | @@ -0,0 +1,64 @@ |
2048 | +#!/usr/bin/make -f |
2049 | + |
2050 | +# Uncomment this to turn on verbose mode. |
2051 | +#export DH_VERBOSE=1 |
2052 | + |
2053 | +export DH_COMPAT=3 |
2054 | + |
2055 | +# This has to be exported to make some magic below work. |
2056 | +export DH_OPTIONS |
2057 | + |
2058 | +CFLAGS = -Wall -g |
2059 | + |
2060 | +ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS))) |
2061 | + CFLAGS += -O0 |
2062 | +else |
2063 | + CFLAGS += -O2 |
2064 | +endif |
2065 | + |
2066 | +#Architecture |
2067 | +build: build-arch build-indep |
2068 | + |
2069 | +build-arch: build-arch-stamp |
2070 | +build-arch-stamp: |
2071 | + $(MAKE) |
2072 | + touch build-arch-stamp |
2073 | + |
2074 | +build-indep: |
2075 | + |
2076 | +clean: |
2077 | + dh_testdir |
2078 | + dh_testroot |
2079 | + rm -f build-arch-stamp build-indep-stamp |
2080 | + -$(MAKE) clean |
2081 | + dh_clean |
2082 | + |
2083 | +install: install-arch |
2084 | + |
2085 | +install-arch: |
2086 | + dh_testdir |
2087 | + dh_testroot |
2088 | + dh_clean -k -s |
2089 | + dh_installdirs -s |
2090 | + $(MAKE) install DESTDIR=$(CURDIR)/debian/dhtest1 |
2091 | + |
2092 | + # install hardlink |
2093 | + ln debian/dhtest1/usr/bin/crash debian/dhtest1/usr/bin/crashl |
2094 | + |
2095 | +# Build architecture dependant packages using the common target. |
2096 | +binary-arch: build-arch install-arch |
2097 | + dh_testdir |
2098 | + dh_testroot |
2099 | + dh_installchangelogs |
2100 | + dh_installdocs |
2101 | + dh_strip |
2102 | + dh_compress |
2103 | + dh_fixperms |
2104 | + dh_installdeb |
2105 | + dh_shlibdeps |
2106 | + dh_gencontrol |
2107 | + dh_md5sums |
2108 | + dh_builddeb |
2109 | + |
2110 | +binary: binary-arch binary-indep |
2111 | +.PHONY: build clean binary-indep binary-arch binary install install-indep install-arch |
2112 | |
2113 | === added directory 'tests/dhtest.dbg' |
2114 | === added file 'tests/dhtest.dbg/Makefile' |
2115 | --- tests/dhtest.dbg/Makefile 1970-01-01 00:00:00 +0000 |
2116 | +++ tests/dhtest.dbg/Makefile 2010-04-21 20:29:14 +0000 |
2117 | @@ -0,0 +1,18 @@ |
2118 | +CFLAGS= -g -Wall -W -O0 |
2119 | + |
2120 | +LIBNAME=crashrep |
2121 | + |
2122 | +all: crash crash2 |
2123 | + |
2124 | +crash: crash.o |
2125 | + $(CC) $^ -o $@ |
2126 | + |
2127 | +crash2: crash2.o |
2128 | + $(CC) $^ -o $@ |
2129 | + |
2130 | +clean: |
2131 | + rm -f *.o crash crash2 |
2132 | + |
2133 | +install: all |
2134 | + install -d $(DESTDIR)/usr/bin |
2135 | + install crash crash2 $(DESTDIR)/usr/bin |
2136 | |
2137 | === added file 'tests/dhtest.dbg/crash.c' |
2138 | --- tests/dhtest.dbg/crash.c 1970-01-01 00:00:00 +0000 |
2139 | +++ tests/dhtest.dbg/crash.c 2010-04-21 20:29:14 +0000 |
2140 | @@ -0,0 +1,34 @@ |
2141 | +/* crash.c - demo program for libcrashreport |
2142 | + |
2143 | + (c) 2004 Martin Pitt <martin@piware.de> |
2144 | + |
2145 | + This file is public domain. |
2146 | +*/ |
2147 | + |
2148 | +#include <stdio.h> |
2149 | + |
2150 | +void h(char* p) { |
2151 | + p[1] = 'a'; |
2152 | +} |
2153 | + |
2154 | +int g( int x, int y ) |
2155 | +{ |
2156 | + char* s = NULL; |
2157 | + h(s); |
2158 | + return x+y; |
2159 | +} |
2160 | + |
2161 | +int f( int x ) |
2162 | +{ |
2163 | + return g( x, 42 ); |
2164 | +} |
2165 | + |
2166 | +int |
2167 | +main() |
2168 | +{ |
2169 | + int x; |
2170 | + |
2171 | + x = f(1); |
2172 | + printf( "x = %i, terminating normally now.\n", x ); |
2173 | + return 0; |
2174 | +} |
2175 | |
2176 | === added file 'tests/dhtest.dbg/crash2.c' |
2177 | --- tests/dhtest.dbg/crash2.c 1970-01-01 00:00:00 +0000 |
2178 | +++ tests/dhtest.dbg/crash2.c 2010-04-21 20:29:14 +0000 |
2179 | @@ -0,0 +1,39 @@ |
2180 | +/* crash.c - demo program for libcrashreport |
2181 | + |
2182 | + (c) 2004 Martin Pitt <martin@piware.de> |
2183 | + |
2184 | + This file is public domain. |
2185 | +*/ |
2186 | + |
2187 | +#include <stdio.h> |
2188 | +#include <math.h> |
2189 | +#include <signal.h> |
2190 | + |
2191 | +double h() |
2192 | +{ |
2193 | + double a = 1./0; |
2194 | + if (isinf(a)) |
2195 | + raise(SIGFPE); |
2196 | + return a; |
2197 | +} |
2198 | + |
2199 | +int g( int x, int y ) |
2200 | +{ |
2201 | + |
2202 | + return x+y+(int) h(); |
2203 | +} |
2204 | + |
2205 | +int f( int x ) |
2206 | +{ |
2207 | + return g( x, 42 ); |
2208 | +} |
2209 | + |
2210 | +int |
2211 | +main() |
2212 | +{ |
2213 | + int x; |
2214 | + |
2215 | + x = f(1); |
2216 | + printf( "x = %i, terminating normally now.\n", x ); |
2217 | + return 0; |
2218 | +} |
2219 | |
2220 | === added directory 'tests/dhtest.dbg/debian' |
2221 | === added file 'tests/dhtest.dbg/debian/changelog' |
2222 | --- tests/dhtest.dbg/debian/changelog 1970-01-01 00:00:00 +0000 |
2223 | +++ tests/dhtest.dbg/debian/changelog 2010-04-21 20:29:14 +0000 |
2224 | @@ -0,0 +1,5 @@ |
2225 | +dhtest.dbg (2) foo; urgency=low |
2226 | + |
2227 | + * Initial release. |
2228 | + |
2229 | + -- Martin Pitt <martin.pitt@ubuntu.com> Fri, 16 Jun 2006 10:49:56 +0200 |
2230 | |
2231 | === added file 'tests/dhtest.dbg/debian/compat' |
2232 | --- tests/dhtest.dbg/debian/compat 1970-01-01 00:00:00 +0000 |
2233 | +++ tests/dhtest.dbg/debian/compat 2010-04-21 20:29:14 +0000 |
2234 | @@ -0,0 +1,1 @@ |
2235 | +5 |
2236 | |
2237 | === added file 'tests/dhtest.dbg/debian/control' |
2238 | --- tests/dhtest.dbg/debian/control 1970-01-01 00:00:00 +0000 |
2239 | +++ tests/dhtest.dbg/debian/control 2010-04-21 20:29:14 +0000 |
2240 | @@ -0,0 +1,31 @@ |
2241 | +Source: dhtest.dbg |
2242 | +Section: utils |
2243 | +Priority: extra |
2244 | +Maintainer: Martin Pitt <martin.pitt@ubuntu.com> |
2245 | +Build-Depends: debhelper (>= 4.1.0) |
2246 | +Standards-Version: 3.7.2 |
2247 | + |
2248 | +Package: dhtest1 |
2249 | +Architecture: any |
2250 | +Depends: ${shlibs:Depends} |
2251 | +Description: crash with a SIGSEGV |
2252 | + Test package |
2253 | + |
2254 | +Package: dhtest1-dbg |
2255 | +Architecture: any |
2256 | +Depends: dhtest1 (= ${Source-Version}) |
2257 | +Description: crash with a SIGSEGV (debug symbols) |
2258 | + Test package (debug symbols) |
2259 | + |
2260 | +Package: dhtest2 |
2261 | +Architecture: any |
2262 | +Depends: ${shlibs:Depends} |
2263 | +Description: crash with a SIGFPE |
2264 | + Test package |
2265 | + |
2266 | +Package: dhtestall |
2267 | +Architecture: all |
2268 | +Depends: ${shlibs:Depends} |
2269 | +Description: dummy arch-all package |
2270 | + Test package |
2271 | + |
2272 | |
2273 | === added file 'tests/dhtest.dbg/debian/copyright' |
2274 | --- tests/dhtest.dbg/debian/copyright 1970-01-01 00:00:00 +0000 |
2275 | +++ tests/dhtest.dbg/debian/copyright 2010-04-21 20:29:14 +0000 |
2276 | @@ -0,0 +1,1 @@ |
2277 | +foo |
2278 | |
2279 | === added file 'tests/dhtest.dbg/debian/dhtest1.install' |
2280 | --- tests/dhtest.dbg/debian/dhtest1.install 1970-01-01 00:00:00 +0000 |
2281 | +++ tests/dhtest.dbg/debian/dhtest1.install 2010-04-21 20:29:14 +0000 |
2282 | @@ -0,0 +1,1 @@ |
2283 | +/usr/bin/crash |
2284 | |
2285 | === added file 'tests/dhtest.dbg/debian/dhtest2.install' |
2286 | --- tests/dhtest.dbg/debian/dhtest2.install 1970-01-01 00:00:00 +0000 |
2287 | +++ tests/dhtest.dbg/debian/dhtest2.install 2010-04-21 20:29:14 +0000 |
2288 | @@ -0,0 +1,1 @@ |
2289 | +/usr/bin/crash2 |
2290 | |
2291 | === added file 'tests/dhtest.dbg/debian/rules' |
2292 | --- tests/dhtest.dbg/debian/rules 1970-01-01 00:00:00 +0000 |
2293 | +++ tests/dhtest.dbg/debian/rules 2010-04-21 20:29:14 +0000 |
2294 | @@ -0,0 +1,87 @@ |
2295 | +#!/usr/bin/make -f |
2296 | + |
2297 | +# Uncomment this to turn on verbose mode. |
2298 | +#export DH_VERBOSE=1 |
2299 | + |
2300 | +# This has to be exported to make some magic below work. |
2301 | +export DH_OPTIONS |
2302 | + |
2303 | +CFLAGS = -Wall -g |
2304 | + |
2305 | +ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS))) |
2306 | + CFLAGS += -O0 |
2307 | +else |
2308 | + CFLAGS += -O2 |
2309 | +endif |
2310 | + |
2311 | +#Architecture |
2312 | +build: build-arch build-indep |
2313 | + |
2314 | +build-arch: build-arch-stamp |
2315 | +build-arch-stamp: |
2316 | + $(MAKE) |
2317 | + touch build-arch-stamp |
2318 | + |
2319 | +build-indep: |
2320 | + |
2321 | +clean: |
2322 | + dh_testdir |
2323 | + dh_testroot |
2324 | + rm -f build-arch-stamp build-indep-stamp |
2325 | + -$(MAKE) clean |
2326 | + dh_clean |
2327 | + |
2328 | +install: install-indep install-arch |
2329 | +install-indep: |
2330 | + dh_testdir |
2331 | + dh_testroot |
2332 | + dh_clean -k -i |
2333 | + dh_installdirs -i |
2334 | + dh_install -i --sourcedir=debian/tmp |
2335 | + |
2336 | +install-arch: |
2337 | + dh_testdir |
2338 | + dh_testroot |
2339 | + dh_clean -k -s |
2340 | + dh_installdirs -s |
2341 | + $(MAKE) install DESTDIR=$(CURDIR)/debian/tmp |
2342 | + dh_install -s --sourcedir=debian/tmp |
2343 | + |
2344 | +# Must not depend on anything. This is to be called by |
2345 | +# binary-arch/binary-indep |
2346 | +# in another 'make' thread. |
2347 | +binary-common: |
2348 | + |
2349 | +# Build architecture independant packages using the common target. |
2350 | +binary-indep: build-indep install-indep |
2351 | + dh_testdir -i |
2352 | + dh_testroot -i |
2353 | + dh_installchangelogs -i |
2354 | + dh_installdocs -i |
2355 | + dh_strip -i |
2356 | + dh_compress -i |
2357 | + dh_fixperms -i |
2358 | + dh_installdeb -i |
2359 | + dh_shlibdeps -i |
2360 | + dh_gencontrol -i |
2361 | + dh_md5sums -i |
2362 | + dh_builddeb -i |
2363 | + |
2364 | +# Build architecture dependant packages using the common target. |
2365 | +binary-arch: build-arch install-arch |
2366 | + dh_testdir -a |
2367 | + dh_testroot -a |
2368 | + dh_installchangelogs -a |
2369 | + dh_installdocs -a |
2370 | + dh_strip -Ndhtest1 -a |
2371 | + dh_strip -pdhtest1 --dbg-package=dhtest1-dbg |
2372 | + dh_compress -a |
2373 | + dh_fixperms -a |
2374 | + dh_installdeb -a |
2375 | + dh_shlibdeps -a |
2376 | + dh_gencontrol -a |
2377 | + dh_md5sums -a |
2378 | + dh_builddeb -a |
2379 | + |
2380 | +binary: binary-arch binary-indep |
2381 | +.PHONY: build clean binary-indep binary-arch binary install install-indep install-arch |
2382 | |
2383 | === added directory 'tests/dhtest.dbg2' |
2384 | === added file 'tests/dhtest.dbg2/Makefile' |
2385 | --- tests/dhtest.dbg2/Makefile 1970-01-01 00:00:00 +0000 |
2386 | +++ tests/dhtest.dbg2/Makefile 2010-04-21 20:29:14 +0000 |
2387 | @@ -0,0 +1,18 @@ |
2388 | +CFLAGS= -g -Wall -W -O0 |
2389 | + |
2390 | +LIBNAME=crashrep |
2391 | + |
2392 | +all: crash crash2 |
2393 | + |
2394 | +crash: crash.o |
2395 | + $(CC) $^ -o $@ |
2396 | + |
2397 | +crash2: crash2.o |
2398 | + $(CC) $^ -o $@ |
2399 | + |
2400 | +clean: |
2401 | + rm -f *.o crash crash2 |
2402 | + |
2403 | +install: all |
2404 | + install -d $(DESTDIR)/usr/bin |
2405 | + install crash crash2 $(DESTDIR)/usr/bin |
2406 | |
2407 | === added file 'tests/dhtest.dbg2/crash.c' |
2408 | --- tests/dhtest.dbg2/crash.c 1970-01-01 00:00:00 +0000 |
2409 | +++ tests/dhtest.dbg2/crash.c 2010-04-21 20:29:14 +0000 |
2410 | @@ -0,0 +1,34 @@ |
2411 | +/* crash.c - demo program for libcrashreport |
2412 | + |
2413 | + (c) 2004 Martin Pitt <martin@piware.de> |
2414 | + |
2415 | + This file is public domain. |
2416 | +*/ |
2417 | + |
2418 | +#include <stdio.h> |
2419 | + |
2420 | +void h(char* p) { |
2421 | + p[1] = 'a'; |
2422 | +} |
2423 | + |
2424 | +int g( int x, int y ) |
2425 | +{ |
2426 | + char* s = NULL; |
2427 | + h(s); |
2428 | + return x+y; |
2429 | +} |
2430 | + |
2431 | +int f( int x ) |
2432 | +{ |
2433 | + return g( x, 42 ); |
2434 | +} |
2435 | + |
2436 | +int |
2437 | +main() |
2438 | +{ |
2439 | + int x; |
2440 | + |
2441 | + x = f(1); |
2442 | + printf( "x = %i, terminating normally now.\n", x ); |
2443 | + return 0; |
2444 | +} |
2445 | |
2446 | === added file 'tests/dhtest.dbg2/crash2.c' |
2447 | --- tests/dhtest.dbg2/crash2.c 1970-01-01 00:00:00 +0000 |
2448 | +++ tests/dhtest.dbg2/crash2.c 2010-04-21 20:29:14 +0000 |
2449 | @@ -0,0 +1,39 @@ |
2450 | +/* crash.c - demo program for libcrashreport |
2451 | + |
2452 | + (c) 2004 Martin Pitt <martin@piware.de> |
2453 | + |
2454 | + This file is public domain. |
2455 | +*/ |
2456 | + |
2457 | +#include <stdio.h> |
2458 | +#include <math.h> |
2459 | +#include <signal.h> |
2460 | + |
2461 | +double h() |
2462 | +{ |
2463 | + double a = 1./0; |
2464 | + if (isinf(a)) |
2465 | + raise(SIGFPE); |
2466 | + return a; |
2467 | +} |
2468 | + |
2469 | +int g( int x, int y ) |
2470 | +{ |
2471 | + |
2472 | + return x+y+(int) h(); |
2473 | +} |
2474 | + |
2475 | +int f( int x ) |
2476 | +{ |
2477 | + return g( x, 42 ); |
2478 | +} |
2479 | + |
2480 | +int |
2481 | +main() |
2482 | +{ |
2483 | + int x; |
2484 | + |
2485 | + x = f(1); |
2486 | + printf( "x = %i, terminating normally now.\n", x ); |
2487 | + return 0; |
2488 | +} |
2489 | |
2490 | === added directory 'tests/dhtest.dbg2/debian' |
2491 | === added file 'tests/dhtest.dbg2/debian/changelog' |
2492 | --- tests/dhtest.dbg2/debian/changelog 1970-01-01 00:00:00 +0000 |
2493 | +++ tests/dhtest.dbg2/debian/changelog 2010-04-21 20:29:14 +0000 |
2494 | @@ -0,0 +1,5 @@ |
2495 | +dhtest.dbg2 (2) foo; urgency=low |
2496 | + |
2497 | + * Initial release. |
2498 | + |
2499 | + -- Martin Pitt <martin.pitt@ubuntu.com> Fri, 16 Jun 2006 10:49:56 +0200 |
2500 | |
2501 | === added file 'tests/dhtest.dbg2/debian/compat' |
2502 | --- tests/dhtest.dbg2/debian/compat 1970-01-01 00:00:00 +0000 |
2503 | +++ tests/dhtest.dbg2/debian/compat 2010-04-21 20:29:14 +0000 |
2504 | @@ -0,0 +1,1 @@ |
2505 | +5 |
2506 | |
2507 | === added file 'tests/dhtest.dbg2/debian/control' |
2508 | --- tests/dhtest.dbg2/debian/control 1970-01-01 00:00:00 +0000 |
2509 | +++ tests/dhtest.dbg2/debian/control 2010-04-21 20:29:14 +0000 |
2510 | @@ -0,0 +1,37 @@ |
2511 | +Source: dhtest.dbg2 |
2512 | +Section: utils |
2513 | +Priority: extra |
2514 | +Maintainer: Martin Pitt <martin.pitt@ubuntu.com> |
2515 | +Build-Depends: debhelper (>= 4.1.0) |
2516 | +Standards-Version: 3.7.2 |
2517 | + |
2518 | +Package: dhtest1 |
2519 | +Architecture: any |
2520 | +Depends: ${shlibs:Depends} |
2521 | +Description: crash with a SIGSEGV |
2522 | + Test package |
2523 | + |
2524 | +Package: dhtest1-dbg |
2525 | +Architecture: any |
2526 | +Depends: dhtest1 (= ${Source-Version}) |
2527 | +Description: crash with a SIGSEGV (debug symbols) |
2528 | + Test package (debug symbols) |
2529 | + |
2530 | +Package: dhtest2 |
2531 | +Architecture: any |
2532 | +Depends: ${shlibs:Depends} |
2533 | +Description: crash with a SIGFPE |
2534 | + Test package |
2535 | + |
2536 | +Package: dhtest2-extra |
2537 | +Architecture: any |
2538 | +Depends: ${shlibs:Depends} |
2539 | +Description: crash with a SIGSEGV -- extra stuff |
2540 | + Test package |
2541 | + |
2542 | +Package: dhtestall |
2543 | +Architecture: all |
2544 | +Depends: ${shlibs:Depends} |
2545 | +Description: dummy arch-all package |
2546 | + Test package |
2547 | + |
2548 | |
2549 | === added file 'tests/dhtest.dbg2/debian/copyright' |
2550 | --- tests/dhtest.dbg2/debian/copyright 1970-01-01 00:00:00 +0000 |
2551 | +++ tests/dhtest.dbg2/debian/copyright 2010-04-21 20:29:14 +0000 |
2552 | @@ -0,0 +1,1 @@ |
2553 | +foo |
2554 | |
2555 | === added file 'tests/dhtest.dbg2/debian/dhtest1.install' |
2556 | --- tests/dhtest.dbg2/debian/dhtest1.install 1970-01-01 00:00:00 +0000 |
2557 | +++ tests/dhtest.dbg2/debian/dhtest1.install 2010-04-21 20:29:14 +0000 |
2558 | @@ -0,0 +1,1 @@ |
2559 | +/usr/bin/crash |
2560 | |
2561 | === added file 'tests/dhtest.dbg2/debian/dhtest2.install' |
2562 | --- tests/dhtest.dbg2/debian/dhtest2.install 1970-01-01 00:00:00 +0000 |
2563 | +++ tests/dhtest.dbg2/debian/dhtest2.install 2010-04-21 20:29:14 +0000 |
2564 | @@ -0,0 +1,1 @@ |
2565 | +/usr/bin/crash2 |
2566 | |
2567 | === added file 'tests/dhtest.dbg2/debian/rules' |
2568 | --- tests/dhtest.dbg2/debian/rules 1970-01-01 00:00:00 +0000 |
2569 | +++ tests/dhtest.dbg2/debian/rules 2010-04-21 20:29:14 +0000 |
2570 | @@ -0,0 +1,89 @@ |
2571 | +#!/usr/bin/make -f |
2572 | + |
2573 | +# Uncomment this to turn on verbose mode. |
2574 | +#export DH_VERBOSE=1 |
2575 | + |
2576 | +# This has to be exported to make some magic below work. |
2577 | +export DH_OPTIONS |
2578 | + |
2579 | +CFLAGS = -Wall -g |
2580 | + |
2581 | +ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS))) |
2582 | + CFLAGS += -O0 |
2583 | +else |
2584 | + CFLAGS += -O2 |
2585 | +endif |
2586 | + |
2587 | +#Architecture |
2588 | +build: build-arch build-indep |
2589 | + |
2590 | +build-arch: build-arch-stamp |
2591 | +build-arch-stamp: |
2592 | + $(MAKE) |
2593 | + touch build-arch-stamp |
2594 | + |
2595 | +build-indep: |
2596 | + |
2597 | +clean: |
2598 | + dh_testdir |
2599 | + dh_testroot |
2600 | + rm -f build-arch-stamp build-indep-stamp |
2601 | + -$(MAKE) clean |
2602 | + dh_clean |
2603 | + |
2604 | +install: install-indep install-arch |
2605 | +install-indep: |
2606 | + dh_testdir |
2607 | + dh_testroot |
2608 | + dh_clean -k -i |
2609 | + dh_installdirs -i |
2610 | + dh_install -i --sourcedir=debian/tmp |
2611 | + |
2612 | +install-arch: |
2613 | + dh_testdir |
2614 | + dh_testroot |
2615 | + dh_clean -k -s |
2616 | + dh_installdirs -s |
2617 | + $(MAKE) install DESTDIR=$(CURDIR)/debian/tmp |
2618 | + dh_install -s --sourcedir=debian/tmp |
2619 | + |
2620 | +# Must not depend on anything. This is to be called by |
2621 | +# binary-arch/binary-indep |
2622 | +# in another 'make' thread. |
2623 | +binary-common: |
2624 | + |
2625 | +# Build architecture independant packages using the common target. |
2626 | +binary-indep: build-indep install-indep |
2627 | + dh_testdir -i |
2628 | + dh_testroot -i |
2629 | + dh_installchangelogs -i |
2630 | + dh_installdocs -i |
2631 | + dh_strip -i |
2632 | + dh_compress -i |
2633 | + dh_fixperms -i |
2634 | + dh_installdeb -i |
2635 | + dh_shlibdeps -i |
2636 | + dh_gencontrol -i |
2637 | + dh_md5sums -i |
2638 | + dh_builddeb -i |
2639 | + |
2640 | +# Build architecture dependant packages using the common target. |
2641 | +binary-arch: build-arch install-arch |
2642 | + dh_testdir -a |
2643 | + dh_testroot -a |
2644 | + dh_installchangelogs -a |
2645 | + dh_installdocs -a |
2646 | + dh_strip -Ndhtest1 -Ndhtest2-extra -a |
2647 | + dh_strip -pdhtest1 --keep-debug |
2648 | + install -d debian/dhtest1-dbg/usr/lib/ |
2649 | + mv debian/dhtest1/usr/lib/debug debian/dhtest1-dbg/usr/lib/ |
2650 | + dh_compress -a |
2651 | + dh_fixperms -a |
2652 | + dh_installdeb -a |
2653 | + dh_shlibdeps -a |
2654 | + dh_gencontrol -a |
2655 | + dh_md5sums -a |
2656 | + dh_builddeb -a |
2657 | + |
2658 | +binary: binary-arch binary-indep |
2659 | +.PHONY: build clean binary-indep binary-arch binary install install-indep install-arch |
2660 | |
2661 | === added directory 'tests/dhtest.dbg3' |
2662 | === added file 'tests/dhtest.dbg3/Makefile' |
2663 | --- tests/dhtest.dbg3/Makefile 1970-01-01 00:00:00 +0000 |
2664 | +++ tests/dhtest.dbg3/Makefile 2010-04-21 20:29:14 +0000 |
2665 | @@ -0,0 +1,18 @@ |
2666 | +CFLAGS= -g -Wall -W -O0 |
2667 | + |
2668 | +LIBNAME=crashrep |
2669 | + |
2670 | +all: crash crash2 |
2671 | + |
2672 | +crash: crash.o |
2673 | + $(CC) $^ -o $@ |
2674 | + |
2675 | +crash2: crash2.o |
2676 | + $(CC) $^ -o $@ |
2677 | + |
2678 | +clean: |
2679 | + rm -f *.o crash crash2 |
2680 | + |
2681 | +install: all |
2682 | + install -d $(DESTDIR)/usr/bin |
2683 | + install crash crash2 $(DESTDIR)/usr/bin |
2684 | |
2685 | === added file 'tests/dhtest.dbg3/crash.c' |
2686 | --- tests/dhtest.dbg3/crash.c 1970-01-01 00:00:00 +0000 |
2687 | +++ tests/dhtest.dbg3/crash.c 2010-04-21 20:29:14 +0000 |
2688 | @@ -0,0 +1,34 @@ |
2689 | +/* crash.c - demo program for libcrashreport |
2690 | + |
2691 | + (c) 2004 Martin Pitt <martin@piware.de> |
2692 | + |
2693 | + This file is public domain. |
2694 | +*/ |
2695 | + |
2696 | +#include <stdio.h> |
2697 | + |
2698 | +void h(char* p) { |
2699 | + p[1] = 'a'; |
2700 | +} |
2701 | + |
2702 | +int g( int x, int y ) |
2703 | +{ |
2704 | + char* s = NULL; |
2705 | + h(s); |
2706 | + return x+y; |
2707 | +} |
2708 | + |
2709 | +int f( int x ) |
2710 | +{ |
2711 | + return g( x, 42 ); |
2712 | +} |
2713 | + |
2714 | +int |
2715 | +main() |
2716 | +{ |
2717 | + int x; |
2718 | + |
2719 | + x = f(1); |
2720 | + printf( "x = %i, terminating normally now.\n", x ); |
2721 | + return 0; |
2722 | +} |
2723 | |
2724 | === added file 'tests/dhtest.dbg3/crash2.c' |
2725 | --- tests/dhtest.dbg3/crash2.c 1970-01-01 00:00:00 +0000 |
2726 | +++ tests/dhtest.dbg3/crash2.c 2010-04-21 20:29:14 +0000 |
2727 | @@ -0,0 +1,39 @@ |
2728 | +/* crash.c - demo program for libcrashreport |
2729 | + |
2730 | + (c) 2004 Martin Pitt <martin@piware.de> |
2731 | + |
2732 | + This file is public domain. |
2733 | +*/ |
2734 | + |
2735 | +#include <stdio.h> |
2736 | +#include <math.h> |
2737 | +#include <signal.h> |
2738 | + |
2739 | +double h() |
2740 | +{ |
2741 | + double a = 1./0; |
2742 | + if (isinf(a)) |
2743 | + raise(SIGFPE); |
2744 | + return a; |
2745 | +} |
2746 | + |
2747 | +int g( int x, int y ) |
2748 | +{ |
2749 | + |
2750 | + return x+y+(int) h(); |
2751 | +} |
2752 | + |
2753 | +int f( int x ) |
2754 | +{ |
2755 | + return g( x, 42 ); |
2756 | +} |
2757 | + |
2758 | +int |
2759 | +main() |
2760 | +{ |
2761 | + int x; |
2762 | + |
2763 | + x = f(1); |
2764 | + printf( "x = %i, terminating normally now.\n", x ); |
2765 | + return 0; |
2766 | +} |
2767 | |
2768 | === added directory 'tests/dhtest.dbg3/debian' |
2769 | === added file 'tests/dhtest.dbg3/debian/changelog' |
2770 | --- tests/dhtest.dbg3/debian/changelog 1970-01-01 00:00:00 +0000 |
2771 | +++ tests/dhtest.dbg3/debian/changelog 2010-04-21 20:29:14 +0000 |
2772 | @@ -0,0 +1,5 @@ |
2773 | +dhtest.dbg3 (2) foo; urgency=low |
2774 | + |
2775 | + * Initial release. |
2776 | + |
2777 | + -- Martin Pitt <martin.pitt@ubuntu.com> Fri, 16 Jun 2006 10:49:56 +0200 |
2778 | |
2779 | === added file 'tests/dhtest.dbg3/debian/compat' |
2780 | --- tests/dhtest.dbg3/debian/compat 1970-01-01 00:00:00 +0000 |
2781 | +++ tests/dhtest.dbg3/debian/compat 2010-04-21 20:29:14 +0000 |
2782 | @@ -0,0 +1,1 @@ |
2783 | +5 |
2784 | |
2785 | === added file 'tests/dhtest.dbg3/debian/control' |
2786 | --- tests/dhtest.dbg3/debian/control 1970-01-01 00:00:00 +0000 |
2787 | +++ tests/dhtest.dbg3/debian/control 2010-04-21 20:29:14 +0000 |
2788 | @@ -0,0 +1,31 @@ |
2789 | +Source: dhtest.dbg3 |
2790 | +Section: utils |
2791 | +Priority: extra |
2792 | +Maintainer: Martin Pitt <martin.pitt@ubuntu.com> |
2793 | +Build-Depends: debhelper (>= 4.1.0) |
2794 | +Standards-Version: 3.7.2 |
2795 | + |
2796 | +Package: dhtest1 |
2797 | +Architecture: any |
2798 | +Depends: ${shlibs:Depends} |
2799 | +Description: crash with a SIGSEGV |
2800 | + Test package |
2801 | + |
2802 | +Package: dhtest1-dbg |
2803 | +Architecture: any |
2804 | +Depends: dhtest1 (= ${Source-Version}) |
2805 | +Description: crash with a SIGSEGV (debug symbols) |
2806 | + Test package (debug symbols) |
2807 | + |
2808 | +Package: dhtest2 |
2809 | +Architecture: any |
2810 | +Depends: ${shlibs:Depends} |
2811 | +Description: crash with a SIGFPE |
2812 | + Test package |
2813 | + |
2814 | +Package: dhtestall |
2815 | +Architecture: all |
2816 | +Depends: ${shlibs:Depends} |
2817 | +Description: dummy arch-all package |
2818 | + Test package |
2819 | + |
2820 | |
2821 | === added file 'tests/dhtest.dbg3/debian/copyright' |
2822 | --- tests/dhtest.dbg3/debian/copyright 1970-01-01 00:00:00 +0000 |
2823 | +++ tests/dhtest.dbg3/debian/copyright 2010-04-21 20:29:14 +0000 |
2824 | @@ -0,0 +1,1 @@ |
2825 | +foo |
2826 | |
2827 | === added file 'tests/dhtest.dbg3/debian/dhtest1.install' |
2828 | --- tests/dhtest.dbg3/debian/dhtest1.install 1970-01-01 00:00:00 +0000 |
2829 | +++ tests/dhtest.dbg3/debian/dhtest1.install 2010-04-21 20:29:14 +0000 |
2830 | @@ -0,0 +1,1 @@ |
2831 | +/usr/bin/crash |
2832 | |
2833 | === added file 'tests/dhtest.dbg3/debian/dhtest2.install' |
2834 | --- tests/dhtest.dbg3/debian/dhtest2.install 1970-01-01 00:00:00 +0000 |
2835 | +++ tests/dhtest.dbg3/debian/dhtest2.install 2010-04-21 20:29:14 +0000 |
2836 | @@ -0,0 +1,1 @@ |
2837 | +/usr/bin/crash2 |
2838 | |
2839 | === added file 'tests/dhtest.dbg3/debian/rules' |
2840 | --- tests/dhtest.dbg3/debian/rules 1970-01-01 00:00:00 +0000 |
2841 | +++ tests/dhtest.dbg3/debian/rules 2010-04-21 20:29:14 +0000 |
2842 | @@ -0,0 +1,86 @@ |
2843 | +#!/usr/bin/make -f |
2844 | + |
2845 | +# Uncomment this to turn on verbose mode. |
2846 | +#export DH_VERBOSE=1 |
2847 | + |
2848 | +# This has to be exported to make some magic below work. |
2849 | +export DH_OPTIONS |
2850 | + |
2851 | +CFLAGS = -Wall -g |
2852 | + |
2853 | +ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS))) |
2854 | + CFLAGS += -O0 |
2855 | +else |
2856 | + CFLAGS += -O2 |
2857 | +endif |
2858 | + |
2859 | +#Architecture |
2860 | +build: build-arch build-indep |
2861 | + |
2862 | +build-arch: build-arch-stamp |
2863 | +build-arch-stamp: |
2864 | + $(MAKE) |
2865 | + touch build-arch-stamp |
2866 | + |
2867 | +build-indep: |
2868 | + |
2869 | +clean: |
2870 | + dh_testdir |
2871 | + dh_testroot |
2872 | + rm -f build-arch-stamp build-indep-stamp |
2873 | + -$(MAKE) clean |
2874 | + dh_clean |
2875 | + |
2876 | +install: install-indep install-arch |
2877 | +install-indep: |
2878 | + dh_testdir |
2879 | + dh_testroot |
2880 | + dh_clean -k -i |
2881 | + dh_installdirs -i |
2882 | + dh_install -i --sourcedir=debian/tmp |
2883 | + |
2884 | +install-arch: |
2885 | + dh_testdir |
2886 | + dh_testroot |
2887 | + dh_clean -k -s |
2888 | + dh_installdirs -s |
2889 | + $(MAKE) install DESTDIR=$(CURDIR)/debian/tmp |
2890 | + dh_install -s --sourcedir=debian/tmp |
2891 | + |
2892 | +# Must not depend on anything. This is to be called by |
2893 | +# binary-arch/binary-indep |
2894 | +# in another 'make' thread. |
2895 | +binary-common: |
2896 | + |
2897 | +# Build architecture independant packages using the common target. |
2898 | +binary-indep: build-indep install-indep |
2899 | + dh_testdir -i |
2900 | + dh_testroot -i |
2901 | + dh_installchangelogs -i |
2902 | + dh_installdocs -i |
2903 | + dh_strip -i |
2904 | + dh_compress -i |
2905 | + dh_fixperms -i |
2906 | + dh_installdeb -i |
2907 | + dh_shlibdeps -i |
2908 | + dh_gencontrol -i |
2909 | + dh_md5sums -i |
2910 | + dh_builddeb -i |
2911 | + |
2912 | +# Build architecture dependant packages using the common target. |
2913 | +binary-arch: build-arch install-arch |
2914 | + dh_testdir -a |
2915 | + dh_testroot -a |
2916 | + dh_installchangelogs -a |
2917 | + dh_installdocs -a |
2918 | + dh_strip -a --dbg-package dhtest1-dbg |
2919 | + dh_compress -a |
2920 | + dh_fixperms -a |
2921 | + dh_installdeb -a |
2922 | + dh_shlibdeps -a |
2923 | + dh_gencontrol -a |
2924 | + dh_md5sums -a |
2925 | + dh_builddeb -a |
2926 | + |
2927 | +binary: binary-arch binary-indep |
2928 | +.PHONY: build clean binary-indep binary-arch binary install install-indep install-arch |
2929 | |
2930 | === added directory 'tests/dhtest.noargs' |
2931 | === added file 'tests/dhtest.noargs/Makefile' |
2932 | --- tests/dhtest.noargs/Makefile 1970-01-01 00:00:00 +0000 |
2933 | +++ tests/dhtest.noargs/Makefile 2010-04-21 20:29:14 +0000 |
2934 | @@ -0,0 +1,19 @@ |
2935 | +CFLAGS= -g -Wall -W -O0 |
2936 | + |
2937 | +LIBNAME=crashrep |
2938 | + |
2939 | +all: crash crash2 |
2940 | + |
2941 | +crash: crash.o |
2942 | + $(CC) $^ -o $@ |
2943 | + objcopy --add-gnu-debuglink=$@ $@ |
2944 | + |
2945 | +crash2: crash2.o |
2946 | + $(CC) $^ -o $@ |
2947 | + |
2948 | +clean: |
2949 | + rm -f *.o crash crash2 |
2950 | + |
2951 | +install: all |
2952 | + install -d $(DESTDIR)/usr/bin |
2953 | + install crash crash2 $(DESTDIR)/usr/bin |
2954 | |
2955 | === added file 'tests/dhtest.noargs/crash.c' |
2956 | --- tests/dhtest.noargs/crash.c 1970-01-01 00:00:00 +0000 |
2957 | +++ tests/dhtest.noargs/crash.c 2010-04-21 20:29:14 +0000 |
2958 | @@ -0,0 +1,34 @@ |
2959 | +/* crash.c - demo program for libcrashreport |
2960 | + |
2961 | + (c) 2004 Martin Pitt <martin@piware.de> |
2962 | + |
2963 | + This file is public domain. |
2964 | +*/ |
2965 | + |
2966 | +#include <stdio.h> |
2967 | + |
2968 | +void h(char* p) { |
2969 | + p[1] = 'a'; |
2970 | +} |
2971 | + |
2972 | +int g( int x, int y ) |
2973 | +{ |
2974 | + char* s = NULL; |
2975 | + h(s); |
2976 | + return x+y; |
2977 | +} |
2978 | + |
2979 | +int f( int x ) |
2980 | +{ |
2981 | + return g( x, 42 ); |
2982 | +} |
2983 | + |
2984 | +int |
2985 | +main() |
2986 | +{ |
2987 | + int x; |
2988 | + |
2989 | + x = f(1); |
2990 | + printf( "x = %i, terminating normally now.\n", x ); |
2991 | + return 0; |
2992 | +} |
2993 | |
2994 | === added file 'tests/dhtest.noargs/crash2.c' |
2995 | --- tests/dhtest.noargs/crash2.c 1970-01-01 00:00:00 +0000 |
2996 | +++ tests/dhtest.noargs/crash2.c 2010-04-21 20:29:14 +0000 |
2997 | @@ -0,0 +1,39 @@ |
2998 | +/* crash.c - demo program for libcrashreport |
2999 | + |
3000 | + (c) 2004 Martin Pitt <martin@piware.de> |
3001 | + |
3002 | + This file is public domain. |
3003 | +*/ |
3004 | + |
3005 | +#include <stdio.h> |
3006 | +#include <math.h> |
3007 | +#include <signal.h> |
3008 | + |
3009 | +double h() |
3010 | +{ |
3011 | + double a = 1./0; |
3012 | + if (isinf(a)) |
3013 | + raise(SIGFPE); |
3014 | + return a; |
3015 | +} |
3016 | + |
3017 | +int g( int x, int y ) |
3018 | +{ |
3019 | + |
3020 | + return x+y+(int) h(); |
3021 | +} |
3022 | + |
3023 | +int f( int x ) |
3024 | +{ |
3025 | + return g( x, 42 ); |
3026 | +} |
3027 | + |
3028 | +int |
3029 | +main() |
3030 | +{ |
3031 | + int x; |
3032 | + |
3033 | + x = f(1); |
3034 | + printf( "x = %i, terminating normally now.\n", x ); |
3035 | + return 0; |
3036 | +} |
3037 | |
3038 | === added directory 'tests/dhtest.noargs/debian' |
3039 | === added file 'tests/dhtest.noargs/debian/changelog' |
3040 | --- tests/dhtest.noargs/debian/changelog 1970-01-01 00:00:00 +0000 |
3041 | +++ tests/dhtest.noargs/debian/changelog 2010-04-21 20:29:14 +0000 |
3042 | @@ -0,0 +1,5 @@ |
3043 | +dhtest.noargs (3.14) foo; urgency=low |
3044 | + |
3045 | + * Initial release. |
3046 | + |
3047 | + -- Martin Pitt <martin.pitt@ubuntu.com> Fri, 16 Jun 2006 10:49:56 +0200 |
3048 | |
3049 | === added file 'tests/dhtest.noargs/debian/compat' |
3050 | --- tests/dhtest.noargs/debian/compat 1970-01-01 00:00:00 +0000 |
3051 | +++ tests/dhtest.noargs/debian/compat 2010-04-21 20:29:14 +0000 |
3052 | @@ -0,0 +1,1 @@ |
3053 | +5 |
3054 | |
3055 | === added file 'tests/dhtest.noargs/debian/control' |
3056 | --- tests/dhtest.noargs/debian/control 1970-01-01 00:00:00 +0000 |
3057 | +++ tests/dhtest.noargs/debian/control 2010-04-21 20:29:14 +0000 |
3058 | @@ -0,0 +1,29 @@ |
3059 | +Source: dhtest.noargs |
3060 | +Section: utils |
3061 | +Priority: extra |
3062 | +Maintainer: Martin Pitt <martin.pitt@ubuntu.com> |
3063 | +Build-Depends: debhelper (>= 4.1.0) |
3064 | +Standards-Version: 3.7.2 |
3065 | + |
3066 | +Package: dhtest1 |
3067 | +Architecture: any |
3068 | +Pre-Depends: coreutils (>= 1) |
3069 | +Depends: ${shlibs:Depends} |
3070 | +Suggests: foo (<< 1), |
3071 | + bar (>= 0), baz, |
3072 | + zip |
3073 | +Description: crash with a SIGSEGV |
3074 | + Test package |
3075 | + |
3076 | +Package: dhtest2 |
3077 | +Architecture: any |
3078 | +Depends: ${shlibs:Depends} |
3079 | +Description: crash with a SIGFPE |
3080 | + Test package |
3081 | + |
3082 | +Package: dhtestall |
3083 | +Architecture: all |
3084 | +Depends: ${shlibs:Depends} |
3085 | +Description: dummy arch-all package |
3086 | + Test package |
3087 | + |
3088 | |
3089 | === added file 'tests/dhtest.noargs/debian/copyright' |
3090 | --- tests/dhtest.noargs/debian/copyright 1970-01-01 00:00:00 +0000 |
3091 | +++ tests/dhtest.noargs/debian/copyright 2010-04-21 20:29:14 +0000 |
3092 | @@ -0,0 +1,1 @@ |
3093 | +foo |
3094 | |
3095 | === added file 'tests/dhtest.noargs/debian/dhtest1.install' |
3096 | --- tests/dhtest.noargs/debian/dhtest1.install 1970-01-01 00:00:00 +0000 |
3097 | +++ tests/dhtest.noargs/debian/dhtest1.install 2010-04-21 20:29:14 +0000 |
3098 | @@ -0,0 +1,1 @@ |
3099 | +/usr/bin/crash |
3100 | |
3101 | === added file 'tests/dhtest.noargs/debian/dhtest2.install' |
3102 | --- tests/dhtest.noargs/debian/dhtest2.install 1970-01-01 00:00:00 +0000 |
3103 | +++ tests/dhtest.noargs/debian/dhtest2.install 2010-04-21 20:29:14 +0000 |
3104 | @@ -0,0 +1,1 @@ |
3105 | +/usr/bin/crash2 |
3106 | |
3107 | === added file 'tests/dhtest.noargs/debian/rules' |
3108 | --- tests/dhtest.noargs/debian/rules 1970-01-01 00:00:00 +0000 |
3109 | +++ tests/dhtest.noargs/debian/rules 2010-04-21 20:29:14 +0000 |
3110 | @@ -0,0 +1,69 @@ |
3111 | +#!/usr/bin/make -f |
3112 | + |
3113 | +# Uncomment this to turn on verbose mode. |
3114 | +#export DH_VERBOSE=1 |
3115 | + |
3116 | +# This has to be exported to make some magic below work. |
3117 | +export DH_OPTIONS |
3118 | + |
3119 | +CFLAGS = -Wall -g |
3120 | + |
3121 | +ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS))) |
3122 | + CFLAGS += -O0 |
3123 | +else |
3124 | + CFLAGS += -O2 |
3125 | +endif |
3126 | + |
3127 | +#Architecture |
3128 | +build: build-arch build-indep |
3129 | + |
3130 | +build-arch: build-arch-stamp |
3131 | +build-arch-stamp: |
3132 | + $(MAKE) |
3133 | + touch build-arch-stamp |
3134 | + |
3135 | +build-indep: |
3136 | + |
3137 | +clean: |
3138 | + dh_testdir |
3139 | + dh_testroot |
3140 | + rm -f build-arch-stamp build-indep-stamp |
3141 | + -$(MAKE) clean |
3142 | + dh_clean |
3143 | + |
3144 | +install: install-indep install-arch |
3145 | +install-indep: |
3146 | + dh_testdir |
3147 | + dh_testroot |
3148 | + dh_clean -k -i |
3149 | + dh_installdirs -i |
3150 | + dh_install -i --sourcedir=debian/tmp |
3151 | + |
3152 | +install-arch: |
3153 | + dh_testdir |
3154 | + dh_testroot |
3155 | + dh_clean -k -s |
3156 | + dh_installdirs -s |
3157 | + $(MAKE) install DESTDIR=$(CURDIR)/debian/tmp |
3158 | + dh_install -s --sourcedir=debian/tmp |
3159 | + |
3160 | +# Build architecture independant packages using the common target. |
3161 | +binary-indep: build-indep install-indep |
3162 | + |
3163 | +# Build architecture dependant packages using the common target. |
3164 | +binary-arch: build-arch install-arch |
3165 | + dh_testdir |
3166 | + dh_testroot |
3167 | + dh_installchangelogs |
3168 | + dh_installdocs |
3169 | + dh_strip |
3170 | + dh_compress |
3171 | + dh_fixperms |
3172 | + dh_installdeb |
3173 | + dh_shlibdeps |
3174 | + dh_gencontrol |
3175 | + dh_md5sums |
3176 | + dh_builddeb |
3177 | + |
3178 | +binary: binary-arch binary-indep |
3179 | +.PHONY: build clean binary-indep binary-arch binary install install-indep install-arch |
3180 | |
3181 | === added directory 'tests/dhtest.nostrip' |
3182 | === added file 'tests/dhtest.nostrip/Makefile' |
3183 | --- tests/dhtest.nostrip/Makefile 1970-01-01 00:00:00 +0000 |
3184 | +++ tests/dhtest.nostrip/Makefile 2010-04-21 20:29:14 +0000 |
3185 | @@ -0,0 +1,19 @@ |
3186 | +CFLAGS= -g -Wall -W -O0 |
3187 | + |
3188 | +LIBNAME=crashrep |
3189 | + |
3190 | +all: crash crash2 |
3191 | + |
3192 | +crash: crash.o |
3193 | + $(CC) $^ -o $@ |
3194 | + |
3195 | +crash2: crash2.o |
3196 | + $(CC) $^ -o $@ |
3197 | + |
3198 | +clean: |
3199 | + rm -f *.o crash crash2 |
3200 | + |
3201 | +install: all |
3202 | + install -d $(DESTDIR)/usr/bin |
3203 | + install crash crash2 $(DESTDIR)/usr/bin |
3204 | + cp -a $(DESTDIR)/usr/bin/crash2 $(DESTDIR)/usr/bin/crash3 |
3205 | |
3206 | === added file 'tests/dhtest.nostrip/crash.c' |
3207 | --- tests/dhtest.nostrip/crash.c 1970-01-01 00:00:00 +0000 |
3208 | +++ tests/dhtest.nostrip/crash.c 2010-04-21 20:29:14 +0000 |
3209 | @@ -0,0 +1,34 @@ |
3210 | +/* crash.c - demo program for libcrashreport |
3211 | + |
3212 | + (c) 2004 Martin Pitt <martin@piware.de> |
3213 | + |
3214 | + This file is public domain. |
3215 | +*/ |
3216 | + |
3217 | +#include <stdio.h> |
3218 | + |
3219 | +void h(char* p) { |
3220 | + p[1] = 'a'; |
3221 | +} |
3222 | + |
3223 | +int g( int x, int y ) |
3224 | +{ |
3225 | + char* s = NULL; |
3226 | + h(s); |
3227 | + return x+y; |
3228 | +} |
3229 | + |
3230 | +int f( int x ) |
3231 | +{ |
3232 | + return g( x, 42 ); |
3233 | +} |
3234 | + |
3235 | +int |
3236 | +main() |
3237 | +{ |
3238 | + int x; |
3239 | + |
3240 | + x = f(1); |
3241 | + printf( "x = %i, terminating normally now.\n", x ); |
3242 | + return 0; |
3243 | +} |
3244 | |
3245 | === added file 'tests/dhtest.nostrip/crash2.c' |
3246 | --- tests/dhtest.nostrip/crash2.c 1970-01-01 00:00:00 +0000 |
3247 | +++ tests/dhtest.nostrip/crash2.c 2010-04-21 20:29:14 +0000 |
3248 | @@ -0,0 +1,39 @@ |
3249 | +/* crash.c - demo program for libcrashreport |
3250 | + |
3251 | + (c) 2004 Martin Pitt <martin@piware.de> |
3252 | + |
3253 | + This file is public domain. |
3254 | +*/ |
3255 | + |
3256 | +#include <stdio.h> |
3257 | +#include <math.h> |
3258 | +#include <signal.h> |
3259 | + |
3260 | +double h() |
3261 | +{ |
3262 | + double a = 1./0; |
3263 | + if (isinf(a)) |
3264 | + raise(SIGFPE); |
3265 | + return a; |
3266 | +} |
3267 | + |
3268 | +int g( int x, int y ) |
3269 | +{ |
3270 | + |
3271 | + return x+y+(int) h(); |
3272 | +} |
3273 | + |
3274 | +int f( int x ) |
3275 | +{ |
3276 | + return g( x, 42 ); |
3277 | +} |
3278 | + |
3279 | +int |
3280 | +main() |
3281 | +{ |
3282 | + int x; |
3283 | + |
3284 | + x = f(1); |
3285 | + printf( "x = %i, terminating normally now.\n", x ); |
3286 | + return 0; |
3287 | +} |
3288 | |
3289 | === added directory 'tests/dhtest.nostrip/debian' |
3290 | === added file 'tests/dhtest.nostrip/debian/changelog' |
3291 | --- tests/dhtest.nostrip/debian/changelog 1970-01-01 00:00:00 +0000 |
3292 | +++ tests/dhtest.nostrip/debian/changelog 2010-04-21 20:29:14 +0000 |
3293 | @@ -0,0 +1,5 @@ |
3294 | +dhtest.nostrip (1:2.3-1) foo; urgency=low |
3295 | + |
3296 | + * Initial release. |
3297 | + |
3298 | + -- Martin Pitt <martin.pitt@ubuntu.com> Fri, 16 Jun 2006 10:49:56 +0200 |
3299 | |
3300 | === added file 'tests/dhtest.nostrip/debian/compat' |
3301 | --- tests/dhtest.nostrip/debian/compat 1970-01-01 00:00:00 +0000 |
3302 | +++ tests/dhtest.nostrip/debian/compat 2010-04-21 20:29:14 +0000 |
3303 | @@ -0,0 +1,1 @@ |
3304 | +5 |
3305 | |
3306 | === added file 'tests/dhtest.nostrip/debian/control' |
3307 | --- tests/dhtest.nostrip/debian/control 1970-01-01 00:00:00 +0000 |
3308 | +++ tests/dhtest.nostrip/debian/control 2010-04-21 20:29:14 +0000 |
3309 | @@ -0,0 +1,30 @@ |
3310 | +Source: dhtest.nostrip |
3311 | +Section: utils |
3312 | +Priority: extra |
3313 | +Maintainer: Martin Pitt <martin.pitt@ubuntu.com> |
3314 | +Build-Depends: debhelper (>= 4.1.0) |
3315 | +Standards-Version: 3.7.2 |
3316 | + |
3317 | +Package: dhtest1 |
3318 | +Architecture: any |
3319 | +Depends: ${shlibs:Depends}, coreutils (>> ${foo}) |
3320 | +Recommends: dhtest2 (>> ${foo}) |
3321 | +Suggests: dhtestall (>= ${foo}), ${bar}-core |
3322 | +Conflicts: dhtestall (<< ${foo}) |
3323 | +Replaces: dhtestall (<< ${foo}) |
3324 | +Breaks: dhtestall (<< ${foo}) |
3325 | +Description: crash with a SIGSEGV |
3326 | + Test package |
3327 | + |
3328 | +Package: dhtest2-nostrip |
3329 | +Architecture: any |
3330 | +Depends: ${shlibs:Depends} |
3331 | +Description: crash with a SIGFPE |
3332 | + Test package |
3333 | + |
3334 | +Package: dhtestall |
3335 | +Architecture: all |
3336 | +Depends: ${shlibs:Depends} |
3337 | +Description: dummy arch-all package |
3338 | + Test package |
3339 | + |
3340 | |
3341 | === added file 'tests/dhtest.nostrip/debian/copyright' |
3342 | --- tests/dhtest.nostrip/debian/copyright 1970-01-01 00:00:00 +0000 |
3343 | +++ tests/dhtest.nostrip/debian/copyright 2010-04-21 20:29:14 +0000 |
3344 | @@ -0,0 +1,1 @@ |
3345 | +foo |
3346 | |
3347 | === added file 'tests/dhtest.nostrip/debian/dhtest1.install' |
3348 | --- tests/dhtest.nostrip/debian/dhtest1.install 1970-01-01 00:00:00 +0000 |
3349 | +++ tests/dhtest.nostrip/debian/dhtest1.install 2010-04-21 20:29:14 +0000 |
3350 | @@ -0,0 +1,1 @@ |
3351 | +/usr/bin/crash |
3352 | |
3353 | === added file 'tests/dhtest.nostrip/debian/dhtest2-nostrip.install' |
3354 | --- tests/dhtest.nostrip/debian/dhtest2-nostrip.install 1970-01-01 00:00:00 +0000 |
3355 | +++ tests/dhtest.nostrip/debian/dhtest2-nostrip.install 2010-04-21 20:29:14 +0000 |
3356 | @@ -0,0 +1,2 @@ |
3357 | +/usr/bin/crash2 |
3358 | +/usr/bin/crash3 |
3359 | |
3360 | === added file 'tests/dhtest.nostrip/debian/rules' |
3361 | --- tests/dhtest.nostrip/debian/rules 1970-01-01 00:00:00 +0000 |
3362 | +++ tests/dhtest.nostrip/debian/rules 2010-04-21 20:29:14 +0000 |
3363 | @@ -0,0 +1,84 @@ |
3364 | +#!/usr/bin/make -f |
3365 | + |
3366 | +# Uncomment this to turn on verbose mode. |
3367 | +#export DH_VERBOSE=1 |
3368 | + |
3369 | +# This has to be exported to make some magic below work. |
3370 | +export DH_OPTIONS |
3371 | + |
3372 | +CFLAGS = -Wall -g |
3373 | + |
3374 | +ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS))) |
3375 | + CFLAGS += -O0 |
3376 | +else |
3377 | + CFLAGS += -O2 |
3378 | +endif |
3379 | + |
3380 | +#Architecture |
3381 | +build: build-arch build-indep |
3382 | + |
3383 | +build-arch: build-arch-stamp |
3384 | +build-arch-stamp: |
3385 | + $(MAKE) |
3386 | + touch build-arch-stamp |
3387 | + |
3388 | +build-indep: |
3389 | + |
3390 | +clean: |
3391 | + dh_testdir |
3392 | + dh_testroot |
3393 | + rm -f build-arch-stamp build-indep-stamp |
3394 | + -$(MAKE) clean |
3395 | + dh_clean |
3396 | + |
3397 | +install: install-indep install-arch |
3398 | +install-indep: |
3399 | + dh_testdir |
3400 | + dh_testroot |
3401 | + dh_clean -k -i |
3402 | + dh_installdirs -i |
3403 | + dh_install -i --sourcedir=debian/tmp |
3404 | + |
3405 | +install-arch: |
3406 | + dh_testdir |
3407 | + dh_testroot |
3408 | + dh_clean -k -s |
3409 | + dh_installdirs -s |
3410 | + $(MAKE) install DESTDIR=$(CURDIR)/debian/tmp |
3411 | + dh_install -s --sourcedir=debian/tmp |
3412 | + |
3413 | +# Must not depend on anything. This is to be called by |
3414 | +# binary-arch/binary-indep |
3415 | +# in another 'make' thread. |
3416 | +binary-common: |
3417 | + dh_testdir |
3418 | + dh_testroot |
3419 | + dh_installchangelogs |
3420 | + dh_installdocs |
3421 | + dh_strip -Xcrash2 -X crash3 |
3422 | + dh_compress |
3423 | + dh_fixperms |
3424 | + dh_installdeb |
3425 | + dh_shlibdeps |
3426 | + dh_gencontrol -u'-Vfoo=1 -Vbar=lsb' |
3427 | + dh_md5sums |
3428 | + dh_builddeb |
3429 | + |
3430 | +# Build architecture independant packages using the common target. |
3431 | +binary-indep: build-indep install-indep |
3432 | + $(MAKE) -f debian/rules DH_OPTIONS=-i binary-common |
3433 | + |
3434 | +# Build architecture dependant packages using the common target. |
3435 | +binary-arch: build-arch install-arch |
3436 | + $(MAKE) -f debian/rules DH_OPTIONS=-a binary-common |
3437 | + if ! cmp -s ./crash2 debian/dhtest2-nostrip/usr/bin/crash2; then \ |
3438 | + echo "crash2 was invalidly touched" >&2; \ |
3439 | + exit 1; \ |
3440 | + fi |
3441 | + if ! cmp -s ./crash2 debian/dhtest2-nostrip/usr/bin/crash3; then \ |
3442 | + echo "crash3 was invalidly touched" >&2; \ |
3443 | + exit 1; \ |
3444 | + fi |
3445 | + |
3446 | +binary: binary-arch binary-indep |
3447 | +.PHONY: build clean binary-indep binary-arch binary install install-indep install-arch |
3448 | |
3449 | === added directory 'tests/dhtest.samename' |
3450 | === added file 'tests/dhtest.samename/Makefile' |
3451 | --- tests/dhtest.samename/Makefile 1970-01-01 00:00:00 +0000 |
3452 | +++ tests/dhtest.samename/Makefile 2010-04-21 20:29:14 +0000 |
3453 | @@ -0,0 +1,18 @@ |
3454 | +CFLAGS= -g -Wall -W -O0 |
3455 | + |
3456 | +LIBNAME=crashrep |
3457 | + |
3458 | +all: crash crash2 |
3459 | + |
3460 | +crash: crash.o |
3461 | + $(CC) $^ -o $@ |
3462 | + |
3463 | +crash2: crash2.o |
3464 | + $(CC) $^ -o $@ |
3465 | + |
3466 | +clean: |
3467 | + rm -f *.o crash crash2 |
3468 | + |
3469 | +install: all |
3470 | + install -d $(DESTDIR)/usr/bin |
3471 | + install crash crash2 $(DESTDIR)/usr/bin |
3472 | |
3473 | === added file 'tests/dhtest.samename/crash.c' |
3474 | --- tests/dhtest.samename/crash.c 1970-01-01 00:00:00 +0000 |
3475 | +++ tests/dhtest.samename/crash.c 2010-04-21 20:29:14 +0000 |
3476 | @@ -0,0 +1,34 @@ |
3477 | +/* crash.c - demo program for libcrashreport |
3478 | + |
3479 | + (c) 2004 Martin Pitt <martin@piware.de> |
3480 | + |
3481 | + This file is public domain. |
3482 | +*/ |
3483 | + |
3484 | +#include <stdio.h> |
3485 | + |
3486 | +void h(char* p) { |
3487 | + p[1] = 'a'; |
3488 | +} |
3489 | + |
3490 | +int g( int x, int y ) |
3491 | +{ |
3492 | + char* s = NULL; |
3493 | + h(s); |
3494 | + return x+y; |
3495 | +} |
3496 | + |
3497 | +int f( int x ) |
3498 | +{ |
3499 | + return g( x, 42 ); |
3500 | +} |
3501 | + |
3502 | +int |
3503 | +main() |
3504 | +{ |
3505 | + int x; |
3506 | + |
3507 | + x = f(1); |
3508 | + printf( "x = %i, terminating normally now.\n", x ); |
3509 | + return 0; |
3510 | +} |
3511 | |
3512 | === added file 'tests/dhtest.samename/crash2.c' |
3513 | --- tests/dhtest.samename/crash2.c 1970-01-01 00:00:00 +0000 |
3514 | +++ tests/dhtest.samename/crash2.c 2010-04-21 20:29:14 +0000 |
3515 | @@ -0,0 +1,39 @@ |
3516 | +/* crash.c - demo program for libcrashreport |
3517 | + |
3518 | + (c) 2004 Martin Pitt <martin@piware.de> |
3519 | + |
3520 | + This file is public domain. |
3521 | +*/ |
3522 | + |
3523 | +#include <stdio.h> |
3524 | +#include <math.h> |
3525 | +#include <signal.h> |
3526 | + |
3527 | +double h() |
3528 | +{ |
3529 | + double a = 1./0; |
3530 | + if (isinf(a)) |
3531 | + raise(SIGFPE); |
3532 | + return a; |
3533 | +} |
3534 | + |
3535 | +int g( int x, int y ) |
3536 | +{ |
3537 | + |
3538 | + return x+y+(int) h(); |
3539 | +} |
3540 | + |
3541 | +int f( int x ) |
3542 | +{ |
3543 | + return g( x, 42 ); |
3544 | +} |
3545 | + |
3546 | +int |
3547 | +main() |
3548 | +{ |
3549 | + int x; |
3550 | + |
3551 | + x = f(1); |
3552 | + printf( "x = %i, terminating normally now.\n", x ); |
3553 | + return 0; |
3554 | +} |
3555 | |
3556 | === added directory 'tests/dhtest.samename/debian' |
3557 | === added file 'tests/dhtest.samename/debian/changelog' |
3558 | --- tests/dhtest.samename/debian/changelog 1970-01-01 00:00:00 +0000 |
3559 | +++ tests/dhtest.samename/debian/changelog 2010-04-21 20:29:14 +0000 |
3560 | @@ -0,0 +1,5 @@ |
3561 | +dhtest.samename (1:2.3-1) foo; urgency=low |
3562 | + |
3563 | + * Initial release. |
3564 | + |
3565 | + -- Martin Pitt <martin.pitt@ubuntu.com> Fri, 16 Jun 2006 10:49:56 +0200 |
3566 | |
3567 | === added file 'tests/dhtest.samename/debian/compat' |
3568 | --- tests/dhtest.samename/debian/compat 1970-01-01 00:00:00 +0000 |
3569 | +++ tests/dhtest.samename/debian/compat 2010-04-21 20:29:14 +0000 |
3570 | @@ -0,0 +1,1 @@ |
3571 | +5 |
3572 | |
3573 | === added file 'tests/dhtest.samename/debian/control' |
3574 | --- tests/dhtest.samename/debian/control 1970-01-01 00:00:00 +0000 |
3575 | +++ tests/dhtest.samename/debian/control 2010-04-21 20:29:14 +0000 |
3576 | @@ -0,0 +1,29 @@ |
3577 | +Source: dhtest.samename |
3578 | +Section: utils |
3579 | +Priority: extra |
3580 | +Maintainer: Martin Pitt <martin.pitt@ubuntu.com> |
3581 | +Build-Depends: debhelper (>= 4.1.0) |
3582 | +Standards-Version: 3.7.2 |
3583 | + |
3584 | +Package: dhtest |
3585 | +Architecture: any |
3586 | +Depends: ${shlibs:Depends}, coreutils (>> ${foo}) |
3587 | +Recommends: dhtest.samename (>> ${foo}) |
3588 | +Suggests: dhtestall (>= ${foo}), ${bar}-core |
3589 | +Conflicts: dhtestall (<< ${foo}) |
3590 | +Replaces: dhtestall (<< ${foo}) |
3591 | +Breaks: dhtestall (<< ${foo}) |
3592 | +Description: crash with a SIGSEGV |
3593 | + Test package |
3594 | + |
3595 | +Package: dhtest.samename |
3596 | +Architecture: any |
3597 | +Depends: ${shlibs:Depends} |
3598 | +Description: crash with a SIGFPE |
3599 | + Test package |
3600 | + |
3601 | +Package: dhtestall |
3602 | +Architecture: all |
3603 | +Depends: ${shlibs:Depends} |
3604 | +Description: dummy arch-all package |
3605 | + Test package |
3606 | |
3607 | === added file 'tests/dhtest.samename/debian/copyright' |
3608 | --- tests/dhtest.samename/debian/copyright 1970-01-01 00:00:00 +0000 |
3609 | +++ tests/dhtest.samename/debian/copyright 2010-04-21 20:29:14 +0000 |
3610 | @@ -0,0 +1,1 @@ |
3611 | +foo |
3612 | |
3613 | === added file 'tests/dhtest.samename/debian/dhtest.samename.install' |
3614 | --- tests/dhtest.samename/debian/dhtest.samename.install 1970-01-01 00:00:00 +0000 |
3615 | +++ tests/dhtest.samename/debian/dhtest.samename.install 2010-04-21 20:29:14 +0000 |
3616 | @@ -0,0 +1,1 @@ |
3617 | +/usr/bin/crash2 |
3618 | |
3619 | === added file 'tests/dhtest.samename/debian/dhtest1.install' |
3620 | --- tests/dhtest.samename/debian/dhtest1.install 1970-01-01 00:00:00 +0000 |
3621 | +++ tests/dhtest.samename/debian/dhtest1.install 2010-04-21 20:29:14 +0000 |
3622 | @@ -0,0 +1,1 @@ |
3623 | +/usr/bin/crash |
3624 | |
3625 | === added file 'tests/dhtest.samename/debian/rules' |
3626 | --- tests/dhtest.samename/debian/rules 1970-01-01 00:00:00 +0000 |
3627 | +++ tests/dhtest.samename/debian/rules 2010-04-21 20:29:14 +0000 |
3628 | @@ -0,0 +1,76 @@ |
3629 | +#!/usr/bin/make -f |
3630 | + |
3631 | +# Uncomment this to turn on verbose mode. |
3632 | +#export DH_VERBOSE=1 |
3633 | + |
3634 | +# This has to be exported to make some magic below work. |
3635 | +export DH_OPTIONS |
3636 | + |
3637 | +CFLAGS = -Wall -g |
3638 | + |
3639 | +ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS))) |
3640 | + CFLAGS += -O0 |
3641 | +else |
3642 | + CFLAGS += -O2 |
3643 | +endif |
3644 | + |
3645 | +#Architecture |
3646 | +build: build-arch build-indep |
3647 | + |
3648 | +build-arch: build-arch-stamp |
3649 | +build-arch-stamp: |
3650 | + $(MAKE) |
3651 | + touch build-arch-stamp |
3652 | + |
3653 | +build-indep: |
3654 | + |
3655 | +clean: |
3656 | + dh_testdir |
3657 | + dh_testroot |
3658 | + rm -f build-arch-stamp build-indep-stamp |
3659 | + -$(MAKE) clean |
3660 | + dh_clean |
3661 | + |
3662 | +install: install-indep install-arch |
3663 | +install-indep: |
3664 | + dh_testdir |
3665 | + dh_testroot |
3666 | + dh_clean -k -i |
3667 | + dh_installdirs -i |
3668 | + dh_install -i --sourcedir=debian/tmp |
3669 | + |
3670 | +install-arch: |
3671 | + dh_testdir |
3672 | + dh_testroot |
3673 | + dh_clean -k -s |
3674 | + dh_installdirs -s |
3675 | + $(MAKE) install DESTDIR=$(CURDIR)/debian/tmp |
3676 | + dh_install -s --sourcedir=debian/tmp |
3677 | + |
3678 | +# Must not depend on anything. This is to be called by |
3679 | +# binary-arch/binary-indep |
3680 | +# in another 'make' thread. |
3681 | +binary-common: |
3682 | + dh_testdir |
3683 | + dh_testroot |
3684 | + dh_installchangelogs |
3685 | + dh_installdocs |
3686 | + dh_strip |
3687 | + dh_compress |
3688 | + dh_fixperms |
3689 | + dh_installdeb |
3690 | + dh_shlibdeps |
3691 | + dh_gencontrol -u'-Vfoo=1 -Vbar=lsb' |
3692 | + dh_md5sums |
3693 | + dh_builddeb |
3694 | + |
3695 | +# Build architecture independant packages using the common target. |
3696 | +binary-indep: build-indep install-indep |
3697 | + $(MAKE) -f debian/rules DH_OPTIONS=-i binary-common |
3698 | + |
3699 | +# Build architecture dependant packages using the common target. |
3700 | +binary-arch: build-arch install-arch |
3701 | + $(MAKE) -f debian/rules DH_OPTIONS=-a binary-common |
3702 | + |
3703 | +binary: binary-arch binary-indep |
3704 | +.PHONY: build clean binary-indep binary-arch binary install install-indep install-arch |
3705 | |
3706 | === added directory 'tests/dhtest.tmpdirarg' |
3707 | === added file 'tests/dhtest.tmpdirarg/Makefile' |
3708 | --- tests/dhtest.tmpdirarg/Makefile 1970-01-01 00:00:00 +0000 |
3709 | +++ tests/dhtest.tmpdirarg/Makefile 2010-04-21 20:29:14 +0000 |
3710 | @@ -0,0 +1,18 @@ |
3711 | +CFLAGS= -g -Wall -W -O0 |
3712 | + |
3713 | +LIBNAME=crashrep |
3714 | + |
3715 | +all: crash crash2 |
3716 | + |
3717 | +crash: crash.o |
3718 | + $(CC) $^ -o $@ |
3719 | + |
3720 | +crash2: crash2.o |
3721 | + $(CC) $^ -o $@ |
3722 | + |
3723 | +clean: |
3724 | + rm -f *.o crash crash2 |
3725 | + |
3726 | +install: all |
3727 | + install -d $(DESTDIR)/usr/bin |
3728 | + install crash crash2 $(DESTDIR)/usr/bin |
3729 | |
3730 | === added file 'tests/dhtest.tmpdirarg/crash.c' |
3731 | --- tests/dhtest.tmpdirarg/crash.c 1970-01-01 00:00:00 +0000 |
3732 | +++ tests/dhtest.tmpdirarg/crash.c 2010-04-21 20:29:14 +0000 |
3733 | @@ -0,0 +1,34 @@ |
3734 | +/* crash.c - demo program for libcrashreport |
3735 | + |
3736 | + (c) 2004 Martin Pitt <martin@piware.de> |
3737 | + |
3738 | + This file is public domain. |
3739 | +*/ |
3740 | + |
3741 | +#include <stdio.h> |
3742 | + |
3743 | +void h(char* p) { |
3744 | + p[1] = 'a'; |
3745 | +} |
3746 | + |
3747 | +int g( int x, int y ) |
3748 | +{ |
3749 | + char* s = NULL; |
3750 | + h(s); |
3751 | + return x+y; |
3752 | +} |
3753 | + |
3754 | +int f( int x ) |
3755 | +{ |
3756 | + return g( x, 42 ); |
3757 | +} |
3758 | + |
3759 | +int |
3760 | +main() |
3761 | +{ |
3762 | + int x; |
3763 | + |
3764 | + x = f(1); |
3765 | + printf( "x = %i, terminating normally now.\n", x ); |
3766 | + return 0; |
3767 | +} |
3768 | |
3769 | === added file 'tests/dhtest.tmpdirarg/crash2.c' |
3770 | --- tests/dhtest.tmpdirarg/crash2.c 1970-01-01 00:00:00 +0000 |
3771 | +++ tests/dhtest.tmpdirarg/crash2.c 2010-04-21 20:29:14 +0000 |
3772 | @@ -0,0 +1,39 @@ |
3773 | +/* crash.c - demo program for libcrashreport |
3774 | + |
3775 | + (c) 2004 Martin Pitt <martin@piware.de> |
3776 | + |
3777 | + This file is public domain. |
3778 | +*/ |
3779 | + |
3780 | +#include <stdio.h> |
3781 | +#include <math.h> |
3782 | +#include <signal.h> |
3783 | + |
3784 | +double h() |
3785 | +{ |
3786 | + double a = 1./0; |
3787 | + if (isinf(a)) |
3788 | + raise(SIGFPE); |
3789 | + return a; |
3790 | +} |
3791 | + |
3792 | +int g( int x, int y ) |
3793 | +{ |
3794 | + |
3795 | + return x+y+(int) h(); |
3796 | +} |
3797 | + |
3798 | +int f( int x ) |
3799 | +{ |
3800 | + return g( x, 42 ); |
3801 | +} |
3802 | + |
3803 | +int |
3804 | +main() |
3805 | +{ |
3806 | + int x; |
3807 | + |
3808 | + x = f(1); |
3809 | + printf( "x = %i, terminating normally now.\n", x ); |
3810 | + return 0; |
3811 | +} |
3812 | |
3813 | === added directory 'tests/dhtest.tmpdirarg/debian' |
3814 | === added file 'tests/dhtest.tmpdirarg/debian/changelog' |
3815 | --- tests/dhtest.tmpdirarg/debian/changelog 1970-01-01 00:00:00 +0000 |
3816 | +++ tests/dhtest.tmpdirarg/debian/changelog 2010-04-21 20:29:14 +0000 |
3817 | @@ -0,0 +1,5 @@ |
3818 | +dhtest.tmpdirarg (1) foo; urgency=low |
3819 | + |
3820 | + * Initial release. |
3821 | + |
3822 | + -- Martin Pitt <martin.pitt@ubuntu.com> Fri, 16 Jun 2006 10:49:56 +0200 |
3823 | |
3824 | === added file 'tests/dhtest.tmpdirarg/debian/compat' |
3825 | --- tests/dhtest.tmpdirarg/debian/compat 1970-01-01 00:00:00 +0000 |
3826 | +++ tests/dhtest.tmpdirarg/debian/compat 2010-04-21 20:29:14 +0000 |
3827 | @@ -0,0 +1,1 @@ |
3828 | +5 |
3829 | |
3830 | === added file 'tests/dhtest.tmpdirarg/debian/control' |
3831 | --- tests/dhtest.tmpdirarg/debian/control 1970-01-01 00:00:00 +0000 |
3832 | +++ tests/dhtest.tmpdirarg/debian/control 2010-04-21 20:29:14 +0000 |
3833 | @@ -0,0 +1,12 @@ |
3834 | +Source: dhtest.tmpdirarg |
3835 | +Section: utils |
3836 | +Priority: extra |
3837 | +Maintainer: Martin Pitt <martin.pitt@ubuntu.com> |
3838 | +Build-Depends: debhelper (>= 4.1.0) |
3839 | +Standards-Version: 3.7.2 |
3840 | + |
3841 | +Package: dhtest1 |
3842 | +Architecture: any |
3843 | +Depends: ${shlibs:Depends} |
3844 | +Description: crash with a SIGSEGV |
3845 | + Test package |
3846 | |
3847 | === added file 'tests/dhtest.tmpdirarg/debian/copyright' |
3848 | --- tests/dhtest.tmpdirarg/debian/copyright 1970-01-01 00:00:00 +0000 |
3849 | +++ tests/dhtest.tmpdirarg/debian/copyright 2010-04-21 20:29:14 +0000 |
3850 | @@ -0,0 +1,1 @@ |
3851 | +foo |
3852 | |
3853 | === added file 'tests/dhtest.tmpdirarg/debian/dhtest1.install' |
3854 | --- tests/dhtest.tmpdirarg/debian/dhtest1.install 1970-01-01 00:00:00 +0000 |
3855 | +++ tests/dhtest.tmpdirarg/debian/dhtest1.install 2010-04-21 20:29:14 +0000 |
3856 | @@ -0,0 +1,1 @@ |
3857 | +/usr/bin/crash |
3858 | |
3859 | === added file 'tests/dhtest.tmpdirarg/debian/rules' |
3860 | --- tests/dhtest.tmpdirarg/debian/rules 1970-01-01 00:00:00 +0000 |
3861 | +++ tests/dhtest.tmpdirarg/debian/rules 2010-04-21 20:29:14 +0000 |
3862 | @@ -0,0 +1,57 @@ |
3863 | +#!/usr/bin/make -f |
3864 | + |
3865 | +# Uncomment this to turn on verbose mode. |
3866 | +#export DH_VERBOSE=1 |
3867 | + |
3868 | +# This has to be exported to make some magic below work. |
3869 | +export DH_OPTIONS |
3870 | + |
3871 | +CFLAGS = -Wall -g |
3872 | + |
3873 | +ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS))) |
3874 | + CFLAGS += -O0 |
3875 | +else |
3876 | + CFLAGS += -O2 |
3877 | +endif |
3878 | + |
3879 | +build: build-arch |
3880 | +build-arch: build-arch-stamp |
3881 | +build-arch-stamp: |
3882 | + $(MAKE) |
3883 | + touch build-arch-stamp |
3884 | + |
3885 | +clean: |
3886 | + dh_testdir |
3887 | + dh_testroot |
3888 | + rm -f build-arch-stamp |
3889 | + -$(MAKE) clean |
3890 | + dh_clean -Pdebian/build/pkgdir |
3891 | + rmdir debian/build 2>/dev/null || true |
3892 | + |
3893 | +install: install-arch |
3894 | + |
3895 | +install-arch: |
3896 | + dh_testdir |
3897 | + dh_testroot |
3898 | + dh_clean -k -s |
3899 | + dh_installdirs -s -Pdebian/build/pkgdir |
3900 | + $(MAKE) install DESTDIR=$(CURDIR)/debian/tmp |
3901 | + dh_install -s -Pdebian/build/pkgdir --sourcedir=debian/tmp |
3902 | + |
3903 | +# Build architecture dependant packages using the common target. |
3904 | +binary-arch: build-arch install-arch |
3905 | + dh_testdir -a -Pdebian/build/pkgdir |
3906 | + dh_testroot -a -Pdebian/build/pkgdir |
3907 | + dh_installchangelogs -a -Pdebian/build/pkgdir |
3908 | + dh_installdocs -a -Pdebian/build/pkgdir |
3909 | + dh_strip -a -Pdebian/build/pkgdir |
3910 | + dh_compress -a -Pdebian/build/pkgdir |
3911 | + dh_fixperms -a -Pdebian/build/pkgdir |
3912 | + dh_installdeb -a -Pdebian/build/pkgdir |
3913 | + dh_shlibdeps -a -Pdebian/build/pkgdir |
3914 | + dh_gencontrol -a -Pdebian/build/pkgdir |
3915 | + dh_md5sums -a -Pdebian/build/pkgdir |
3916 | + dh_builddeb -a -Pdebian/build/pkgdir |
3917 | + |
3918 | +binary: binary-arch binary-indep |
3919 | +.PHONY: build clean binary-indep binary-arch binary install install-indep install-arch |
3920 | |
3921 | === added directory 'tests/dhtest.versionoverride' |
3922 | === added file 'tests/dhtest.versionoverride/Makefile' |
3923 | --- tests/dhtest.versionoverride/Makefile 1970-01-01 00:00:00 +0000 |
3924 | +++ tests/dhtest.versionoverride/Makefile 2010-04-21 20:29:14 +0000 |
3925 | @@ -0,0 +1,18 @@ |
3926 | +CFLAGS= -g -Wall -W -O0 |
3927 | + |
3928 | +LIBNAME=crashrep |
3929 | + |
3930 | +all: crash crash2 |
3931 | + |
3932 | +crash: crash.o |
3933 | + $(CC) $^ -o $@ |
3934 | + |
3935 | +crash2: crash2.o |
3936 | + $(CC) $^ -o $@ |
3937 | + |
3938 | +clean: |
3939 | + rm -f *.o crash crash2 |
3940 | + |
3941 | +install: all |
3942 | + install -d $(DESTDIR)/usr/bin |
3943 | + install crash crash2 $(DESTDIR)/usr/bin |
3944 | |
3945 | === added file 'tests/dhtest.versionoverride/crash.c' |
3946 | --- tests/dhtest.versionoverride/crash.c 1970-01-01 00:00:00 +0000 |
3947 | +++ tests/dhtest.versionoverride/crash.c 2010-04-21 20:29:14 +0000 |
3948 | @@ -0,0 +1,34 @@ |
3949 | +/* crash.c - demo program for libcrashreport |
3950 | + |
3951 | + (c) 2004 Martin Pitt <martin@piware.de> |
3952 | + |
3953 | + This file is public domain. |
3954 | +*/ |
3955 | + |
3956 | +#include <stdio.h> |
3957 | + |
3958 | +void h(char* p) { |
3959 | + p[1] = 'a'; |
3960 | +} |
3961 | + |
3962 | +int g( int x, int y ) |
3963 | +{ |
3964 | + char* s = NULL; |
3965 | + h(s); |
3966 | + return x+y; |
3967 | +} |
3968 | + |
3969 | +int f( int x ) |
3970 | +{ |
3971 | + return g( x, 42 ); |
3972 | +} |
3973 | + |
3974 | +int |
3975 | +main() |
3976 | +{ |
3977 | + int x; |
3978 | + |
3979 | + x = f(1); |
3980 | + printf( "x = %i, terminating normally now.\n", x ); |
3981 | + return 0; |
3982 | +} |
3983 | |
3984 | === added file 'tests/dhtest.versionoverride/crash2.c' |
3985 | --- tests/dhtest.versionoverride/crash2.c 1970-01-01 00:00:00 +0000 |
3986 | +++ tests/dhtest.versionoverride/crash2.c 2010-04-21 20:29:14 +0000 |
3987 | @@ -0,0 +1,39 @@ |
3988 | +/* crash.c - demo program for libcrashreport |
3989 | + |
3990 | + (c) 2004 Martin Pitt <martin@piware.de> |
3991 | + |
3992 | + This file is public domain. |
3993 | +*/ |
3994 | + |
3995 | +#include <stdio.h> |
3996 | +#include <math.h> |
3997 | +#include <signal.h> |
3998 | + |
3999 | +double h() |
4000 | +{ |
4001 | + double a = 1./0; |
4002 | + if (isinf(a)) |
4003 | + raise(SIGFPE); |
4004 | + return a; |
4005 | +} |
4006 | + |
4007 | +int g( int x, int y ) |
4008 | +{ |
4009 | + |
4010 | + return x+y+(int) h(); |
4011 | +} |
4012 | + |
4013 | +int f( int x ) |
4014 | +{ |
4015 | + return g( x, 42 ); |
4016 | +} |
4017 | + |
4018 | +int |
4019 | +main() |
4020 | +{ |
4021 | + int x; |
4022 | + |
4023 | + x = f(1); |
4024 | + printf( "x = %i, terminating normally now.\n", x ); |
4025 | + return 0; |
4026 | +} |
4027 | |
4028 | === added directory 'tests/dhtest.versionoverride/debian' |
4029 | === added file 'tests/dhtest.versionoverride/debian/changelog' |
4030 | --- tests/dhtest.versionoverride/debian/changelog 1970-01-01 00:00:00 +0000 |
4031 | +++ tests/dhtest.versionoverride/debian/changelog 2010-04-21 20:29:14 +0000 |
4032 | @@ -0,0 +1,5 @@ |
4033 | +dhtest.versionoverride (1) foo; urgency=low |
4034 | + |
4035 | + * Initial release. |
4036 | + |
4037 | + -- Martin Pitt <martin.pitt@ubuntu.com> Fri, 16 Jun 2006 10:49:56 +0200 |
4038 | |
4039 | === added file 'tests/dhtest.versionoverride/debian/compat' |
4040 | --- tests/dhtest.versionoverride/debian/compat 1970-01-01 00:00:00 +0000 |
4041 | +++ tests/dhtest.versionoverride/debian/compat 2010-04-21 20:29:14 +0000 |
4042 | @@ -0,0 +1,1 @@ |
4043 | +5 |
4044 | |
4045 | === added file 'tests/dhtest.versionoverride/debian/control' |
4046 | --- tests/dhtest.versionoverride/debian/control 1970-01-01 00:00:00 +0000 |
4047 | +++ tests/dhtest.versionoverride/debian/control 2010-04-21 20:29:14 +0000 |
4048 | @@ -0,0 +1,18 @@ |
4049 | +Source: dhtest.versionoverride |
4050 | +Section: utils |
4051 | +Priority: extra |
4052 | +Maintainer: Martin Pitt <martin.pitt@ubuntu.com> |
4053 | +Build-Depends: debhelper (>= 4.1.0) |
4054 | +Standards-Version: 3.7.2 |
4055 | + |
4056 | +Package: dhtest1 |
4057 | +Architecture: any |
4058 | +Depends: ${shlibs:Depends} |
4059 | +Description: crash with a SIGSEGV |
4060 | + Test package |
4061 | + |
4062 | +Package: dhtest2 |
4063 | +Architecture: any |
4064 | +Depends: ${shlibs:Depends} |
4065 | +Description: crash with a SIGFPE |
4066 | + Test package |
4067 | |
4068 | === added file 'tests/dhtest.versionoverride/debian/copyright' |
4069 | --- tests/dhtest.versionoverride/debian/copyright 1970-01-01 00:00:00 +0000 |
4070 | +++ tests/dhtest.versionoverride/debian/copyright 2010-04-21 20:29:14 +0000 |
4071 | @@ -0,0 +1,1 @@ |
4072 | +foo |
4073 | |
4074 | === added file 'tests/dhtest.versionoverride/debian/dhtest1.install' |
4075 | --- tests/dhtest.versionoverride/debian/dhtest1.install 1970-01-01 00:00:00 +0000 |
4076 | +++ tests/dhtest.versionoverride/debian/dhtest1.install 2010-04-21 20:29:14 +0000 |
4077 | @@ -0,0 +1,1 @@ |
4078 | +/usr/bin/crash |
4079 | |
4080 | === added file 'tests/dhtest.versionoverride/debian/dhtest2.install' |
4081 | --- tests/dhtest.versionoverride/debian/dhtest2.install 1970-01-01 00:00:00 +0000 |
4082 | +++ tests/dhtest.versionoverride/debian/dhtest2.install 2010-04-21 20:29:14 +0000 |
4083 | @@ -0,0 +1,1 @@ |
4084 | +/usr/bin/crash2 |
4085 | |
4086 | === added file 'tests/dhtest.versionoverride/debian/rules' |
4087 | --- tests/dhtest.versionoverride/debian/rules 1970-01-01 00:00:00 +0000 |
4088 | +++ tests/dhtest.versionoverride/debian/rules 2010-04-21 20:29:14 +0000 |
4089 | @@ -0,0 +1,57 @@ |
4090 | +#!/usr/bin/make -f |
4091 | + |
4092 | +# Uncomment this to turn on verbose mode. |
4093 | +#export DH_VERBOSE=1 |
4094 | + |
4095 | +# This has to be exported to make some magic below work. |
4096 | +export DH_OPTIONS |
4097 | + |
4098 | +CFLAGS = -Wall -g |
4099 | + |
4100 | +ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS))) |
4101 | + CFLAGS += -O0 |
4102 | +else |
4103 | + CFLAGS += -O2 |
4104 | +endif |
4105 | + |
4106 | +#Architecture |
4107 | +build: build-arch |
4108 | + |
4109 | +build-arch: build-arch-stamp |
4110 | +build-arch-stamp: |
4111 | + $(MAKE) |
4112 | + touch build-arch-stamp |
4113 | + |
4114 | +clean: |
4115 | + dh_testdir |
4116 | + dh_testroot |
4117 | + rm -f build-arch-stamp |
4118 | + -$(MAKE) clean |
4119 | + dh_clean |
4120 | + |
4121 | +install-arch: |
4122 | + dh_testdir |
4123 | + dh_testroot |
4124 | + dh_clean -k -s |
4125 | + dh_installdirs -s |
4126 | + $(MAKE) install DESTDIR=$(CURDIR)/debian/tmp |
4127 | + dh_install -s --sourcedir=debian/tmp |
4128 | + |
4129 | +# Build architecture dependant packages using the common target. |
4130 | +binary-arch: build-arch install-arch |
4131 | + dh_testdir |
4132 | + dh_testroot |
4133 | + dh_installchangelogs -a |
4134 | + dh_installdocs -a |
4135 | + dh_strip -a |
4136 | + dh_compress -a |
4137 | + dh_fixperms -a |
4138 | + dh_installdeb -a |
4139 | + dh_shlibdeps -a |
4140 | + dh_gencontrol -pdhtest1 |
4141 | + dh_gencontrol -pdhtest2 -- -v1:42 |
4142 | + dh_md5sums -a |
4143 | + dh_builddeb -a |
4144 | + |
4145 | +binary: binary-arch |
4146 | +.PHONY: build clean binary-indep binary-arch binary install install-indep install-arch |
4147 | |
4148 | === added directory 'tests/dhtest.whitespace' |
4149 | === added file 'tests/dhtest.whitespace/Makefile' |
4150 | --- tests/dhtest.whitespace/Makefile 1970-01-01 00:00:00 +0000 |
4151 | +++ tests/dhtest.whitespace/Makefile 2010-04-21 20:29:14 +0000 |
4152 | @@ -0,0 +1,18 @@ |
4153 | +CFLAGS= -g -Wall -W -O0 |
4154 | + |
4155 | +LIBNAME=crashrep |
4156 | + |
4157 | +all: crash crash2 |
4158 | + |
4159 | +crash: crash.o |
4160 | + $(CC) $^ -o $@ |
4161 | + |
4162 | +crash2: crash2.o |
4163 | + $(CC) $^ -o $@ |
4164 | + |
4165 | +clean: |
4166 | + rm -f *.o crash crash2 |
4167 | + |
4168 | +install: all |
4169 | + install -d $(DESTDIR)/usr/bin |
4170 | + install crash crash2 $(DESTDIR)/usr/bin |
4171 | |
4172 | === added file 'tests/dhtest.whitespace/crash.c' |
4173 | --- tests/dhtest.whitespace/crash.c 1970-01-01 00:00:00 +0000 |
4174 | +++ tests/dhtest.whitespace/crash.c 2010-04-21 20:29:14 +0000 |
4175 | @@ -0,0 +1,34 @@ |
4176 | +/* crash.c - demo program for libcrashreport |
4177 | + |
4178 | + (c) 2004 Martin Pitt <martin@piware.de> |
4179 | + |
4180 | + This file is public domain. |
4181 | +*/ |
4182 | + |
4183 | +#include <stdio.h> |
4184 | + |
4185 | +void h(char* p) { |
4186 | + p[1] = 'a'; |
4187 | +} |
4188 | + |
4189 | +int g( int x, int y ) |
4190 | +{ |
4191 | + char* s = NULL; |
4192 | + h(s); |
4193 | + return x+y; |
4194 | +} |
4195 | + |
4196 | +int f( int x ) |
4197 | +{ |
4198 | + return g( x, 42 ); |
4199 | +} |
4200 | + |
4201 | +int |
4202 | +main() |
4203 | +{ |
4204 | + int x; |
4205 | + |
4206 | + x = f(1); |
4207 | + printf( "x = %i, terminating normally now.\n", x ); |
4208 | + return 0; |
4209 | +} |
4210 | |
4211 | === added file 'tests/dhtest.whitespace/crash2.c' |
4212 | --- tests/dhtest.whitespace/crash2.c 1970-01-01 00:00:00 +0000 |
4213 | +++ tests/dhtest.whitespace/crash2.c 2010-04-21 20:29:14 +0000 |
4214 | @@ -0,0 +1,39 @@ |
4215 | +/* crash.c - demo program for libcrashreport |
4216 | + |
4217 | + (c) 2004 Martin Pitt <martin@piware.de> |
4218 | + |
4219 | + This file is public domain. |
4220 | +*/ |
4221 | + |
4222 | +#include <stdio.h> |
4223 | +#include <math.h> |
4224 | +#include <signal.h> |
4225 | + |
4226 | +double h() |
4227 | +{ |
4228 | + double a = 1./0; |
4229 | + if (isinf(a)) |
4230 | + raise(SIGFPE); |
4231 | + return a; |
4232 | +} |
4233 | + |
4234 | +int g( int x, int y ) |
4235 | +{ |
4236 | + |
4237 | + return x+y+(int) h(); |
4238 | +} |
4239 | + |
4240 | +int f( int x ) |
4241 | +{ |
4242 | + return g( x, 42 ); |
4243 | +} |
4244 | + |
4245 | +int |
4246 | +main() |
4247 | +{ |
4248 | + int x; |
4249 | + |
4250 | + x = f(1); |
4251 | + printf( "x = %i, terminating normally now.\n", x ); |
4252 | + return 0; |
4253 | +} |
4254 | |
4255 | === added directory 'tests/dhtest.whitespace/debian' |
4256 | === added file 'tests/dhtest.whitespace/debian/changelog' |
4257 | --- tests/dhtest.whitespace/debian/changelog 1970-01-01 00:00:00 +0000 |
4258 | +++ tests/dhtest.whitespace/debian/changelog 2010-04-21 20:29:14 +0000 |
4259 | @@ -0,0 +1,5 @@ |
4260 | +dhtest.whitespace (1:2.3-1) foo; urgency=low |
4261 | + |
4262 | + * Initial release. |
4263 | + |
4264 | + -- Martin Pitt <martin.pitt@ubuntu.com> Fri, 16 Jun 2006 10:49:56 +0200 |
4265 | |
4266 | === added file 'tests/dhtest.whitespace/debian/compat' |
4267 | --- tests/dhtest.whitespace/debian/compat 1970-01-01 00:00:00 +0000 |
4268 | +++ tests/dhtest.whitespace/debian/compat 2010-04-21 20:29:14 +0000 |
4269 | @@ -0,0 +1,1 @@ |
4270 | +5 |
4271 | |
4272 | === added file 'tests/dhtest.whitespace/debian/control' |
4273 | --- tests/dhtest.whitespace/debian/control 1970-01-01 00:00:00 +0000 |
4274 | +++ tests/dhtest.whitespace/debian/control 2010-04-21 20:29:14 +0000 |
4275 | @@ -0,0 +1,35 @@ |
4276 | +Source: dhtest.whitespace |
4277 | +Section: utils |
4278 | +Priority: extra |
4279 | +Maintainer: Martin Pitt <martin.pitt@ubuntu.com> |
4280 | +Build-Depends: debhelper (>= 4.1.0) |
4281 | +Standards-Version: 3.7.2 |
4282 | + |
4283 | +Package: dhtest1 |
4284 | +Architecture: any |
4285 | +Description: crash with a SIGSEGV |
4286 | + Test package |
4287 | +Depends: ${shlibs:Depends}, |
4288 | + coreutils (>> ${foo}) |
4289 | +Recommends: dhtest2 (>> ${foo}) |
4290 | +Suggests: dhtestall (>= ${foo}), ${bar}-core |
4291 | +Conflicts: dhtestall (<< ${foo}) |
4292 | +Breaks: dhtestall (<< ${foo}) |
4293 | +Replaces: dhtestall (<< ${foo}) |
4294 | + |
4295 | +Package: dhtest2 |
4296 | +Architecture: any |
4297 | +Description: crash with a SIGFPE |
4298 | + Test package |
4299 | +Depends: ${shlibs:Depends}, |
4300 | + coreutils, |
4301 | + bash |
4302 | + |
4303 | +Package: dhtestall |
4304 | +Architecture: all |
4305 | +Depends: ${shlibs:Depends} |
4306 | +Description: dummy arch-all package |
4307 | + Test package |
4308 | +Pre-Depends: coreutils, |
4309 | + bash, |
4310 | + findutils |
4311 | |
4312 | === added file 'tests/dhtest.whitespace/debian/copyright' |
4313 | --- tests/dhtest.whitespace/debian/copyright 1970-01-01 00:00:00 +0000 |
4314 | +++ tests/dhtest.whitespace/debian/copyright 2010-04-21 20:29:14 +0000 |
4315 | @@ -0,0 +1,1 @@ |
4316 | +foo |
4317 | |
4318 | === added file 'tests/dhtest.whitespace/debian/dhtest1.install' |
4319 | --- tests/dhtest.whitespace/debian/dhtest1.install 1970-01-01 00:00:00 +0000 |
4320 | +++ tests/dhtest.whitespace/debian/dhtest1.install 2010-04-21 20:29:14 +0000 |
4321 | @@ -0,0 +1,1 @@ |
4322 | +/usr/bin/crash |
4323 | |
4324 | === added file 'tests/dhtest.whitespace/debian/dhtest2.install' |
4325 | --- tests/dhtest.whitespace/debian/dhtest2.install 1970-01-01 00:00:00 +0000 |
4326 | +++ tests/dhtest.whitespace/debian/dhtest2.install 2010-04-21 20:29:14 +0000 |
4327 | @@ -0,0 +1,1 @@ |
4328 | +/usr/bin/crash2 |
4329 | |
4330 | === added file 'tests/dhtest.whitespace/debian/rules' |
4331 | --- tests/dhtest.whitespace/debian/rules 1970-01-01 00:00:00 +0000 |
4332 | +++ tests/dhtest.whitespace/debian/rules 2010-04-21 20:29:14 +0000 |
4333 | @@ -0,0 +1,76 @@ |
4334 | +#!/usr/bin/make -f |
4335 | + |
4336 | +# Uncomment this to turn on verbose mode. |
4337 | +#export DH_VERBOSE=1 |
4338 | + |
4339 | +# This has to be exported to make some magic below work. |
4340 | +export DH_OPTIONS |
4341 | + |
4342 | +CFLAGS = -Wall -g |
4343 | + |
4344 | +ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS))) |
4345 | + CFLAGS += -O0 |
4346 | +else |
4347 | + CFLAGS += -O2 |
4348 | +endif |
4349 | + |
4350 | +#Architecture |
4351 | +build: build-arch build-indep |
4352 | + |
4353 | +build-arch: build-arch-stamp |
4354 | +build-arch-stamp: |
4355 | + $(MAKE) |
4356 | + touch build-arch-stamp |
4357 | + |
4358 | +build-indep: |
4359 | + |
4360 | +clean: |
4361 | + dh_testdir |
4362 | + dh_testroot |
4363 | + rm -f build-arch-stamp build-indep-stamp |
4364 | + -$(MAKE) clean |
4365 | + dh_clean |
4366 | + |
4367 | +install: install-indep install-arch |
4368 | +install-indep: |
4369 | + dh_testdir |
4370 | + dh_testroot |
4371 | + dh_clean -k -i |
4372 | + dh_installdirs -i |
4373 | + dh_install -i --sourcedir=debian/tmp |
4374 | + |
4375 | +install-arch: |
4376 | + dh_testdir |
4377 | + dh_testroot |
4378 | + dh_clean -k -s |
4379 | + dh_installdirs -s |
4380 | + $(MAKE) install DESTDIR=$(CURDIR)/debian/tmp |
4381 | + dh_install -s --sourcedir=debian/tmp |
4382 | + |
4383 | +# Must not depend on anything. This is to be called by |
4384 | +# binary-arch/binary-indep |
4385 | +# in another 'make' thread. |
4386 | +binary-common: |
4387 | + dh_testdir |
4388 | + dh_testroot |
4389 | + dh_installchangelogs |
4390 | + dh_installdocs |
4391 | + dh_strip |
4392 | + dh_compress |
4393 | + dh_fixperms |
4394 | + dh_installdeb |
4395 | + dh_shlibdeps |
4396 | + dh_gencontrol -u'-Vfoo=1 -Vbar=lsb' |
4397 | + dh_md5sums |
4398 | + dh_builddeb |
4399 | + |
4400 | +# Build architecture independant packages using the common target. |
4401 | +binary-indep: build-indep install-indep |
4402 | + $(MAKE) -f debian/rules DH_OPTIONS=-i binary-common |
4403 | + |
4404 | +# Build architecture dependant packages using the common target. |
4405 | +binary-arch: build-arch install-arch |
4406 | + $(MAKE) -f debian/rules DH_OPTIONS=-a binary-common |
4407 | + |
4408 | +binary: binary-arch binary-indep |
4409 | +.PHONY: build clean binary-indep binary-arch binary install install-indep install-arch |
4410 | |
4411 | === added file 'tests/dhtest/Makefile' |
4412 | --- tests/dhtest/Makefile 1970-01-01 00:00:00 +0000 |
4413 | +++ tests/dhtest/Makefile 2010-04-21 20:29:14 +0000 |
4414 | @@ -0,0 +1,18 @@ |
4415 | +CFLAGS= -g -Wall -W -O0 |
4416 | + |
4417 | +LIBNAME=crashrep |
4418 | + |
4419 | +all: crash crash2 |
4420 | + |
4421 | +crash: crash.o |
4422 | + $(CC) $^ -o $@ |
4423 | + |
4424 | +crash2: crash2.o |
4425 | + $(CC) $^ -o $@ |
4426 | + |
4427 | +clean: |
4428 | + rm -f *.o crash crash2 |
4429 | + |
4430 | +install: all |
4431 | + install -d $(DESTDIR)/usr/bin |
4432 | + install crash crash2 $(DESTDIR)/usr/bin |
4433 | |
4434 | === added file 'tests/dhtest/crash.c' |
4435 | --- tests/dhtest/crash.c 1970-01-01 00:00:00 +0000 |
4436 | +++ tests/dhtest/crash.c 2010-04-21 20:29:14 +0000 |
4437 | @@ -0,0 +1,34 @@ |
4438 | +/* crash.c - demo program for libcrashreport |
4439 | + |
4440 | + (c) 2004 Martin Pitt <martin@piware.de> |
4441 | + |
4442 | + This file is public domain. |
4443 | +*/ |
4444 | + |
4445 | +#include <stdio.h> |
4446 | + |
4447 | +void h(char* p) { |
4448 | + p[1] = 'a'; |
4449 | +} |
4450 | + |
4451 | +int g( int x, int y ) |
4452 | +{ |
4453 | + char* s = NULL; |
4454 | + h(s); |
4455 | + return x+y; |
4456 | +} |
4457 | + |
4458 | +int f( int x ) |
4459 | +{ |
4460 | + return g( x, 42 ); |
4461 | +} |
4462 | + |
4463 | +int |
4464 | +main() |
4465 | +{ |
4466 | + int x; |
4467 | + |
4468 | + x = f(1); |
4469 | + printf( "x = %i, terminating normally now.\n", x ); |
4470 | + return 0; |
4471 | +} |
4472 | |
4473 | === added file 'tests/dhtest/crash2.c' |
4474 | --- tests/dhtest/crash2.c 1970-01-01 00:00:00 +0000 |
4475 | +++ tests/dhtest/crash2.c 2010-04-21 20:29:14 +0000 |
4476 | @@ -0,0 +1,39 @@ |
4477 | +/* crash.c - demo program for libcrashreport |
4478 | + |
4479 | + (c) 2004 Martin Pitt <martin@piware.de> |
4480 | + |
4481 | + This file is public domain. |
4482 | +*/ |
4483 | + |
4484 | +#include <stdio.h> |
4485 | +#include <math.h> |
4486 | +#include <signal.h> |
4487 | + |
4488 | +double h() |
4489 | +{ |
4490 | + double a = 1./0; |
4491 | + if (isinf(a)) |
4492 | + raise(SIGFPE); |
4493 | + return a; |
4494 | +} |
4495 | + |
4496 | +int g( int x, int y ) |
4497 | +{ |
4498 | + |
4499 | + return x+y+(int) h(); |
4500 | +} |
4501 | + |
4502 | +int f( int x ) |
4503 | +{ |
4504 | + return g( x, 42 ); |
4505 | +} |
4506 | + |
4507 | +int |
4508 | +main() |
4509 | +{ |
4510 | + int x; |
4511 | + |
4512 | + x = f(1); |
4513 | + printf( "x = %i, terminating normally now.\n", x ); |
4514 | + return 0; |
4515 | +} |
4516 | |
4517 | === added directory 'tests/dhtest/debian' |
4518 | === added file 'tests/dhtest/debian/changelog' |
4519 | --- tests/dhtest/debian/changelog 1970-01-01 00:00:00 +0000 |
4520 | +++ tests/dhtest/debian/changelog 2010-04-21 20:29:14 +0000 |
4521 | @@ -0,0 +1,5 @@ |
4522 | +dhtest (1:2.3-1) foo; urgency=low |
4523 | + |
4524 | + * Initial release. |
4525 | + |
4526 | + -- Martin Pitt <martin.pitt@ubuntu.com> Fri, 16 Jun 2006 10:49:56 +0200 |
4527 | |
4528 | === added file 'tests/dhtest/debian/compat' |
4529 | --- tests/dhtest/debian/compat 1970-01-01 00:00:00 +0000 |
4530 | +++ tests/dhtest/debian/compat 2010-04-21 20:29:14 +0000 |
4531 | @@ -0,0 +1,1 @@ |
4532 | +5 |
4533 | |
4534 | === added file 'tests/dhtest/debian/control' |
4535 | --- tests/dhtest/debian/control 1970-01-01 00:00:00 +0000 |
4536 | +++ tests/dhtest/debian/control 2010-04-21 20:29:14 +0000 |
4537 | @@ -0,0 +1,30 @@ |
4538 | +Source: dhtest |
4539 | +Section: utils |
4540 | +Priority: extra |
4541 | +Maintainer: Martin Pitt <martin.pitt@ubuntu.com> |
4542 | +Build-Depends: debhelper (>= 4.1.0) |
4543 | +Standards-Version: 3.7.2 |
4544 | + |
4545 | +Package: dhtest1 |
4546 | +Architecture: any |
4547 | +Depends: ${shlibs:Depends}, coreutils (>> ${foo}) |
4548 | +Recommends: dhtest2 (>> ${foo}) |
4549 | +Suggests: dhtestall (>= ${foo}), ${bar}-core |
4550 | +Conflicts: dhtestall (<< ${foo}) |
4551 | +Replaces: dhtestall (<< ${foo}) |
4552 | +Breaks: dhtestall (<< ${foo}) |
4553 | +Description: crash with a SIGSEGV |
4554 | + Test package |
4555 | + |
4556 | +Package: dhtest2 |
4557 | +Architecture: any |
4558 | +Depends: ${shlibs:Depends} |
4559 | +Description: crash with a SIGFPE |
4560 | + Test package |
4561 | + |
4562 | +Package: dhtestall |
4563 | +Architecture: all |
4564 | +Depends: ${shlibs:Depends} |
4565 | +Description: dummy arch-all package |
4566 | + Test package |
4567 | + |
4568 | |
4569 | === added file 'tests/dhtest/debian/copyright' |
4570 | --- tests/dhtest/debian/copyright 1970-01-01 00:00:00 +0000 |
4571 | +++ tests/dhtest/debian/copyright 2010-04-21 20:29:14 +0000 |
4572 | @@ -0,0 +1,1 @@ |
4573 | +foo |
4574 | |
4575 | === added file 'tests/dhtest/debian/dhtest1.install' |
4576 | --- tests/dhtest/debian/dhtest1.install 1970-01-01 00:00:00 +0000 |
4577 | +++ tests/dhtest/debian/dhtest1.install 2010-04-21 20:29:14 +0000 |
4578 | @@ -0,0 +1,1 @@ |
4579 | +/usr/bin/crash |
4580 | |
4581 | === added file 'tests/dhtest/debian/dhtest2.install' |
4582 | --- tests/dhtest/debian/dhtest2.install 1970-01-01 00:00:00 +0000 |
4583 | +++ tests/dhtest/debian/dhtest2.install 2010-04-21 20:29:14 +0000 |
4584 | @@ -0,0 +1,1 @@ |
4585 | +/usr/bin/crash2 |
4586 | |
4587 | === added file 'tests/dhtest/debian/rules' |
4588 | --- tests/dhtest/debian/rules 1970-01-01 00:00:00 +0000 |
4589 | +++ tests/dhtest/debian/rules 2010-04-21 20:29:14 +0000 |
4590 | @@ -0,0 +1,76 @@ |
4591 | +#!/usr/bin/make -f |
4592 | + |
4593 | +# Uncomment this to turn on verbose mode. |
4594 | +#export DH_VERBOSE=1 |
4595 | + |
4596 | +# This has to be exported to make some magic below work. |
4597 | +export DH_OPTIONS |
4598 | + |
4599 | +CFLAGS = -Wall -g |
4600 | + |
4601 | +ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS))) |
4602 | + CFLAGS += -O0 |
4603 | +else |
4604 | + CFLAGS += -O2 |
4605 | +endif |
4606 | + |
4607 | +#Architecture |
4608 | +build: build-arch build-indep |
4609 | + |
4610 | +build-arch: build-arch-stamp |
4611 | +build-arch-stamp: |
4612 | + $(MAKE) |
4613 | + touch build-arch-stamp |
4614 | + |
4615 | +build-indep: |
4616 | + |
4617 | +clean: |
4618 | + dh_testdir |
4619 | + dh_testroot |
4620 | + rm -f build-arch-stamp build-indep-stamp |
4621 | + -$(MAKE) clean |
4622 | + dh_clean |
4623 | + |
4624 | +install: install-indep install-arch |
4625 | +install-indep: |
4626 | + dh_testdir |
4627 | + dh_testroot |
4628 | + dh_clean -k -i |
4629 | + dh_installdirs -i |
4630 | + dh_install -i --sourcedir=debian/tmp |
4631 | + |
4632 | +install-arch: |
4633 | + dh_testdir |
4634 | + dh_testroot |
4635 | + dh_clean -k -s |
4636 | + dh_installdirs -s |
4637 | + $(MAKE) install DESTDIR=$(CURDIR)/debian/tmp |
4638 | + dh_install -s --sourcedir=debian/tmp |
4639 | + |
4640 | +# Must not depend on anything. This is to be called by |
4641 | +# binary-arch/binary-indep |
4642 | +# in another 'make' thread. |
4643 | +binary-common: |
4644 | + dh_testdir |
4645 | + dh_testroot |
4646 | + dh_installchangelogs |
4647 | + dh_installdocs |
4648 | + dh_strip |
4649 | + dh_compress |
4650 | + dh_fixperms |
4651 | + dh_installdeb |
4652 | + dh_shlibdeps |
4653 | + dh_gencontrol -u'-Vfoo=1 -Vbar=lsb' |
4654 | + dh_md5sums |
4655 | + dh_builddeb |
4656 | + |
4657 | +# Build architecture independant packages using the common target. |
4658 | +binary-indep: build-indep install-indep |
4659 | + $(MAKE) -f debian/rules DH_OPTIONS=-i binary-common |
4660 | + |
4661 | +# Build architecture dependant packages using the common target. |
4662 | +binary-arch: build-arch install-arch |
4663 | + $(MAKE) -f debian/rules DH_OPTIONS=-a binary-common |
4664 | + |
4665 | +binary: binary-arch binary-indep |
4666 | +.PHONY: build clean binary-indep binary-arch binary install install-indep install-arch |
4667 | |
4668 | === added file 'tests/run' |
4669 | --- tests/run 1970-01-01 00:00:00 +0000 |
4670 | +++ tests/run 2010-04-21 20:29:14 +0000 |
4671 | @@ -0,0 +1,107 @@ |
4672 | +#!/bin/sh -e |
4673 | + |
4674 | +TESTSOURCES="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" |
4675 | + |
4676 | +print_result() { |
4677 | + if [ -n "$fail" ]; then |
4678 | + echo "FAIL: $1" |
4679 | + echo "Output:" |
4680 | + echo '---------------------------------------------------------------------' |
4681 | + echo "$2" |
4682 | + echo '---------------------------------------------------------------------' |
4683 | + echo Please remove testsuite.tmp after examination |
4684 | + exit 1 |
4685 | + else |
4686 | + echo "PASS: $1" |
4687 | + fi |
4688 | + unset fail |
4689 | + return 0 |
4690 | +} |
4691 | + |
4692 | +# Arguments: <command> <test suite description> |
4693 | +# execute given command, pass test if it exits successfully, fail test if not. |
4694 | +# In the latter case, print command output and abort |
4695 | +check_command() { |
4696 | + out=`$1 2>&1` || fail=1 |
4697 | + print_result "$2" "$out" |
4698 | +} |
4699 | + |
4700 | +# Arguments: <application deb> <corresponding dbgsym deb> |
4701 | +check_pkg_pair() { |
4702 | + deb="$1" |
4703 | + ddeb="$2" |
4704 | + mkdir unpacked |
4705 | + dpkg -x $deb unpacked |
4706 | + dpkg -x $ddeb unpacked |
4707 | + |
4708 | + for bin in unpacked/usr/bin/*; do |
4709 | + # check for debuglink section |
4710 | + objdump -j .gnu_debuglink -s $bin | grep -q .gnu_debuglink || fail=1 |
4711 | + print_result "$bin has .gnu_debuglink section" "`objdump -j .gnu_debuglink -s $bin`" |
4712 | + |
4713 | + # check for good backtrace |
4714 | + bt=`gdb --batch -ex "symbol-file unpacked/usr/lib/debug/${bin##unpacked/}" -ex run -ex 'bt' $bin` |
4715 | + echo "$bt" | grep -q 'g (x=1, y=42)' || fail=1 |
4716 | + print_result "$bin: executable and debug symbols produce good backtrace" "$bt" |
4717 | + done |
4718 | + rm -rf unpacked |
4719 | +} |
4720 | + |
4721 | +ROOTDIR=$(readlink -f `dirname $0`/..) |
4722 | +cd $ROOTDIR/tests |
4723 | +ORIGDIR=`pwd` |
4724 | +mkdir testsuite.tmp |
4725 | +cd testsuite.tmp |
4726 | + |
4727 | +for s in $TESTSOURCES; do |
4728 | + rm -rf * |
4729 | + |
4730 | + # copy source package into test directory |
4731 | + cp -r ../$s . |
4732 | + |
4733 | + # build it |
4734 | + cd $s |
4735 | + 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" |
4736 | + # clean it |
4737 | + check_command "fakeroot debian/rules clean" "Cleaning source package $s" |
4738 | + cd .. |
4739 | + # check for leftovers |
4740 | + check_command "diff -ur $s ../$s" "No leftover files after cleaning $s" |
4741 | + |
4742 | + for deb in *.deb; do |
4743 | + pkg=`echo $deb|cut -d_ -f1` |
4744 | + version=`echo $deb|cut -d_ -f2` |
4745 | + version=${version#*:} # strip off epoch |
4746 | + arch=`echo ${deb%.deb}|cut -d_ -f3` |
4747 | + |
4748 | + if echo $pkg | grep -q -- '-dbg$'; then |
4749 | + check_pkg_pair "${pkg%-dbg}_${version}_${arch}.deb" "${pkg}_${version}_${arch}.deb" |
4750 | + else |
4751 | + if dpkg -c $deb | grep -q usr/bin && ! echo $deb | grep -q nostrip; then |
4752 | + check_command "test -f ${pkg}-dbgsym_${version}_${arch}.ddeb" "dbgsym ddeb for $deb exists" |
4753 | + check_pkg_pair "${pkg}_${version}_${arch}.deb" "${pkg}-dbgsym_${version}_${arch}.ddeb" |
4754 | + else |
4755 | + check_command "test ! -f ${pkg}-dbgsym_${version}_${arch}.ddeb" "No dbgsym ddeb for $deb" |
4756 | + fi |
4757 | + fi |
4758 | + done |
4759 | + |
4760 | + # check that all existing -dbg packages are conflicted to in -dbgsym, and |
4761 | + # that they have all other dependency fields stripped |
4762 | + dbg_pkgs=`ls *-dbg_*deb 2>/dev/null| cut -f1 -d_` |
4763 | + for ddeb in *.ddeb; do |
4764 | + dpkg -I $ddeb | egrep -q '^[[:space:]]*(Pre-Depends|Recommends|Suggests|Provides|Replaces|Breaks|Essential):' && fail=1 || true |
4765 | + print_result "$ddeb has other dependencies stripped" "`dpkg -I $ddeb`" |
4766 | + |
4767 | + for c in $dbg_pkgs; do |
4768 | + dpkg -I $ddeb | grep '^[[:space:]]*Conflicts: ' | grep -qw $c || fail=1 |
4769 | + print_result "$ddeb conflicts to $c" "`dpkg -I $ddeb`" |
4770 | + done |
4771 | + |
4772 | + dpkg -I $ddeb | grep -q "^[[:space:]]*Source: $s\$" || fail=1 |
4773 | + print_result "$ddeb has a correct Source field" |
4774 | + done |
4775 | +done |
4776 | + |
4777 | +cd "$ORIGDIR" |
4778 | +rm -r testsuite.tmp |
Wrong branch, using the other merge request in https:/ /code.launchpad .net/~tormodvol den/ubuntu/ lucid/pkg- create- dbgsym/ doublestrip/ +merge/ 23880
Thanks!