debian/0000755000000000000000000000000011725314263007172 5ustar debian/source/0000755000000000000000000000000011725307146010474 5ustar debian/source/format0000644000000000000000000000001411725307146011702 0ustar 3.0 (quilt) debian/dirs0000644000000000000000000000001011725307145010046 0ustar usr/bin debian/copyright0000644000000000000000000000154111725307147011131 0ustar This package was debianized by Alejandro Rios P. on Sat, 16 Oct 2004 16:08:56 -0500. It was downloaded from http://www.holgerschurig.de/patcher.html Copyright: Upstream Author: Holger Schurig License: This software is copyright (c) 2004 by Holger Schurig. This program is free software; you can redistribute it and/or modify it under the terms of either: a) the GNU General Public License as published by the Free Software Foundation; either version 1, or (at your option) any later version, or b) the "Artistic License" which comes with Perl. On Debian GNU/Linux systems, the complete text of the GNU General Public License can be found in `/usr/share/common-licenses/GPL' and the Artistic Licence in `/usr/share/common-licenses/Artistic'. debian/rules0000755000000000000000000000303511725307146010255 0ustar #!/usr/bin/make -f # -*- makefile -*- # Sample debian/rules that uses debhelper. # GNU copyright 1997 to 1999 by Joey Hess. # Uncomment this to turn on verbose mode. export DH_VERBOSE=1 CFLAGS = -Wall -g ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS))) CFLAGS += -O0 else CFLAGS += -O2 endif ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS))) INSTALL_PROGRAM += -s endif configure: configure-stamp configure-stamp: dh_testdir # Add here commands to configure the package. touch configure-stamp build: build-arch build-indep build-arch: build-stamp build-indep: build-stamp build-stamp: configure-stamp dh_testdir # Add here commands to compile the package. #$(MAKE) touch build-stamp clean: dh_testdir dh_testroot rm -f build-stamp configure-stamp # Add here commands to clean up after the build process. #-$(MAKE) clean dh_clean install: build dh_testdir dh_testroot dh_prep dh_installdirs # Add here commands to install the package into debian/patcher. #$(MAKE) install DESTDIR=$(CURDIR)/debian/patcher cp $(CURDIR)/patcher $(CURDIR)/debian/patcher/usr/bin # Build architecture-independent files here. binary-indep: build install dh_testdir dh_testroot dh_installchangelogs dh_installdocs dh_installman debian/*.1 dh_compress dh_fixperms dh_perl dh_installdeb dh_gencontrol dh_md5sums dh_builddeb # Build architecture-dependent files here. binary-arch: build install # We have nothing to do by default. binary: binary-indep binary-arch .PHONY: build clean binary-indep binary-arch binary install configure debian/changelog0000644000000000000000000000242611725307147011053 0ustar patcher (0.0.20040521-6) unstable; urgency=low * Applying patch from Jari Aalto : - Remove deprecated dpatch and upgrade to packaging format "3.0 quilt". - Move added manual page under debian/ directory, so that it is not flagged as a modification to sources. - Update to Standards-Version to 3.9.3 and debhelper to 9. * Updating maintainer field. -- Alejandro Rios P. Mon, 5 Mar 2012 09:37:13 -0500 patcher (0.0.20040521-5) unstable; urgency=low * Use abosolute paths for *.files file (Closes: #283383). * Upgraded "Standards-Version" field and debhelper. -- Alejandro Rios P. Wed, 19 Sep 2007 13:49:48 -0500 patcher (0.0.20040521-4) unstable; urgency=low * Added support for options on $EDITOR env variable. Closes: #283373 * Upgraded to Standards-Version 3.6.2 -- Alejandro Rios P. Wed, 3 Aug 2005 00:47:10 -0500 patcher (0.0.20040521-3) unstable; urgency=low * Updated man page. Closes: #281311: -- Alejandro Rios P. Mon, 17 Jan 2005 21:42:32 -0500 patcher (0.0.20040521-1) unstable; urgency=low * Initial Release. -- Alejandro Rios P. Sun, 17 Oct 2004 10:33:25 -0500 debian/compat0000644000000000000000000000000211725307146010372 0ustar 9 debian/patcher.10000644000000000000000000003333011725307146010706 0ustar .\" Automatically generated by Pod::Man v1.37, Pod::Parser v1.14 .\" .\" Standard preamble: .\" ======================================================================== .de Sh \" Subsection heading .br .if t .Sp .ne 5 .PP \fB\\$1\fR .PP .. .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" Set up some character translations and predefined strings. \*(-- will .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left .\" double quote, and \*(R" will give a right double quote. | will give a .\" real vertical bar. \*(C+ will give a nicer C++. Capital omega is used to .\" do unbreakable dashes and therefore won't be available. \*(C` and \*(C' .\" expand to `' in nroff, nothing in troff, for use with C<>. .tr \(*W-|\(bv\*(Tr .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' .ie n \{\ . ds -- \(*W- . ds PI pi . if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch . if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch . ds L" "" . ds R" "" . ds C` "" . ds C' "" 'br\} .el\{\ . ds -- \|\(em\| . ds PI \(*p . ds L" `` . ds R" '' 'br\} .\" .\" If the F register is turned on, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.Sh), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .if \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . nr % 0 . rr F .\} .\" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .hy 0 .if n .na .\" .\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2). .\" Fear. Run. Save yourself. No user-serviceable parts. . \" fudge factors for nroff and troff .if n \{\ . ds #H 0 . ds #V .8m . ds #F .3m . ds #[ \f1 . ds #] \fP .\} .if t \{\ . ds #H ((1u-(\\\\n(.fu%2u))*.13m) . ds #V .6m . ds #F 0 . ds #[ \& . ds #] \& .\} . \" simple accents for nroff and troff .if n \{\ . ds ' \& . ds ` \& . ds ^ \& . ds , \& . ds ~ ~ . ds / .\} .if t \{\ . ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u" . ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u' . ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u' . ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u' . ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u' . ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u' .\} . \" troff and (daisy-wheel) nroff accents .ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V' .ds 8 \h'\*(#H'\(*b\h'-\*(#H' .ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#] .ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H' .ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u' .ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#] .ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#] .ds ae a\h'-(\w'a'u*4/10)'e .ds Ae A\h'-(\w'A'u*4/10)'E . \" corrections for vroff .if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u' .if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u' . \" for low resolution devices (crt and lpr) .if \n(.H>23 .if \n(.V>19 \ \{\ . ds : e . ds 8 ss . ds o a . ds d- d\h'-1'\(ga . ds D- D\h'-1'\(hy . ds th \o'bp' . ds Th \o'LP' . ds ae ae . ds Ae AE .\} .rm #[ #] #H #V #F C .\" ======================================================================== .\" .IX Title "PATCHER 1" .TH PATCHER 1 "2004-05-21" "perl v5.8.4" "User Contributed Perl Documentation" .SH "NAME" patcher \- a patch maintenance tool .SH "SYNOPSIS" .IX Header "SYNOPSIS" .IP "patcher [\-n ] []" 20 .IX Item "patcher [-n ] []" Edit as part of the patch . .IP "patcher \-r" 20 .IX Item "patcher -r" Refresh current patch. .IP "patcher [\-f] \-b" 20 .IX Item "patcher [-f] -b" Move back one patch to the previous one. .IP "patcher [\-f] \-b " 20 .IX Item "patcher [-f] -b " Move back in series until we're at . .IP "patcher [\-f] \-b " 20 .IX Item "patcher [-f] -b " Move back patches in series. .IP "patcher \-a" 20 .IX Item "patcher -a" Apply the next patch in the series. .IP "patcher \-a " 20 .IX Item "patcher -a " Apply all patches from the series until we've reached at . .IP "patcher \-a " 20 .IX Item "patcher -a " Apply next patches from series. .IP "patcher \-n [\-p ] \-i " 20 .IX Item "patcher -n [-p ] -i " Import an external diff file into patch . Strip levels from the directory names. Please note that patch allows '\-p1', but we only '\-p 1'. .IP "patcher [\-f] [\-n ] [\-p ] \-i " 20 .IX Item "patcher [-f] [-n ] [-p ] -i " Import an external diff file into patch . Strip levels from the directory names. Please note that patch allows '\-p1', but we only '\-p 1'. .SH "CONCEPT" .IX Header "CONCEPT" Patcher is a perl script which I use for managing patches. It's quite powerful, easy to use, and fast. .PP Patcher keeps track of which files you change. It then can generate patches from your changes, no need for you to handle the diff tool manually. .PP You can have more than one record of file changes, we call this a patch. A patch is something that the \fIpatch\fR\|(1) command can apply. .PP The patches can be stacked in series, they define the order they have to applied. Patcher keeps series information as well as information which patches have been applied and which not. .SH "DESCRIPTION" .IX Header "DESCRIPTION" Later we will have a walkthrought, but let me first explain the basic operation modes of patcher: .Sh "Editing files" .IX Subsection "Editing files" When you call patcher with a filename, patch will make a backup of this file (if the file exists). Now you can create or change the file. Later you can ask patcher to create a unified diff with all your changes. .Sh "Creating unified diffs" .IX Subsection "Creating unified diffs" Just call \*(L"patcher \-r\*(R" and you will get a unified diff of all your additions, modification and deletions. The diff will be stored in \&.patches/.patch. It is in a form that allows direct application via \fIpatch\fR\|(1) or, of course, via \*(L"patcher \-i\*(R". .PP Whenever you do \*(L"patcher \-r\*(R" your .patches/.patch file get's refreshed. .Sh "Back out a patch" .IX Subsection "Back out a patch" To revoke your changes and go to the previous version, just enter \&\*(L"patcher \-b\*(R". Patcher will make sure that you don't loose your changes by asking you to create a diff if something has changed since the last refresh. You may use \-f (or \-\-force) patcher to go back anyway. .PP You can back out more than one patch by either specifying a number a patch name after \-b. .Sh "Re-Apply a patch" .IX Subsection "Re-Apply a patch" With \*(L"patcher \-n \-a\*(R" one can apply an already existing managed patch. A managed patch is a patch that already is stored in the .patches directory and is mentioned in the .patches/series file. Patcher tests if the patch would apply without problem and applies it. If the patch would be rejected, you can use \-f (or \-\-force) to apply the patch anyway. .PP You can apply more than one patch by either specifying a number a patch name after \-a. .Sh "Importing external patches" .IX Subsection "Importing external patches" Sometimes you have an external patch. That's the opposite of a managed patch, the patch is not stored in the .patches directory. By importing it, it will become a managed patch. .PP Import the patch simply with \-i . You can use \-p to specify the directory level, similar to the \-p option of \fIpatch\fR\|(1). But please keep in mind that we need a space between \-p and the number. .PP Normally only clean patches will be imported. To import a patch that creates rejects use \-f (or \-\-force). You'll see a list of files where the patch did not apply cleanly, fix the problems manually. .PP Later you can use \*(L"patcher \-r\*(R" to create a clean patch. .SH "INSTALLATION" .IX Header "INSTALLATION" Just place patcher somewhere in your path. That's all. .PP For each project Patcher requires one special directory called \*(L".patches\*(R". It will search for this directory. If it does not exist, patcher creates it automatically. .SH "INTERNALS" .IX Header "INTERNALS" All work occurs with a single directory tree. All commands are invoked within the root of that tree (\s-1TODO:\s0 this can and should change). Patcher manages a \&\*(L"stack\*(R" of patches. .PP Each patch is a changeset against the base tree plus the preceding patches. .PP All patches are listed, in order, in the file \*(L".patches/series\*(R". Patcher adds patches into this file, but never deletes entries. You can edit this file with a text editor, but please do only so if the patch you delete is currently not applied. .PP Any currently applied patches is listed in the file \*(L".patches/applied\*(R". The patcher manage this file, there is no need for you to ever edit this file manually. .PP Each patch affects a number of files in the tree. These files are listed in a file list named \*(L".patches/*.files\*(R". Patcher manages them. When you back out a patch, this file will deleted. Or, in other words, this file exists only for applied patches. It's only used by \*(L"patcher \-r\*(R". .PP Patches are placed into \*(L".patches/*.patch\*(R" files. They are always unified diffs with \-p1 as patchlevel. You can copy then anywhere, the \fIpatch\fR\|(1) utility will read them without problems. .PP Optionally you can put descriptions for the patches in files named \&\*(L".patches/*.txt\*(R". .PP So for a particular patch \*(L"my\-first\-patch\*(R" the following will exist: .IP "\-" 4 An entry \*(L"my\-first\-patch.patch\*(R" in \*(L".patches/series\*(R". .IP "\-" 4 An entry \*(L"my\-first\-patch\*(R" in \*(L".patches/applied\*(R" (if it's currently applied) .IP "\-" 4 A file \*(L".patches/my\-first\-patch.files\*(R" which contains the names of the files which my-first-patch modifies, adds or removes .IP "\-" 4 A file \*(L".patches/my\-first\-patch.patch\*(R", which is the context diff, basically the main output of patcher. .IP "\-" 4 Optionally a file \*(L".patches/my\-first\-patch.txt\*(R" which contains the patch's changelog, description or whatever you put in there. .SH "WALKTHROUGHT" .IX Header "WALKTHROUGHT" Let's start. .PP Go into /usr/src/linux (or wherever). .PP Now let's start with changing some source files: .PP .Vb 1 \& patcher -n my-patch kernel/sched.c .Ve .PP \&\s-1OK\s0, patcher copied kernel/sched.c to kernel/sched.c~my\-patch for you, the program has also done some magic in the .patches directory, which won't be of interest to us now. .PP .Vb 1 \& Now edit kernel/sched.c a bit. .Ve .PP Now we're ready to document the patch: .PP .Vb 1 \& Create .patches/my-patch.txt .Ve .PP Now generate a patch: .PP .Vb 1 \& patcher -r .Ve .PP This will generate \*(L".patches/my\-patch.patch\*(R". Take a look at this file. .PP Now we remove our change to sched.c by going backwards: .PP .Vb 1 \& patcher -b .Ve .PP Look at where we're now: .PP .Vb 1 \& patcher -s .Ve .PP Now let's add another file to my\-patch. First we re-apply the patch: .PP .Vb 1 \& patcher -a .Ve .PP Now edit a second file: .PP .Vb 1 \& patcher kernel/printk.c .Ve .PP Note that here we gave patcher a single argument, without command line options. This always tells patcher to add another file to the current patch. .PP .Vb 1 \& Edit kernel/printk.c .Ve .PP Refresh my\-patch: .PP .Vb 1 \& patcher -r .Ve .PP Now start a second patch: .PP .Vb 1 \& patcher -n my-second-patch kernel/sched.c .Ve .PP Here we have a filename in the command line for patcher, so we edit a file. But now we specified a patch name with \-n. This told patcher to create a new patch. Now patcher manages two patches, \*(L"my\-patch\*(R" and \*(L"my\-second\-patch\*(R". .PP .Vb 1 \& Edit kernel/sched.c, to make some changes for my-second-patch .Ve .PP Generate my\-second\-patch: .PP .Vb 1 \& patcher -r .Ve .PP Take a look in \*(L".patches/my\-second\-patch.patch\*(R". .PP Also note that \*(L"my\-second\-patch.patch\*(R" has been added to the series file. Whenever you manually begin a patch, it will automatically be put into the series file. .PP In this way, the whole thing is stackable. If you have four patches applied, say \*(L"patch\-1\*(R", \*(L"patch\-2\*(R", \*(L"patch\-3\*(R" and \*(L"patch\-4\*(R", and if patch\-2 and patch\-4 both touch kernel/sched.c then you will have: .IP "kernel/sched.c~patch\-2" 30 .IX Item "kernel/sched.c~patch-2" Original copy, before patch\-2 .IP "kernel/sched.c~patch\-4" 30 .IX Item "kernel/sched.c~patch-4" Copy before patch\-4. Contains changes from patch\-2 .IP "kernel/sched.c" 30 .IX Item "kernel/sched.c" Current working copy. Contains changes from patch\-4. .PP This means that your diff headers contain \*(L"~patch\-name\*(R" in them, which is convenient documentation. .PP To end our tour, we remove both patches: .PP .Vb 2 \& patcher -b \& patcher -b .Ve .PP That's pretty much it, really. .SH "SEE ALSO" .IX Header "SEE ALSO" Andrew Morton's patch scripts at http://www.zip.com.au/~akpm/linux/patches/ .PP I stole the idea from him and even most of this documentation. .PP At http://savannah.nongnu.org/projects/quilt/ you'll find Quilt. That's the successor of Andrew's original scripts. They do the same as patcher (and slightly more), but with tenthousand shell scripts. .SH "AUTHOR" .IX Header "AUTHOR" Holger Schurig debian/docs0000644000000000000000000000000711725307144010042 0ustar README debian/patches/0000755000000000000000000000000011725307146010623 5ustar debian/patches/bug283373.patch0000644000000000000000000000125111725307146013112 0ustar From: Alejandro Rios P. Subject: Add support for options on $EDITOR env variable diff -urNad /home/alerios/documentos/debian/patcher/patcher/patcher-0.0.20040521/patcher patcher-0.0.20040521/patcher --- /home/alerios/documentos/debian/patcher/patcher/patcher-0.0.20040521/patcher 2004-05-21 14:27:00.000000000 -0500 +++ patcher-0.0.20040521/patcher 2005-08-03 01:06:52.131828896 -0500 @@ -749,7 +749,8 @@ if ($ENV{EDITOR}) { print "NOTE: editing file $fname\n"; - system($ENV{EDITOR}, $fname); + my @editor=split(/\ /,$ENV{EDITOR}); + system(@editor, $fname); } else { print "\$EDITOR to $fname missing\n"; system("vi " . $fname); debian/patches/02-bub283383.patch0000644000000000000000000000136011725307146013326 0ustar From: Alejandro Rios P. Subject: Use abosolute paths for *.files file (Closes: #283383) diff -urNad patcher-0.0.20040521~/patcher patcher-0.0.20040521/patcher --- patcher-0.0.20040521~/patcher 2007-09-19 13:54:59.000000000 -0500 +++ patcher-0.0.20040521/patcher 2007-09-19 13:56:26.000000000 -0500 @@ -721,6 +721,7 @@ sub EditFile($) { my $fname = shift; + $fname = "$origdir/$fname"; print "DEBUG: EditFile('$fname')\n" if $debug > 1; if ($patchname) { @@ -767,7 +768,8 @@ my ($fname) = @_; print "DEBUG: DiffOneFile('$fname')\n" if $debug > 1; - my $dir = basename($projectdir); + #my $dir = basename($projectdir); + my $dir = ""; my $backupname = GetBackupName($fname); chdir("$projectdir/.."); debian/patches/series0000644000000000000000000000004311725307146012035 0ustar bug283373.patch 02-bub283383.patch debian/control0000644000000000000000000000133411725307147010601 0ustar Source: patcher Section: devel Priority: optional Maintainer: Alejandro Rios P. Build-Depends: debhelper (>= 9) Standards-Version: 3.9.3 Package: patcher Architecture: all Depends: perl-base (>= 5.0.0), perl-modules, ${misc:Depends} Description: perl script useful for managing patches patcher is a patch manager that keeps track of which files you change. It then can generate patches from your changes, no need for you to handle the diff tool manually. . The patches can be stacked in series, they define the order they have to be applied. Patcher keeps series information as well as information of which patches have been applied and which not. . Homepage http://www.holgerschurig.de/patcher.html