.\" Automatically generated by Pod::Man 2.28 (Pod::Simple 3.28) .\" .\" Standard preamble: .\" ======================================================================== .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. \*(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- .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" '' . ds C` . ds C' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is turned on, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .\" .\" Avoid warning from groff about undefined register 'F'. .de IX .. .nr rF 0 .if \n(.g .if rF .nr rF 1 .if (\n(rF:(\n(.g==0)) \{ . if \nF \{ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{ . nr % 0 . nr F 2 . \} . \} .\} .rr rF .\" .\" 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 "MAKEPATCH 1p" .TH MAKEPATCH 1p "2015-08-31" "perl v5.20.2" "User Contributed Perl Documentation" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH "NAME" makepatch \- create script to update a source tree .SH "SYNOPSIS" .IX Header "SYNOPSIS" \&\fBmakepatch\fR [ \fIoptions\fR ] \fIold-src\fR \fInew-src\fR .SH "Introduction" .IX Header "Introduction" Traditionally, source trees are updated with the \fBpatch\fR program, processing patch information that is generated by the \fBdiff\fR program. Although \fBdiff\fR and \fBpatch\fR do a very good job at patching file contents, most versions do not handle creating and deleting files and directories, and adjusting of file modes and time stamps. Newer versions of \fBdiff\fR and \fBpatch\fR seem to be able to create files, and very new versions of \fBpatch\fR can remove files. But that's about it. .PP Another typical problem is that patch kits are typically downloaded from the Internet, or transmitted via electronic mail. It is often desirable to verify the correctness of a patch kit before even attempting to apply it. .PP The \fBmakepatch\fR package is designed to overcome these limitations. .SH "DESCRIPTION" .IX Header "DESCRIPTION" The \fBmakepatch\fR package contains two Perl programs: \&\fBmakepatch\fR and \fBapplypatch\fR. .PP \&\fBmakepatch\fR will generate a patch kit from two source trees. It traverses the source directory and runs a \fBdiff\fR on each pair of corresponding files, accumulating the output into a patch kit. It knows about the conventions for patch kits: if a file named \&\f(CW\*(C`patchlevel.h\*(C'\fR exists, it is handled first, so \fBpatch\fR can check the version of the source tree. Also, to deal with the non-perfect versions of \fBpatch\fR that are in use, it supplies "\f(CW\*(C`Index:\*(C'\fR\*(L" and \&\*(R"\f(CW\*(C`Prereq:\*(C'\fR" lines, so \fBpatch\fR can correctly locate the files to patch, and it relocates the patch to the current directory to avoid problems with creating new files. .PP The list of files can be specified in a so called \fB\s-1MANIFEST\s0\fR file, but it can also be generated by recursively traversing the source tree. Files can be excluded using shell style wildcards and Perl regex patterns. .PP But that is not it! \fBmakepatch\fR also inserts some additional information in the patch kit for use by the \fBapplypatch\fR program. .PP It is important to emphasize that the generated patch kit is still valid input for \fBpatch\fR. When used with \fBpatch\fR, there are no verifications and problems may arise when new files need to be created. \fBmakepatch\fR prepends a small shell script in front of the patch kit that creates the necessary files and directories for the patch process. If you can not run \fBapplypatch\fR for some reason, you can run the patch kit \fIas a shell script\fR to prepare the source directory for the patching process. .PP The \fBapplypatch\fR program will do the following: .IP "\(bu" 4 It will extensively verify that the patch kit is complete and not corrupted during transfer. .IP "\(bu" 4 It will apply some heuristics to verify that the directory in which the patch will be applied does indeed contain the expected sources. .IP "\(bu" 4 It creates files and directories as necessary. .IP "\(bu" 4 It applies the patch by running the \fBpatch\fR program. .IP "\(bu" 4 Upon completion, obsolete files, directories and \f(CW\*(C`.orig\*(C'\fR files are removed, file modes of new files are set, and the timestamps of all patched files are adjusted. .PP Note that \fBapplypatch\fR only requires the \fBpatch\fR program. It does not rely on a shell or shell tools. This makes it possible to apply patches on non-Unix systems. .SH "General usage" .IX Header "General usage" Suppose you have an archive `\f(CW\*(C`pkg\-1.6.tar.gz\*(C'\fR' containing the sources for package `\f(CW\*(C`pkg\*(C'\fR' version 1.6, and a directory tree `\f(CW\*(C`pkg\-1.7\*(C'\fR' containing the sources for version 1.7. The following command will generate a patch kit that updates the 1.6 sources into their 1.7 versions: .PP .Vb 1 \& makepatch pkg\-1.6.tar.gz pkg\-1.7 > pkg\-1.6\-1.7.patch .Ve .PP To apply this script, go to the directory containing the 1.6 sources and feed the script to \fBapplypatch\fR: .PP .Vb 2 \& cd old/pkg\-1.6 \& applypatch pkg\-1.6\-1.7.patch .Ve .PP \&\fBapplypatch\fR will verify that it is executing in the right place and make all necessary updates. .PP By default, \fBmakepatch\fR will provide a few lines of progress information, for example: .PP .Vb 8 \& Extracting pkg\-1.6.tar.gz to /tmp/mp21575.d/old... \& Manifest MANIFEST for pkg\-1.6 contains 1083 files. \& Manifest MANIFEST for pkg\-1.7 contains 1292 files. \& Processing the filelists ... \& Collecting patches ... \& 266 files need to be patched. \& 216 files and 8 directories need to be created. \& 7 files need to be removed. .Ve .PP \&\fBapplypatch\fR will provide no feedback information by default. .SH "Makepatch arguments" .IX Header "Makepatch arguments" \&\fBmakepatch\fR requires two arguments: \fIold_src\fR and \fInew_src\fR. .IP "\fIold-src\fR" 4 .IX Item "old-src" This is the name of either a single file or a directory that contains copies of the older version of the target files; in other words, copies of the files \fIprior\fR to any modifications. .Sp Alternatively, it may be the name of an archive that holds the files to be processed. Allowable archive formats are gzipped tar (name ends in "\f(CW\*(C`.tar.gz\*(C'\fR\*(L" or \*(R"\f(CW\*(C`.tgz\*(C'\fR\*(L"), bzipped tar (name ends in \&\*(R"\f(CW\*(C`.tar.bz2\*(C'\fR\*(L"), plain tar (name ends in \*(R"\f(CW\*(C`.tar\*(C'\fR\*(L" and zip (name ends in \&\*(R"\f(CW\*(C`.zip\*(C'\fR"). .IP "\fInew-src\fR" 4 .IX Item "new-src" This is the name of either a single file or a directory that contains copies of the newer version of the target files; in other words, copies of the files \fIafter\fR the modifications have been made. .Sp Alternatively, it may be the name of an archive that holds the files to be processed. .PP The patch script generated by \fBmakepatch\fR will take care of creating new files and directories, update existing files, and remove files and directories that are no longer present in the \fInew-src\fR directory. .SH "MANIFEST files" .IX Header "MANIFEST files" The purpose of a manifest file is to provide the list of files that constitute a package. Manifest files are traditionally called "\f(CW\*(C`MANIFEST\*(C'\fR" and reside in the top level directory of the package. .PP Although there is no formal standard for the contents of manifest files, \fBmakepatch\fR uses the following rules: .IP "\(bu" 4 If the second line from the manifest file looks like a separator line (e.g. it is empty, or contains only dashes), it is discarded and so is the first line. .IP "\(bu" 4 Empty lines and lines that start with a \f(CW\*(C`#\*(C'\fR are ignored. .IP "\(bu" 4 If there are multiple space-separated \*(L"words\*(R" on a line, the first word is considered to be the filename. .SS "Default treatment" .IX Subsection "Default treatment" By default, \fBmakepatch\fR looks for files named "\f(CW\*(C`MANIFEST\*(C'\fR" in the top level directories of the old and the new source trees. If these files (or one of them) are found, they are used. If no manifest file could be found, the package is assumed to consist of all files in the directory. .PP The default name of the default manifest file can be modified with the command line option "\f(CW\*(C`\-automanifest\*(C'\fR", see Section \*(L"Command line options\*(R". .SS "Explicitly naming of manifest files" .IX Subsection "Explicitly naming of manifest files" Command line options "\f(CW\*(C`\-oldmanifest\*(C'\fR\*(L" and \*(R"\f(CW\*(C`\-newmanifest\*(C'\fR\*(L" can be used to explicitly designate old and new manifest files. Option \&\*(R"\f(CW\*(C`\-manifest\*(C'\fR" is a short way to set one manifest file for both the old and new source trees. .SS "Suppress manifest file processing" .IX Subsection "Suppress manifest file processing" Command line option "\f(CW\*(C`\-nomanifest\*(C'\fR" can be used to suppress all manifest file processing. The package is assumed to consist of all files in the source directories. .SH "Makepatch options" .IX Header "Makepatch options" \&\fBmakepatch\fR takes several options to control its behaviour. Options are usually specified on the command line, but \fBmakepatch\fR can take options from three sources in the following order: .IP "\(bu" 4 Environment variable \fB\s-1MAKEPATCHINIT\s0\fR. .Sp When this environment variable is set its contents are considered to be command line options that are processed upon startup. All normal options are allowed, plus one: \fB\-rcfile \fR\fIfilename\fR. Option \&\fB\-rcfile\fR can be used to specify an alternate option file, see below. .IP "\(bu" 4 Options files. .Sp \&\fBmakepatch\fR first tries to process a file named \fB/etc/makepatchrc\fR. (This is a Unix-ism.) It is okay if this file is missing. .Sp Next, \fBmakepatch\fR will process a file named \fB.makepatchrc\fR in the user's home directory, if it exists. .Sp After processing this file, \fBmakepatch\fR will process a file named \&\fB.makepatchrc\fR in the current directory, if it exists. An alternative name for this file can be specified with option \fB\-rcfile\fR in environment variable \fB\s-1MAKEPATCHINIT\s0\fR. This is the only way to specify an alternative options file name. .Sp In all option files, empty lines and lines starting with \f(CW\*(C`;\*(C'\fR or \f(CW\*(C`#\*(C'\fR are ignored. All other lines are considered to contain options exactly as if they had been supplied on the command line. .IP "\(bu" 4 The command line. .SH "Command line options" .IX Header "Command line options" Options are matched case insensitive, and may be abbreviated to uniqueness. .IP "\fB\-description\fR \fItext\fR" 4 .IX Item "-description text" Provide a descriptive text for this patch. Multiple \fB\-description\fR options may be supplied. .Sp If no description is provided, the program try to guess one. This is usually possible if both directories are simple names, e.g. \&'\f(CW\*(C`pkg\-1.16\*(C'\fR'. If no description can be determined, the program will ask for one. .IP "\fB\-diff\fR \fIcmd\fR" 4 .IX Item "-diff cmd" If specified, \fIcmd\fR is the command to be used to generate the differences between the two versions of the files. If not specified, this command defaults to "\f(CW\*(C`diff \-c\*(C'\fR". .Sp For best results, only use "\f(CW\*(C`diff \-c\*(C'\fR\*(L" or \*(R"\f(CW\*(C`diff \-u\*(C'\fR". In any case, it \fBmust\fR produce either context or unified diff output. .IP "\fB\-patchlevel\fR \fIpfile\fR" 4 .IX Item "-patchlevel pfile" If specified, \fIpfile\fR indicates an alternate file that is to be used in lieu of "\fBpatchlevel.h\fR". .IP "\fB\-automanifest\fR \fImfile\fR" 4 .IX Item "-automanifest mfile" \&\fBmakepatch\fR will automatically use manifest files of the given name if they appear in the directories. The default name is "\fB\s-1MANIFEST\s0\fR". .IP "\fB\-nomanifest\fR" 4 .IX Item "-nomanifest" Suppress using manifest files. .IP "\fB\-manifest\fR \fImfile\fR" 4 .IX Item "-manifest mfile" If specified, \fImfile\fR indicates the name of the manifest file which consists of a list of the files contained in both the \fIold\fR and the \fInew\fR directories. .IP "\fB\-oldmanifest\fR \fIomfile\fR" 4 .IX Item "-oldmanifest omfile" If specified, \fIomfile\fR indicates the name of the manifest file which consists of a list of the files contained in the \fIold\fR directory. This option is designed to be used in conjunction with the \&\fB\-newmanifest\fR option. Note that the \fIold\fR and \fInew\fR directories must still be indicated. .IP "\fB\-newmanifest\fR \fInmfile\fR" 4 .IX Item "-newmanifest nmfile" If specified, \fInmfile\fR indicates the name of the manifest file which consists of a list of the files contained in the \fInew\fR directory. This option is designed to be used in conjunction with the \&\fB\-oldmanifest\fR option. Note that the \fIold\fR and \fInew\fR directories must still be indicated. .IP "\fB\-\fR[\fBno\fR]\fBrecurse\fR" 4 .IX Item "-[no]recurse" \&\fBmakepatch\fR recurses through directories by default. Option \&\fB\-norecurse\fR prevents recursion beyond the initial directories. .IP "\fB\-\fR[\fBno\fR]\fBfollow\fR" 4 .IX Item "-[no]follow" If set, symbolic links to directories are traversed as if they were real directories. .IP "\fB\-infocmd\fR \fIcommand\fR" 4 .IX Item "-infocmd command" If specified, the output of running \fIcommand\fR will be added before each patch chunk. \fIcommand\fR will undergo the following substitutions first: \f(CW%oP\fR will be replaced by the name of the old file, \f(CW%nP\fR will be replaced by the name of the new file. \f(CW\*(C`%%\*(C'\fR will be replaced by a single \f(CW\*(C`%\*(C'\fR; other \f(CW\*(C`%\*(C'\fR sequences may be added in future versions. When a new file is being created, the name of the new file will be supplied for both \f(CW%oP\fR and \f(CW%nP\fR. .Sp Note that \f(CW%oP\fR and \f(CW%nP\fR are modeled after the \f(CW\*(C`%\*(C'\fR sequences of \&\fBfind \-printf\fR. .IP "\fB\-exclude\fR \fIpattern\fR" 4 .IX Item "-exclude pattern" If specified, files that match the shell pattern \fIpattern\fR will be excluded. Only wildcard characters \f(CW\*(C`*\*(C'\fR and \f(CW\*(C`?\*(C'\fR, and character classes \f(CW\*(C`[...]\*(C'\fR are handled. Multiple \fB\-exclude\fR options may be supplied. .IP "\fB\-exclude\-regex\fR \fIpattern\fR" 4 .IX Item "-exclude-regex pattern" If specified, files and directories that match the Perl regular expression pattern \fIpattern\fR will be excluded. Multiple \fB\-exclude\-regex\fR options may be supplied. .IP "\fB\-\fR[\fBno\fR]\fBexclude-standard\fR" 4 .IX Item "-[no]exclude-standard" Set by default. If set, a common set of files and directories are ignored. .Sp See also section \*(L"Standard Exclude Patterns\*(R". .IP "\fB\-\fR[\fBno\fR]\fBexclude-cvs\fR" 4 .IX Item "-[no]exclude-cvs" If set, files and directories that are usually part of version control system \s-1CVS\s0 are excluded. .Sp Also, \f(CW\*(C`.cvsignore\*(C'\fR files are honoured just like \s-1CVS\s0 does it. .Sp See also section \*(L"Standard Exclude Patterns\*(R". .IP "\fB\-\fR[\fBno\fR]\fBexclude-rcs\fR" 4 .IX Item "-[no]exclude-rcs" If set, files and directories that are usually part of version control system \s-1RCS\s0 are excluded. .Sp See also section \*(L"Standard Exclude Patterns\*(R". .IP "\fB\-\fR[\fBno\fR]\fBexclude-sccs\fR" 4 .IX Item "-[no]exclude-sccs" If set, files and directories that are usually part of version control system \s-1SCCS\s0 are excluded. .Sp See also section \*(L"Standard Exclude Patterns\*(R". .IP "\fB\-\fR[\fBno\fR]\fBexclude-vc\fR" 4 .IX Item "-[no]exclude-vc" Short for (re)setting \fB\-exclude\-rcs\fR, \fB\-exclude\-cvs\fR, and \&\fB\-exclude\-sccs\fR. .IP "\fB\-\fR[\fBno\fR]\fBignore-cvs-keywords\fR" 4 .IX Item "-[no]ignore-cvs-keywords" Differences in \s-1CVS\s0 keyword data (e.g. \f(CW\*(C`Id\*(C'\fR, \f(CW\*(C`Header\*(C'\fR, \f(CW\*(C`Revision\*(C'\fR) are ignored, provided there are no other differences in the same hunk. This option passes a very hairy regex to the \&\fB\-\-ignore\-matching\-lines\fR option of the \fIdiff\fR program, and hence requires \s-1GNU \s0\fIdiff\fR. This restriction may be lifted in a future version. .IP "\fB\-\fR[\fBno\fR]\fBignore-rcs-keywords\fR" 4 .IX Item "-[no]ignore-rcs-keywords" Same as \fB\-\fR[\fBno\fR]\fBignore-cvs-keywords\fR. .IP "\fB\-extract\fR \fIpattern\fR\fB=\fR\fIcommand\fR" 4 .IX Item "-extract pattern=command" Define additional extraction rules for archives. If the name of the source or destination matches the Perl \fIpattern\fR, the \fIcommand\fR is executed with the archive on standard input and the current directory set to the location where the files must be extracted. Multiple \&\fB\-extract\fR options may be supplied. User defined rules override built-in rules. .Sp Builtin rules are: .Sp .Vb 4 \& .+\e.(tar\e.gz|tgz) => "gzip \-d | tar xpf \-" \& .+\e.(tar\e.bz2) => "bzip2 \-d | tar xpf \-" \& .+\e.tar => "tar xf \-" \& .+\e.zip => "unzip \-" .Ve .Sp The patterns are implicitly anchored to the begin and end of the filename. .IP "\fB\-\fR[\fBno\fR]\fBident\fR" 4 .IX Item "-[no]ident" If set, the program name and version is reported. .IP "\fB\-\fR[\fBno\fR]\fBverbose\fR" 4 .IX Item "-[no]verbose" This is set by default, making \fBmakepatch\fR display information concerning its activity to \fIstderr\fR. .IP "\fB\-\fR[\fBno\fR]\fBquiet\fR" 4 .IX Item "-[no]quiet" The opposite of \fB\-verbose\fR. If set, this instructs \fBmakepatch\fR to suppress the display of activity information. .IP "\fB\-\fR[\fBno\fR]\fBhelp\fR" 4 .IX Item "-[no]help" If set, this causes a short help message to be displayed, after which the program immediately exits. .SH "Standard Exclude Patterns" .IX Header "Standard Exclude Patterns" The following file patterns are always excluded: .PP .Vb 4 \& *~ *.a *.bak *.BAK *.elc *.exe *.gz *.ln *.o *.obj \& *.olb *.old *.orig *.rej *.so *.Z \& .del\-* .make.state .nse_depinfo core \& tags TAGS .Ve .PP Option \fB\-exclude\-sccs\fR adds: .PP .Vb 1 \& p.* s.* SCCS .Ve .PP Option \fB\-exclude\-rcs\fR adds: .PP .Vb 1 \& ,* *,v RCS RCSLOG .Ve .PP Option \fB\-exclude\-cvs\fR adds \f(CW\*(C`.cvsignore\*(C'\fR patterns, and: .PP .Vb 1 \& .#* #* _$* *$ CVS CVS.adm cvslog.* .Ve .PP Please let me know if I missed some. .SH "Environment variables" .IX Header "Environment variables" .IP "\s-1MAKEPATCHINIT\s0" 4 .IX Item "MAKEPATCHINIT" When this environment variable is set its contents is considered to be command line options that are processed upon startup. All normal options are allowed, plus one: \fB\-rcfile \fR\fIfilename\fR. If \fB\-rcfile\fR is specified, the file is read and all lines of it are considered to contain option settings as described in section \*(L"Makepatch options\*(R". .IP "\s-1TMPDIR\s0" 4 .IX Item "TMPDIR" \&\f(CW\*(C`TMPDIR\*(C'\fR can be used to designate the area where temporary files are placed. It defaults to \f(CW\*(C`/tmp\*(C'\fR. .IP "\s-1TEMP\s0" 4 .IX Item "TEMP" \&\f(CW\*(C`TEMP\*(C'\fR can be used as an alternative to \f(CW\*(C`TMPDIR\*(C'\fR. .SH "Examples" .IX Header "Examples" Suppose you have a directory tree `\f(CW\*(C`pkg\-1.6\*(C'\fR' containing the sources for package `\f(CW\*(C`pkg\*(C'\fR' version 1.6, and a directory tree `\f(CW\*(C`pkg\-1.7\*(C'\fR' containing the sources for version 1.7. The following command will generate a patch kit that updates the 1.6 sources into their 1.7 versions: .PP .Vb 1 \& makepatch pkg\-1.6 pkg\-1.7 > pkg\-1.6\-1.7.patch .Ve .PP To apply this script, go to the pkg\-1.6 directory and feed the script to \fBapplypatch\fR: .PP .Vb 2 \& cd old/pkg\-1.6 \& applypatch pkg\-1.6\-1.7.patch .Ve .PP \&\fBapplypatch\fR will verify that it is executing in the right place and make all necessary updates. .PP This is one way to generate and use manifest files: .PP .Vb 1 \& (cd pkg\-1.6; find . \-type f \-print > OLDMANIFEST) \& \& (cd pkg\-1.7; find . \-type f \-print > NEWMANIFEST) \& \& makepatch \e \& \-oldmanifest pkg\-1.6/OLDMANIFEST \e \& \-newmanifest pkg\-1.7/NEWMANIFEST \e \& pkg\-1.6 pkg\-1.7 > pkg\-1.6\-1.7.diff .Ve .SH "Bugs and restrictions" .IX Header "Bugs and restrictions" Much of the job of \fBmakepatch\fR is processing file names. \fBmakepatch\fR has been tested extensively on Unix systems, but it is not guaranteed to work on other systems. .PP \&\fBapplypatch\fR is repeatedly reported to correctly process \fBmakepatch\fR generated patch kits on modern 32\-bit Windows systems as well. .PP \&\fBmakepatch\fR does not know about symbolic links. These will be treated like plain files. .PP Wrong results can be generated if the file lists that are used or generated use different path separators. .SH "SEE ALSO" .IX Header "SEE ALSO" \&\fBapplypatch\fR(1), \&\fBdiff\fR(1), \&\fBpatch\fR(1), \&\fBperl\fR(1), \&\fBrm\fR(1). .SH "AUTHOR AND CREDITS" .IX Header "AUTHOR AND CREDITS" Johan Vromans (jvromans@squirrel.nl) wrote the program, with a little help and inspiration from: Jeffery Small, Ulrich Pfeifer, Nigel Metheringham, Julian Yip, Tim Bunce, Gurusamy Sarathy, Hugo van der Sanden, Rob Browning, Joshua Pritikin, and others. .SH "COPYRIGHT AND DISCLAIMER" .IX Header "COPYRIGHT AND DISCLAIMER" This program is Copyright 1992,2004,2006 by Squirrel Consultancy. All rights reserved. .PP This program is free software; you can redistribute it and/or modify it under the terms of either: a) the \s-1GNU\s0 General Public License as published by the Free Software Foundation; either version 1, or (at your option) any later version, or b) the \*(L"Artistic License\*(R" which comes with Perl. .PP This program is distributed in the hope that it will be useful, but \&\s-1WITHOUT ANY WARRANTY\s0; without even the implied warranty of \&\s-1MERCHANTABILITY\s0 or \s-1FITNESS FOR A PARTICULAR PURPOSE.\s0 See either the \&\s-1GNU\s0 General Public License or the Artistic License for more details.