Merge lp:~ubuntu-branches/ubuntu/lucid/quilt/lucid-201002122335 into lp:ubuntu/lucid/quilt
- Lucid (10.04)
- lucid-201002122335
- Merge into lucid
Proposed by
James Westby
Status: | Needs review |
---|---|
Proposed branch: | lp:~ubuntu-branches/ubuntu/lucid/quilt/lucid-201002122335 |
Merge into: | lp:ubuntu/lucid/quilt |
Diff against target: |
3720 lines (+3406/-55) (has conflicts) 17 files modified
Makefile.in (+19/-6) debian/README.Debian (+38/-0) debian/README.source (+60/-0) debian/changelog (+814/-0) debian/control (+41/-0) debian/gbp.conf (+9/-0) debian/patches/arch_all (+1128/-0) debian/patches/series (+24/-0) debian/patches/test_broken_patches (+54/-0) debian/patchsys-quilt.mk (+127/-0) debian/rules (+155/-49) lib/backup-files.c.OTHER (+601/-0) quilt/mail.in (+49/-0) quilt/pop.in (+7/-0) quilt/scripts/patchfns.in (+78/-0) test/mail.test (+19/-0) test/symlink_pc.test.ignoreme (+183/-0) Text conflict in Makefile.in Text conflict in debian/README.Debian Text conflict in debian/README.source Text conflict in debian/changelog Text conflict in debian/control Text conflict in debian/gbp.conf Text conflict in debian/patches/arch_all Text conflict in debian/patches/series Text conflict in debian/patches/test_broken_patches Text conflict in debian/patchsys-quilt.mk Text conflict in debian/rules Contents conflict in lib/backup-files.c Text conflict in quilt/mail.in Text conflict in quilt/pop.in Text conflict in quilt/scripts/patchfns.in Text conflict in test/mail.test |
To merge this branch: | bzr merge lp:~ubuntu-branches/ubuntu/lucid/quilt/lucid-201002122335 |
Related bugs: |
Commit message
Description of the change
To post a comment you must log in.
Unmerged revisions
- 13. By Steve Langasek
-
Merging shared upstream rev into target branch.
Preview Diff
[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1 | === modified file 'Makefile.in' |
2 | --- Makefile.in 2009-12-11 15:00:38 +0000 |
3 | +++ Makefile.in 2010-02-12 23:40:30 +0000 |
4 | @@ -377,12 +377,25 @@ |
5 | { print FILENAME, ":", "quilt/"$$1}' $(TESTS); \ |
6 | $(AWK) 'sub(/.*\<quilt_command /, "") && ($$1 !~ /[^a-z]/) \ |
7 | { print FILENAME, ":", "quilt/"$$1 }' quilt/*.in; \ |
8 | - ) | sort -u | $(SED) -re 's:^test/(.*)\.test:test/.\1.ok:' \ |
9 | - -e 's:quilt/graph:quilt/graph quilt/scripts/dependency-graph:' \ |
10 | - -e 's:quilt/mail:quilt/mail quilt/scripts/edmail:' \ |
11 | - -e 's:quilt/refresh:quilt/refresh quilt/scripts/remove-trailing-ws:' \ |
12 | - -e 's:quilt/setup:quilt/setup quilt/scripts/inspect:' \ |
13 | - > $@ |
14 | +<<<<<<< TREE |
15 | + ) | sort -u | $(SED) -re 's:^test/(.*)\.test:test/.\1.ok:' \ |
16 | + -e 's:quilt/graph:quilt/graph quilt/scripts/dependency-graph:' \ |
17 | + -e 's:quilt/mail:quilt/mail quilt/scripts/edmail:' \ |
18 | + -e 's:quilt/refresh:quilt/refresh quilt/scripts/remove-trailing-ws:' \ |
19 | + -e 's:quilt/setup:quilt/setup quilt/scripts/inspect:' \ |
20 | + > $@ |
21 | +======= |
22 | + ) | sort -u | $(SED) -re 's:^test/(.*)\.test:test/.\1.ok:' \ |
23 | + -e 's:quilt/graph:quilt/graph quilt/scripts/dependency-graph:' \ |
24 | + -e 's:quilt/mail:quilt/mail quilt/scripts/edmail:' \ |
25 | + -e 's:quilt/refresh:quilt/refresh quilt/scripts/remove-trailing-ws:' \ |
26 | + -e 's:quilt/setup:quilt/setup quilt/scripts/inspect:' \ |
27 | + > $@ |
28 | + |
29 | +ifneq ($(shell . $(QUILTRC) ; echo $$QUILT_PATCHES_PREFIX),) |
30 | +CHECK_ENV := P=patches/; _P=../patches/; export P _P |
31 | +endif |
32 | +>>>>>>> MERGE-SOURCE |
33 | |
34 | # Each tests dependencies are stored in test/.depend |
35 | ifneq ($(findstring check-,$(MAKECMDGOALS)),) |
36 | |
37 | === modified file 'debian/README.Debian' |
38 | --- debian/README.Debian 2009-12-11 15:00:38 +0000 |
39 | +++ debian/README.Debian 2010-02-12 23:40:30 +0000 |
40 | @@ -1,3 +1,4 @@ |
41 | +<<<<<<< TREE |
42 | Using quilt with debhelper |
43 | -------------------------- |
44 | If you use the dh command provided by debhelper 7, you can simply |
45 | @@ -36,3 +37,40 @@ |
46 | build: $(QUILT_STAMPFN) |
47 | ... |
48 | |
49 | +======= |
50 | +Using quilt with debhelper |
51 | +-------------------------- |
52 | +If you use the dh command provided by debhelper 7, you can simply |
53 | +call it with "dh --with quilt" and dh_quilt_patch/dh_quilt_unpatch |
54 | +will be called at the right time. |
55 | + |
56 | +Otherwise you can manually call dh_quilt_patch / dh_quilt_unpatch |
57 | +at the right place, see their respective manpages for examples. |
58 | + |
59 | +Using quilt with CDBS |
60 | +--------------------- |
61 | + |
62 | +You can include /usr/share/cdbs/1/rules/patchsys-quilt.mk |
63 | +in debian/rules and be done with it. |
64 | + |
65 | +If you use DEB_SRCDIR you might want to set DEB_QUILT_TOPDIR to "." |
66 | +so that quilt patches are applied in the current directory and |
67 | +not in DEB_SRCDIR. This will ensure compatibility with the |
68 | +"3.0 (quilt)" source format. |
69 | + |
70 | +Using quilt in other packages |
71 | +----------------------------- |
72 | + |
73 | +You can include /usr/share/quilt/quilt.make in debian/rules and modify |
74 | +your rules to depend on the targets provided by this Makefile (unpatch and |
75 | +$(QUILT_STAMPFN)). Here's an example: |
76 | + |
77 | + include /usr/share/quilt/quilt.make |
78 | + |
79 | + clean: unpatch |
80 | + ... |
81 | + |
82 | + build: $(QUILT_STAMPFN) |
83 | + ... |
84 | + |
85 | +>>>>>>> MERGE-SOURCE |
86 | |
87 | === modified file 'debian/README.source' |
88 | --- debian/README.source 2009-10-29 17:56:18 +0000 |
89 | +++ debian/README.source 2010-02-12 23:40:30 +0000 |
90 | @@ -1,3 +1,4 @@ |
91 | +<<<<<<< TREE |
92 | This package uses quilt to manage all modifications to the upstream |
93 | source. Changes are stored in the source package as diffs in |
94 | debian/patches and applied during the build. |
95 | @@ -56,3 +57,62 @@ |
96 | |
97 | You may need to run quilt pop -a to unapply patches first before running |
98 | this command. |
99 | +======= |
100 | +This package uses quilt to manage all modifications to the upstream |
101 | +source. Changes are stored in the source package as diffs in |
102 | +debian/patches and applied during the build. |
103 | + |
104 | +To configure quilt to use debian/patches instead of patches, you want |
105 | +either to export QUILT_PATCHES=debian/patches in your environment |
106 | +or use this snippet in your ~/.quiltrc: |
107 | + |
108 | + for where in ./ ../ ../../ ../../../ ../../../../ ../../../../../; do |
109 | + if [ -e ${where}debian/rules -a -d ${where}debian/patches ]; then |
110 | + export QUILT_PATCHES=debian/patches |
111 | + fi |
112 | + done |
113 | + |
114 | +To get the fully patched source after unpacking the source package, cd to |
115 | +the root level of the source package and run: |
116 | + |
117 | + quilt push -a |
118 | + |
119 | +The last patch listed in debian/patches/series will become the current |
120 | +patch. |
121 | + |
122 | +To add a new set of changes, first run quilt push -a, and then run: |
123 | + |
124 | + quilt new <patch> |
125 | + |
126 | +where <patch> is a descriptive name for the patch, used as the filename in |
127 | +debian/patches. Then, for every file that will be modified by this patch, |
128 | +run: |
129 | + |
130 | + quilt add <file> |
131 | + |
132 | +before editing those files. You must tell quilt with quilt add what files |
133 | +will be part of the patch before making changes or quilt will not work |
134 | +properly. After editing the files, run: |
135 | + |
136 | + quilt refresh |
137 | + |
138 | +to save the results as a patch. |
139 | + |
140 | +Alternately, if you already have an external patch and you just want to |
141 | +add it to the build system, run quilt push -a and then: |
142 | + |
143 | + quilt import -P <patch> /path/to/patch |
144 | + quilt push -a |
145 | + |
146 | +(add -p 0 to quilt import if needed). <patch> as above is the filename to |
147 | +use in debian/patches. The last quilt push -a will apply the patch to |
148 | +make sure it works properly. |
149 | + |
150 | +To remove an existing patch from the list of patches that will be applied, |
151 | +run: |
152 | + |
153 | + quilt delete <patch> |
154 | + |
155 | +You may need to run quilt pop -a to unapply patches first before running |
156 | +this command. |
157 | +>>>>>>> MERGE-SOURCE |
158 | |
159 | === modified file 'debian/changelog' |
160 | --- debian/changelog 2010-01-14 22:23:25 +0000 |
161 | +++ debian/changelog 2010-02-12 23:40:30 +0000 |
162 | @@ -1,3 +1,4 @@ |
163 | +<<<<<<< TREE |
164 | quilt (0.48-4ubuntu1) lucid; urgency=low |
165 | |
166 | * Merge from Debian unstable (LP: #507662), remaining changes: |
167 | @@ -856,3 +857,816 @@ |
168 | -- Martin Quinson <martin.quinson@tuxfamily.org> Tue, 29 Oct 2002 09:29:20 +0100 |
169 | |
170 | # -*- coding: utf-8 -*- |
171 | +======= |
172 | +quilt (0.48-1ubuntu1) lucid; urgency=low |
173 | + |
174 | + * Merge from Debian testing, remaining changes: |
175 | + - debian/patches/check_series_is_no_dir: Check that series is not a |
176 | + directory. |
177 | + |
178 | + -- Steve Langasek <steve.langasek@ubuntu.com> Thu, 10 Dec 2009 10:44:30 +0000 |
179 | + |
180 | +quilt (0.48-1) unstable; urgency=low |
181 | + |
182 | + [ Martin Quinson ] |
183 | + * New upstream release. |
184 | + * debian/patches/generic-awk: removed since merged upstream. |
185 | + * debian/patches/*: updated so that they apply again on this release. |
186 | + |
187 | + [ Raphaël Hertzog ] |
188 | + * Remove Simon Hormans from Uploaders with his permission. |
189 | + * debian/patches/fix-manpage-generation: fix Makefile so that |
190 | + the manual page is correctly generated with dash too (LP: #402237) |
191 | + * Improve dh_quilt_patch/unpatch by respecting the QUILT_PATCH_DIR |
192 | + environment variable like /usr/share/quilt/quilt.make does. |
193 | + Closes: #544668 |
194 | + |
195 | + [ Ryan Niebur ] |
196 | + * Add myself to Uploaders |
197 | + * fixes to the arch_all patch to pass test suite |
198 | + - port upstream changes to the c version to the bash rewrite |
199 | + of backup-files |
200 | + - fix backup-files to process all files passed in on the |
201 | + command line instead of just the last (a clear bug) |
202 | + * refresh all patches with -p ab |
203 | + * add procmail to build deps, needed by tests |
204 | + * Debian Policy 3.8.3 |
205 | + |
206 | + -- Raphaël Hertzog <hertzog@debian.org> Wed, 02 Sep 2009 22:05:25 +0200 |
207 | + |
208 | +quilt (0.46-8ubuntu1) karmic; urgency=low |
209 | + |
210 | + * debian/patches/check_series_is_no_dir: |
211 | + - Check that series is no directory. (LP: #428657) |
212 | + |
213 | + -- Christoph Korn <c_korn@gmx.de> Sun, 13 Sep 2009 01:26:44 +0200 |
214 | + |
215 | +quilt (0.46-8) unstable; urgency=low |
216 | + |
217 | + * Move to section “vcs” to match with ftpmasters' overrides. |
218 | + * Hide from build output some comments inside quilt.make |
219 | + that could lead to believe that an error appeared. Thanks to |
220 | + Andrea Bolognani <eof@kiyuko.org>. Closes: #531192 |
221 | + * Rename debian/patches/fr.po into debian/patches/po-fix-msguniq |
222 | + to avoid problems with scripts believing this is a po file. |
223 | + * Add "quilt shell" sub-command to update the topmost patch without having |
224 | + to quilt add files that are going to be modified. Thanks to Josselin |
225 | + Mouette for the patch. Closes: #526141 |
226 | + * Update Standards-Version to 3.8.2: no change needed except switch to vcs |
227 | + section. |
228 | + * Modify the quilt debhelper sequence to also register the dh_quilt_patch |
229 | + command in the "patch" target. Thanks to Joey Hess for the debhelper |
230 | + feature update and to Ryan Niebur for the bug report. Closes: #540124 |
231 | + * Modify my name in Uploaders to include the accent. |
232 | + |
233 | + -- Raphaël Hertzog <hertzog@debian.org> Fri, 14 Aug 2009 14:06:49 +0200 |
234 | + |
235 | +quilt (0.46-7) unstable; urgency=low |
236 | + |
237 | + * Add new dh_quilt_patch and dh_quilt_unpatch commands to be used within |
238 | + debhelper. Also add a debhelper addon so that the dh command can do patch |
239 | + management with a simple "dh --with quilt $@" in the tiny rules file |
240 | + provided by debhelper 7. Closes: #527255 |
241 | + * Build-Depends on perl for pod2man and man page generation of the new |
242 | + dh_* commands. |
243 | + * Add Enhances: debhelper in debian/control for the new dh_* commands. |
244 | + * Update Standards-Version to 3.8.1: no change needed. |
245 | + * Fix misc lintian warnings. |
246 | + * Update the copyright file with the few copyright notices that are |
247 | + embedded. |
248 | + * Add a watch file. |
249 | + |
250 | + -- Raphael Hertzog <hertzog@debian.org> Fri, 08 May 2009 12:23:52 +0200 |
251 | + |
252 | +quilt (0.46-6) unstable; urgency=low |
253 | + |
254 | + * Change back patchsys-quilt.mk to enter DEB_SRCDIR by default before |
255 | + applying patches (8 packages FTBFS due to this change). But we can now |
256 | + use DEB_QUILT_TOPDIR to override the default choice of DEB_SRCDIR. |
257 | + |
258 | + -- Raphael Hertzog <hertzog@debian.org> Thu, 19 Jun 2008 21:40:27 +0200 |
259 | + |
260 | +quilt (0.46-5) unstable; urgency=low |
261 | + |
262 | + [ Martin Quinson ] |
263 | + * Acknowledge NMU (thanks Raphael). |
264 | + This also Closes: #454351 (doc in erroneous section Apps/Text) |
265 | + * debian/control: add Vcs-git, Vcs-browser and homepage fields. |
266 | + * Remove file patches/generic-awk from the debian diff |
267 | + (was a leftover of the creation of debian/patches/generic-awk) |
268 | + * debian/rules: filter \sh{.*} constructs in the hevea output, |
269 | + such that HTML documentation is more readable [Rafael Laboissiere] |
270 | + Closes: #471453 (Make HTML documentation more readable) |
271 | + * pass --with-sendmail to configure, not --with-mta, and remove the |
272 | + /usr/share/quilt/compat/sendmail link. |
273 | + Closes: #443419 (quilt mail command cannot find sendmail) |
274 | + * Closes: #458285 (spelling error in /usr/share/quilt/quilt.make) |
275 | + * patches/arch_all: in backup-files.in:link_or_copy_file() |
276 | + redirect the errors comming from ls to /dev/null to reduce noise |
277 | + when ln is not usable (for example on AFS). Should be harmless |
278 | + since cp is used as backup when ln fails. [Russ Allbery] |
279 | + Closes: #458158 (extra noise when cross-directory symlinks aren't supported) |
280 | + * patches/unset_posix_strict_conformance_variables (new): |
281 | + unset POSIXLY_CORRECT _POSIX2_VERSION POSIXLY_PEDANTIC from quilt |
282 | + since they force patch to run in interactive manner (doh!) |
283 | + Closes: #462578 (quilt: breaks when POSIXLY_CORRECT=1) |
284 | + * Add a dpatch2quilt.sh script (to /usr/share/doc/quilt/examples) to |
285 | + ease the conversion from dpatch to quilt |
286 | + Closes: #464663 (sample script for dpatch -> quilt conversions) |
287 | + * Pass --no-print-directory to make while generating the man page to |
288 | + counter the fact that the top-level make (ie, debian/rules) pass |
289 | + -w to all childs. Patch by Romain Francoise, thanks. |
290 | + Closes: #436936 (build process has contaminated the manpage) |
291 | + |
292 | + [ Raphael Hertzog ] |
293 | + * Add myself to Uploaders. |
294 | + * Update Standards-Version to 3.8.0: |
295 | + - support patch/unpatch rules in patchsys-quilt.mk |
296 | + - support patch/unpatch rules in debian/rules |
297 | + * Switch to debhelper 5, adjust debian/compat and build-depends. |
298 | + * Remove minimal version in the cdbs build-dependency, even oldstable |
299 | + has a high-enough version. |
300 | + * patchsys-quilt.mk: don't try to apply patches in $(DEB_SRCDIR) but in |
301 | + current directory. This is best for compatibility with the upcoming "3.0 |
302 | + (quilt)" source package format and the two only packages which are |
303 | + affected by this change have already been fixed (see #485142, #485163). |
304 | + Closes: #485835 |
305 | + |
306 | + -- Martin Quinson <mquinson@debian.org> Sun, 15 Jun 2008 22:17:14 +0200 |
307 | + |
308 | +quilt (0.46-4.1) unstable; urgency=low |
309 | + |
310 | + * Non-maintainer upload. |
311 | + * Changes in patchsys-quilt.mk: |
312 | + * Convert to UTF-8. |
313 | + * Always use QUILT_PATCHES=$(CURDIR)/debian/patches. And thus drop the |
314 | + creation of the "patches" symlink as it will occasionnaly lead to |
315 | + problems with some packages. Closes: #473381 |
316 | + * Fixes generated build-dependency on CDBS to not contain the "-1" that |
317 | + leads to the lintian warning "build-depends-on-1-revision". |
318 | + Closes: #482948 |
319 | + * Fixes "apply-patches" rule to not reapply patches when they have already |
320 | + been applied by dpkg-source. Closes: #482750 |
321 | + * Integrate debian/README.source as suggested by Russ Allbery and install it |
322 | + in /usr/share/doc/quilt/. Closes: #478421 |
323 | + * Several lintian fixes: |
324 | + * clean-should-be-satisfied-by-build-depends: move debhelper and cdbs to |
325 | + Build-Depends |
326 | + * doc-base-file-uses-obsolete-national-encoding: switch |
327 | + debian/quilt.doc-base to UTF-8. |
328 | + * virtual-package-depends-without-real-package-depends and |
329 | + needlessly-depends-on-awk: drop dependency and build-dependency on awk. |
330 | + * spelling-error-in-description linux Linux: fix description accordingly. |
331 | + * doc-base-unknown-section: switch doc-base section to "Programming". |
332 | + * doc-base-abstract-might-contain-extra-leading-whitespaces: fix doc-base |
333 | + description to be a proper paragraph that can be rewrapped. |
334 | + |
335 | + -- Raphael Hertzog <hertzog@debian.org> Wed, 28 May 2008 13:57:30 +0200 |
336 | + |
337 | +quilt (0.46-4) unstable; urgency=low |
338 | + |
339 | + * Really remove the depend on gawk, sorry (only build-depend was |
340 | + changed) |
341 | + * Reindent quilt.make to remove spurious output. |
342 | + * Thanks to Marco d'Itri for spotting these ones. |
343 | + |
344 | + -- Martin Quinson <mquinson@debian.org> Tue, 07 Aug 2007 19:58:03 +0200 |
345 | + |
346 | +quilt (0.46-3) unstable; urgency=low |
347 | + |
348 | + * Depend on awk and not gawk (add patch generic-awk for this to work). |
349 | + Thanks to Wolfram Sang -- Closes #431926. |
350 | + * Modify patch doc_improvement to fix a typo in manpage: |
351 | + s/QUILT_NO_DIFF_TIMESTAMP/QUILT_NO_DIFF_TIMESTAMPS/ |
352 | + Thanks to Sukant Hajra -- Closes: #422000. |
353 | + * Modify patch doc_improvement to fix a typo in main documentation: |
354 | + s/ouput/output/ Thanks to Cyril Brulebois. |
355 | + * Add a link /usr/sbin/sendmail -> /usr/share/quilt/compat/sendmail |
356 | + since /usr/sbin is not supposed to be in users' path |
357 | + Thanks to Mark Brown -- Closes: #410890. |
358 | + * Add a call to create_db in snapshot command so that it works on |
359 | + freshly untarred quiltified projects. |
360 | + Thanks to Cyril Brulebois -- Closes: #403399. |
361 | + * Really get rid of debug messages in the generated man page (I hope). |
362 | + it didn't came from the debian/rules and neither from the package |
363 | + Makefile, but from the makefile I use to rebuild the package here. |
364 | + Closes: #402114. |
365 | + |
366 | + -- Martin Quinson <mquinson@debian.org> Sun, 05 Aug 2007 14:36:21 +0200 |
367 | + |
368 | +quilt (0.46-2) unstable; urgency=low |
369 | + |
370 | + * Integrate the changes to the quilt package from Simon Horman. |
371 | + Add Simon to the uploaders list. Changes to the different patches: |
372 | + |
373 | + [arch_all] (modified) |
374 | + - stop exporting QUILT_LIB in bin/quilt since there is no lib after the |
375 | + arch_all modification |
376 | + - remove the backup-files.c since we don't use it anymore |
377 | + |
378 | + [mail-signature] (new) |
379 | + new option --signature to the mail command to specify which signature |
380 | + file to use (defaults to ~/.signature) |
381 | + |
382 | + [no-signature-test] (new) |
383 | + forbid the use of a .signature file in the tests (using the feature of |
384 | + previous patch) to not fail when a ~/.signature is present |
385 | + |
386 | + [mail-from-locale] (new) |
387 | + Force locale to C when generating date for From header |
388 | + |
389 | + * [debian/quilt.make]: various fixes |
390 | + - Do not indent internal comments or make will display them, and |
391 | + likewise for debian/patchsys-quilt.mk. (Closes: #418680) |
392 | + By Peter Eisentraut. |
393 | + - Add ".PHONY: patch unpatch" as it should be. (Closes: #405558) |
394 | + By Steinar H. Gunderson. |
395 | + - Place emacs mode on the first line. (Closes: #406249) |
396 | + By Marco Túlio Gontijo e Silva. |
397 | + |
398 | + * [debian/patchsys-quilt.mk] use $(CURDIR) instead of $(shell pwd) |
399 | + By Loïc Minier. (Closes: #406183) |
400 | + |
401 | + * [patches/doc_improvements] catch punctuation typos. (Closes: #402120) |
402 | + By Bastian Kleineidam. |
403 | + |
404 | + * [patches/makefile_gliches] Yet another try to remove debuging output |
405 | + form the makefile. By Bastian Kleineidam. (Closes: #402114) |
406 | + |
407 | + * Suggest the graphviz package since the graph command use it (at least |
408 | + the 'dot' command of graphviz). (Closes: #407469). |
409 | + * Change Build-deps into Build-dep-indep since we're now arch:all |
410 | + |
411 | + -- Martin Quinson <mquinson@debian.org> Fri, 20 Apr 2007 13:31:29 +0200 |
412 | + |
413 | +quilt (0.46-1) unstable; urgency=low |
414 | + |
415 | + * New upstream release |
416 | + |
417 | + -- Martin Quinson <mquinson@debian.org> Thu, 19 Apr 2007 14:40:45 +0200 |
418 | + |
419 | +quilt (0.45-6) unstable; urgency=low |
420 | + |
421 | + * [debian/patches/override_mail_sender_in_testsuite] |
422 | + Fix the patch to catch all occurences of 'quilt mail' since each of them |
423 | + will cause a FTBFS on misconfigured hosts (thanks to Goswin Brederlow). |
424 | + (Closes: #397285, #395482, #393985) I hope, at least. |
425 | + |
426 | + * [debian/patches/doc_improvement] |
427 | + Fix some more typos in the manpages |
428 | + (Closes: #386548, #395447) |
429 | + |
430 | + * [debian/control] |
431 | + Add procmail to suggest list to help users locating the 'formail' tool. |
432 | + (Closes: #396093) |
433 | + |
434 | + -- Martin Quinson <mquinson@debian.org> Thu, 23 Nov 2006 16:17:11 +0100 |
435 | + |
436 | +quilt (0.45-5) unstable; urgency=low |
437 | + |
438 | + * [debian/patches/override_mail_sender_in_testsuite] |
439 | + override the mail sender in the testsuite so that it works even on |
440 | + misconfigured chroots used to compile etch over and over |
441 | + (Closes: #393985). |
442 | + |
443 | + -- Martin Quinson <mquinson@debian.org> Thu, 19 Oct 2006 21:19:45 +0200 |
444 | + |
445 | +quilt (0.45-4) unstable; urgency=low |
446 | + |
447 | + * [debian/control] |
448 | + Typo in package description (Closes: #386549): |
449 | + "basic support those" -> "basic support for those" |
450 | + * [debian/patches/doc_improvement] |
451 | + Typo in man page (Closes: #386549): |
452 | + invoqued -> invoked |
453 | + * [debian/patches/makefile_glitches] |
454 | + Remove buildd messages from the manpage (Closes: #381125) |
455 | + |
456 | + -- Martin Quinson <mquinson@debian.org> Sun, 1 Oct 2006 22:31:29 +0200 |
457 | + |
458 | +quilt (0.45-3) unstable; urgency=low |
459 | + |
460 | + * Don't even try to build the package when /proc is not mounted since |
461 | + the checks will fail after a long moment. #380598 is thus closed twice: |
462 | + once upstream with the changes from 0.45-2 and in debian now. |
463 | + Note that if nocheck is added to DEB_BUILD_OPTIONS, the package will be |
464 | + built since there will be no test to fail. The only pb is that I can't |
465 | + remember of how to add this option with dpkg-buildpackage ;) |
466 | + |
467 | + -- Martin Quinson <mquinson@debian.org> Mon, 31 Jul 2006 18:24:58 +0200 |
468 | + |
469 | +quilt (0.45-2) unstable; urgency=low |
470 | + |
471 | + * New patch: patch-wrapper_do_depend_on_proc: |
472 | + Let patch-wrapper die with an informative message when /proc is not |
473 | + mounted (Closes: #380598) |
474 | + |
475 | + -- Martin Quinson <mquinson@debian.org> Mon, 31 Jul 2006 13:23:12 +0200 |
476 | + |
477 | +quilt (0.45-1) unstable; urgency=low |
478 | + |
479 | + * New upstream release. |
480 | + - Various bug fixes and little improvements such as: |
481 | + - quilt/edit.in: Fix for working in subdirectories. Closes: #366964. |
482 | + - Update all patches |
483 | + * Acknoledge the NMU. Thanks Vorlon. Closes: #364834. |
484 | + * Move cdbs & debhelper from Build-Depends-Indep to Build-Depends since it |
485 | + is what I understand from the Right Thing to do. |
486 | + * Pass --quiltrc /dev/null to quilt in /usr/share/quilt/quilt.make for |
487 | + those who don't use cdbs but still don't want to FTBFTS because of |
488 | + personal settings in ~/.quiltrc. Closes: #370041. |
489 | + * use debian/stamp-patched as stamp file in /usr/share/quilt/quilt.make, |
490 | + and don't add debian/ artificially to the touch & rm commands. Hopefully |
491 | + Closes: #367078. |
492 | + |
493 | + -- Martin Quinson <mquinson@debian.org> Fri, 16 Jun 2006 11:34:08 +0200 |
494 | + |
495 | +quilt (0.44-6.1) unstable; urgency=low |
496 | + |
497 | + * Non-maintainer upload with permission of the maintainer. |
498 | + * Fix handling of recursive directory removal in the backup-files |
499 | + shell script to account for path elements being symlinks instead of |
500 | + directories. Closes: #364834. |
501 | + |
502 | + -- Steve Langasek <vorlon@debian.org> Fri, 26 May 2006 00:35:14 -0700 |
503 | + |
504 | +quilt (0.44-6) unstable; urgency=low |
505 | + |
506 | + * Split the debian patch in several ones. Use quilt *when available* |
507 | + to deal with it. |
508 | + pbuilds well here. Let's see what the buildd think of it. |
509 | + |
510 | + * Avoid infinite loops in backup-files when patching inexistant files. |
511 | + Thanks to Dan for reporting and sorting the problem out. |
512 | + (Closes: #366424). |
513 | + * New patch: test_broken_patches: |
514 | + Adds test/file-not-found.test pushing a patch touching a inexistant |
515 | + file (yeah, that's the previous bug) |
516 | + |
517 | + -- Martin Quinson <mquinson@debian.org> Tue, 9 May 2006 08:55:02 +0200 |
518 | + |
519 | +quilt (0.44-5) unstable; urgency=low |
520 | + |
521 | + * add '--quiltrc /dev/null' to quilt invocations in patchsys-quilt.mk. |
522 | + (Closes: #362054) |
523 | + * Make backup-files a shell script instead of a binary, so we can make |
524 | + quilt arch: all [Steve Langasek, thanks so much] |
525 | + (Closes: #363659) |
526 | + * Do run "make check" when building the package. |
527 | + |
528 | + -- Martin Quinson <mquinson@debian.org> Wed, 12 Apr 2006 02:23:27 +0200 |
529 | + |
530 | +quilt (0.44-4) unstable; urgency=low |
531 | + |
532 | + * Build-depend on diffstat so that diffstat support gets compiled in |
533 | + (Closes: #361191). |
534 | + * Register quilt documentation with doc-base [Nicolas François] |
535 | + (Closes: #344793). |
536 | + * Ship sample quilt.quiltrc along with the documentation |
537 | + (Closes: #356249). |
538 | + |
539 | + -- Martin Quinson <mquinson@debian.org> Fri, 7 Apr 2006 22:52:23 +0200 |
540 | + |
541 | +quilt (0.44-3) unstable; urgency=low |
542 | + |
543 | + * Make sure that quilt returns 2 when there is nothing to do so that |
544 | + patchsys-quilt.mk works again. Upstream regression since 0.33. |
545 | + (Closes: #358792). |
546 | + * Make sure that quilt fails when trying to push a non existant patch (ie |
547 | + if there is a typo in the serie file) unless -f is provided. |
548 | + (Closes: #358875). |
549 | + * Let /etc/mailname override the hostname in the mail command |
550 | + (Closes: #356348). |
551 | + |
552 | + -- Martin Quinson <mquinson@debian.org> Wed, 22 Mar 2006 16:14:51 +0100 |
553 | + |
554 | +quilt (0.44-2) unstable; urgency=low |
555 | + |
556 | + * Re-upload as non-native package (stupid me). |
557 | + |
558 | + -- Martin Quinson <mquinson@debian.org> Wed, 22 Mar 2006 09:40:41 +0100 |
559 | + |
560 | +quilt (0.44-1) unstable; urgency=low |
561 | + |
562 | + * New upstream release (tons of bug fixes, no new major feature). |
563 | + - bin/guards.in: s/ocnfiguration/configuration/ |
564 | + (Closes: #341518) |
565 | + - doc/quilt.1.in: Document common options to all commands |
566 | + (Closes: #334408) |
567 | + * Remove spurious ccache suggests (Closes: #354547). |
568 | + * Rewrite the package description (Closes: #347499). |
569 | + * Let the manpage make clearer that literal QUILT_COMMAND_ARGS is |
570 | + not read (Closes: #354997) |
571 | + * Let the manpage give the exact path to the pdf documentation |
572 | + (Closes: #352324) |
573 | + |
574 | + -- Martin Quinson <mquinson@debian.org> Tue, 21 Mar 2006 21:29:06 +0100 |
575 | + |
576 | +quilt (0.42-2) unstable; urgency=low |
577 | + |
578 | + * Add a missing semi-colon in quilt.debbuild.mk (Closes: #343893) |
579 | + |
580 | + -- Martin Quinson <mquinson@debian.org> Fri, 30 Dec 2005 23:43:06 +0100 |
581 | + |
582 | +quilt (0.42-1) unstable; urgency=low |
583 | + |
584 | + * New upstream release. |
585 | + - New commands: |
586 | + annotate: to see which patch modify which line of a file |
587 | + header: to print or change the patch header |
588 | + rename: to rename patches |
589 | + - New options: |
590 | + {diff,refresh} --no-index: suppress Index: lines in patch |
591 | + delete -n: delete the next patch after topmost |
592 | + --version: print the program version |
593 | + - Rework the german translation (Closes: #313827). |
594 | + * [Makefile.in]: in Debian, the docdir is /usr/share/doc/quilt, without |
595 | + the version number. (Closes: #321155) |
596 | + * Use the full path to /usr/sbin/sendmail (Closes: #318924) |
597 | + * Add text and html versions of the pdf documentation (Closes: #320294) |
598 | + Build-dep on hevea and lynx to get it working. Damn, that's huge deps |
599 | + |
600 | + -- Martin Quinson <mquinson@debian.org> Wed, 29 Jun 2005 18:52:42 +0200 |
601 | + |
602 | +quilt (0.40-6) unstable; urgency=low |
603 | + |
604 | + [patchsys-quilt.mk] |
605 | + * Don't call update-config after reverting patches. (Closes: #299010) |
606 | + |
607 | + -- Martin Quinson <mquinson@debian.org> Wed, 29 Jun 2005 18:52:42 +0200 |
608 | + |
609 | +quilt (0.40-5) unstable; urgency=low |
610 | + |
611 | + [Packaging] |
612 | + * Do not automatically generate debian/control.in since it is now |
613 | + forbidden by policy. |
614 | + [quilt.debbuild.mk] |
615 | + * also cleanup arch cruft from debian dirs (patch stolen from cdbs) |
616 | + * Pass the -nd flag to wget when fetching upstream source to avoid |
617 | + by all means creating a dirctory structure. |
618 | + |
619 | + -- Martin Quinson <mquinson@debian.org> Wed, 29 Jun 2005 10:36:57 +0200 |
620 | + |
621 | +quilt (0.40-4) unstable; urgency=low |
622 | + |
623 | + * Do depend on patchutils only when using cdbs |
624 | + (dependency moved from control.in to patchsys-quilt.mk) |
625 | + * quilt.debuild.mk: Also cleanup svn stuff from debian dirs |
626 | + |
627 | + -- Martin Quinson <mquinson@debian.org> Sun, 22 May 2005 11:23:27 +0200 |
628 | + |
629 | +quilt (0.40-3) unstable; urgency=low |
630 | + |
631 | + * Depend on patchutils (>= 0.2.25) since we use lsdiff -H to fix #295913 |
632 | + |
633 | + -- Martin Quinson <mquinson@debian.org> Fri, 13 May 2005 18:43:23 +0200 |
634 | + |
635 | +quilt (0.40-2) unstable; urgency=low |
636 | + |
637 | + * Add /usr/share/quilt/quilt.debbuild.mk to ease the build from the cvs |
638 | + of debian packages using quilt. Read its header for documentation. |
639 | + |
640 | + -- Martin Quinson <mquinson@debian.org> Thu, 12 May 2005 23:02:13 +0200 |
641 | + |
642 | +quilt (0.40-1) unstable; urgency=low |
643 | + |
644 | + * New upstream version |
645 | + * Add /usr/share/quilt/quilt.make for the ones not using CDBS. |
646 | + The "patch" and "unpatch" targets are implemented. |
647 | + |
648 | + -- Martin Quinson <mquinson@debian.org> Wed, 11 May 2005 15:51:51 +0200 |
649 | + |
650 | +quilt (0.39-3) unstable; urgency=low |
651 | + |
652 | + * Add a word in the man page about how to display compressed pdf files |
653 | + since this non-bug got reported twice now (Closes: #304848). |
654 | + |
655 | + -- Martin Quinson <mquinson@debian.org> Tue, 26 Apr 2005 16:02:16 +0200 |
656 | + |
657 | +quilt (0.39-2) unstable; urgency=low |
658 | + |
659 | + * Pass -p $opt_strip_level option to diffstat in refresh command. |
660 | + (Closes: #298785) |
661 | + * fixes from upstream cvs: |
662 | + - Add a missing "exit 1" to quilt/fold.in when no patches are applied. |
663 | + - typo in graph help message. |
664 | + |
665 | + -- Martin Quinson <mquinson@debian.org> Wed, 23 Mar 2005 11:10:07 +0100 |
666 | + |
667 | +quilt (0.39-1) unstable; urgency=low |
668 | + |
669 | + * New upstream release. |
670 | + 0.38 were mostly bugfixes, and those bugs were also reported against |
671 | + debian package, so I had to steal most of the cvs content already. |
672 | + 0.39 is also mainly bugfixes. There is a new "mail" command I didn't |
673 | + test yet. ;) |
674 | + |
675 | + * Refuse to add symlinks into patches since we fail to backup them |
676 | + properly. (Closes: #294424). Will be in 0.40 ;) |
677 | + * Take care of the lost souls patching their config.* files. |
678 | + Cdbs updates them automatically. Thanks to Robert Millan for detecting |
679 | + the issue (in cdbs) and proposing a fix (in quilt). (Closes: #295913). |
680 | + |
681 | + This implies a versionned depend on cdbs (>=0.4.27-1) for using packages, |
682 | + since part of the fix is in there. quilt itself suggests this version. |
683 | + |
684 | + -- Martin Quinson <mquinson@debian.org> Thu, 24 Feb 2005 13:51:10 +0100 |
685 | + |
686 | +quilt (0.37-5) unstable; urgency=low |
687 | + |
688 | + * Let cdbs track the build-dep automatically. |
689 | + * Make sure people letting cdbs tracking the builddeps for them will get |
690 | + the one on quilt when using the quilt patchsys. |
691 | + Fix upstream bugs: |
692 | + * Strip out the letters from the bash version before [numerical] comparison |
693 | + (Closes: #288839) |
694 | + * Make sure directories are completed with the trailing '/' (for further |
695 | + completion) where quilt expects a file and refuses any directory. |
696 | + (Closes: #281256) |
697 | + |
698 | + -- Martin Quinson <mquinson@debian.org> Thu, 6 Jan 2005 07:51:02 +0100 |
699 | + |
700 | +quilt (0.37-4) unstable; urgency=low |
701 | + |
702 | + * Fix the 'patches' command (print the patch names again). |
703 | + (Closes: #286293). |
704 | + |
705 | + -- Martin Quinson <mquinson@debian.org> Thu, 23 Dec 2004 14:48:35 +0100 |
706 | + |
707 | +quilt (0.37-3) unstable; urgency=low |
708 | + |
709 | + * Fix extra trailing space in series file after quilt refresh. |
710 | + (Closes: #285865) |
711 | + |
712 | + -- Martin Quinson <mquinson@debian.org> Thu, 16 Dec 2004 21:33:54 +0100 |
713 | + |
714 | +quilt (0.37-2) unstable; urgency=low |
715 | + |
716 | + * Fix a quoting issue in bash_autocompletion. Patch from upstream CVS. |
717 | + (Closes: #285322) |
718 | + |
719 | + -- Martin Quinson <mquinson@debian.org> Mon, 13 Dec 2004 14:54:25 +0100 |
720 | + |
721 | +quilt (0.37-1) unstable; urgency=low |
722 | + |
723 | + * New upstream release(s. I missed the 0.36, sorry): |
724 | + - "quilt new" now work from a sub-dir (instead of creating a new |
725 | + patches/ dir in the current one). |
726 | + - allow to list all modified files (within patch ranges). |
727 | + - japaneese translation. |
728 | + - touch files after they are restored to not confuse make and friends. |
729 | + - various bug fixes. |
730 | + * Fix a bashism in patchsys-quilt.mk (Closes: #275253) |
731 | + * Useless cleanup in debian/rules (Closes: #268967) |
732 | + * Acknoledge NMU. Thanks Matt! (Closes: #264053) |
733 | + * Use my Debian address as maintainer. |
734 | + * Fix two typos in description. Thanks Matt (Kraii) ! (Closes: #266195) |
735 | + |
736 | + -- Martin Quinson <martin.quinson@tuxfamily.org> Wed, 8 Dec 2004 16:12:21 +0100 |
737 | + |
738 | +quilt (0.35-1.1) unstable; urgency=low |
739 | + |
740 | + * NMU at maintainer's request |
741 | + * Add ${shlibs:Depends} to debian/control:Depends (Closes: #264053) |
742 | + |
743 | + -- Matt Zimmerman <mdz@debian.org> Fri, 6 Aug 2004 18:41:46 -0700 |
744 | + |
745 | +quilt (0.35-1) unstable; urgency=low |
746 | + |
747 | + * New upstream version. |
748 | + - bash completion made usable (even out of Debian). |
749 | + - New configuration variables: QUILT_<command>_ARGS amongst others. |
750 | + - Reintroduction of the diffstat feature (--diffstat option of refresh). |
751 | + - Setting QUILT_PATCHES_PREFIX asks quilt to display the full path to |
752 | + the patches instead of the patch names (for copy/paste). |
753 | + - Ability to specify the type of patch, and the context length (-u, -U |
754 | + num, -c, and -C num options of diff and refresh). |
755 | + - Syntax highlighting (--color option of diff). |
756 | + - Various bug fixes. |
757 | + |
758 | + -- Martin Quinson <martin.quinson@tuxfamily.org> Thu, 15 Jul 2004 15:06:43 -0700 |
759 | + |
760 | +quilt (0.34-2) unstable; urgency=low |
761 | + |
762 | + * [patchsys-quilt.mk] Fix a stupid bug preventing to work on empty |
763 | + patch series |
764 | + |
765 | + -- Martin Quinson <martin.quinson@tuxfamily.org> Fri, 11 Jun 2004 10:45:08 -0700 |
766 | + |
767 | +quilt (0.34-1) unstable; urgency=low |
768 | + |
769 | + * New upstream release. |
770 | + - Backward compatibility of .pc directory implemented |
771 | + * Get ride of the now useless big fat warning in NEWS.Debian about that. |
772 | + * Use the manpage generated by the upstream makefile, and remove the |
773 | + one embeeded in the debian dir. |
774 | + |
775 | + -- Martin Quinson <martin.quinson@tuxfamily.org> Thu, 10 Jun 2004 16:35:00 -0700 |
776 | + |
777 | +quilt (0.33-1) unstable; urgency=low |
778 | + |
779 | + * New upstream release. |
780 | + - Return exit status 2 when commands go beyond the series (push when |
781 | + already on top, and so on) |
782 | + - Bunch of bug fixes. |
783 | + * [patchsys-quilt.mk] quilt return 2 when there was nothing to do. |
784 | + |
785 | + -- Martin Quinson <martin.quinson@tuxfamily.org> Tue, 8 Jun 2004 11:54:58 -0700 |
786 | + |
787 | +quilt (0.32-3) unstable; urgency=low |
788 | + |
789 | + * push exits 0 when no patch is to be pushed. |
790 | + |
791 | + -- Martin Quinson <martin.quinson@tuxfamily.org> Thu, 3 Jun 2004 08:46:23 -0700 |
792 | + |
793 | +quilt (0.32-2) unstable; urgency=low |
794 | + |
795 | + * Use relative link for debian/patches. Closes: #242342 |
796 | + * Specify we want to use gawk since mawk causes trouble. Closes: #251972. |
797 | + * Add an entry to NEWS.Debian warning about the breakage in opened tree |
798 | + occuring between 0.30 and 0.32 versions. At least people using |
799 | + apt-listchanges will be warned about that. It looks like the best we can |
800 | + do for now. |
801 | + * pop exits 0 when no patch is to be removed. |
802 | + |
803 | + -- Martin Quinson <martin.quinson@tuxfamily.org> Tue, 1 Jun 2004 11:41:51 -0700 |
804 | + |
805 | +quilt (0.32-1) unstable; urgency=low |
806 | + |
807 | + * New upstream release. |
808 | + - It is now possible to use quilt from within sub-directories of the |
809 | + working tree. Quilt will automatically find the root of the tree. |
810 | + - New 'graph' command to display neat graphics of patch dependencies. |
811 | + - 'fork' semantic reverted to previous one: the forked patch is the |
812 | + topmost one, not the next in the series. |
813 | + - documentation update. |
814 | + - man page (provided by your servitor ;) |
815 | + * Fix a typo in output of setup -l. Closes #236933 |
816 | + * Rephrase package description. Closes #236221 |
817 | + |
818 | + -- Martin Quinson <martin.quinson@tuxfamily.org> Fri, 19 Mar 2004 10:00:03 -0800 |
819 | + |
820 | +quilt (0.30-4) unstable; urgency=low |
821 | + |
822 | + * patchsys-quilt.mk: |
823 | + Various improvements from David Kimdon. Closes: #234449 |
824 | + - rm debian/stamp-patch in reverse-patches (instead of clean) so that this |
825 | + target can be called directly. |
826 | + - Make those rules usable along with the cdbs tarball.mk ones. |
827 | + - remove a dupplicated useless line |
828 | + |
829 | + -- Martin Quinson <martin.quinson@tuxfamily.org> Wed, 25 Feb 2004 10:22:39 -0800 |
830 | + |
831 | +quilt (0.30-3) unstable; urgency=low |
832 | + |
833 | + * Add a man page from the upstream CVS. Closes: #219318 |
834 | + |
835 | + -- Martin Quinson <martin.quinson@tuxfamily.org> Mon, 23 Feb 2004 08:43:08 -0800 |
836 | + |
837 | +quilt (0.30-2) unstable; urgency=low |
838 | + |
839 | + * [debian/control] |
840 | + - Remove the dependency on bash since it's an essential package. |
841 | + - Upgrade the dependency on debhelper to (>= 4.1.0) as requested by cdbs. |
842 | + * [debian/quilt.install] |
843 | + - Reput quilt.pdf in the package back, and make sure it won't disapear |
844 | + anymore. |
845 | + |
846 | + -- Martin Quinson <martin.quinson@tuxfamily.org> Mon, 2 Feb 2004 16:45:12 -0800 |
847 | + |
848 | +quilt (0.30-1) unstable; urgency=low |
849 | + |
850 | + * New upstream release. |
851 | + * Fix the URL of the project (Closes #223387). |
852 | + * add a dependency on gawk (Closes #227111). |
853 | + |
854 | + -- Martin Quinson <martin.quinson@tuxfamily.org> Fri, 30 Jan 2004 16:10:23 -0800 |
855 | + |
856 | +quilt (0.29-3) unstable; urgency=low |
857 | + |
858 | + * force the shell to be bash, since we use tons of bashism |
859 | + |
860 | + -- Martin Quinson <martin.quinson@tuxfamily.org> Mon, 24 Nov 2003 11:24:15 +0100 |
861 | + |
862 | +quilt (0.29-2) unstable; urgency=low |
863 | + |
864 | + * Add the patchsys-quilt.mk file achieving the integration of quilt within |
865 | + cdbs. |
866 | + * Install the upstream changelog under the changelog.gz name. |
867 | + * Remove several files left over in the debian/ dir. |
868 | + * Bump standard-version to 3.6.1.0: convert all control files to utf8. |
869 | + |
870 | + -- Martin Quinson <martin.quinson@tuxfamily.org> Mon, 24 Nov 2003 10:24:15 +0100 |
871 | + |
872 | +quilt (0.29-1) unstable; urgency=low |
873 | + |
874 | + * New upstream version. |
875 | + * Repackage to use cdbs. |
876 | + |
877 | + -- Martin Quinson <martin.quinson@tuxfamily.org> Thu, 20 Nov 2003 11:04:34 +0100 |
878 | + |
879 | +quilt (0.25-4) unstable; urgency=low |
880 | + |
881 | + * Various cleanup in the packaging (like removing a `pwd` in the debian/rules) |
882 | + |
883 | + -- Martin Quinson <martin.quinson@tuxfamily.org> Thu, 6 Nov 2003 16:27:15 +0100 |
884 | + |
885 | +quilt (0.25-3) unstable; urgency=low |
886 | + |
887 | + * Do not invoque autoconf during the build process since I do not change this file. |
888 | + That way, autobuilder will be happy even without build-depend (Closes: #217055). |
889 | + |
890 | + -- Martin Quinson <martin.quinson@tuxfamily.org> Fri, 31 Oct 2003 00:18:43 +0100 |
891 | + |
892 | +quilt (0.25-2) unstable; urgency=low |
893 | + |
894 | + * Do not install anything under /usr/share/doc/quilt-version/ |
895 | + Thanks to Daniel Jacobowitz for reporting that bug. |
896 | + |
897 | + -- Martin Quinson <martin.quinson@tuxfamily.org> Fri, 12 Sep 2003 08:18:29 +0200 |
898 | + |
899 | +quilt (0.25-1) unstable; urgency=low |
900 | + |
901 | + * New upstream release. |
902 | + * Set LC_ALL to C during the build so that the README.gz becomes in |
903 | + english and not french. Thanks to Jan-Benedict Glaw for reporting that |
904 | + issue. |
905 | + |
906 | + -- Martin Quinson <martin.quinson@tuxfamily.org> Tue, 9 Sep 2003 08:30:52 +0200 |
907 | + |
908 | +quilt (0.24-1) unstable; urgency=low |
909 | + |
910 | + * New upstream release |
911 | + * debquilt.mk: Makefile chunk to manage debian packages using quilt |
912 | + |
913 | + -- Martin Quinson <martin.quinson@tuxfamily.org> Thu, 26 Jun 2003 15:26:16 +0200 |
914 | + |
915 | +quilt (0.23-1) unstable; urgency=low |
916 | + |
917 | + * New upstream release |
918 | + * Hardcode location of bash |
919 | + |
920 | + -- Martin Quinson <martin.quinson@tuxfamily.org> Wed, 9 Apr 2003 09:54:30 +0200 |
921 | + |
922 | +quilt (0.22-1) unstable; urgency=low |
923 | + |
924 | + * New upstream release |
925 | + |
926 | + -- Martin Quinson <martin.quinson@tuxfamily.org> Fri, 14 Feb 2003 14:12:31 +0100 |
927 | + |
928 | +quilt (0.21-2) unstable; urgency=low |
929 | + |
930 | + * Fight lintian warnings and error: |
931 | + - Format copyright file properly |
932 | + - Don't depend on essential packages |
933 | + - Change Build-Depends-Indep: to Build-Depends: since the package is |
934 | + now arch-dependent. |
935 | + - Update to lastest standards |
936 | + * The documentation did move one more time. |
937 | + |
938 | + -- Martin Quinson <martin.quinson@tuxfamily.org> Fri, 31 Jan 2003 09:21:03 +0100 |
939 | + |
940 | +quilt (0.21-1) unstable; urgency=low |
941 | + |
942 | + * New upstream release. |
943 | + * Change from architecture: all to architecture: any, since we now have a |
944 | + compiled C programm. |
945 | + * Add the new documentation provided. |
946 | + |
947 | + -- Martin Quinson <martin.quinson@tuxfamily.org> Wed, 29 Jan 2003 10:19:31 +0100 |
948 | + |
949 | +quilt (0.11-1) unstable; urgency=low |
950 | + |
951 | + * New upstream release. New upstream author. Developement moved to savannah. |
952 | + * Some functionnalities were removed, but all the scripts are much more robust now. |
953 | + |
954 | + -- Martin Quinson <martin.quinson@tuxfamily.org> Sat, 18 Jan 2003 23:36:29 +0100 |
955 | + |
956 | +quilt (0.8.1-1) unstable; urgency=low |
957 | + |
958 | + * New upstream release |
959 | + * Should now work if installed in /usr/lib or if unpacked in the current |
960 | + directory. |
961 | + |
962 | + -- Martin Quinson <martin.quinson@tuxfamily.org> Wed, 11 Dec 2002 09:31:28 +0100 |
963 | + |
964 | +quilt (0.8-1) unstable; urgency=low |
965 | + |
966 | + * New upstream release |
967 | + |
968 | + -- Martin Quinson <martin.quinson@tuxfamily.org> Wed, 6 Nov 2002 22:48:32 +0100 |
969 | + |
970 | +quilt (0.6-1) unstable; urgency=low |
971 | + |
972 | + * New upstream release |
973 | + |
974 | + -- Martin Quinson <martin.quinson@tuxfamily.org> Wed, 6 Nov 2002 22:48:32 +0100 |
975 | + |
976 | +quilt (0.4-1) unstable; urgency=low |
977 | + |
978 | + * Initial Release. |
979 | + |
980 | + -- Martin Quinson <martin.quinson@tuxfamily.org> Tue, 29 Oct 2002 09:29:20 +0100 |
981 | + |
982 | +# -*- coding: utf-8 -*- |
983 | +>>>>>>> MERGE-SOURCE |
984 | |
985 | === modified file 'debian/control' |
986 | --- debian/control 2010-01-14 22:23:25 +0000 |
987 | +++ debian/control 2010-02-12 23:40:30 +0000 |
988 | @@ -1,3 +1,4 @@ |
989 | +<<<<<<< TREE |
990 | # -*- coding: utf-8 -*- |
991 | |
992 | Source: quilt |
993 | @@ -36,3 +37,43 @@ |
994 | allowing maintainers to easily add a quilt-based patch management system in |
995 | their packages. The package also provides some basic support for those not |
996 | using those tools. See README.Debian for more information. |
997 | +======= |
998 | +# -*- coding: utf-8 -*- |
999 | + |
1000 | +Source: quilt |
1001 | +Section: vcs |
1002 | +Priority: optional |
1003 | +Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com> |
1004 | +XSBC-Original-Maintainer: Martin Quinson <mquinson@debian.org> |
1005 | +Uploaders: Raphaël Hertzog <hertzog@debian.org>, Ryan Niebur <ryanryan52@gmail.com> |
1006 | +Build-Depends: cdbs, debhelper (>= 5) |
1007 | +Build-Depends-Indep: gettext, hevea, lynx, diffstat, perl, procmail |
1008 | +Standards-Version: 3.8.3 |
1009 | +Vcs-git: git://git.debian.org/git/collab-maint/quilt |
1010 | +Vcs-Browser: http://git.debian.org/?p=collab-maint/quilt.git |
1011 | +Homepage: http://savannah.nongnu.org/projects/quilt |
1012 | + |
1013 | +Package: quilt |
1014 | +Architecture: all |
1015 | +Depends: patch, diffstat, bzip2, gettext, ${misc:Depends} |
1016 | +Suggests: procmail, graphviz |
1017 | +Enhances: debhelper, cdbs |
1018 | +Description: Tool to work with series of patches |
1019 | + Quilt manages a series of patches by keeping track of the changes |
1020 | + each of them makes. They are logically organized as a stack, and you can |
1021 | + apply, un-apply, refresh them easily by traveling into the stack (push/pop). |
1022 | + . |
1023 | + Quilt is good for managing additional patches applied to a package received |
1024 | + as a tarball or maintained in another version control system. The stacked |
1025 | + organization is proven to be efficient for the management of very large patch |
1026 | + sets (more than hundred patches). As matter of fact, it was designed by and |
1027 | + for Linux kernel hackers (Andrew Morton, from the -mm branch, is the |
1028 | + original author), and its main use by the current upstream maintainer is to |
1029 | + manage the (hundreds of) patches against the kernel made for the SUSE |
1030 | + distribution. |
1031 | + . |
1032 | + This package provides seamless integration into Debhelper or CDBS, |
1033 | + allowing maintainers to easily add a quilt-based patch management system in |
1034 | + their packages. The package also provides some basic support for those not |
1035 | + using those tools. See README.Debian for more information. |
1036 | +>>>>>>> MERGE-SOURCE |
1037 | |
1038 | === modified file 'debian/dh_quilt_patch' (properties changed: +x to -x) |
1039 | === modified file 'debian/dh_quilt_unpatch' (properties changed: +x to -x) |
1040 | === modified file 'debian/gbp.conf' |
1041 | --- debian/gbp.conf 2010-01-14 22:23:25 +0000 |
1042 | +++ debian/gbp.conf 2010-02-12 23:40:30 +0000 |
1043 | @@ -1,3 +1,4 @@ |
1044 | +<<<<<<< TREE |
1045 | [DEFAULT] |
1046 | pristine-tar = True |
1047 | debian-tag = %(version)s |
1048 | @@ -5,3 +6,11 @@ |
1049 | |
1050 | [git-buildpackage] |
1051 | sign-tags = True |
1052 | +======= |
1053 | +[DEFAULT] |
1054 | +pristine-tar = True |
1055 | +debian-tag = %(version)s |
1056 | + |
1057 | +[git-buildpackage] |
1058 | +sign-tags = True |
1059 | +>>>>>>> MERGE-SOURCE |
1060 | |
1061 | === modified file 'debian/patches/arch_all' |
1062 | --- debian/patches/arch_all 2009-12-11 15:00:38 +0000 |
1063 | +++ debian/patches/arch_all 2010-02-12 23:40:30 +0000 |
1064 | @@ -1,3 +1,4 @@ |
1065 | +<<<<<<< TREE |
1066 | * Make backup-files a shell script instead of a binary, so we can make |
1067 | quilt arch: all [Steve Langasek, thanks so much] |
1068 | (Closes: #363659) |
1069 | @@ -1122,3 +1123,1130 @@ |
1070 | then |
1071 | printf $"Failed to copy files to temporary directory\n" >&2 |
1072 | return 1 |
1073 | +======= |
1074 | + * Make backup-files a shell script instead of a binary, so we can make |
1075 | + quilt arch: all [Steve Langasek, thanks so much] |
1076 | + (Closes: #363659) |
1077 | + |
1078 | +Upstream status: Submitted 060427 |
1079 | + |
1080 | +--- |
1081 | + Makefile.in | 26 - |
1082 | + bin/quilt.in | 4 |
1083 | + lib/backup-files.c | 601 ------------------------------------------ |
1084 | + quilt/add.in | 2 |
1085 | + quilt/pop.in | 6 |
1086 | + quilt/push.in | 2 |
1087 | + quilt/scripts/backup-files.in | 292 ++++++++++++++++++++ |
1088 | + quilt/scripts/patchfns.in | 2 |
1089 | + quilt/snapshot.in | 2 |
1090 | + 9 files changed, 307 insertions(+), 630 deletions(-) |
1091 | + |
1092 | +Index: b/Makefile.in |
1093 | +=================================================================== |
1094 | +--- a/Makefile.in |
1095 | ++++ b/Makefile.in |
1096 | +@@ -6,7 +6,6 @@ |
1097 | + prefix := @prefix@ |
1098 | + exec_prefix := @exec_prefix@ |
1099 | + bindir := @bindir@ |
1100 | +-libdir := @libdir@ |
1101 | + datarootdir := @datarootdir@ |
1102 | + datadir := @datadir@ |
1103 | + docdir := @docdir@ |
1104 | +@@ -51,11 +50,6 @@ |
1105 | + LIBS := @LIBS@ |
1106 | + EXEEXT := @EXEEXT@ |
1107 | + |
1108 | +-LIBOBJS := $(filter $(patsubst lib/%.c,lib/%.o,$(wildcard lib/*.c)), $(patsubst %,lib/%,@LIBOBJS@)) |
1109 | +-ifneq ($(LIBOBJS),) |
1110 | +-CFLAGS += -Ilib |
1111 | +-endif |
1112 | +- |
1113 | + COMPAT_SYMLINKS := @COMPAT_SYMLINKS@ |
1114 | + COMPAT_PROGRAMS := @COMPAT_PROGRAMS@ |
1115 | + |
1116 | +@@ -83,7 +77,7 @@ |
1117 | + DIRT += $(QUILT_IN:%=quilt/%) |
1118 | + |
1119 | + SCRIPTS_IN := patchfns parse-patch inspect dependency-graph edmail \ |
1120 | +- remove-trailing-ws |
1121 | ++ remove-trailing-ws backup-files |
1122 | + |
1123 | + SCRIPTS_SRC := $(SCRIPTS_IN:%=%.in) |
1124 | + SCRIPTS := $(SCRIPTS_IN) |
1125 | +@@ -131,16 +125,13 @@ |
1126 | + # Settings for running the uninstalled version of quilt in the source tree: |
1127 | + PATH := $(CURDIR)/bin:$(CURDIR)/compat:$(PATH) |
1128 | + QUILT_DIR := $(CURDIR)/quilt |
1129 | +-QUILT_LIB := $(CURDIR)/lib |
1130 | + QUILTRC := $(CURDIR)/test/test.quiltrc |
1131 | +-export QUILT_DIR QUILT_LIB QUILTRC |
1132 | ++export QUILT_DIR QUILTRC |
1133 | + |
1134 | + #----------------------------------------------------------------------- |
1135 | + |
1136 | + all : configure scripts compat $(DOC:%=doc/%) $(MAN1) mofiles |
1137 | + |
1138 | +-$(LIB:%=lib/%) :: $(LIBOBJS) |
1139 | +- |
1140 | + ifeq ($(USE_NLS),yes) |
1141 | + mofiles : $(LINGUAS:%=po/%.mo) |
1142 | + else |
1143 | +@@ -154,7 +145,7 @@ |
1144 | + $(MSGMERGE) -o $@ $@ $^ |
1145 | + |
1146 | + scripts : $(BIN:%=bin/%) $(QUILT:%=quilt/%) \ |
1147 | +- $(SCRIPTS:%=quilt/scripts/%) $(LIB:%=lib/%) \ |
1148 | ++ $(SCRIPTS:%=quilt/scripts/%) \ |
1149 | + $(if $(PATCH_WRAPPER),bin/patch-wrapper) |
1150 | + |
1151 | + dist : clean $(PACKAGE)-$(VERSION).tar.gz |
1152 | +@@ -258,8 +249,7 @@ |
1153 | + $(patsubst %.in,%,$(wildcard bin/*.in quilt/*.in quilt/scripts/*.in)) :: Makefile |
1154 | + % :: %.in |
1155 | + @echo "$< -> $@" >&2 |
1156 | +- @$(SED) -e 's:@QUILT_LIB''@:$(libdir)/$(PACKAGE):g' \ |
1157 | +- -e 's:@QUILT_DIR''@:$(datadir)/$(PACKAGE):g' \ |
1158 | ++ @$(SED) -e 's:@QUILT_DIR''@:$(datadir)/$(PACKAGE):g' \ |
1159 | + -e 's:@PERL''@:$(PERL):g' \ |
1160 | + -e 's:@BASH''@:$(BASH):g' \ |
1161 | + -e 's:@PATCH''@:$(PATCH):g' \ |
1162 | +@@ -270,7 +260,7 @@ |
1163 | + $< > $@ |
1164 | + @$(if $(filter-out $<,$(NON_EXEC_IN)),chmod +x $@) |
1165 | + |
1166 | +-lib/backup-files.o :: Makefile |
1167 | ++#lib/backup-files.o :: Makefile |
1168 | + |
1169 | + configure : configure.ac aclocal.m4 |
1170 | + autoconf |
1171 | +@@ -322,9 +312,6 @@ |
1172 | + $(BUILD_ROOT)$(datadir)/$(PACKAGE)/wrapper/patch |
1173 | + endif |
1174 | + |
1175 | +- $(INSTALL) -d $(BUILD_ROOT)$(libdir)/$(PACKAGE) |
1176 | +- $(INSTALL) -m 755 $(LIB:%=lib/%) $(BUILD_ROOT)$(libdir)/$(PACKAGE)/ |
1177 | +- |
1178 | + $(INSTALL) -d $(BUILD_ROOT)$(docdir)/$(PACKAGE)-$(VERSION)/ |
1179 | + $(INSTALL) -m 644 doc/README \ |
1180 | + $(BUILD_ROOT)$(docdir)/$(PACKAGE)-$(VERSION)/ |
1181 | +@@ -361,7 +348,6 @@ |
1182 | + |
1183 | + uninstall :: |
1184 | + rm -rf $(BIN:%=$(BUILD_ROOT)$(bindir)/%) \ |
1185 | +- $(BUILD_ROOT)$(libdir)/$(PACKAGE) \ |
1186 | + $(BUILD_ROOT)$(datadir)/$(PACKAGE) \ |
1187 | + $(patsubst %,$(BUILD_ROOT)$(mandir)/man1/%, \ |
1188 | + $(notdir $(MAN1))) \ |
1189 | +@@ -385,7 +371,7 @@ |
1190 | + |
1191 | + # Include a run-time generated list of dependencies for each test case |
1192 | + test/.depend : Makefile $(TESTS) |
1193 | +- @( printf "%s : bin/quilt quilt/scripts/patchfns $(LIB:%=lib/%) $(COMPAT)\n" $(TESTS); \ |
1194 | ++ @( printf "%s : bin/quilt quilt/scripts/patchfns $(COMPAT)\n" $(TESTS); \ |
1195 | + $(AWK) 'sub(/.*\$$ *quilt /, "") \ |
1196 | + { print FILENAME, ":", "quilt/"$$1}' $(TESTS); \ |
1197 | + $(AWK) 'sub(/.*\<quilt_command /, "") && ($$1 !~ /[^a-z]/) \ |
1198 | +Index: b/quilt/add.in |
1199 | +=================================================================== |
1200 | +--- a/quilt/add.in |
1201 | ++++ b/quilt/add.in |
1202 | +@@ -121,7 +121,7 @@ |
1203 | + continue |
1204 | + fi |
1205 | + |
1206 | +- if ! $QUILT_LIB/backup-files -b -s -L -B $QUILT_PC/$patch/ $SUBDIR$file |
1207 | ++ if ! $QUILT_DIR/scripts/backup-files -b -s -L -B $QUILT_PC/$patch/ $SUBDIR$file |
1208 | + then |
1209 | + printf $"Failed to back up file %s\n" "$SUBDIR$file" >&2 |
1210 | + status=1 |
1211 | +Index: b/quilt/pop.in |
1212 | +=================================================================== |
1213 | +--- a/quilt/pop.in |
1214 | ++++ b/quilt/pop.in |
1215 | +@@ -95,7 +95,7 @@ |
1216 | + local prefix=$QUILT_PC/$patch/ |
1217 | + [ ${prefix:0:1} == / ] || prefix=$PWD/$prefix |
1218 | + if ! ( cd $workdir && \ |
1219 | +- $QUILT_LIB/backup-files -B $prefix -rks - ) |
1220 | ++ $QUILT_DIR/scripts/backup-files -B $prefix -r -k -s - ) |
1221 | + then |
1222 | + printf $"Failed to copy files to temporary directory\n" >&2 |
1223 | + rm -rf $workdir |
1224 | +@@ -162,7 +162,7 @@ |
1225 | + status=$? |
1226 | + else |
1227 | + printf $"Removing patch %s\n" "$(print_patch $patch)" |
1228 | +- $QUILT_LIB/backup-files $silent -r -t -B $QUILT_PC/$patch/ - |
1229 | ++ $QUILT_DIR/scripts/backup-files $silent -r -t -B $QUILT_PC/$patch/ - |
1230 | + status=$? |
1231 | + fi |
1232 | + remove_from_db $patch |
1233 | +@@ -264,7 +264,7 @@ |
1234 | + # of one: This will automatically be the case in the usual |
1235 | + # situations, but we don't want to risk file corruption in weird |
1236 | + # corner cases such as files added to a patch but not modified. |
1237 | +- $QUILT_LIB/backup-files -L -s -B $QUILT_PC/$patch/ - |
1238 | ++ $QUILT_DIR/scripts/backup-files -L -s -B $QUILT_PC/$patch/ - |
1239 | + printf $"Now at patch %s\n" "$(print_patch $patch)" |
1240 | + fi |
1241 | + ### Local Variables: |
1242 | +Index: b/quilt/push.in |
1243 | +=================================================================== |
1244 | +--- a/quilt/push.in |
1245 | ++++ b/quilt/push.in |
1246 | +@@ -135,7 +135,7 @@ |
1247 | + { |
1248 | + local patch=$1 |
1249 | + |
1250 | +- $QUILT_LIB/backup-files $silent_unless_verbose -r -B $QUILT_PC/$patch/ - |
1251 | ++ $QUILT_DIR/scripts/backup-files $silent_unless_verbose -r -B $QUILT_PC/$patch/ - |
1252 | + } |
1253 | + |
1254 | + cleanup_patch_output() { |
1255 | +Index: b/quilt/snapshot.in |
1256 | +=================================================================== |
1257 | +--- a/quilt/snapshot.in |
1258 | ++++ b/quilt/snapshot.in |
1259 | +@@ -85,7 +85,7 @@ |
1260 | + } |
1261 | + { print } |
1262 | + ' \ |
1263 | +-| $QUILT_LIB/backup-files -b -s -L -f - -B "$QUILT_PC/$snap_subdir/" |
1264 | ++| $QUILT_DIR/scripts/backup-files -b -s -L -f - -B "$QUILT_PC/$snap_subdir/" |
1265 | + |
1266 | + ### Local Variables: |
1267 | + ### mode: shell-script |
1268 | +Index: b/quilt/scripts/backup-files.in |
1269 | +=================================================================== |
1270 | +--- /dev/null |
1271 | ++++ b/quilt/scripts/backup-files.in |
1272 | +@@ -0,0 +1,292 @@ |
1273 | ++#! @BASH@ |
1274 | ++ |
1275 | ++set -e |
1276 | ++ |
1277 | ++# File: backup-files.sh |
1278 | ++ |
1279 | ++# Copyright (C) 2006 Steve Langasek <vorlon@debian.org> |
1280 | ++# portions Copyright (C) 2003, 2004, 2005, 2006 Andreas Gruenbacher |
1281 | ++# <agruen@suse.de>, SuSE Labs |
1282 | ++ |
1283 | ++# This program is free software; you can redistribute it and/or modify |
1284 | ++# it under the terms of the GNU General Public License as published by |
1285 | ++# the Free Software Foundation; version 2 dated June, 1991. |
1286 | ++ |
1287 | ++# This program is distributed in the hope that it will be useful, but |
1288 | ++# WITHOUT ANY WARRANTY; without even the implied warranty of |
1289 | ++# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
1290 | ++# General Public License for more details. |
1291 | ++ |
1292 | ++# You should have received a copy of the GNU General Public License |
1293 | ++# along with this program; if not, write to the Free Software |
1294 | ++# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, |
1295 | ++# MA 02110-1301, USA. |
1296 | ++ |
1297 | ++ |
1298 | ++# Create backup files of a list of files similar to GNU patch. A path |
1299 | ++# name prefix and suffix for the backup file can be specified with the |
1300 | ++# -B and -z options. |
1301 | ++ |
1302 | ++usage () { |
1303 | ++ progname="$1" |
1304 | ++ printf "Usage: %s [-B prefix] [-z suffix] [-f {file|-}] [-s] [-k] [-t] [-L] [-b|-r|-x] {file|-} ...\n"\ |
1305 | ++ "\n"\ |
1306 | ++ "\tCreate hard linked backup copies of a list of files\n"\ |
1307 | ++ "\tread from standard input.\n"\ |
1308 | ++ "\n"\ |
1309 | ++ "\t-b\tCreate backup\n"\ |
1310 | ++ "\t-r\tRestore the backup\n"\ |
1311 | ++ "\t-x\tRemove backup files and empty parent directories\n"\ |
1312 | ++ "\t-k\tWhen doing a restore, keep the backup files\n"\ |
1313 | ++ "\t-B\tPath name prefix for backup files\n"\ |
1314 | ++ "\t-z\tPath name suffix for backup files\n"\ |
1315 | ++ "\t-s\tSilent operation; only print error messages\n"\ |
1316 | ++ "\t-f\tRead the filenames to process from file (- = standard input)\n"\ |
1317 | ++ "\t-t\tTouch original files after restore (update their mtimes)\n\n"\ |
1318 | ++ "\t-L\tEnsure that when finished, the source file has a link count of 1\n\n", \ |
1319 | ++ "$progname" |
1320 | ++} |
1321 | ++ |
1322 | ++copy_file() { |
1323 | ++ from="$1" |
1324 | ++ to="$2" |
1325 | ++ cp -dp --remove-destination "$from" "$to" |
1326 | ++} |
1327 | ++ |
1328 | ++link_or_copy_file() { |
1329 | ++ from="$1" |
1330 | ++ to="$2" |
1331 | ++ if ! ln "$from" "$to" 2>/dev/null || [ -d "$to" ]; then |
1332 | ++ copy_file "$from" "$to" |
1333 | ++ fi |
1334 | ++} |
1335 | ++ |
1336 | ++ensure_nolinks() { |
1337 | ++ filename="$1" |
1338 | ++ |
1339 | ++ link_count=$(stat -c '%h' "$filename") |
1340 | ++ if [ -z "$link_count" ] || [ "$link_count" -gt 1 ]; then |
1341 | ++ dirname=$(dirname "$filename") |
1342 | ++ basename=$(basename "$filename") |
1343 | ++ # Temp file name is "path/to/.file.XXXXXX" |
1344 | ++ tmpname=$(mktemp "${dirname}/.${basename}.XXXXXX") |
1345 | ++ cp -dp "$filename" "$tmpname" |
1346 | ++ mv "$tmpname" "$filename" |
1347 | ++ fi |
1348 | ++} |
1349 | ++ |
1350 | ++process_file() { |
1351 | ++ file="$1" |
1352 | ++ backup="${OPT_PREFIX}${file}${OPT_SUFFIX}" |
1353 | ++ |
1354 | ++ if [ "$OPT_WHAT" == "backup" ]; then |
1355 | ++ if [ -e "$backup" ]; then |
1356 | ++ rm "$backup" |
1357 | ++ else |
1358 | ++ mkdir -p "$(dirname "$backup")" |
1359 | ++ fi |
1360 | ++ if [ ! -e "$file" ]; then |
1361 | ++ $ECHO "New file $file" |
1362 | ++ touch "$backup" |
1363 | ++ chmod 000 "$backup" |
1364 | ++ else |
1365 | ++ $ECHO "Copying $file" |
1366 | ++ if [ -n "$OPT_NOLINKS" -a "$(stat -c '%h' "$file")" = "1" ]; then |
1367 | ++ copy_file "$file" "$backup" |
1368 | ++ else |
1369 | ++ link_or_copy_file "$file" "$backup" |
1370 | ++ if [ -n "$OPT_NOLINKS" ]; then |
1371 | ++ ensure_nolinks "$file" |
1372 | ++ fi |
1373 | ++ fi |
1374 | ++ if [ -n "OPT_TOUCH" ]; then |
1375 | ++ touch "$backup" |
1376 | ++ fi |
1377 | ++ fi |
1378 | ++ elif [ "$OPT_WHAT" == "restore" ]; then |
1379 | ++ mkdir -p "$(dirname "$file")" |
1380 | ++ |
1381 | ++ if [ ! -e "$backup" ]; then |
1382 | ++ return 1 |
1383 | ++ fi |
1384 | ++ if [ ! -s "$backup" ]; then |
1385 | ++ if [ -e "$file" ]; then |
1386 | ++ rm "$file" |
1387 | ++ fi |
1388 | ++ $ECHO "Removing $file" |
1389 | ++ if [ -z "$OPT_KEEP_BACKUP" ]; then |
1390 | ++ rm "$backup" |
1391 | ++ while [ -d "${backup%/*}" ] && ! [ -L "${backup%/*}" ] |
1392 | ++ do |
1393 | ++ backup="${backup%/*}" |
1394 | ++ rmdir --ignore-fail-on-non-empty "$backup" 2>/dev/null |
1395 | ++ if [ -d "$backup" ]; then |
1396 | ++ break |
1397 | ++ fi |
1398 | ++ done |
1399 | ++ fi |
1400 | ++ else |
1401 | ++ $ECHO "Restoring $file" |
1402 | ++ if [ -e "$file" ]; then |
1403 | ++ rm "$file" |
1404 | ++ fi |
1405 | ++ if [ -n "$OPT_NOLINKS" -a "$(stat -c '%h' "$backup")" != "1" ]; then |
1406 | ++ copy_file "$backup" "$file" |
1407 | ++ else |
1408 | ++ link_or_copy_file "$backup" "$file" |
1409 | ++ if [ -n "$OPT_NOLINKS" ]; then |
1410 | ++ ensure_nolinks "$file" |
1411 | ++ fi |
1412 | ++ fi |
1413 | ++ |
1414 | ++ if [ -z "$OPT_KEEP_BACKUP" ]; then |
1415 | ++ rm "$backup" |
1416 | ++ while [ -d "${backup%/*}" ] && ! [ -L "${backup%/*}" ] |
1417 | ++ do |
1418 | ++ backup="${backup%/*}" |
1419 | ++ rmdir --ignore-fail-on-non-empty "$backup" 2>/dev/null |
1420 | ++ if [ -d "$backup" ]; then |
1421 | ++ break |
1422 | ++ fi |
1423 | ++ done |
1424 | ++ fi |
1425 | ++ if [ -n "$OPT_TOUCH" ]; then |
1426 | ++ touch "$file" |
1427 | ++ fi |
1428 | ++ fi |
1429 | ++ elif [ "$OPT_WHAT" == "remove" ]; then |
1430 | ++ if [ -e "$backup" ]; then |
1431 | ++ rm "$backup" |
1432 | ++ fi |
1433 | ++ while [ -d "${backup%/*}" ] && ! [ -L "${backup%/*}" ] |
1434 | ++ do |
1435 | ++ backup="${backup%/*}" |
1436 | ++ rmdir --ignore-fail-on-non-empty "$backup" 2>/dev/null |
1437 | ++ if [ -d "$backup" ]; then |
1438 | ++ break |
1439 | ++ fi |
1440 | ++ done |
1441 | ++ elif [ "$OPT_WHAT" == "noop" ]; then |
1442 | ++ if [ -e "$file" ] && [ -n "$OPT_NOLINKS" ]; then |
1443 | ++ ensure_nolinks "$file" |
1444 | ++ fi |
1445 | ++ else |
1446 | ++ return 1 |
1447 | ++ fi |
1448 | ++} |
1449 | ++ |
1450 | ++walk() { |
1451 | ++ path="$1" |
1452 | ++ if [ ! -f "$path" ]; then |
1453 | ++ return 0 |
1454 | ++ fi |
1455 | ++ |
1456 | ++ if [ "${path#$OPT_PREFIX}" == "$path" ] |
1457 | ++ then |
1458 | ++ # prefix does not match |
1459 | ++ return 0 |
1460 | ++ fi |
1461 | ++ path="${path#$OPT_PREFIX}" |
1462 | ++ |
1463 | ++ if [ -n "$OPT_SUFFIX" ] && [ "${path%$OPT_SUFFIX}" == "$path" ] |
1464 | ++ then |
1465 | ++ # suffix does not match |
1466 | ++ return 0 |
1467 | ++ fi |
1468 | ++ path="${path%$OPT_SUFFIX}" |
1469 | ++ |
1470 | ++ process_file "$path" |
1471 | ++} |
1472 | ++ |
1473 | ++ |
1474 | ++ECHO=echo |
1475 | ++declare -a FILELIST |
1476 | ++progname="$0" |
1477 | ++while [ $# -gt 0 ]; do |
1478 | ++ case $1 in |
1479 | ++ -b) OPT_WHAT=backup |
1480 | ++ ;; |
1481 | ++ -r) OPT_WHAT=restore |
1482 | ++ ;; |
1483 | ++ -x) OPT_WHAT=remove |
1484 | ++ ;; |
1485 | ++ -B) OPT_PREFIX=$2 |
1486 | ++ shift |
1487 | ++ ;; |
1488 | ++ -f) OPT_FILE=$2 |
1489 | ++ shift |
1490 | ++ ;; |
1491 | ++ -z) OPT_SUFFIX=$2 |
1492 | ++ shift |
1493 | ++ ;; |
1494 | ++ -s) ECHO=: |
1495 | ++ ;; |
1496 | ++ -k) OPT_KEEP_BACKUP=1 |
1497 | ++ ;; |
1498 | ++ -L) OPT_NOLINKS=1 |
1499 | ++ ;; |
1500 | ++ -t) OPT_TOUCH=1 |
1501 | ++ ;; |
1502 | ++ -?*) usage "$progname" |
1503 | ++ exit 0 |
1504 | ++ ;; |
1505 | ++ *) FILELIST=($@) |
1506 | ++ break |
1507 | ++ ;; |
1508 | ++ esac |
1509 | ++ |
1510 | ++ shift |
1511 | ++done |
1512 | ++ |
1513 | ++if [ -z "${OPT_PREFIX}${OPT_SUFFIX}" ]; then |
1514 | ++ usage "$progname" |
1515 | ++ exit 1 |
1516 | ++fi |
1517 | ++if [ ${#FILELIST[@]} == 0 ] && [ -z "$OPT_FILE" ]; then |
1518 | ++ usage "$progname" |
1519 | ++ exit 1 |
1520 | ++fi |
1521 | ++ |
1522 | ++if [ -n "$OPT_FILE" ]; then |
1523 | ++ cat "$OPT_FILE" \ |
1524 | ++ | while read nextfile; do |
1525 | ++ process_file "$nextfile" |
1526 | ++ done |
1527 | ++fi |
1528 | ++ |
1529 | ++I=0 |
1530 | ++while [ $I -lt ${#FILELIST[@]} ]; do |
1531 | ++ |
1532 | ++ case "${FILELIST[$I]}" in |
1533 | ++ -) |
1534 | ++ path="${OPT_PREFIX%/*}" |
1535 | ++ if ! [ -n "$path" ] && [ -d "$path" ] ; then |
1536 | ++ I=$(($I+1)) |
1537 | ++ continue |
1538 | ++ fi |
1539 | ++ |
1540 | ++ find "$path" -mindepth 1 \( -type f -o -type d \) -print 2>/dev/null \ |
1541 | ++ | while read |
1542 | ++ do |
1543 | ++ if [ -d "$REPLY" ] |
1544 | ++ then |
1545 | ++ if ! [ -r "$REPLY" ] || ! [ -x "$REPLY" ] |
1546 | ++ then |
1547 | ++ echo "$REPLY: Permission denied" |
1548 | ++ exit 1 |
1549 | ++ fi |
1550 | ++ else |
1551 | ++ walk "$REPLY" |
1552 | ++ fi |
1553 | ++ done |
1554 | ++ if [ $? != 0 ]; then |
1555 | ++ exit 1 |
1556 | ++ fi |
1557 | ++ ;; |
1558 | ++ *) |
1559 | ++ process_file "${FILELIST[$I]}" |
1560 | ++ ;; |
1561 | ++ esac |
1562 | ++ |
1563 | ++ I=$(($I+1)) |
1564 | ++done |
1565 | +Index: b/bin/quilt.in |
1566 | +=================================================================== |
1567 | +--- a/bin/quilt.in |
1568 | ++++ b/bin/quilt.in |
1569 | +@@ -9,8 +9,8 @@ |
1570 | + export TEXTDOMAIN=quilt |
1571 | + export TEXTDOMAINDIR=@LOCALEDIR@ |
1572 | + |
1573 | +-: ${QUILT_DIR=@QUILT_DIR@} ${QUILT_LIB=@QUILT_LIB@} |
1574 | +-export QUILT_DIR QUILT_LIB |
1575 | ++: ${QUILT_DIR=@QUILT_DIR@} |
1576 | ++export QUILT_DIR |
1577 | + |
1578 | + if [ -z "$QUILTRC" ] |
1579 | + then |
1580 | +Index: b/lib/backup-files.c |
1581 | +=================================================================== |
1582 | +--- a/lib/backup-files.c |
1583 | ++++ /dev/null |
1584 | +@@ -1,601 +0,0 @@ |
1585 | +-/* |
1586 | +- File: backup-files.c |
1587 | +- |
1588 | +- Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008 |
1589 | +- Andreas Gruenbacher <agruen@suse.de>, SuSE Labs |
1590 | +- |
1591 | +- This program is free software; you can redistribute it and/or |
1592 | +- modify it under the terms of the GNU Library General Public |
1593 | +- License as published by the Free Software Foundation; either |
1594 | +- version 2 of the License, or (at your option) any later version. |
1595 | +- |
1596 | +- This program is distributed in the hope that it will be useful, |
1597 | +- but WITHOUT ANY WARRANTY; without even the implied warranty of |
1598 | +- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
1599 | +- Library General Public License for more details. |
1600 | +- |
1601 | +- You should have received a copy of the GNU Library General Public |
1602 | +- License along with this library; if not, write to the Free Software |
1603 | +- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. |
1604 | +-*/ |
1605 | +- |
1606 | +-/* |
1607 | +- * Create backup files of a list of files similar to GNU patch. A path |
1608 | +- * name prefix and suffix for the backup file can be specified with the |
1609 | +- * -B and -z options. |
1610 | +- */ |
1611 | +- |
1612 | +-#define _GNU_SOURCE 1 |
1613 | +- |
1614 | +-#ifdef HAVE_CONFIG_H |
1615 | +-# include "config.h" |
1616 | +-#endif |
1617 | +- |
1618 | +-#include <sys/types.h> |
1619 | +-#include <sys/stat.h> |
1620 | +-#include <utime.h> |
1621 | +-#include <fcntl.h> |
1622 | +-#include <unistd.h> |
1623 | +-#include <stdio.h> |
1624 | +-#include <stdlib.h> |
1625 | +-#include <errno.h> |
1626 | +-#include <string.h> |
1627 | +-#include <dirent.h> |
1628 | +- |
1629 | +-#if !defined(HAVE_MKSTEMP) && defined(HAVE_MKTEMP) |
1630 | +-# define mkstemp(x) creat(mktemp(x), 0600) |
1631 | +-#endif |
1632 | +- |
1633 | +-#ifndef PATH_MAX |
1634 | +-# define PATH_MAX 4096 |
1635 | +-#endif |
1636 | +- |
1637 | +-#ifdef __MINGW32__ |
1638 | +-#define mkdir(x,y) mkdir(x) |
1639 | +-/* Symlinks are not supported */ |
1640 | +-#define lstat stat |
1641 | +-static int link(const char *oldpath, const char *newpath) |
1642 | +-{ |
1643 | +- errno = ENOSYS; |
1644 | +- return -1; |
1645 | +-} |
1646 | +-#endif |
1647 | +- |
1648 | +-const char *progname; |
1649 | +- |
1650 | +-enum { what_noop, what_backup, what_restore, what_remove }; |
1651 | +- |
1652 | +-const char *opt_prefix="", *opt_suffix="", *opt_file; |
1653 | +-int opt_silent, opt_what=what_noop; |
1654 | +-int opt_nolinks, opt_touch; |
1655 | +-int opt_keep_backup; |
1656 | +- |
1657 | +-#define LINE_LENGTH 1024 |
1658 | +- |
1659 | +- |
1660 | +-static void |
1661 | +-usage(void) |
1662 | +-{ |
1663 | +- printf("Usage: %s [-B prefix] [-z suffix] [-f {file|-}] [-sktL] [-b|-r|-x] {file|-} ...\n" |
1664 | +- "\n" |
1665 | +- "\tCreate hard linked backup copies of a list of files\n" |
1666 | +- "\tread from standard input.\n" |
1667 | +- "\n" |
1668 | +- "\t-b\tCreate backup\n" |
1669 | +- "\t-r\tRestore the backup\n" |
1670 | +- "\t-x\tRemove backup files and empty parent directories\n" |
1671 | +- "\t-k\tWhen doing a restore, keep the backup files\n" |
1672 | +- "\t-B\tPath name prefix for backup files\n" |
1673 | +- "\t-z\tPath name suffix for backup files\n" |
1674 | +- "\t-s\tSilent operation; only print error messages\n" |
1675 | +- "\t-f\tRead the filenames to process from file (- = standard input)\n" |
1676 | +- "\t-t\tTouch original files after restore (update their mtimes)\n\n" |
1677 | +- "\t-L\tEnsure that when finished, the source file has a link count of 1\n\n", |
1678 | +- progname); |
1679 | +-} |
1680 | +- |
1681 | +-static void * |
1682 | +-malloc_nofail(size_t size) |
1683 | +-{ |
1684 | +- void *p = malloc(size); |
1685 | +- if (!p) { |
1686 | +- perror(progname); |
1687 | +- exit(1); |
1688 | +- } |
1689 | +- return p; |
1690 | +-} |
1691 | +- |
1692 | +-static void |
1693 | +-create_parents(const char *filename) |
1694 | +-{ |
1695 | +- struct stat st; |
1696 | +- int rv = -1; |
1697 | +- char *fn = malloc_nofail(strlen(filename) + 1), *f; |
1698 | +- |
1699 | +- strcpy(fn, filename); |
1700 | +- |
1701 | +- f = strrchr(fn, '/'); |
1702 | +- if (f == NULL) |
1703 | +- goto out; |
1704 | +- *f = '\0'; |
1705 | +- if (stat(fn, &st) == 0) |
1706 | +- goto out; |
1707 | +- *f = '/'; |
1708 | +- |
1709 | +- f = strchr(fn, '/'); |
1710 | +- while (f != NULL) { |
1711 | +- *f = '\0'; |
1712 | +- if (!rv || (rv = stat(fn, &st)) != 0) { |
1713 | +- mkdir(fn, 0777); |
1714 | +- } |
1715 | +- *f = '/'; |
1716 | +- f = strchr(f+1, '/'); |
1717 | +- } |
1718 | +-out: |
1719 | +- free(fn); |
1720 | +-} |
1721 | +- |
1722 | +-static void |
1723 | +-remove_parents(const char *filename) |
1724 | +-{ |
1725 | +- char *fn = malloc_nofail(strlen(filename) + 1), *f; |
1726 | +- |
1727 | +- strcpy(fn, filename); |
1728 | +- |
1729 | +- f = strrchr(fn, '/'); |
1730 | +- if (f == NULL) |
1731 | +- goto out; |
1732 | +- do { |
1733 | +- *f = '\0'; |
1734 | +- if (rmdir(fn) == -1) |
1735 | +- goto out; |
1736 | +- } while ((f = strrchr(fn, '/')) != NULL); |
1737 | +- rmdir(fn); |
1738 | +-out: |
1739 | +- free(fn); |
1740 | +-} |
1741 | +- |
1742 | +-static int |
1743 | +-copy_fd(int from_fd, int to_fd) |
1744 | +-{ |
1745 | +- char buffer[16384]; |
1746 | +- char *wbuf; |
1747 | +- ssize_t len, l; |
1748 | +- |
1749 | +- for ( ;; ) { |
1750 | +- len = read(from_fd, buffer, sizeof(buffer)); |
1751 | +- if (len == 0) |
1752 | +- return 0; |
1753 | +- if (len < 0) { |
1754 | +- if (errno == EINTR || errno == EAGAIN) |
1755 | +- continue; |
1756 | +- return 1; |
1757 | +- } |
1758 | +- for (wbuf = buffer; len != 0; ) { |
1759 | +- l = write(to_fd, wbuf, len); |
1760 | +- if (l < 0) { |
1761 | +- if (errno == EINTR || errno == EAGAIN) |
1762 | +- continue; |
1763 | +- return 1; |
1764 | +- } |
1765 | +- wbuf += l; |
1766 | +- len -= l; |
1767 | +- } |
1768 | +- } |
1769 | +-} |
1770 | +- |
1771 | +-static int |
1772 | +-copy_file(const char *from, const struct stat *st, const char *to) |
1773 | +-{ |
1774 | +- int from_fd, to_fd, error = 1; |
1775 | +- |
1776 | +- if ((from_fd = open(from, O_RDONLY)) == -1) { |
1777 | +- perror(from); |
1778 | +- return 1; |
1779 | +- } |
1780 | +- unlink(to); /* make sure we don't inherit this file's mode. */ |
1781 | +- if ((to_fd = creat(to, st->st_mode)) < 0) { |
1782 | +- perror(to); |
1783 | +- close(from_fd); |
1784 | +- return 1; |
1785 | +- } |
1786 | +-#if defined(HAVE_FCHMOD) |
1787 | +- (void) fchmod(to_fd, st->st_mode); |
1788 | +-#elif defined(HAVE_CHMOD) |
1789 | +- (void) chmod(to, st->st_mode); |
1790 | +-#endif |
1791 | +- if (copy_fd(from_fd, to_fd)) { |
1792 | +- fprintf(stderr, "%s -> %s: %s\n", from, to, strerror(errno)); |
1793 | +- unlink(to); |
1794 | +- goto out; |
1795 | +- } |
1796 | +- |
1797 | +- error = 0; |
1798 | +-out: |
1799 | +- close(from_fd); |
1800 | +- close(to_fd); |
1801 | +- |
1802 | +- return error; |
1803 | +-} |
1804 | +- |
1805 | +-static int |
1806 | +-link_or_copy_file(const char *from, const struct stat *st, const char *to) |
1807 | +-{ |
1808 | +- if (link(from, to) == 0) |
1809 | +- return 0; |
1810 | +- if (errno != EXDEV && errno != EPERM && |
1811 | +- errno != EMLINK && errno != ENOSYS) { |
1812 | +- fprintf(stderr, "Could not link file `%s' to `%s': %s\n", |
1813 | +- from, to, strerror(errno)); |
1814 | +- return 1; |
1815 | +- } |
1816 | +- return copy_file(from, st, to); |
1817 | +-} |
1818 | +- |
1819 | +-static int |
1820 | +-ensure_nolinks(const char *filename) |
1821 | +-{ |
1822 | +- struct stat st; |
1823 | +- |
1824 | +- if (stat(filename, &st) != 0) { |
1825 | +- perror(filename); |
1826 | +- return 1; |
1827 | +- } |
1828 | +- if (st.st_nlink > 1) { |
1829 | +- char *tmpname = malloc(1 + strlen(filename) + 7 + 1), *c; |
1830 | +- int from_fd = -1, to_fd = -1; |
1831 | +- int error = 1; |
1832 | +- |
1833 | +- if (!tmpname) |
1834 | +- goto fail; |
1835 | +- from_fd = open(filename, O_RDONLY); |
1836 | +- if (from_fd == -1) |
1837 | +- goto fail; |
1838 | +- |
1839 | +- /* Temp file name is "path/to/.file.XXXXXX" */ |
1840 | +- strcpy(tmpname, filename); |
1841 | +- strcat(tmpname, ".XXXXXX"); |
1842 | +- c = strrchr(tmpname, '/'); |
1843 | +- if (c == NULL) |
1844 | +- c = tmpname; |
1845 | +- else |
1846 | +- c++; |
1847 | +- memmove(c + 1, c, strlen(c) + 1); |
1848 | +- *c = '.'; |
1849 | +- |
1850 | +- to_fd = mkstemp(tmpname); |
1851 | +- if (to_fd == -1) |
1852 | +- goto fail; |
1853 | +- if (copy_fd(from_fd, to_fd)) |
1854 | +- goto fail; |
1855 | +-#if defined(HAVE_FCHMOD) |
1856 | +- (void) fchmod(to_fd, st.st_mode); |
1857 | +-#elif defined(HAVE_CHMOD) |
1858 | +- (void) chmod(tmpname, st.st_mode); |
1859 | +-#endif |
1860 | +- close(from_fd); |
1861 | +- from_fd = -1; |
1862 | +- close(to_fd); |
1863 | +- to_fd = -1; |
1864 | +- if (rename(tmpname, filename)) |
1865 | +- goto fail; |
1866 | +- |
1867 | +- error = 0; |
1868 | +- fail: |
1869 | +- if (error) |
1870 | +- perror(filename); |
1871 | +- if (from_fd != -1) |
1872 | +- close(from_fd); |
1873 | +- if (to_fd != -1) |
1874 | +- close(to_fd); |
1875 | +- free(tmpname); |
1876 | +- return error; |
1877 | +- } else |
1878 | +- return 0; |
1879 | +-} |
1880 | +- |
1881 | +-static int |
1882 | +-process_file(const char *file) |
1883 | +-{ |
1884 | +- char *backup = malloc_nofail( |
1885 | +- strlen(opt_prefix) + strlen(file) + strlen(opt_suffix) + 1); |
1886 | +- |
1887 | +- sprintf(backup, "%s%s%s", opt_prefix, file, opt_suffix); |
1888 | +- |
1889 | +- if (opt_what == what_backup) { |
1890 | +- struct stat st; |
1891 | +- int missing_file = (stat(file, &st) == -1 && errno == ENOENT); |
1892 | +- |
1893 | +- unlink(backup); |
1894 | +- create_parents(backup); |
1895 | +- if (missing_file) { |
1896 | +- int fd; |
1897 | +- |
1898 | +- if (!opt_silent) |
1899 | +- printf("New file %s\n", file); |
1900 | +- /* GNU patch creates new files with mode==0. */ |
1901 | +- if ((fd = creat(backup, 0)) == -1) { |
1902 | +- perror(backup); |
1903 | +- goto fail; |
1904 | +- } |
1905 | +- close(fd); |
1906 | +- } else { |
1907 | +- if (!opt_silent) |
1908 | +- printf("Copying %s\n", file); |
1909 | +- if (opt_nolinks && st.st_nlink == 1) { |
1910 | +- if (copy_file(file, &st, backup)) |
1911 | +- goto fail; |
1912 | +- } else { |
1913 | +- if (link_or_copy_file(file, &st, backup)) |
1914 | +- goto fail; |
1915 | +- if (opt_nolinks && ensure_nolinks(file)) |
1916 | +- goto fail; |
1917 | +- } |
1918 | +- if (opt_touch) |
1919 | +- (void) utime(backup, NULL); |
1920 | +- else { |
1921 | +- struct utimbuf ut; |
1922 | +- ut.actime = ut.modtime = st.st_mtime; |
1923 | +- (void) utime(backup, &ut); |
1924 | +- } |
1925 | +- } |
1926 | +- } else if (opt_what == what_restore) { |
1927 | +- struct stat st; |
1928 | +- |
1929 | +- create_parents(file); |
1930 | +- if (stat(backup, &st) != 0) { |
1931 | +- perror(backup); |
1932 | +- goto fail; |
1933 | +- } |
1934 | +- if (st.st_size == 0) { |
1935 | +- if (unlink(file) == 0 || errno == ENOENT) { |
1936 | +- if (!opt_silent) |
1937 | +- printf("Removing %s\n", file); |
1938 | +- } else { |
1939 | +- perror(file); |
1940 | +- goto fail; |
1941 | +- } |
1942 | +- if (!opt_keep_backup) { |
1943 | +- unlink(backup); |
1944 | +- remove_parents(backup); |
1945 | +- } |
1946 | +- } else { |
1947 | +- if (!opt_silent) |
1948 | +- printf("Restoring %s\n", file); |
1949 | +- unlink(file); |
1950 | +- if (opt_nolinks && st.st_nlink != 1) { |
1951 | +- if (copy_file(backup, &st, file)) |
1952 | +- goto fail; |
1953 | +- } else { |
1954 | +- if (link_or_copy_file(backup, &st, file)) |
1955 | +- goto fail; |
1956 | +- if (opt_nolinks && ensure_nolinks(file)) |
1957 | +- goto fail; |
1958 | +- } |
1959 | +- if (!opt_keep_backup) { |
1960 | +- unlink(backup); |
1961 | +- remove_parents(backup); |
1962 | +- } |
1963 | +- if (opt_touch) |
1964 | +- (void) utime(file, NULL); |
1965 | +- else { |
1966 | +- struct utimbuf ut; |
1967 | +- ut.actime = ut.modtime = st.st_mtime; |
1968 | +- (void) utime(file, &ut); |
1969 | +- } |
1970 | +- } |
1971 | +- } else if (opt_what == what_remove) { |
1972 | +- unlink(backup); |
1973 | +- remove_parents(backup); |
1974 | +- } else if (opt_what == what_noop) { |
1975 | +- struct stat st; |
1976 | +- int missing_file = (stat(file, &st) == -1 && errno == ENOENT); |
1977 | +- |
1978 | +- if (!missing_file && opt_nolinks) { |
1979 | +- if (ensure_nolinks(file)) |
1980 | +- goto fail; |
1981 | +- } |
1982 | +- } else |
1983 | +- goto fail; |
1984 | +- |
1985 | +- free(backup); |
1986 | +- return 0; |
1987 | +- |
1988 | +-fail: |
1989 | +- free(backup); |
1990 | +- return 1; |
1991 | +-} |
1992 | +- |
1993 | +-static int |
1994 | +-foreachdir_rec(const char *path, struct stat *st, |
1995 | +- int (*walk)(const char *, const struct stat *)) |
1996 | +-{ |
1997 | +- DIR *dir; |
1998 | +- struct dirent *dp; |
1999 | +- int failed = 0; |
2000 | +- char *p = malloc_nofail(PATH_MAX); |
2001 | +- |
2002 | +- if (access(path, R_OK|X_OK) || !(dir = opendir(path))) |
2003 | +- return walk(path, NULL); |
2004 | +- while ((dp = readdir(dir))) { |
2005 | +- if (!strcmp(dp->d_name, ".") || !strcmp(dp->d_name, "..")) |
2006 | +- continue; |
2007 | +- if (strlen(path) + 1 + strlen(dp->d_name) + 1 > PATH_MAX) { |
2008 | +- fprintf(stderr, "%s/%s: name too long\n", path, |
2009 | +- dp->d_name); |
2010 | +- failed = -1; |
2011 | +- goto out; |
2012 | +- } |
2013 | +- sprintf(p, "%s/%s", path, dp->d_name); |
2014 | +- |
2015 | +- if (lstat(p, st)) |
2016 | +- continue; /* file has disappeared meanwhile */ |
2017 | +- if (S_ISDIR(st->st_mode)) { |
2018 | +- failed = foreachdir_rec(p, st, walk); |
2019 | +- if (failed) |
2020 | +- goto out; |
2021 | +- } else { |
2022 | +- failed = walk(p, st); |
2023 | +- if (failed) |
2024 | +- goto out; |
2025 | +- } |
2026 | +- } |
2027 | +- if (closedir(dir) != 0) |
2028 | +- failed = -1; |
2029 | +- |
2030 | +-out: |
2031 | +- free(p); |
2032 | +- return failed; |
2033 | +-} |
2034 | +- |
2035 | +-static int |
2036 | +-foreachdir(const char *path, |
2037 | +- int (*walk)(const char *, const struct stat *)) |
2038 | +-{ |
2039 | +- struct stat st; |
2040 | +- |
2041 | +- if (lstat(path, &st)) |
2042 | +- return walk(path, NULL); |
2043 | +- return foreachdir_rec(path, &st, walk); |
2044 | +-} |
2045 | +- |
2046 | +-static int |
2047 | +-walk(const char *path, const struct stat *st) |
2048 | +-{ |
2049 | +- size_t prefix_len=strlen(opt_prefix), suffix_len=strlen(opt_suffix); |
2050 | +- size_t len = strlen(path); |
2051 | +- char *p; |
2052 | +- int ret; |
2053 | +- |
2054 | +- if (!st) { |
2055 | +- perror(path); |
2056 | +- return 1; |
2057 | +- } |
2058 | +- if (!S_ISREG(st->st_mode)) |
2059 | +- return 0; |
2060 | +- if (strncmp(opt_prefix, path, prefix_len)) |
2061 | +- return 0; /* prefix does not match */ |
2062 | +- if (len < suffix_len || strcmp(opt_suffix, path + len - suffix_len)) |
2063 | +- return 0; /* suffix does not match */ |
2064 | +- |
2065 | +- p = malloc_nofail(len - prefix_len - suffix_len + 1); |
2066 | +- memcpy(p, path + prefix_len, len - prefix_len - suffix_len); |
2067 | +- p[len - prefix_len - suffix_len] = '\0'; |
2068 | +- ret = process_file(p); |
2069 | +- free(p); |
2070 | +- return ret; |
2071 | +-} |
2072 | +- |
2073 | +-int |
2074 | +-main(int argc, char *argv[]) |
2075 | +-{ |
2076 | +- int opt, status = 0; |
2077 | +- |
2078 | +- progname = argv[0]; |
2079 | +- |
2080 | +- while ((opt = getopt(argc, argv, "brkxB:z:f:shLt")) != -1) { |
2081 | +- switch(opt) { |
2082 | +- case 'b': |
2083 | +- opt_what = what_backup; |
2084 | +- break; |
2085 | +- |
2086 | +- case 'r': |
2087 | +- opt_what = what_restore; |
2088 | +- break; |
2089 | +- |
2090 | +- case 'k': |
2091 | +- opt_keep_backup = 1; |
2092 | +- break; |
2093 | +- |
2094 | +- case 'x': |
2095 | +- opt_what = what_remove; |
2096 | +- break; |
2097 | +- |
2098 | +- case 'B': |
2099 | +- opt_prefix = optarg; |
2100 | +- break; |
2101 | +- |
2102 | +- case 'f': |
2103 | +- opt_file = optarg; |
2104 | +- break; |
2105 | +- |
2106 | +- case 'z': |
2107 | +- opt_suffix = optarg; |
2108 | +- break; |
2109 | +- |
2110 | +- case 's': |
2111 | +- opt_silent = 1; |
2112 | +- break; |
2113 | +- |
2114 | +- case 'L': |
2115 | +- opt_nolinks = 1; |
2116 | +- break; |
2117 | +- |
2118 | +- case 't': |
2119 | +- opt_touch = 1; |
2120 | +- break; |
2121 | +- |
2122 | +- case 'h': |
2123 | +- default: |
2124 | +- usage(); |
2125 | +- return 0; |
2126 | +- } |
2127 | +- } |
2128 | +- |
2129 | +- if ((*opt_prefix == '\0' && *opt_suffix == '\0') || |
2130 | +- (opt_file == NULL && optind == argc)) { |
2131 | +- usage(); |
2132 | +- return 1; |
2133 | +- } |
2134 | +- |
2135 | +- if (opt_file != NULL) { |
2136 | +- FILE *file; |
2137 | +- char line[LINE_LENGTH]; |
2138 | +- |
2139 | +- if (!strcmp(opt_file, "-")) { |
2140 | +- file = stdin; |
2141 | +- } else { |
2142 | +- if ((file = fopen(opt_file, "r")) == NULL) { |
2143 | +- perror(opt_file); |
2144 | +- return 1; |
2145 | +- } |
2146 | +- } |
2147 | +- |
2148 | +- while (fgets(line, sizeof(line), file)) { |
2149 | +- char *l = strchr(line, '\0'); |
2150 | +- |
2151 | +- if (l > line && *(l-1) == '\n') |
2152 | +- *(l-1) = '\0'; |
2153 | +- if (*line == '\0') |
2154 | +- continue; |
2155 | +- |
2156 | +- if ((status = process_file(line)) != 0) |
2157 | +- return status; |
2158 | +- } |
2159 | +- |
2160 | +- if (file != stdin) { |
2161 | +- fclose(file); |
2162 | +- } |
2163 | +- } |
2164 | +- for (; optind < argc; optind++) { |
2165 | +- if (strcmp(argv[optind], "-") == 0) { |
2166 | +- struct stat st; |
2167 | +- char *dir = strdup(opt_prefix), *d = strrchr(dir, '/'); |
2168 | +- if (d) |
2169 | +- *d = '\0'; |
2170 | +- else |
2171 | +- d = "."; |
2172 | +- if (stat(dir, &st) == 0) { |
2173 | +- status = foreachdir(dir, walk); |
2174 | +- if (status == -1) |
2175 | +- perror(dir); |
2176 | +- } |
2177 | +- free(dir); |
2178 | +- } else |
2179 | +- status = process_file(argv[optind]); |
2180 | +- if (status) |
2181 | +- return status; |
2182 | +- } |
2183 | +- |
2184 | +- return status; |
2185 | +-} |
2186 | +Index: b/quilt/scripts/patchfns.in |
2187 | +=================================================================== |
2188 | +--- a/quilt/scripts/patchfns.in |
2189 | ++++ b/quilt/scripts/patchfns.in |
2190 | +@@ -884,7 +884,7 @@ |
2191 | + local prefix=$QUILT_PC/$patch/ |
2192 | + [ ${prefix:0:1} == / ] || prefix=$PWD/$prefix |
2193 | + if ! ( cd $workdir && \ |
2194 | +- $QUILT_LIB/backup-files -B $prefix -rks ${@:--} ) |
2195 | ++ $QUILT_DIR/scripts/backup-files -B $prefix -r -k -s ${@:--} ) |
2196 | + then |
2197 | + printf $"Failed to copy files to temporary directory\n" >&2 |
2198 | + return 1 |
2199 | +>>>>>>> MERGE-SOURCE |
2200 | |
2201 | === modified file 'debian/patches/series' |
2202 | --- debian/patches/series 2010-01-14 22:23:25 +0000 |
2203 | +++ debian/patches/series 2010-02-12 23:40:30 +0000 |
2204 | @@ -1,3 +1,4 @@ |
2205 | +<<<<<<< TREE |
2206 | fix-manpage-generation |
2207 | arch_all |
2208 | debianize |
2209 | @@ -23,3 +24,26 @@ |
2210 | use-sensible-editor |
2211 | test-suite-update-for-patch-2.6 |
2212 | check_series_is_no_dir |
2213 | +======= |
2214 | +fix-manpage-generation |
2215 | +arch_all |
2216 | +debianize |
2217 | +fail_on_missing |
2218 | +return2 |
2219 | +mailname |
2220 | +testsuite_cleanups |
2221 | +doc_improvement |
2222 | +makefile_glitche |
2223 | +test_broken_patches |
2224 | +po-fix-msguniq |
2225 | +check_SERIES_exists |
2226 | +patch-wrapper_do_depend_on_proc |
2227 | +override_mail_sender_in_testsuite |
2228 | +mail-signature |
2229 | +no-signature-test |
2230 | +mail-from-locale |
2231 | +create_db_on_snapshot |
2232 | +unset_posix_strict_conformance_variables |
2233 | +shell-subcommand |
2234 | +check_series_is_no_dir |
2235 | +>>>>>>> MERGE-SOURCE |
2236 | |
2237 | === modified file 'debian/patches/test_broken_patches' |
2238 | --- debian/patches/test_broken_patches 2009-12-11 15:00:38 +0000 |
2239 | +++ debian/patches/test_broken_patches 2010-02-12 23:40:30 +0000 |
2240 | @@ -1,3 +1,4 @@ |
2241 | +<<<<<<< TREE |
2242 | --- |
2243 | test/file-not-found.test | 30 ++++++++++++++++++++++++++++++ |
2244 | 1 file changed, 30 insertions(+) |
2245 | @@ -37,3 +38,56 @@ |
2246 | + |
2247 | +$ cd .. |
2248 | +$ rm -rf d |
2249 | +======= |
2250 | +--- |
2251 | + test/file-not-found.test | 42 ++++++++++++++++++++++++++++++++++++++++++ |
2252 | + 1 file changed, 42 insertions(+) |
2253 | + |
2254 | +Index: b/test/file-not-found.test |
2255 | +=================================================================== |
2256 | +--- /dev/null |
2257 | ++++ b/test/file-not-found.test |
2258 | +@@ -0,0 +1,42 @@ |
2259 | ++# Try to push a patch touching a file which does not exist in this tree |
2260 | ++ |
2261 | ++$ rm -rf d |
2262 | ++$ mkdir -p d/patches |
2263 | ++$ cd d |
2264 | ++ |
2265 | ++$ mkdir subdir |
2266 | ++$ echo foo > subdir/file.txt |
2267 | ++$ echo bar > subdir/other.txt |
2268 | ++$ diff -u subdir/file.txt subdir/other.txt > patches/patch |
2269 | ++# simulate --no-timestamp |
2270 | ++$ sed 's|subdir/file.txt.*|subdir/file.txt|' patches/patch > patches/patch2 |
2271 | ++$ sed 's|subdir/other.txt.*|subdir/other.txt|' patches/patch2 > patches/patch |
2272 | ++$ rm subdir/other.txt patches/patch2 |
2273 | ++$ echo patch > patches/series |
2274 | ++ |
2275 | ++$ quilt push |
2276 | ++> Applying patch patches/patch |
2277 | ++> can't find file to patch at input line 3 |
2278 | ++> Perhaps you used the wrong -p or --strip option? |
2279 | ++> The text leading up to this was: |
2280 | ++> -------------------------- |
2281 | ++> |--- subdir/file.txt |
2282 | ++> |+++ subdir/other.txt |
2283 | ++> -------------------------- |
2284 | ++> No file to patch. Skipping patch. |
2285 | ++> 1 out of 1 hunk ignored |
2286 | ++> Patch patches/patch does not apply (enforce with -f) |
2287 | ++ |
2288 | ++$ quilt push -qf |
2289 | ++> Applying patch patches/patch |
2290 | ++> The text leading up to this was: |
2291 | ++> -------------------------- |
2292 | ++> |--- subdir/file.txt |
2293 | ++> |+++ subdir/other.txt |
2294 | ++> -------------------------- |
2295 | ++> No file to patch. Skipping patch. |
2296 | ++> 1 out of 1 hunk ignored |
2297 | ++> Patch patches/patch appears to be empty; applied |
2298 | ++ |
2299 | ++$ cd .. |
2300 | ++$ rm -rf d |
2301 | +>>>>>>> MERGE-SOURCE |
2302 | |
2303 | === modified file 'debian/patchsys-quilt.mk' |
2304 | --- debian/patchsys-quilt.mk 2009-12-11 15:00:38 +0000 |
2305 | +++ debian/patchsys-quilt.mk 2010-02-12 23:40:30 +0000 |
2306 | @@ -1,3 +1,4 @@ |
2307 | +<<<<<<< TREE |
2308 | # -*- mode: makefile; coding: utf-8 -*- |
2309 | # Copyright © 2003 Martin Quinson <martin.quinson@tuxfamily.org> |
2310 | # Description: An advanced patch system based on the quilt facilities. |
2311 | @@ -123,3 +124,129 @@ |
2312 | rm -f debian/stamp-patch* |
2313 | |
2314 | endif |
2315 | +======= |
2316 | +# -*- mode: makefile; coding: utf-8 -*- |
2317 | +# Copyright © 2003 Martin Quinson <martin.quinson@tuxfamily.org> |
2318 | +# Description: An advanced patch system based on the quilt facilities. |
2319 | +# please refere to the documentation of the quilt package for more information. |
2320 | +# |
2321 | +# Used variables for configuration: |
2322 | +# |
2323 | + |
2324 | +# |
2325 | +# This program is free software; you can redistribute it and/or |
2326 | +# modify it under the terms of the GNU General Public License as |
2327 | +# published by the Free Software Foundation; either version 2, or (at |
2328 | +# your option) any later version. |
2329 | +# |
2330 | +# This program is distributed in the hope that it will be useful, but |
2331 | +# WITHOUT ANY WARRANTY; without even the implied warranty of |
2332 | +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
2333 | +# General Public License for more details. |
2334 | +# |
2335 | +# You should have received a copy of the GNU General Public License |
2336 | +# along with this program; if not, write to the Free Software |
2337 | +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA |
2338 | +# 02111-1307 USA. |
2339 | + |
2340 | +ifndef _cdbs_bootstrap |
2341 | +_cdbs_scripts_path ?= /usr/lib/cdbs |
2342 | +_cdbs_rules_path ?= /usr/share/cdbs/1/rules |
2343 | +_cdbs_class_path ?= /usr/share/cdbs/1/class |
2344 | +endif |
2345 | + |
2346 | +ifndef _cdbs_rules_patchsys_quilt |
2347 | +_cdbs_rules_patchsys_quilt := 1 |
2348 | + |
2349 | +ifdef _cdbs_rules_patchsys |
2350 | +$(error cannot load two patch systems at the same time) |
2351 | +endif |
2352 | + |
2353 | +include $(_cdbs_rules_path)/buildcore.mk$(_cdbs_makefile_suffix) |
2354 | + |
2355 | +DEB_SRCDIR ?= . |
2356 | +_cdbs_patch_system_apply_rule := apply-patches |
2357 | +_cdbs_patch_system_unapply_rule := reverse-patches |
2358 | + |
2359 | +# standard targets, as recommended by Debian policy 3.8.0 |
2360 | +.PHONY: patch unpatch |
2361 | +patch: apply-patches |
2362 | +unpatch: reverse-patches |
2363 | + |
2364 | +# DEB_PATCHDIRS: directory containing your source file for patches. |
2365 | +# |
2366 | +# You might find it convenient to add the snippet below to your |
2367 | +# $HOME/.quiltrc so that you can use quilt without having to reset |
2368 | +# QUILT_PATCHES when you switch from one project to the other: |
2369 | +# for where in ./ ../ ../../ ../../../ ../../../../ ../../../../../; do |
2370 | +# if [ -e ${where}debian/rules -a -d ${where}debian/patches ]; then |
2371 | +# export QUILT_PATCHES=debian/patches |
2372 | +# fi |
2373 | +# done |
2374 | +DEB_PATCHDIRS = $(CURDIR)/debian/patches |
2375 | + |
2376 | +# DEB_QUILT_TOPDIR: directory where patches will be applied |
2377 | +# Use it only to override back to "." when CDBS sets DEB_SRCDIR |
2378 | +# and you don't want the quilt patching to happen in a subdirectory |
2379 | +DEB_QUILT_TOPDIR ?= $(DEB_SRCDIR) |
2380 | + |
2381 | +# Internal variables, do not change it unless you know what you're doing |
2382 | +DEB_QUILT_CMD = cd $(DEB_QUILT_TOPDIR) && QUILT_PATCHES=$(DEB_PATCHDIRS) quilt --quiltrc /dev/null |
2383 | + |
2384 | +# Declare Build-Dep of packages using this file onto quilt |
2385 | +CDBS_BUILD_DEPENDS := $(CDBS_BUILD_DEPENDS), quilt |
2386 | + |
2387 | +# Build-Dep on patchutils to check for fool souls patching config.* files |
2388 | +# This is a Bad Thing since cdbs updates those files automatically. |
2389 | +# (code stolen from cdbs itself, in dpatch.mk) |
2390 | + |
2391 | +CDBS_BUILD_DEPENDS := $(CDBS_BUILD_DEPENDS), patchutils (>= 0.2.25) |
2392 | + |
2393 | +# target reverse-config, which we use, don't exist in old cdbs |
2394 | +CDBS_BUILD_DEPENDS := $(CDBS_BUILD_DEPENDS), cdbs (>= 0.4.27) |
2395 | + |
2396 | +evil_patches_that_do_nasty_things := $(shell \ |
2397 | +if lsdiff=`which lsdiff` ; then \ |
2398 | + patchlist=`$(DEB_QUILT_CMD) series \ |
2399 | + | sed 's|^|$(DEB_PATCHDIRS)/|' \ |
2400 | + | tr "\n" " "`; \ |
2401 | + if [ "x$$patchlist" != x ] ; then \ |
2402 | + $$lsdiff -H $$patchlist \ |
2403 | + | egrep "/config\.(guess|sub|rpath)$$" | tr "\n" " " ; \ |
2404 | + fi;\ |
2405 | +fi) |
2406 | +ifneq (, $(evil_patches_that_do_nasty_things)) |
2407 | +$(warning WARNING: The following patches are modifying auto-updated files. This can result in serious trouble: $(evil_patches_that_do_nasty_things)) |
2408 | +endif |
2409 | + |
2410 | + |
2411 | +post-patches:: apply-patches |
2412 | + |
2413 | +clean:: reverse-patches |
2414 | + |
2415 | +# The patch subsystem |
2416 | +apply-patches: pre-build debian/stamp-patched |
2417 | +debian/stamp-patched: |
2418 | +# reverse-config must be first |
2419 | + $(MAKE) -f debian/rules reverse-config |
2420 | + |
2421 | +# quilt exits with 2 as return when there was nothing to do. |
2422 | +# That's not an error here (but it's usefull to break loops in crude scripts) |
2423 | + $(DEB_QUILT_CMD) push -a || test $$? = 2 |
2424 | + touch debian/stamp-patched |
2425 | + |
2426 | + $(MAKE) -f debian/rules update-config |
2427 | +# update-config must be last |
2428 | + |
2429 | +reverse-patches: |
2430 | +# reverse-config must be first |
2431 | + $(MAKE) -f debian/rules reverse-config |
2432 | + |
2433 | + if [ -d "$(DEB_QUILT_TOPDIR)" ]; then \ |
2434 | + $(DEB_QUILT_CMD) pop -a -R || test $$? = 2 ; \ |
2435 | + fi |
2436 | + rm -rf $(DEB_QUILT_TOPDIR)/.pc |
2437 | + rm -f debian/stamp-patch* |
2438 | + |
2439 | +endif |
2440 | +>>>>>>> MERGE-SOURCE |
2441 | |
2442 | === modified file 'debian/rules' |
2443 | --- debian/rules 2009-10-29 17:56:18 +0000 |
2444 | +++ debian/rules 2010-02-12 23:40:30 +0000 |
2445 | @@ -1,49 +1,155 @@ |
2446 | -#!/usr/bin/make -f |
2447 | -# -*- mode: makefile; coding: utf-8 -*- |
2448 | - |
2449 | -# $Id: rules,v 1.15 2005/01/06 19:32:53 mquinson Exp $ |
2450 | - |
2451 | -# Import Common Debian Build System (CDBS). |
2452 | -include /usr/share/cdbs/1/rules/debhelper.mk |
2453 | -include /usr/share/cdbs/1/class/autotools.mk |
2454 | - |
2455 | -# Here is a badly nammed changelog file |
2456 | -DEB_INSTALL_CHANGELOGS_ALL = quilt.changes |
2457 | - |
2458 | -# installing under debian/tmp... |
2459 | -DEB_MAKE_ENVVARS := BUILD_ROOT=$(CURDIR)/debian/tmp LC_ALL=C |
2460 | -DEB_MAKE_CHECK_TARGET = check |
2461 | - |
2462 | -# ... and moving it to the right dir using dh_install |
2463 | -DEB_DH_INSTALL_SOURCEDIR := debian/tmp |
2464 | - |
2465 | -# also specify the full path to sendmail, as requested by policy |
2466 | -DEB_CONFIGURE_EXTRA_FLAGS := --with-sendmail=/usr/sbin/sendmail |
2467 | - |
2468 | -# distribute a text version of the doc |
2469 | -common-build-indep:: |
2470 | - mkdir doc/tmp || true |
2471 | - cd doc/tmp; LC_ALL=C hevea ../main.tex ; LC_ALL=C hevea ../main.tex; LC_ALL=C hevea ../main.tex |
2472 | - perl -pe 'if (/\\sh{.*}/) {s:\\sh{(.*)}:<I>$$1</I>:}' \ |
2473 | - < doc/tmp/main.html > doc/quilt.html |
2474 | - LC_ALL=C perl -e '$$/ = undef; $$f=<>; $$f =~ s|<A[^>]*?HREF="[^"]*#[^"]*">(.*?)</A>|$$1|msg; print $$f;' < doc/tmp/main.html > doc/tmp/tmp.html |
2475 | - LC_ALL=C lynx doc/tmp/tmp.html -dump > doc/quilt.txt |
2476 | - pod2man -c Debhelper debian/dh_quilt_patch debian/dh_quilt_patch.1 |
2477 | - pod2man -c Debhelper debian/dh_quilt_unpatch debian/dh_quilt_unpatch.1 |
2478 | - |
2479 | -clean:: |
2480 | - rm -rf doc/quilt.txt doc/quilt.html doc/tmp test/.pc test/d |
2481 | - rm -f compat/awk compat/sendmail |
2482 | - rm -f debian/dh_quilt_patch.1 debian/dh_quilt_unpatch.1 |
2483 | - |
2484 | -# Don't even try to build the package when /proc is not mounted since the |
2485 | -# checks will fail after a long while. Closes: #380598 |
2486 | -ifeq (,$(findstring nocheck,$(DEB_BUILD_OPTIONS))) |
2487 | -pre-build:: |
2488 | - @if ! [ -d /proc/1 ]; then \ |
2489 | - echo "quilt needs a mounted /proc to correctly build";\ |
2490 | - echo "If you really want to build without /proc, add nocheck to the DEB_BUILD_OPTIONS"; \ |
2491 | - exit 1; \ |
2492 | - fi |
2493 | -endif |
2494 | - |
2495 | +<<<<<<< TREE |
2496 | +#!/usr/bin/make -f |
2497 | +# -*- mode: makefile; coding: utf-8 -*- |
2498 | + |
2499 | +# $Id: rules,v 1.15 2005/01/06 19:32:53 mquinson Exp $ |
2500 | + |
2501 | +# Import Common Debian Build System (CDBS). |
2502 | +include /usr/share/cdbs/1/rules/debhelper.mk |
2503 | +include /usr/share/cdbs/1/class/autotools.mk |
2504 | + |
2505 | +# Here is a badly nammed changelog file |
2506 | +DEB_INSTALL_CHANGELOGS_ALL = quilt.changes |
2507 | + |
2508 | +# installing under debian/tmp... |
2509 | +DEB_MAKE_ENVVARS := BUILD_ROOT=$(CURDIR)/debian/tmp LC_ALL=C |
2510 | +DEB_MAKE_CHECK_TARGET = check |
2511 | + |
2512 | +# ... and moving it to the right dir using dh_install |
2513 | +DEB_DH_INSTALL_SOURCEDIR := debian/tmp |
2514 | + |
2515 | +# also specify the full path to sendmail, as requested by policy |
2516 | +DEB_CONFIGURE_EXTRA_FLAGS := --with-sendmail=/usr/sbin/sendmail |
2517 | + |
2518 | +# distribute a text version of the doc |
2519 | +common-build-indep:: |
2520 | + mkdir doc/tmp || true |
2521 | + cd doc/tmp; LC_ALL=C hevea ../main.tex ; LC_ALL=C hevea ../main.tex; LC_ALL=C hevea ../main.tex |
2522 | + perl -pe 'if (/\\sh{.*}/) {s:\\sh{(.*)}:<I>$$1</I>:}' \ |
2523 | + < doc/tmp/main.html > doc/quilt.html |
2524 | + LC_ALL=C perl -e '$$/ = undef; $$f=<>; $$f =~ s|<A[^>]*?HREF="[^"]*#[^"]*">(.*?)</A>|$$1|msg; print $$f;' < doc/tmp/main.html > doc/tmp/tmp.html |
2525 | + LC_ALL=C lynx doc/tmp/tmp.html -dump > doc/quilt.txt |
2526 | + pod2man -c Debhelper debian/dh_quilt_patch debian/dh_quilt_patch.1 |
2527 | + pod2man -c Debhelper debian/dh_quilt_unpatch debian/dh_quilt_unpatch.1 |
2528 | + |
2529 | +clean:: |
2530 | + rm -rf doc/quilt.txt doc/quilt.html doc/tmp test/.pc test/d |
2531 | + rm -f compat/awk compat/sendmail |
2532 | + rm -f debian/dh_quilt_patch.1 debian/dh_quilt_unpatch.1 |
2533 | + |
2534 | +# Don't even try to build the package when /proc is not mounted since the |
2535 | +# checks will fail after a long while. Closes: #380598 |
2536 | +ifeq (,$(findstring nocheck,$(DEB_BUILD_OPTIONS))) |
2537 | +pre-build:: |
2538 | + @if ! [ -d /proc/1 ]; then \ |
2539 | + echo "quilt needs a mounted /proc to correctly build";\ |
2540 | + echo "If you really want to build without /proc, add nocheck to the DEB_BUILD_OPTIONS"; \ |
2541 | + exit 1; \ |
2542 | + fi |
2543 | +endif |
2544 | + |
2545 | +======= |
2546 | +#!/usr/bin/make -f |
2547 | +# -*- mode: makefile; coding: utf-8 -*- |
2548 | + |
2549 | +# $Id: rules,v 1.15 2005/01/06 19:32:53 mquinson Exp $ |
2550 | + |
2551 | +# Import Common Debian Build System (CDBS). |
2552 | +include /usr/share/cdbs/1/rules/debhelper.mk |
2553 | +include /usr/share/cdbs/1/class/autotools.mk |
2554 | + |
2555 | +# Here is a badly nammed changelog file |
2556 | +DEB_INSTALL_CHANGELOGS_ALL = quilt.changes |
2557 | + |
2558 | +# installing under debian/tmp... |
2559 | +DEB_MAKE_ENVVARS := BUILD_ROOT=$(CURDIR)/debian/tmp LC_ALL=C |
2560 | +DEB_MAKE_CHECK_TARGET = check |
2561 | + |
2562 | +# ... and moving it to the right dir using dh_install |
2563 | +DEB_DH_INSTALL_SOURCEDIR := debian/tmp |
2564 | + |
2565 | +# also specify the full path to sendmail, as requested by policy |
2566 | +DEB_CONFIGURE_EXTRA_FLAGS := --with-sendmail=/usr/sbin/sendmail |
2567 | + |
2568 | +# distribute a text version of the doc |
2569 | +common-build-indep:: |
2570 | + mkdir doc/tmp || true |
2571 | + cd doc/tmp; LC_ALL=C hevea ../main.tex ; LC_ALL=C hevea ../main.tex; LC_ALL=C hevea ../main.tex |
2572 | + perl -pe 'if (/\\sh{.*}/) {s:\\sh{(.*)}:<I>$$1</I>:}' \ |
2573 | + < doc/tmp/main.html > doc/quilt.html |
2574 | + LC_ALL=C perl -e '$$/ = undef; $$f=<>; $$f =~ s|<A[^>]*?HREF="[^"]*#[^"]*">(.*?)</A>|$$1|msg; print $$f;' < doc/tmp/main.html > doc/tmp/tmp.html |
2575 | + LC_ALL=C lynx doc/tmp/tmp.html -dump > doc/quilt.txt |
2576 | + pod2man -c Debhelper debian/dh_quilt_patch debian/dh_quilt_patch.1 |
2577 | + pod2man -c Debhelper debian/dh_quilt_unpatch debian/dh_quilt_unpatch.1 |
2578 | + |
2579 | +clean:: |
2580 | + rm -rf doc/quilt.txt doc/quilt.html doc/tmp test/.pc test/d |
2581 | + rm -f compat/awk compat/sendmail |
2582 | + rm -f debian/dh_quilt_patch.1 debian/dh_quilt_unpatch.1 |
2583 | + |
2584 | +# Don't even try to build the package when /proc is not mounted since the |
2585 | +# checks will fail after a long while. Closes: #380598 |
2586 | +ifeq (,$(findstring nocheck,$(DEB_BUILD_OPTIONS))) |
2587 | +pre-build:: |
2588 | + @if ! [ -d /proc/1 ]; then \ |
2589 | + echo "quilt needs a mounted /proc to correctly build";\ |
2590 | + echo "If you really want to build without /proc, add nocheck to the DEB_BUILD_OPTIONS"; \ |
2591 | + exit 1; \ |
2592 | + fi |
2593 | +endif |
2594 | + |
2595 | +### |
2596 | +### Auto-patching stuff. |
2597 | +### |
2598 | +### Some extra love is needed to use ourselves without builddepending on us. |
2599 | + |
2600 | +post-patches:: apply-patches |
2601 | +clean:: reverse-patches |
2602 | + |
2603 | +# standard targets as recommended by Debian Policy 3.8.0 |
2604 | +.PHONY: patch unpatch |
2605 | +patch: apply-patches |
2606 | +unpatch: reverse-patches |
2607 | + |
2608 | +#_cdbs_patch_system_apply_rule := apply-patches |
2609 | +#_cdbs_patch_system_unapply_rule := reverse-patches |
2610 | + |
2611 | +QUILTBIN=/usr/bin/quilt |
2612 | +QUILTOPT=--quiltrc debian/quiltrc.build |
2613 | + |
2614 | +apply-patches: pre-build debian/stamp-patched |
2615 | +debian/stamp-patched: |
2616 | + if [ -e $(QUILTBIN) ] ; then \ |
2617 | + $(QUILTBIN) $(QUILTOPT) push -a || test $$? = 2; \ |
2618 | + else \ |
2619 | + echo "WARNING: quilt not installed. DO NOT MODIFY THE PACKAGE WITHOUT INSTALLING QUILT.";\ |
2620 | + echo "building quilt without quilt is good for autobuilders only, not for humans.";\ |
2621 | + list=`cat debian/patches/series|sed 's/#.*$$//'|grep -v '^$$'`; \ |
2622 | + if [ -n "$$list" ] ; then \ |
2623 | + for patch in `echo $$list` ; do \ |
2624 | + if [ ! -e debian/patches/.dpkg-source-applied ] || \ |
2625 | + ! grep -q "^$$patch$$" debian/patches/.dpkg-source-applied; then \ |
2626 | + patch -p1 < debian/patches/$$patch ; \ |
2627 | + fi ; \ |
2628 | + done ; \ |
2629 | + fi ; \ |
2630 | + fi |
2631 | + touch debian/stamp-patched |
2632 | + |
2633 | +reverse-patches: |
2634 | + if [ -e $(QUILTBIN) ] ; then \ |
2635 | + $(QUILTBIN) $(QUILTOPT) pop -a || test $$? = 2; \ |
2636 | + else if [ -e debian/stamp-patched ] ; then \ |
2637 | + echo "WARNING: quilt not installed. DO NOT MODIFY THE PACKAGE WITHOUT INSTALLING QUILT.";\ |
2638 | + echo "building quilt without quilt is good for autobuilders only, not for humans.";\ |
2639 | + list=`cat debian/patches/series|sed 's/#.*$$//'|grep -v '^$$'|tac`; \ |
2640 | + if [ -n "$$list" ] ; then \ |
2641 | + for patch in `echo $$list` ; do \ |
2642 | + patch -p1 -R < debian/patches/$$patch ; \ |
2643 | + done; \ |
2644 | + fi;fi; \ |
2645 | + fi |
2646 | + rm -rf .pc |
2647 | + rm -f debian/stamp-patch* |
2648 | + |
2649 | +>>>>>>> MERGE-SOURCE |
2650 | |
2651 | === modified file 'doc/main.tex' |
2652 | === modified file 'doc/quilt.1.in' |
2653 | === added file 'lib/backup-files.c.OTHER' |
2654 | --- lib/backup-files.c.OTHER 1970-01-01 00:00:00 +0000 |
2655 | +++ lib/backup-files.c.OTHER 2010-02-12 23:40:30 +0000 |
2656 | @@ -0,0 +1,601 @@ |
2657 | +/* |
2658 | + File: backup-files.c |
2659 | + |
2660 | + Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008 |
2661 | + Andreas Gruenbacher <agruen@suse.de>, SuSE Labs |
2662 | + |
2663 | + This program is free software; you can redistribute it and/or |
2664 | + modify it under the terms of the GNU Library General Public |
2665 | + License as published by the Free Software Foundation; either |
2666 | + version 2 of the License, or (at your option) any later version. |
2667 | + |
2668 | + This program is distributed in the hope that it will be useful, |
2669 | + but WITHOUT ANY WARRANTY; without even the implied warranty of |
2670 | + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
2671 | + Library General Public License for more details. |
2672 | + |
2673 | + You should have received a copy of the GNU Library General Public |
2674 | + License along with this library; if not, write to the Free Software |
2675 | + Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. |
2676 | +*/ |
2677 | + |
2678 | +/* |
2679 | + * Create backup files of a list of files similar to GNU patch. A path |
2680 | + * name prefix and suffix for the backup file can be specified with the |
2681 | + * -B and -z options. |
2682 | + */ |
2683 | + |
2684 | +#define _GNU_SOURCE 1 |
2685 | + |
2686 | +#ifdef HAVE_CONFIG_H |
2687 | +# include "config.h" |
2688 | +#endif |
2689 | + |
2690 | +#include <sys/types.h> |
2691 | +#include <sys/stat.h> |
2692 | +#include <utime.h> |
2693 | +#include <fcntl.h> |
2694 | +#include <unistd.h> |
2695 | +#include <stdio.h> |
2696 | +#include <stdlib.h> |
2697 | +#include <errno.h> |
2698 | +#include <string.h> |
2699 | +#include <dirent.h> |
2700 | + |
2701 | +#if !defined(HAVE_MKSTEMP) && defined(HAVE_MKTEMP) |
2702 | +# define mkstemp(x) creat(mktemp(x), 0600) |
2703 | +#endif |
2704 | + |
2705 | +#ifndef PATH_MAX |
2706 | +# define PATH_MAX 4096 |
2707 | +#endif |
2708 | + |
2709 | +#ifdef __MINGW32__ |
2710 | +#define mkdir(x,y) mkdir(x) |
2711 | +/* Symlinks are not supported */ |
2712 | +#define lstat stat |
2713 | +static int link(const char *oldpath, const char *newpath) |
2714 | +{ |
2715 | + errno = ENOSYS; |
2716 | + return -1; |
2717 | +} |
2718 | +#endif |
2719 | + |
2720 | +const char *progname; |
2721 | + |
2722 | +enum { what_noop, what_backup, what_restore, what_remove }; |
2723 | + |
2724 | +const char *opt_prefix="", *opt_suffix="", *opt_file; |
2725 | +int opt_silent, opt_what=what_noop; |
2726 | +int opt_nolinks, opt_touch; |
2727 | +int opt_keep_backup; |
2728 | + |
2729 | +#define LINE_LENGTH 1024 |
2730 | + |
2731 | + |
2732 | +static void |
2733 | +usage(void) |
2734 | +{ |
2735 | + printf("Usage: %s [-B prefix] [-z suffix] [-f {file|-}] [-sktL] [-b|-r|-x] {file|-} ...\n" |
2736 | + "\n" |
2737 | + "\tCreate hard linked backup copies of a list of files\n" |
2738 | + "\tread from standard input.\n" |
2739 | + "\n" |
2740 | + "\t-b\tCreate backup\n" |
2741 | + "\t-r\tRestore the backup\n" |
2742 | + "\t-x\tRemove backup files and empty parent directories\n" |
2743 | + "\t-k\tWhen doing a restore, keep the backup files\n" |
2744 | + "\t-B\tPath name prefix for backup files\n" |
2745 | + "\t-z\tPath name suffix for backup files\n" |
2746 | + "\t-s\tSilent operation; only print error messages\n" |
2747 | + "\t-f\tRead the filenames to process from file (- = standard input)\n" |
2748 | + "\t-t\tTouch original files after restore (update their mtimes)\n\n" |
2749 | + "\t-L\tEnsure that when finished, the source file has a link count of 1\n\n", |
2750 | + progname); |
2751 | +} |
2752 | + |
2753 | +static void * |
2754 | +malloc_nofail(size_t size) |
2755 | +{ |
2756 | + void *p = malloc(size); |
2757 | + if (!p) { |
2758 | + perror(progname); |
2759 | + exit(1); |
2760 | + } |
2761 | + return p; |
2762 | +} |
2763 | + |
2764 | +static void |
2765 | +create_parents(const char *filename) |
2766 | +{ |
2767 | + struct stat st; |
2768 | + int rv = -1; |
2769 | + char *fn = malloc_nofail(strlen(filename) + 1), *f; |
2770 | + |
2771 | + strcpy(fn, filename); |
2772 | + |
2773 | + f = strrchr(fn, '/'); |
2774 | + if (f == NULL) |
2775 | + goto out; |
2776 | + *f = '\0'; |
2777 | + if (stat(fn, &st) == 0) |
2778 | + goto out; |
2779 | + *f = '/'; |
2780 | + |
2781 | + f = strchr(fn, '/'); |
2782 | + while (f != NULL) { |
2783 | + *f = '\0'; |
2784 | + if (!rv || (rv = stat(fn, &st)) != 0) { |
2785 | + mkdir(fn, 0777); |
2786 | + } |
2787 | + *f = '/'; |
2788 | + f = strchr(f+1, '/'); |
2789 | + } |
2790 | +out: |
2791 | + free(fn); |
2792 | +} |
2793 | + |
2794 | +static void |
2795 | +remove_parents(const char *filename) |
2796 | +{ |
2797 | + char *fn = malloc_nofail(strlen(filename) + 1), *f; |
2798 | + |
2799 | + strcpy(fn, filename); |
2800 | + |
2801 | + f = strrchr(fn, '/'); |
2802 | + if (f == NULL) |
2803 | + goto out; |
2804 | + do { |
2805 | + *f = '\0'; |
2806 | + if (rmdir(fn) == -1) |
2807 | + goto out; |
2808 | + } while ((f = strrchr(fn, '/')) != NULL); |
2809 | + rmdir(fn); |
2810 | +out: |
2811 | + free(fn); |
2812 | +} |
2813 | + |
2814 | +static int |
2815 | +copy_fd(int from_fd, int to_fd) |
2816 | +{ |
2817 | + char buffer[16384]; |
2818 | + char *wbuf; |
2819 | + ssize_t len, l; |
2820 | + |
2821 | + for ( ;; ) { |
2822 | + len = read(from_fd, buffer, sizeof(buffer)); |
2823 | + if (len == 0) |
2824 | + return 0; |
2825 | + if (len < 0) { |
2826 | + if (errno == EINTR || errno == EAGAIN) |
2827 | + continue; |
2828 | + return 1; |
2829 | + } |
2830 | + for (wbuf = buffer; len != 0; ) { |
2831 | + l = write(to_fd, wbuf, len); |
2832 | + if (l < 0) { |
2833 | + if (errno == EINTR || errno == EAGAIN) |
2834 | + continue; |
2835 | + return 1; |
2836 | + } |
2837 | + wbuf += l; |
2838 | + len -= l; |
2839 | + } |
2840 | + } |
2841 | +} |
2842 | + |
2843 | +static int |
2844 | +copy_file(const char *from, const struct stat *st, const char *to) |
2845 | +{ |
2846 | + int from_fd, to_fd, error = 1; |
2847 | + |
2848 | + if ((from_fd = open(from, O_RDONLY)) == -1) { |
2849 | + perror(from); |
2850 | + return 1; |
2851 | + } |
2852 | + unlink(to); /* make sure we don't inherit this file's mode. */ |
2853 | + if ((to_fd = creat(to, st->st_mode)) < 0) { |
2854 | + perror(to); |
2855 | + close(from_fd); |
2856 | + return 1; |
2857 | + } |
2858 | +#if defined(HAVE_FCHMOD) |
2859 | + (void) fchmod(to_fd, st->st_mode); |
2860 | +#elif defined(HAVE_CHMOD) |
2861 | + (void) chmod(to, st->st_mode); |
2862 | +#endif |
2863 | + if (copy_fd(from_fd, to_fd)) { |
2864 | + fprintf(stderr, "%s -> %s: %s\n", from, to, strerror(errno)); |
2865 | + unlink(to); |
2866 | + goto out; |
2867 | + } |
2868 | + |
2869 | + error = 0; |
2870 | +out: |
2871 | + close(from_fd); |
2872 | + close(to_fd); |
2873 | + |
2874 | + return error; |
2875 | +} |
2876 | + |
2877 | +static int |
2878 | +link_or_copy_file(const char *from, const struct stat *st, const char *to) |
2879 | +{ |
2880 | + if (link(from, to) == 0) |
2881 | + return 0; |
2882 | + if (errno != EXDEV && errno != EPERM && |
2883 | + errno != EMLINK && errno != ENOSYS) { |
2884 | + fprintf(stderr, "Could not link file `%s' to `%s': %s\n", |
2885 | + from, to, strerror(errno)); |
2886 | + return 1; |
2887 | + } |
2888 | + return copy_file(from, st, to); |
2889 | +} |
2890 | + |
2891 | +static int |
2892 | +ensure_nolinks(const char *filename) |
2893 | +{ |
2894 | + struct stat st; |
2895 | + |
2896 | + if (stat(filename, &st) != 0) { |
2897 | + perror(filename); |
2898 | + return 1; |
2899 | + } |
2900 | + if (st.st_nlink > 1) { |
2901 | + char *tmpname = malloc(1 + strlen(filename) + 7 + 1), *c; |
2902 | + int from_fd = -1, to_fd = -1; |
2903 | + int error = 1; |
2904 | + |
2905 | + if (!tmpname) |
2906 | + goto fail; |
2907 | + from_fd = open(filename, O_RDONLY); |
2908 | + if (from_fd == -1) |
2909 | + goto fail; |
2910 | + |
2911 | + /* Temp file name is "path/to/.file.XXXXXX" */ |
2912 | + strcpy(tmpname, filename); |
2913 | + strcat(tmpname, ".XXXXXX"); |
2914 | + c = strrchr(tmpname, '/'); |
2915 | + if (c == NULL) |
2916 | + c = tmpname; |
2917 | + else |
2918 | + c++; |
2919 | + memmove(c + 1, c, strlen(c) + 1); |
2920 | + *c = '.'; |
2921 | + |
2922 | + to_fd = mkstemp(tmpname); |
2923 | + if (to_fd == -1) |
2924 | + goto fail; |
2925 | + if (copy_fd(from_fd, to_fd)) |
2926 | + goto fail; |
2927 | +#if defined(HAVE_FCHMOD) |
2928 | + (void) fchmod(to_fd, st.st_mode); |
2929 | +#elif defined(HAVE_CHMOD) |
2930 | + (void) chmod(tmpname, st.st_mode); |
2931 | +#endif |
2932 | + close(from_fd); |
2933 | + from_fd = -1; |
2934 | + close(to_fd); |
2935 | + to_fd = -1; |
2936 | + if (rename(tmpname, filename)) |
2937 | + goto fail; |
2938 | + |
2939 | + error = 0; |
2940 | + fail: |
2941 | + if (error) |
2942 | + perror(filename); |
2943 | + if (from_fd != -1) |
2944 | + close(from_fd); |
2945 | + if (to_fd != -1) |
2946 | + close(to_fd); |
2947 | + free(tmpname); |
2948 | + return error; |
2949 | + } else |
2950 | + return 0; |
2951 | +} |
2952 | + |
2953 | +static int |
2954 | +process_file(const char *file) |
2955 | +{ |
2956 | + char *backup = malloc_nofail( |
2957 | + strlen(opt_prefix) + strlen(file) + strlen(opt_suffix) + 1); |
2958 | + |
2959 | + sprintf(backup, "%s%s%s", opt_prefix, file, opt_suffix); |
2960 | + |
2961 | + if (opt_what == what_backup) { |
2962 | + struct stat st; |
2963 | + int missing_file = (stat(file, &st) == -1 && errno == ENOENT); |
2964 | + |
2965 | + unlink(backup); |
2966 | + create_parents(backup); |
2967 | + if (missing_file) { |
2968 | + int fd; |
2969 | + |
2970 | + if (!opt_silent) |
2971 | + printf("New file %s\n", file); |
2972 | + /* GNU patch creates new files with mode==0. */ |
2973 | + if ((fd = creat(backup, 0)) == -1) { |
2974 | + perror(backup); |
2975 | + goto fail; |
2976 | + } |
2977 | + close(fd); |
2978 | + } else { |
2979 | + if (!opt_silent) |
2980 | + printf("Copying %s\n", file); |
2981 | + if (opt_nolinks && st.st_nlink == 1) { |
2982 | + if (copy_file(file, &st, backup)) |
2983 | + goto fail; |
2984 | + } else { |
2985 | + if (link_or_copy_file(file, &st, backup)) |
2986 | + goto fail; |
2987 | + if (opt_nolinks && ensure_nolinks(file)) |
2988 | + goto fail; |
2989 | + } |
2990 | + if (opt_touch) |
2991 | + (void) utime(backup, NULL); |
2992 | + else { |
2993 | + struct utimbuf ut; |
2994 | + ut.actime = ut.modtime = st.st_mtime; |
2995 | + (void) utime(backup, &ut); |
2996 | + } |
2997 | + } |
2998 | + } else if (opt_what == what_restore) { |
2999 | + struct stat st; |
3000 | + |
3001 | + create_parents(file); |
3002 | + if (stat(backup, &st) != 0) { |
3003 | + perror(backup); |
3004 | + goto fail; |
3005 | + } |
3006 | + if (st.st_size == 0) { |
3007 | + if (unlink(file) == 0 || errno == ENOENT) { |
3008 | + if (!opt_silent) |
3009 | + printf("Removing %s\n", file); |
3010 | + } else { |
3011 | + perror(file); |
3012 | + goto fail; |
3013 | + } |
3014 | + if (!opt_keep_backup) { |
3015 | + unlink(backup); |
3016 | + remove_parents(backup); |
3017 | + } |
3018 | + } else { |
3019 | + if (!opt_silent) |
3020 | + printf("Restoring %s\n", file); |
3021 | + unlink(file); |
3022 | + if (opt_nolinks && st.st_nlink != 1) { |
3023 | + if (copy_file(backup, &st, file)) |
3024 | + goto fail; |
3025 | + } else { |
3026 | + if (link_or_copy_file(backup, &st, file)) |
3027 | + goto fail; |
3028 | + if (opt_nolinks && ensure_nolinks(file)) |
3029 | + goto fail; |
3030 | + } |
3031 | + if (!opt_keep_backup) { |
3032 | + unlink(backup); |
3033 | + remove_parents(backup); |
3034 | + } |
3035 | + if (opt_touch) |
3036 | + (void) utime(file, NULL); |
3037 | + else { |
3038 | + struct utimbuf ut; |
3039 | + ut.actime = ut.modtime = st.st_mtime; |
3040 | + (void) utime(file, &ut); |
3041 | + } |
3042 | + } |
3043 | + } else if (opt_what == what_remove) { |
3044 | + unlink(backup); |
3045 | + remove_parents(backup); |
3046 | + } else if (opt_what == what_noop) { |
3047 | + struct stat st; |
3048 | + int missing_file = (stat(file, &st) == -1 && errno == ENOENT); |
3049 | + |
3050 | + if (!missing_file && opt_nolinks) { |
3051 | + if (ensure_nolinks(file)) |
3052 | + goto fail; |
3053 | + } |
3054 | + } else |
3055 | + goto fail; |
3056 | + |
3057 | + free(backup); |
3058 | + return 0; |
3059 | + |
3060 | +fail: |
3061 | + free(backup); |
3062 | + return 1; |
3063 | +} |
3064 | + |
3065 | +static int |
3066 | +foreachdir_rec(const char *path, struct stat *st, |
3067 | + int (*walk)(const char *, const struct stat *)) |
3068 | +{ |
3069 | + DIR *dir; |
3070 | + struct dirent *dp; |
3071 | + int failed = 0; |
3072 | + char *p = malloc_nofail(PATH_MAX); |
3073 | + |
3074 | + if (access(path, R_OK|X_OK) || !(dir = opendir(path))) |
3075 | + return walk(path, NULL); |
3076 | + while ((dp = readdir(dir))) { |
3077 | + if (!strcmp(dp->d_name, ".") || !strcmp(dp->d_name, "..")) |
3078 | + continue; |
3079 | + if (strlen(path) + 1 + strlen(dp->d_name) + 1 > PATH_MAX) { |
3080 | + fprintf(stderr, "%s/%s: name too long\n", path, |
3081 | + dp->d_name); |
3082 | + failed = -1; |
3083 | + goto out; |
3084 | + } |
3085 | + sprintf(p, "%s/%s", path, dp->d_name); |
3086 | + |
3087 | + if (lstat(p, st)) |
3088 | + continue; /* file has disappeared meanwhile */ |
3089 | + if (S_ISDIR(st->st_mode)) { |
3090 | + failed = foreachdir_rec(p, st, walk); |
3091 | + if (failed) |
3092 | + goto out; |
3093 | + } else { |
3094 | + failed = walk(p, st); |
3095 | + if (failed) |
3096 | + goto out; |
3097 | + } |
3098 | + } |
3099 | + if (closedir(dir) != 0) |
3100 | + failed = -1; |
3101 | + |
3102 | +out: |
3103 | + free(p); |
3104 | + return failed; |
3105 | +} |
3106 | + |
3107 | +static int |
3108 | +foreachdir(const char *path, |
3109 | + int (*walk)(const char *, const struct stat *)) |
3110 | +{ |
3111 | + struct stat st; |
3112 | + |
3113 | + if (lstat(path, &st)) |
3114 | + return walk(path, NULL); |
3115 | + return foreachdir_rec(path, &st, walk); |
3116 | +} |
3117 | + |
3118 | +static int |
3119 | +walk(const char *path, const struct stat *st) |
3120 | +{ |
3121 | + size_t prefix_len=strlen(opt_prefix), suffix_len=strlen(opt_suffix); |
3122 | + size_t len = strlen(path); |
3123 | + char *p; |
3124 | + int ret; |
3125 | + |
3126 | + if (!st) { |
3127 | + perror(path); |
3128 | + return 1; |
3129 | + } |
3130 | + if (!S_ISREG(st->st_mode)) |
3131 | + return 0; |
3132 | + if (strncmp(opt_prefix, path, prefix_len)) |
3133 | + return 0; /* prefix does not match */ |
3134 | + if (len < suffix_len || strcmp(opt_suffix, path + len - suffix_len)) |
3135 | + return 0; /* suffix does not match */ |
3136 | + |
3137 | + p = malloc_nofail(len - prefix_len - suffix_len + 1); |
3138 | + memcpy(p, path + prefix_len, len - prefix_len - suffix_len); |
3139 | + p[len - prefix_len - suffix_len] = '\0'; |
3140 | + ret = process_file(p); |
3141 | + free(p); |
3142 | + return ret; |
3143 | +} |
3144 | + |
3145 | +int |
3146 | +main(int argc, char *argv[]) |
3147 | +{ |
3148 | + int opt, status = 0; |
3149 | + |
3150 | + progname = argv[0]; |
3151 | + |
3152 | + while ((opt = getopt(argc, argv, "brkxB:z:f:shLt")) != -1) { |
3153 | + switch(opt) { |
3154 | + case 'b': |
3155 | + opt_what = what_backup; |
3156 | + break; |
3157 | + |
3158 | + case 'r': |
3159 | + opt_what = what_restore; |
3160 | + break; |
3161 | + |
3162 | + case 'k': |
3163 | + opt_keep_backup = 1; |
3164 | + break; |
3165 | + |
3166 | + case 'x': |
3167 | + opt_what = what_remove; |
3168 | + break; |
3169 | + |
3170 | + case 'B': |
3171 | + opt_prefix = optarg; |
3172 | + break; |
3173 | + |
3174 | + case 'f': |
3175 | + opt_file = optarg; |
3176 | + break; |
3177 | + |
3178 | + case 'z': |
3179 | + opt_suffix = optarg; |
3180 | + break; |
3181 | + |
3182 | + case 's': |
3183 | + opt_silent = 1; |
3184 | + break; |
3185 | + |
3186 | + case 'L': |
3187 | + opt_nolinks = 1; |
3188 | + break; |
3189 | + |
3190 | + case 't': |
3191 | + opt_touch = 1; |
3192 | + break; |
3193 | + |
3194 | + case 'h': |
3195 | + default: |
3196 | + usage(); |
3197 | + return 0; |
3198 | + } |
3199 | + } |
3200 | + |
3201 | + if ((*opt_prefix == '\0' && *opt_suffix == '\0') || |
3202 | + (opt_file == NULL && optind == argc)) { |
3203 | + usage(); |
3204 | + return 1; |
3205 | + } |
3206 | + |
3207 | + if (opt_file != NULL) { |
3208 | + FILE *file; |
3209 | + char line[LINE_LENGTH]; |
3210 | + |
3211 | + if (!strcmp(opt_file, "-")) { |
3212 | + file = stdin; |
3213 | + } else { |
3214 | + if ((file = fopen(opt_file, "r")) == NULL) { |
3215 | + perror(opt_file); |
3216 | + return 1; |
3217 | + } |
3218 | + } |
3219 | + |
3220 | + while (fgets(line, sizeof(line), file)) { |
3221 | + char *l = strchr(line, '\0'); |
3222 | + |
3223 | + if (l > line && *(l-1) == '\n') |
3224 | + *(l-1) = '\0'; |
3225 | + if (*line == '\0') |
3226 | + continue; |
3227 | + |
3228 | + if ((status = process_file(line)) != 0) |
3229 | + return status; |
3230 | + } |
3231 | + |
3232 | + if (file != stdin) { |
3233 | + fclose(file); |
3234 | + } |
3235 | + } |
3236 | + for (; optind < argc; optind++) { |
3237 | + if (strcmp(argv[optind], "-") == 0) { |
3238 | + struct stat st; |
3239 | + char *dir = strdup(opt_prefix), *d = strrchr(dir, '/'); |
3240 | + if (d) |
3241 | + *d = '\0'; |
3242 | + else |
3243 | + d = "."; |
3244 | + if (stat(dir, &st) == 0) { |
3245 | + status = foreachdir(dir, walk); |
3246 | + if (status == -1) |
3247 | + perror(dir); |
3248 | + } |
3249 | + free(dir); |
3250 | + } else |
3251 | + status = process_file(argv[optind]); |
3252 | + if (status) |
3253 | + return status; |
3254 | + } |
3255 | + |
3256 | + return status; |
3257 | +} |
3258 | |
3259 | === modified file 'quilt/edit.in' |
3260 | === modified file 'quilt/import.in' |
3261 | === modified file 'quilt/mail.in' |
3262 | --- quilt/mail.in 2009-12-11 15:00:38 +0000 |
3263 | +++ quilt/mail.in 2010-02-12 23:40:30 +0000 |
3264 | @@ -19,7 +19,11 @@ |
3265 | |
3266 | usage() |
3267 | { |
3268 | +<<<<<<< TREE |
3269 | printf $"Usage: quilt mail {--mbox file|--send} [-m text] [--prefix prefix] [--sender ...] [--from ...] [--to ...] [--cc ...] [--bcc ...] [--subject ...] [--signature file] [--reply-to message] [first_patch [last_patch]]\n" |
3270 | +======= |
3271 | + printf $"Usage: quilt mail {--mbox file|--send} [-m text] [--prefix prefix] [--sender ...] [--from ...] [--to ...] [--cc ...] [--bcc ...] [--subject ...] [--reply-to message] [first_patch [last_patch]]\n" |
3272 | +>>>>>>> MERGE-SOURCE |
3273 | if [ x$1 = x-h ] |
3274 | then |
3275 | printf $" |
3276 | @@ -135,8 +139,13 @@ |
3277 | | ${QUILT_SENDMAIL:-sendmail} \ |
3278 | ${QUILT_SENDMAIL_ARGS--f "$opt_sender"} "$@" |
3279 | else |
3280 | +<<<<<<< TREE |
3281 | local from_date=$(LC_ALL=C date "+%a %b %e %H:%M:%S %Y") |
3282 | echo "From $opt_sender_address $from_date" |
3283 | +======= |
3284 | + local from_date=$(date "+%a %b %e %H:%M:%S %Y") |
3285 | + echo "From $opt_sender_address $from_date" |
3286 | +>>>>>>> MERGE-SOURCE |
3287 | sed -e 's/^From />From /' $tmpfile |
3288 | echo |
3289 | fi |
3290 | @@ -233,6 +242,7 @@ |
3291 | usage |
3292 | fi |
3293 | |
3294 | +<<<<<<< TREE |
3295 | # check if formail is installed before doing anything |
3296 | if ! type formail &> /dev/null |
3297 | then |
3298 | @@ -275,6 +285,40 @@ |
3299 | hostname=$(hostname -f 2>/dev/null) |
3300 | fi |
3301 | |
3302 | +======= |
3303 | +# check if formail is installed before doing anything |
3304 | +if ! type formail &> /dev/null |
3305 | +then |
3306 | + echo "You have to install 'formail' to use 'quilt mail'" >&2 |
3307 | + exit 1 |
3308 | +fi |
3309 | + |
3310 | +if [ $# -ge 1 ] |
3311 | +then |
3312 | + if [ "$1" = - ] |
3313 | + then |
3314 | + first_patch="$(find_first_patch)" || exit 1 |
3315 | + else |
3316 | + first_patch="$(find_patch "$1")" || exit 1 |
3317 | + fi |
3318 | + |
3319 | + if [ $# -ge 2 ] |
3320 | + then |
3321 | + if [ "$2" = - ] |
3322 | + then |
3323 | + last_patch="$(find_last_patch)" || exit 1 |
3324 | + else |
3325 | + last_patch="$(find_patch "$2")" || exit 1 |
3326 | + fi |
3327 | + else |
3328 | + last_patch=$first_patch |
3329 | + fi |
3330 | +fi |
3331 | + |
3332 | +if [ -z "$opt_sender" ] |
3333 | +then |
3334 | + hostname=$(hostname -f 2>/dev/null) |
3335 | +>>>>>>> MERGE-SOURCE |
3336 | if [ "$hostname" = "${hostname/.}" ] |
3337 | then |
3338 | hostname=$(hostname) |
3339 | @@ -497,8 +541,13 @@ |
3340 | |
3341 | if [ -z "$opt_message" ] |
3342 | then |
3343 | +<<<<<<< TREE |
3344 | if ! LANG=$ORIGINAL_LANG sensible-editor $introduction |
3345 | then |
3346 | +======= |
3347 | + if ! LANG=$ORIGINAL_LANG $EDITOR $introduction |
3348 | + then |
3349 | +>>>>>>> MERGE-SOURCE |
3350 | rm -f $introduction |
3351 | exit 1 |
3352 | fi |
3353 | |
3354 | === modified file 'quilt/pop.in' |
3355 | --- quilt/pop.in 2009-12-11 15:00:38 +0000 |
3356 | +++ quilt/pop.in 2010-02-12 23:40:30 +0000 |
3357 | @@ -92,10 +92,17 @@ |
3358 | |
3359 | if [ -d $QUILT_PC/$patch ] |
3360 | then |
3361 | +<<<<<<< TREE |
3362 | local prefix=$QUILT_PC/$patch/ |
3363 | [ ${prefix:0:1} == / ] || prefix=$PWD/$prefix |
3364 | if ! ( cd $workdir && \ |
3365 | $QUILT_DIR/scripts/backup-files -B $prefix -r -k -s - ) |
3366 | +======= |
3367 | + local prefix=$QUILT_PC/$patch/ |
3368 | + [ ${prefix:0:1} == / ] || prefix=$PWD/$prefix |
3369 | + if ! ( cd $workdir && \ |
3370 | + $QUILT_LIB/backup-files -B $prefix -rks - ) |
3371 | +>>>>>>> MERGE-SOURCE |
3372 | then |
3373 | printf $"Failed to copy files to temporary directory\n" >&2 |
3374 | rm -rf $workdir |
3375 | |
3376 | === modified file 'quilt/push.in' |
3377 | === modified file 'quilt/scripts/patchfns.in' |
3378 | --- quilt/scripts/patchfns.in 2010-01-14 22:23:25 +0000 |
3379 | +++ quilt/scripts/patchfns.in 2010-02-12 23:40:30 +0000 |
3380 | @@ -502,6 +502,18 @@ |
3381 | echo "$patch" |
3382 | } |
3383 | |
3384 | +find_last_patch() |
3385 | +{ |
3386 | + local patch=$(cat_series | tail -n 1) |
3387 | + if [ -z "$patch" ] |
3388 | + then |
3389 | + printf $"No patches in series\n" >&2 |
3390 | + return 1 |
3391 | + fi |
3392 | + |
3393 | + echo "$patch" |
3394 | +} |
3395 | + |
3396 | find_top_patch() |
3397 | { |
3398 | if ! top_patch |
3399 | @@ -875,6 +887,7 @@ |
3400 | return 1 |
3401 | } |
3402 | |
3403 | +<<<<<<< TREE |
3404 | apply_patch_temporarily() |
3405 | { |
3406 | local workdir=$1 patch=$2 patch_file patch_args |
3407 | @@ -924,6 +937,57 @@ |
3408 | echo "${base%-$num}-$((num+1))${patch#$base}" |
3409 | } |
3410 | |
3411 | +======= |
3412 | +apply_patch_temporarily() |
3413 | +{ |
3414 | + local workdir=$1 patch=$2 patch_file patch_args |
3415 | + |
3416 | + patch_file=$(patch_file_name "$patch") |
3417 | + patch_args=$(patch_args "$patch") |
3418 | + |
3419 | + shift 2 |
3420 | + |
3421 | + local prefix=$QUILT_PC/$patch/ |
3422 | + [ ${prefix:0:1} == / ] || prefix=$PWD/$prefix |
3423 | + if ! ( cd $workdir && \ |
3424 | + $QUILT_LIB/backup-files -B $prefix -rks ${@:--} ) |
3425 | + then |
3426 | + printf $"Failed to copy files to temporary directory\n" >&2 |
3427 | + return 1 |
3428 | + fi |
3429 | + |
3430 | + if [ -s $patch_file ] |
3431 | + then |
3432 | + if ! cat_file $patch_file \ |
3433 | + | patch -d $workdir $QUILT_PATCH_OPTS $patch_args \ |
3434 | + --no-backup-if-mismatch -Ef \ |
3435 | + >/dev/null 2>/dev/null |
3436 | + then |
3437 | + # Generating a relative diff for a subset of files in |
3438 | + # the patch will fail. Also, if a patch was force |
3439 | + # applied, we know that it won't apply cleanly. In |
3440 | + # all other cases, print a warning. |
3441 | + |
3442 | + if [ ! -e $QUILT_PC/$patch~refresh -a $# -eq 0 ] |
3443 | + then |
3444 | + printf $"Failed to patch temporary files\n" >&2 |
3445 | + return 1 |
3446 | + fi |
3447 | + fi |
3448 | + fi |
3449 | +} |
3450 | + |
3451 | +next_filename() |
3452 | +{ |
3453 | + local patch=$1 base num |
3454 | + base=$(echo "$patch" \ |
3455 | + | sed -r -e 's:(\.gz|\.bz2)$::' -e 's:(\.diff?|\.patch)$::') |
3456 | + num=$(echo "$base" | sed -nre 's:.*-([0-9]+)$:\1:'p) |
3457 | + [ -n "$num" ] || num=1 |
3458 | + echo "${base%-$num}-$((num+1))${patch#$base}" |
3459 | +} |
3460 | + |
3461 | +>>>>>>> MERGE-SOURCE |
3462 | create_db() { |
3463 | if ! [ -e $QUILT_PC ] |
3464 | then |
3465 | @@ -1008,6 +1072,7 @@ |
3466 | unset basedir down |
3467 | fi |
3468 | |
3469 | +<<<<<<< TREE |
3470 | : ${QUILT_SERIES:=series} |
3471 | |
3472 | if [ "${QUILT_SERIES:0:1}" = / ] |
3473 | @@ -1019,6 +1084,19 @@ |
3474 | elif [ -e $QUILT_SERIES -a ! -d $QUILT_SERIES ] |
3475 | then |
3476 | SERIES=$QUILT_SERIES |
3477 | +======= |
3478 | +: ${QUILT_SERIES:=series} |
3479 | + |
3480 | +if [ "${QUILT_SERIES:0:1}" = / ] |
3481 | +then |
3482 | + SERIES=$QUILT_SERIES |
3483 | +elif [ -e $QUILT_PC/$QUILT_SERIES ] |
3484 | +then |
3485 | + SERIES=$QUILT_PC/$QUILT_SERIES |
3486 | +elif [ -e $QUILT_SERIES ] |
3487 | +then |
3488 | + SERIES=$QUILT_SERIES |
3489 | +>>>>>>> MERGE-SOURCE |
3490 | else |
3491 | SERIES=$QUILT_PATCHES/$QUILT_SERIES |
3492 | fi |
3493 | |
3494 | === modified file 'test/mail.test' |
3495 | --- test/mail.test 2009-12-11 15:00:38 +0000 |
3496 | +++ test/mail.test 2010-02-12 23:40:30 +0000 |
3497 | @@ -62,6 +62,7 @@ |
3498 | < Aw: [patch] Fwd: Re: [patch 5/7] Fw: Subject of 5.diff |
3499 | < |
3500 | |
3501 | +<<<<<<< TREE |
3502 | $ cat - no-subject > patches/6.diff |
3503 | < Subject: Must not expand * ? [abc] |
3504 | < |
3505 | @@ -78,6 +79,24 @@ |
3506 | > Cc: Dummy <dummy@some.where> |
3507 | > Subject: [test 2/6] Subject of 2.diff is: split into multiple lines |
3508 | > From a@b.c |
3509 | +======= |
3510 | + $ cat - no-subject > patches/6.diff |
3511 | + < Subject: Must not expand * ? [abc] |
3512 | + < |
3513 | + |
3514 | + $ ls patches/ > series |
3515 | + $ quilt mail --mbox mbox --prefix "test" --subject "This is a test" -m "Message" |
3516 | + $ sed -nre "s/^(From [^ ]*).*/\\1/p" -e "/^Subject:/p" -e "/^To:/p" -e "/^Cc:/p" -e "/^ /p" -e "/^Replace-.*:/p" -e "/^Recipient-.*:/p" mbox |
3517 | + > From a@b.c |
3518 | + > Subject: [test 0/6] This is a test |
3519 | + > From a@b.c |
3520 | + > Cc: Dummy <dummy@some.where> |
3521 | + > Subject: [test 1/6] Subject of 1.diff |
3522 | + > From a@b.c |
3523 | + > Cc: Dummy <dummy@some.where> |
3524 | + > Subject: [test 2/6] Subject of 2.diff is: split into multiple lines |
3525 | + > From a@b.c |
3526 | +>>>>>>> MERGE-SOURCE |
3527 | > To: "John X. Doe" <jxd@some.where> |
3528 | > Subject: [test 3/6] Subject of 3.diff |
3529 | > To: John X. Doe <jxd@some.where> |
3530 | |
3531 | === modified file 'test/run' |
3532 | === added file 'test/symlink_pc.test.ignoreme' |
3533 | --- test/symlink_pc.test.ignoreme 1970-01-01 00:00:00 +0000 |
3534 | +++ test/symlink_pc.test.ignoreme 2010-02-12 23:40:30 +0000 |
3535 | @@ -0,0 +1,183 @@ |
3536 | +This test is very similar to one.test, except that it uses a symlinked .pc |
3537 | +directory. |
3538 | + |
3539 | + $ rm -rf d pc |
3540 | + $ mkdir -p d/patches pc |
3541 | + $ cd d |
3542 | + $ ln -s ../pc .pc |
3543 | + $ mkdir dir |
3544 | + $ echo "This is file one." > dir/file1 |
3545 | + $ quilt new patch1.diff |
3546 | + > Patch %{P}patch1.diff is now on top |
3547 | + |
3548 | + $ quilt add dir/file1 |
3549 | + > File dir/file1 added to patch %{P}patch1.diff |
3550 | + |
3551 | + $ quilt add file2 |
3552 | + > File file2 added to patch %{P}patch1.diff |
3553 | + |
3554 | + $ quilt diff |
3555 | + $ quilt diff -z |
3556 | + $ quilt refresh |
3557 | + > Nothing in patch %{P}patch1.diff |
3558 | + |
3559 | + $ test -L .pc || echo ".pc isn't a symlink anymore" |
3560 | + $ echo "This is file two." > file2 |
3561 | + $ quilt diff |
3562 | + > Index: d/file2 |
3563 | + > =================================================================== |
3564 | + > --- /dev/null |
3565 | + > +++ d/file2 |
3566 | + > @@ -0,0 +1 @@ |
3567 | + > +This is file two. |
3568 | + |
3569 | + $ test -L .pc || echo ".pc isn't a symlink anymore" |
3570 | + $ quilt diff -z |
3571 | + > Index: d/file2 |
3572 | + > =================================================================== |
3573 | + > --- /dev/null |
3574 | + > +++ d/file2 |
3575 | + > @@ -0,0 +1 @@ |
3576 | + > +This is file two. |
3577 | + |
3578 | + $ quilt refresh |
3579 | + > Refreshed patch %{P}patch1.diff |
3580 | + |
3581 | + $ test -L .pc || echo ".pc isn't a symlink anymore" |
3582 | + $ quilt diff -z |
3583 | + $ echo "Another line has been added." >> dir/file1 |
3584 | + $ quilt diff -z |
3585 | + > Index: d/dir/file1 |
3586 | + > =================================================================== |
3587 | + > --- d.orig/dir/file1 |
3588 | + > +++ d/dir/file1 |
3589 | + > @@ -1 +1,2 @@ |
3590 | + > This is file one. |
3591 | + > +Another line has been added. |
3592 | + |
3593 | + $ test -L .pc || echo ".pc isn't a symlink anymore" |
3594 | + $ quilt diff -z dir/file1 |
3595 | + > Index: d/dir/file1 |
3596 | + > =================================================================== |
3597 | + > --- d.orig/dir/file1 |
3598 | + > +++ d/dir/file1 |
3599 | + > @@ -1 +1,2 @@ |
3600 | + > This is file one. |
3601 | + > +Another line has been added. |
3602 | + |
3603 | + $ test -L .pc || echo ".pc isn't a symlink anymore" |
3604 | + $ quilt refresh |
3605 | + > Refreshed patch %{P}patch1.diff |
3606 | + |
3607 | + $ test -L .pc || echo ".pc isn't a symlink anymore" |
3608 | + $ quilt new patch2.diff |
3609 | + > Patch %{P}patch2.diff is now on top |
3610 | + |
3611 | + $ test -L .pc || echo ".pc isn't a symlink anymore" |
3612 | + $ quilt add dir/file3 |
3613 | + > File dir/file3 added to patch %{P}patch2.diff |
3614 | + |
3615 | + $ test -L .pc || echo ".pc isn't a symlink anymore" |
3616 | + $ echo "This is file three." > dir/file3 |
3617 | + $ quilt refresh |
3618 | + > Refreshed patch %{P}patch2.diff |
3619 | + |
3620 | + $ test -L .pc || echo ".pc isn't a symlink anymore" |
3621 | + $ quilt add -P patch1 dir/file3 |
3622 | + > File dir/file3 modified by patch %{P}patch2.diff |
3623 | + |
3624 | + $ test -L .pc || echo ".pc isn't a symlink anymore" |
3625 | + $ quilt pop -R |
3626 | + > Removing patch %{P}patch2.diff |
3627 | + > Removing dir/file3 |
3628 | + > |
3629 | + > Now at patch %{P}patch1.diff |
3630 | + |
3631 | + $ test -L .pc || echo ".pc isn't a symlink anymore" |
3632 | + $ quilt add file4 |
3633 | + > File file4 added to patch %{P}patch1.diff |
3634 | + |
3635 | + $ test -L .pc || echo ".pc isn't a symlink anymore" |
3636 | + $ echo "This is file 4." > file4 |
3637 | + $ quilt refresh |
3638 | + > Refreshed patch %{P}patch1.diff |
3639 | + |
3640 | + $ test -L .pc || echo ".pc isn't a symlink anymore" |
3641 | + $ quilt push |
3642 | + > Applying patch %{P}patch2.diff |
3643 | + >~ patching file `?dir/file3'? |
3644 | + > |
3645 | + > Now at patch %{P}patch2.diff |
3646 | + |
3647 | + $ test -L .pc || echo ".pc isn't a symlink anymore" |
3648 | + $ quilt new subdir/patch3.diff |
3649 | + > Patch %{P}subdir/patch3.diff is now on top |
3650 | + |
3651 | + $ test -L .pc || echo ".pc isn't a symlink anymore" |
3652 | + $ quilt add file4 |
3653 | + > File file4 added to patch %{P}subdir/patch3.diff |
3654 | + |
3655 | + $ test -L .pc || echo ".pc isn't a symlink anymore" |
3656 | + $ rm file4 |
3657 | + $ quilt diff |
3658 | + > Index: d/file4 |
3659 | + > =================================================================== |
3660 | + > --- d.orig/file4 |
3661 | + > +++ /dev/null |
3662 | + > @@ -1 +0,0 @@ |
3663 | + > -This is file 4. |
3664 | + |
3665 | + $ test -L .pc || echo ".pc isn't a symlink anymore" |
3666 | + $ quilt add -P patch2 file4 |
3667 | + > File file4 modified by patch %{P}subdir/patch3.diff |
3668 | + |
3669 | + $ test -L .pc || echo ".pc isn't a symlink anymore" |
3670 | + $ quilt refresh |
3671 | + > Refreshed patch %{P}subdir/patch3.diff |
3672 | + |
3673 | + $ test -L .pc || echo ".pc isn't a symlink anymore" |
3674 | + $ echo "Another line here, too." >> dir/file3 |
3675 | + $ quilt refresh patch2 |
3676 | + > Refreshed patch %{P}patch2.diff |
3677 | + |
3678 | + $ test -L .pc || echo ".pc isn't a symlink anymore" |
3679 | + $ echo "Another line added." >> file2 |
3680 | + $ quilt diff -z -P patch1 |
3681 | + > Index: d/file2 |
3682 | + > =================================================================== |
3683 | + > --- d.orig/file2 |
3684 | + > +++ d/file2 |
3685 | + > @@ -1 +1,2 @@ |
3686 | + > This is file two. |
3687 | + > +Another line added. |
3688 | + > Warning: more recent patches modify files in patch %{P}patch1.diff |
3689 | + |
3690 | + $ test -L .pc || echo ".pc isn't a symlink anymore" |
3691 | + $ quilt refresh patch1 |
3692 | + > More recent patches modify files in patch %{P}patch1.diff. Enforce refresh with -f. |
3693 | + |
3694 | + $ test -L .pc || echo ".pc isn't a symlink anymore" |
3695 | + $ quilt refresh -f patch1 |
3696 | + > Refreshed patch %{P}patch1.diff |
3697 | + |
3698 | + $ test -L .pc || echo ".pc isn't a symlink anymore" |
3699 | + $ echo "Another line here, too." >> dir/file3 |
3700 | + $ quilt pop -R |
3701 | + > Removing patch %{P}subdir/patch3.diff |
3702 | + > Restoring file4 |
3703 | + > |
3704 | + > Now at patch %{P}patch2.diff |
3705 | + |
3706 | + $ test -L .pc || echo ".pc isn't a symlink anymore" |
3707 | + $ quilt refresh patch2 |
3708 | + > Refreshed patch %{P}patch2.diff |
3709 | + |
3710 | + $ test -L .pc || echo ".pc isn't a symlink anymore" |
3711 | + $ quilt pop -qaR |
3712 | + > Removing patch %{P}patch2.diff |
3713 | + > Removing patch %{P}patch1.diff |
3714 | + > No patches applied |
3715 | + |
3716 | + $ test -L .pc || echo ".pc isn't a symlink anymore" |
3717 | + $ cd .. |
3718 | +# $ rm -rf d pc |
3719 | |
3720 | === modified file 'test/test.quiltrc' |
The package history in the archive and the history in the bzr branch differ. As the archive is authoritative the history of lp:ubuntu/lucid/quilt now reflects that and the old bzr branch has been pushed to lp:~ubuntu-branches/ubuntu/lucid/quilt/lucid-201002122335. A merge should be performed if necessary.