summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--pkgtools/pkgdiff/Makefile11
-rw-r--r--pkgtools/pkgdiff/PLIST5
-rw-r--r--pkgtools/pkgdiff/files/feedback-patches72
-rw-r--r--pkgtools/pkgdiff/files/feedback-patches.059
-rw-r--r--pkgtools/pkgdiff/files/feedback-patches.1100
5 files changed, 241 insertions, 6 deletions
diff --git a/pkgtools/pkgdiff/Makefile b/pkgtools/pkgdiff/Makefile
index fa99a48d03a..8cf905594a5 100644
--- a/pkgtools/pkgdiff/Makefile
+++ b/pkgtools/pkgdiff/Makefile
@@ -1,14 +1,14 @@
-# $NetBSD: Makefile,v 1.51 2004/10/27 01:27:31 wiz Exp $
+# $NetBSD: Makefile,v 1.52 2004/11/23 22:00:48 hubertf Exp $
#
-DISTNAME= pkgdiff-0.115
+DISTNAME= pkgdiff-0.116
CATEGORIES= pkgtools devel
MASTER_SITES= # empty
DISTFILES= # empty
MAINTAINER= wiz@NetBSD.org
HOMEPAGE= ftp://ftp.NetBSD.org/pub/NetBSD/packages/pkgsrc/Packages.txt
-COMMENT= Tools to ease creating and maintaining patches for pkgsrc
+COMMENT= Tools to create, maintain and send back patches for pkgsrc
PKG_INSTALLATION_TYPES= overwrite pkgviews
@@ -57,8 +57,9 @@ do-build:
< ${FILESDIR}/pkgdiff \
> ${WRKSRC}/pkgdiff
${CP} ${FILESDIR}/pkgvi ${WRKSRC}
+ ${CP} ${FILESDIR}/feedback-patches ${WRKSRC}
.if !empty(MANINSTALL:Mcatinstall)
-. for FILE in mkpatches patchdiff pkgdiff pkgvi
+. for FILE in mkpatches patchdiff pkgdiff pkgvi feedback-patches
. if ${OPSYS} == "SunOS" || ${OPSYS} == "AIX"
nroff -man ${FILESDIR}/${FILE}.1 >${WRKSRC}/${FILE}.0
. else
@@ -68,7 +69,7 @@ do-build:
.endif
do-install:
-.for FILE in mkpatches patchdiff pkgdiff pkgvi
+.for FILE in mkpatches patchdiff pkgdiff pkgvi feedback-patches
${INSTALL_SCRIPT} ${WRKSRC}/${FILE} ${PREFIX}/bin
. if !empty(MANINSTALL:Mcatinstall)
${INSTALL_MAN} ${WRKSRC}/${FILE}.0 ${PREFIX}/man/cat1
diff --git a/pkgtools/pkgdiff/PLIST b/pkgtools/pkgdiff/PLIST
index 1ac34dbe8b8..d2d40a2b440 100644
--- a/pkgtools/pkgdiff/PLIST
+++ b/pkgtools/pkgdiff/PLIST
@@ -1,12 +1,15 @@
-@comment $NetBSD: PLIST,v 1.1 2001/10/31 21:31:42 zuntum Exp $
+@comment $NetBSD: PLIST,v 1.2 2004/11/23 22:00:48 hubertf Exp $
+bin/feedback-patches
bin/mkpatches
bin/patchdiff
bin/pkgdiff
bin/pkgvi
+man/cat1/feedback-patches.0
man/cat1/mkpatches.0
man/cat1/patchdiff.0
man/cat1/pkgdiff.0
man/cat1/pkgvi.0
+man/man1/feedback-patches.1
man/man1/mkpatches.1
man/man1/patchdiff.1
man/man1/pkgdiff.1
diff --git a/pkgtools/pkgdiff/files/feedback-patches b/pkgtools/pkgdiff/files/feedback-patches
new file mode 100644
index 00000000000..cb566892523
--- /dev/null
+++ b/pkgtools/pkgdiff/files/feedback-patches
@@ -0,0 +1,72 @@
+#!/bin/sh
+#
+# Send back NetBSD patches
+#
+
+PKGSRCBASE=/usr/pkgsrc
+
+pkg_f=$1
+to=$2
+
+if [ "$pkg_f" = "." ]
+then
+ pkg_f=`pwd`
+fi
+
+if [ "$pkg_f" = "" ]
+then
+ echo "Usage: $0 category/pkg [maintainer@software.org]"
+ exit 1
+fi
+
+pkg=`echo $pkg_f | sed -e 's,.*/pkgsrc/,,' -e 's,/$,,'`
+cd $PKGSRCBASE/$pkg
+
+if [ ! -d patches -o `ls patches 2>/dev/null | grep -v orig | grep -v BAK | wc -l` -eq 0 ]
+then
+ echo '***' Package $pkg has no patches, exiting.
+ exit 0
+fi
+
+pkgname=`make show-var VARNAME=PKGNAME | sed -e 's,nb.*$,,'`
+
+
+tmp=`mktemp -t feedback-patches`
+
+(
+cat <<EOTXT
+Hi!
+
+below you will find some patches against $pkgname that are
+currently part of the NetBSD Packages Collection, pkgsrc, to get your
+software build properly on NetBSD and maybe some other platforms. We'd
+be pleased if you could include as much of these patches into your next
+release as possible, thanks!
+
+FWIW, your software has a webpage at the NetBSD site, see
+
+ http://www.NetBSD.org/packages/$pkg/README.html
+
+See http://www.NetBSD.org/Documentation/software/packages.html
+to learn more about the NetBSD Packages Collection, to find out
+more about the NetBSD operating system, see http://www.NetBSD.org/.
+
+
+--- 8X --- 8X --- 8X --- 8X --- 8X --- 8X --- 8X --- 8X --- 8X --- 8X ---
+
+EOTXT
+
+find $PKGSRCBASE/$pkg/patches/. -type f -print \
+| grep -v CVS | xargs cat
+) >$tmp
+
+if [ "$to" = "" ]
+then
+ cat $tmp
+ rm $tmp
+else
+ echo Mailing patches for $pkgname...
+ cat $tmp | mail -v -s "Patches for $pkgname" $to
+ rm $tmp
+ echo done.
+fi
diff --git a/pkgtools/pkgdiff/files/feedback-patches.0 b/pkgtools/pkgdiff/files/feedback-patches.0
new file mode 100644
index 00000000000..949955aa3b0
--- /dev/null
+++ b/pkgtools/pkgdiff/files/feedback-patches.0
@@ -0,0 +1,59 @@
+FEEDBACK-PATCHES(1) NetBSD General Commands Manual FEEDBACK-PATCHES(1)
+
+NNAAMMEE
+ ffeeeeddbbaacckk--ppaattcchheess - help sending pkgsrc patches back
+
+SSYYNNOOPPSSIISS
+ ffeeeeddbbaacckk--ppaattcchheess _c_a_t_e_g_o_r_y_/_p_k_g [maintainer@software.org]
+
+DDEESSCCRRIIPPTTIIOONN
+ The ffeeeeddbbaacckk--ppaattcchheess script is intended to help sending back patches in
+ the NetBSD Packages Collection, pkgsrc, back to the maintainers of the
+ original package, for inclusion into future releases. The given
+ _c_a_t_e_g_o_r_y_/_p_k_g is either a path relative to the pkgsrc base directory, or
+ an absolute patch, which will be stripped the base directory. A pathname
+ of _. will be expanded to the current directory, which is useful when the
+ current working directory is in a package's directory in pkgsrc.
+
+ If an email address is given, the patches will be sent to that address,
+ with some nice words. If no email address is given, the mail will only be
+ displayed instead of sent.
+
+EEXXAAMMPPLLEESS
+ The command:
+
+ feedback-patches audio/gqmpeg
+
+ will display a mail that can be sent to the gqmpeg people with patches to
+ include.
+
+ feedback-patches somecat/dunno whoever@foobar.baz
+
+ will invoke mail(1) to send the patches back immediately.
+
+ feedback-patches /usr/pkgsrc/somecat/dunno whoever@foobar.baz
+
+ works just as well, you can use either full path or path relative to
+ pkgsrc base when specifying a package. As you're usually already in the
+ pkg's directory for finding out the contact address (probably by looking
+ at the HOMEPAGE variable in the pkg's Makefile), you can also do:
+
+ cd .../category/pkg
+ feedback-patches `pwd` whoever@foobar.baz
+
+ or
+
+ cd .../category/pkg
+ feedback-patches . whoever@foobar.baz
+
+SSEEEE AALLSSOO
+ pkgdiff(1), mkpatches(1)
+
+AAUUTTHHOORRSS
+ The feedback-patches utility was written by Hubert Feyrer
+ <hubertf@NetBSD.org>.
+
+BBUUGGSS
+ Currently the pkgsrc base directory is hardcoded to _/_u_s_r_/_p_k_g_s_r_c.
+
+NetBSD 2.0_BETA Sep 29, 2003 NetBSD 2.0_BETA
diff --git a/pkgtools/pkgdiff/files/feedback-patches.1 b/pkgtools/pkgdiff/files/feedback-patches.1
new file mode 100644
index 00000000000..5fd97f9842d
--- /dev/null
+++ b/pkgtools/pkgdiff/files/feedback-patches.1
@@ -0,0 +1,100 @@
+.\" $NetBSD: feedback-patches.1,v 1.1 2004/11/23 22:00:48 hubertf Exp $
+.\"
+.\" Copyright (c) 2003 Hubert Feyrer. All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\" 3. All advertising materials mentioning features or use of this software
+.\" must display the following acknowledgement:
+.\" This product includes software developed by Hubert Feyrer
+.\" for the NetBSD Project
+.\" 4. The name of the author may not be used to endorse or promote products
+.\" derived from this software without specific prior written permission.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.Dd Sep 29, 2003
+.Dt FEEDBACK-PATCHES 1
+.Os
+.Sh NAME
+.Nm feedback-patches
+.Nd "help sending pkgsrc patches back"
+.Sh SYNOPSIS
+.Nm
+.Ar category/pkg
+.Op maintainer@software.org
+.Sh DESCRIPTION
+The
+.Nm
+script is intended to help sending back patches in the
+NetBSD Packages Collection, pkgsrc, back to the maintainers
+of the original package, for inclusion into future releases.
+The given
+.Pa category/pkg
+is either a path relative to the pkgsrc base directory,
+or an absolute patch, which will be stripped the base
+directory.
+A pathname of
+.Pa \&.
+will be expanded to the current directory, which is useful
+when the current working directory is in a package's
+directory in pkgsrc.
+.Pp
+If an email address is given, the patches will be sent to that
+address, with some nice words. If no email address is given,
+the mail will only be displayed instead of sent.
+.Sh EXAMPLES
+The command:
+.Pp
+.Dl feedback-patches audio/gqmpeg
+.Pp
+will display a mail that can be sent to the gqmpeg people
+with patches to include.
+.Pp
+.Dl feedback-patches somecat/dunno whoever@foobar.baz
+.Pp
+will invoke
+.Xr mail 1
+to send the patches back immediately.
+.Pp
+.Dl feedback-patches /usr/pkgsrc/somecat/dunno whoever@foobar.baz
+.Pp
+works just as well, you can use either full path or path relative
+to pkgsrc base when specifying a package. As you're usually already
+in the pkg's directory for finding out the contact address
+(probably by looking at the HOMEPAGE variable in the pkg's Makefile),
+you can also do:
+.Pp
+.Dl cd .../category/pkg
+.Dl feedback-patches `pwd` whoever@foobar.baz
+.Pp
+or
+.Pp
+.Dl cd .../category/pkg
+.Dl feedback-patches \ . whoever@foobar.baz
+.Pp
+.Sh SEE ALSO
+.Xr pkgdiff 1 ,
+.Xr mkpatches 1
+.Sh AUTHORS
+The feedback-patches utility was written by
+.An Hubert Feyrer Aq hubertf@NetBSD.org .
+.Sh BUGS
+Currently the pkgsrc base directory is hardcoded to
+.Pa /usr/pkgsrc .