Wed Feb 2 10:36:20 2011 UTC ()
Clarify my license.


(wiz)
diff -r1.4 -r1.5 pkgsrc/pkgtools/pkgdiff/files/mkpatches.1
diff -r1.4 -r1.5 pkgsrc/pkgtools/pkgdiff/files/patchdiff.1
diff -r1.18 -r1.19 pkgsrc/pkgtools/pkgdiff/files/pkgdiff

cvs diff -r1.4 -r1.5 pkgsrc/pkgtools/pkgdiff/files/mkpatches.1 (switch to unified diff)

--- pkgsrc/pkgtools/pkgdiff/files/mkpatches.1 2011/02/02 10:23:02 1.4
+++ pkgsrc/pkgtools/pkgdiff/files/mkpatches.1 2011/02/02 10:36:20 1.5
@@ -1,60 +1,81 @@ @@ -1,60 +1,81 @@
1.\" $NetBSD: mkpatches.1,v 1.4 2011/02/02 10:23:02 wiz Exp $ 1.\" $NetBSD: mkpatches.1,v 1.5 2011/02/02 10:36:20 wiz Exp $
2.\" 2.\"
3.\" Copyright (c) 2000-2011 by Thomas Klausner <wiz@NetBSD.org> 3.\" Copyright (c) 2000-2011 by Thomas Klausner <wiz@NetBSD.org>
4.\" All Rights Reserved. Absolutely no warranty. 4.\" All rights reserved.
 5.\"
 6.\" Redistribution and use in source and binary forms, with or without
 7.\" modification, are permitted provided that the following conditions
 8.\" are met:
 9.\" 1. Redistributions of source code must retain the above copyright
 10.\" notice, this list of conditions and the following disclaimer.
 11.\" 2. Redistributions in binary form must reproduce the above copyright
 12.\" notice, this list of conditions and the following disclaimer in the
 13.\" documentation and/or other materials provided with the distribution.
 14.\"
 15.\" THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
 16.\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
 17.\" TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
 18.\" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
 19.\" BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
 20.\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
 21.\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
 22.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
 23.\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
 24.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 25.\" POSSIBILITY OF SUCH DAMAGE.
5.\" 26.\"
6.Dd January 31, 2011 27.Dd January 31, 2011
7.Dt MKPATCHES 1 28.Dt MKPATCHES 1
8.Os 29.Os
9.Sh NAME 30.Sh NAME
10.Nm mkpatches 31.Nm mkpatches
11.Nd create patch files appropriate for pkgsrc 32.Nd create patch files appropriate for pkgsrc
12.Sh SYNOPSIS 33.Sh SYNOPSIS
13.Nm 34.Nm
14.Oo Fl c | Fl r Oc 35.Oo Fl c | Fl r Oc
15.Op Fl hv 36.Op Fl hv
16.Sh DESCRIPTION 37.Sh DESCRIPTION
17.Nm 38.Nm
18is a perl script that simplifies creating patches from a changed work 39is a perl script that simplifies creating patches from a changed work
19tree if for each changed file the original was kept with an added 40tree if for each changed file the original was kept with an added
20extension 41extension
21.Dq .orig . 42.Dq .orig .
22.Pp 43.Pp
23.Nm 44.Nm
24must be called from the package's main directory, that is 45must be called from the package's main directory, that is
25.Pa ${PKGSRC}/category/program . 46.Pa ${PKGSRC}/category/program .
26It then proceeds to find all files that 47It then proceeds to find all files that
27match the pattern 48match the pattern
28.Dq *.orig . 49.Dq *.orig .
29Each of these is then compared to the 50Each of these is then compared to the
30changed file of the same name (with no 51changed file of the same name (with no
31.Dq .orig 52.Dq .orig
32extension) using 53extension) using
33.Xr pkgdiff 1 . 54.Xr pkgdiff 1 .
34.Pp 55.Pp
35The resulting patches are saved in the package's patches directory 56The resulting patches are saved in the package's patches directory
36(usually 57(usually
37.Pa patches/ ) 58.Pa patches/ )
38and can be easily compared to the currently existing set using 59and can be easily compared to the currently existing set using
39.Xr patchdiff 1 60.Xr patchdiff 1
40or 61or
41.Ic "cvs diff" . 62.Ic "cvs diff" .
42.Pp 63.Pp
43Supported options are: 64Supported options are:
44.Bl -tag -width 3n 65.Bl -tag -width 3n
45.It Fl c 66.It Fl c
46Clean up backup patches of previous runs. 67Clean up backup patches of previous runs.
47Use this after you're finished working on the patch set and committed 68Use this after you're finished working on the patch set and committed
48it. 69it.
49.It Fl h 70.It Fl h
50Show a short usage. 71Show a short usage.
51.It Fl r 72.It Fl r
52Revert the changes. 73Revert the changes.
53Removes the new patches and puts the original patches back. 74Removes the new patches and puts the original patches back.
54.It Fl v 75.It Fl v
55More verbose output. 76More verbose output.
56.El 77.El
57.Sh SEE ALSO 78.Sh SEE ALSO
58.Xr cvs 1 , 79.Xr cvs 1 ,
59.Xr patchdiff 1 , 80.Xr patchdiff 1 ,
60.Xr pkgdiff 1 81.Xr pkgdiff 1

cvs diff -r1.4 -r1.5 pkgsrc/pkgtools/pkgdiff/files/patchdiff.1 (switch to unified diff)

--- pkgsrc/pkgtools/pkgdiff/files/patchdiff.1 2011/02/02 10:23:02 1.4
+++ pkgsrc/pkgtools/pkgdiff/files/patchdiff.1 2011/02/02 10:36:20 1.5
@@ -1,33 +1,54 @@ @@ -1,33 +1,54 @@
1.\" $NetBSD: patchdiff.1,v 1.4 2011/02/02 10:23:02 wiz Exp $ 1.\" $NetBSD: patchdiff.1,v 1.5 2011/02/02 10:36:20 wiz Exp $
2.\" 2.\"
3.\" Copyright (c) 2000-2011 by Thomas Klausner <wiz@NetBSD.org> 3.\" Copyright (c) 2000-2011 by Thomas Klausner <wiz@NetBSD.org>
4.\" All Rights Reserved. Absolutely no warranty. 4.\" All rights reserved.
 5.\"
 6.\" Redistribution and use in source and binary forms, with or without
 7.\" modification, are permitted provided that the following conditions
 8.\" are met:
 9.\" 1. Redistributions of source code must retain the above copyright
 10.\" notice, this list of conditions and the following disclaimer.
 11.\" 2. Redistributions in binary form must reproduce the above copyright
 12.\" notice, this list of conditions and the following disclaimer in the
 13.\" documentation and/or other materials provided with the distribution.
 14.\"
 15.\" THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
 16.\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
 17.\" TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
 18.\" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
 19.\" BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
 20.\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
 21.\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
 22.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
 23.\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
 24.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 25.\" POSSIBILITY OF SUCH DAMAGE.
5.\" 26.\"
6.Dd January 31, 2011 27.Dd January 31, 2011
7.Dt PATCHDIFF 1 28.Dt PATCHDIFF 1
8.Os 29.Os
9.Sh NAME 30.Sh NAME
10.Nm patchdiff 31.Nm patchdiff
11.Nd compare sets of patches 32.Nd compare sets of patches
12.Sh SYNOPSIS 33.Sh SYNOPSIS
13.Nm 34.Nm
14.Sh DESCRIPTION 35.Sh DESCRIPTION
15.Nm 36.Nm
16is a perl script that simplifies comparing a set of previously 37is a perl script that simplifies comparing a set of previously
17existing patches with a new one created with 38existing patches with a new one created with
18.Xr mkpatches 1 . 39.Xr mkpatches 1 .
19.Pp 40.Pp
20.Nm 41.Nm
21must be called from the package's main directory, that is 42must be called from the package's main directory, that is
22.Pa ${PKGSRC}/category/program . 43.Pa ${PKGSRC}/category/program .
23For each patch existing in either the 44For each patch existing in either the
24.Pa patches 45.Pa patches
25directory, it is compared with its backup file 46directory, it is compared with its backup file
26.Pq Pa patch-foo.orig 47.Pq Pa patch-foo.orig
27using 48using
28.Xr diff 1 . 49.Xr diff 1 .
29If no relevant differences are found, the original patch is restored. 50If no relevant differences are found, the original patch is restored.
30.Sh SEE ALSO 51.Sh SEE ALSO
31.Xr diff 1 , 52.Xr diff 1 ,
32.Xr patchdiff 1 , 53.Xr patchdiff 1 ,
33.Xr pkgdiff 1 54.Xr pkgdiff 1

cvs diff -r1.18 -r1.19 pkgsrc/pkgtools/pkgdiff/files/pkgdiff (switch to unified diff)

--- pkgsrc/pkgtools/pkgdiff/files/pkgdiff 2011/02/02 10:23:02 1.18
+++ pkgsrc/pkgtools/pkgdiff/files/pkgdiff 2011/02/02 10:36:20 1.19
@@ -1,72 +1,95 @@ @@ -1,72 +1,95 @@
1#!@SH@ 1#!@SH@
2# 2#
3# $NetBSD: pkgdiff,v 1.18 2011/02/02 10:23:02 wiz Exp $ 3# $NetBSD: pkgdiff,v 1.19 2011/02/02 10:36:20 wiz Exp $
4# 4#
5# Usage: pkgdiff newfile 5# Usage: pkgdiff newfile
6# pkgdiff oldfile newfile 6# pkgdiff oldfile newfile
7# 7#
8# Will output a patch ready for the NetBSD Pkgs Collection (unified 8# Will output a patch ready for the NetBSD Pkgs Collection (unified
9# diff, plus no RCS IDs if possible). If only newfile is given, 9# diff, plus no RCS IDs if possible). If only newfile is given,
10# oldfile is assumed as newfile.orig. 10# oldfile is assumed as newfile.orig.
11# 11#
12# Copyright (c) 2000 by Hubert Feyrer <hubertf@netbsd.org> 
13# Copyright (c) 2011 by Thomas Klausner <wiz@NetBSD.org> 12# Copyright (c) 2011 by Thomas Klausner <wiz@NetBSD.org>
 13# All rights reserved.
 14#
 15# Redistribution and use in source and binary forms, with or without
 16# modification, are permitted provided that the following conditions
 17# are met:
 18# 1. Redistributions of source code must retain the above copyright
 19# notice, this list of conditions and the following disclaimer.
 20# 2. Redistributions in binary form must reproduce the above copyright
 21# notice, this list of conditions and the following disclaimer in the
 22# documentation and/or other materials provided with the distribution.
 23#
 24# THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
 25# ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
 26# TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
 27# PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
 28# BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
 29# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
 30# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
 31# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
 32# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
 33# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 34# POSSIBILITY OF SUCH DAMAGE.
 35#
 36# Copyright (c) 2000 by Hubert Feyrer <hubertf@netbsd.org>
14# All Rights Reserved. Absolutely no warranty.  37# All Rights Reserved. Absolutely no warranty.
15# 38#
16 39
17# Ensure we always use the same timezone to avoid spurious metadata diffs 40# Ensure we always use the same timezone to avoid spurious metadata diffs
18export TZ=UTC 41export TZ=UTC
19 42
20if [ $# -le 1 ] 43if [ $# -le 1 ]
21then 44then
22 if [ -f "$1.orig" ]; then  45 if [ -f "$1.orig" ]; then
23 old="$1.orig" 46 old="$1.orig"
24 new="$1" 47 new="$1"
25 else 48 else
26 echo $0: need at least one argument >&2 49 echo $0: need at least one argument >&2
27 exit 1; 50 exit 1;
28 fi 51 fi
29else 52else
30 old="$1" 53 old="$1"
31 new="$2" 54 new="$2"
32fi 55fi
33basename_new="`basename $new`" 56basename_new="`basename $new`"
34 57
35dodiff() { 58dodiff() {
36 case x"$basename_new" in 59 case x"$basename_new" in
37 xconfigure) 60 xconfigure)
38 @DIFF@ -I '\(echo .*as_me:[0-9][0-9]*:\|echo .*configure:[0-9][0-9]*:\|line [0-9][0-9]* "configure\)' -I '\(Avoid regenerating within pkgsrc\|exit 0\)' $* 61 @DIFF@ -I '\(echo .*as_me:[0-9][0-9]*:\|echo .*configure:[0-9][0-9]*:\|line [0-9][0-9]* "configure\)' -I '\(Avoid regenerating within pkgsrc\|exit 0\)' $*
39 ;; 62 ;;
40 xMakefile*) 63 xMakefile*)
41 @DIFF@ -I '\(localedir.*=.*localedir\|localedir.*=.*share/locale\)' $* 64 @DIFF@ -I '\(localedir.*=.*localedir\|localedir.*=.*share/locale\)' $*
42 ;; 65 ;;
43 *) 66 *)
44 @DIFF@ $* 67 @DIFF@ $*
45 esac 68 esac
46} 69}
47 70
48case x"$PKGDIFF_FMT" in x) 71case x"$PKGDIFF_FMT" in x)
49lines=3 72lines=3
50PKGDIFF_FMT="-p" 73PKGDIFF_FMT="-p"
51while [ `dodiff "$PKGDIFF_FMT" -U $lines "$old" "$new" | egrep -c '\\$(NetBSD|Author|Date|Header|Id|Locker|Log|Name|RCSfile|Revision|Source|State)(:.*)?\\$'` != 0 ] 74while [ `dodiff "$PKGDIFF_FMT" -U $lines "$old" "$new" | egrep -c '\\$(NetBSD|Author|Date|Header|Id|Locker|Log|Name|RCSfile|Revision|Source|State)(:.*)?\\$'` != 0 ]
52do 75do
53 lines=`expr $lines - 1` 76 lines=`expr $lines - 1`
54 if [ $lines = 0 ]; then 77 if [ $lines = 0 ]; then
55 echo "Cannot strip away RCS IDs, please handle manually!" >&2 78 echo "Cannot strip away RCS IDs, please handle manually!" >&2
56 exit 1 79 exit 1
57 fi 80 fi
58done 81done
59PKGDIFF_FMT="${PKGDIFF_FMT} -U $lines" 82PKGDIFF_FMT="${PKGDIFF_FMT} -U $lines"
60;; 83;;
61esac # PKGDIFF_FMT unset or null 84esac # PKGDIFF_FMT unset or null
62 85
63if dodiff -q "$PKGDIFF_FMT" "$old" "$new" > /dev/null 86if dodiff -q "$PKGDIFF_FMT" "$old" "$new" > /dev/null
64then 87then
65 : 88 :
66else 89else
67 echo '$'NetBSD'$' 90 echo '$'NetBSD'$'
68 echo '' 91 echo ''
69 # Strip out the date on the +++ line to reduce needless 92 # Strip out the date on the +++ line to reduce needless
70 # differences in regenerated patches 93 # differences in regenerated patches
71 dodiff "$PKGDIFF_FMT" "$old" "$new" | sed -e 's:^\(+++ [^ ]*\) .*:\1:' 94 dodiff "$PKGDIFF_FMT" "$old" "$new" | sed -e 's:^\(+++ [^ ]*\) .*:\1:'
72fi 95fi