summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorwiz <wiz@pkgsrc.org>2006-03-05 23:35:49 +0000
committerwiz <wiz@pkgsrc.org>2006-03-05 23:35:49 +0000
commit68b2898a37f1101df78aa1bf4aebd5266bd2bea4 (patch)
tree462ace62fd78f2302b19b95821c08fedfac8ffe2
parent8474fe415151f89e68d3637cd3019178050d8116 (diff)
downloadpkgsrc-68b2898a37f1101df78aa1bf4aebd5266bd2bea4.tar.gz
Update to 1.2:
New script "finddepends" that finds all packages that need bumping. No need for an index, and not as many false positives too. Update recursive PKGREVISION instructions in revbump(1).
-rw-r--r--pkgtools/revbump/Makefile14
-rw-r--r--pkgtools/revbump/PLIST4
-rw-r--r--pkgtools/revbump/files/blbump.15
-rw-r--r--pkgtools/revbump/files/finddepends120
-rw-r--r--pkgtools/revbump/files/finddepends.169
-rw-r--r--pkgtools/revbump/files/revbump.138
6 files changed, 225 insertions, 25 deletions
diff --git a/pkgtools/revbump/Makefile b/pkgtools/revbump/Makefile
index 0414c109f97..d32e40c8622 100644
--- a/pkgtools/revbump/Makefile
+++ b/pkgtools/revbump/Makefile
@@ -1,7 +1,7 @@
-# $NetBSD: Makefile,v 1.4 2005/11/24 18:49:07 wiz Exp $
+# $NetBSD: Makefile,v 1.5 2006/03/05 23:35:49 wiz Exp $
#
-DISTNAME= revbump-1.1
+DISTNAME= revbump-1.2
CATEGORIES= pkgtools
MASTER_SITES= # empty
DISTFILES= # empty
@@ -18,17 +18,21 @@ NO_CONFIGURE= yes
USE_TOOLS+= perl:run
USE_LANGUAGES= # empty
-INSTALLATION_DIRS= bin man/man8
+INSTALLATION_DIRS= bin man/man1
do-build:
- ${SED} -e "s!@PERL@!${PERL5}!g" ${FILESDIR}/revbump \
- > ${WRKDIR}/revbump
${SED} -e "s!@PERL@!${PERL5}!g" ${FILESDIR}/blbump \
> ${WRKDIR}/blbump
+ ${SED} -e "s!@PERL@!${PERL5}!g" ${FILESDIR}/finddepends \
+ > ${WRKDIR}/finddepends
+ ${SED} -e "s!@PERL@!${PERL5}!g" ${FILESDIR}/revbump \
+ > ${WRKDIR}/revbump
do-install:
${INSTALL_SCRIPT} ${WRKDIR}/blbump ${PREFIX}/bin
${INSTALL_MAN} ${FILESDIR}/blbump.1 ${PREFIX}/man/man1
+ ${INSTALL_SCRIPT} ${WRKDIR}/finddepends ${PREFIX}/bin
+ ${INSTALL_MAN} ${FILESDIR}/finddepends.1 ${PREFIX}/man/man1
${INSTALL_SCRIPT} ${WRKDIR}/revbump ${PREFIX}/bin
${INSTALL_MAN} ${FILESDIR}/revbump.1 ${PREFIX}/man/man1
diff --git a/pkgtools/revbump/PLIST b/pkgtools/revbump/PLIST
index b9ae9fd5a05..b199687f76b 100644
--- a/pkgtools/revbump/PLIST
+++ b/pkgtools/revbump/PLIST
@@ -1,5 +1,7 @@
-@comment $NetBSD: PLIST,v 1.2 2005/11/24 18:49:07 wiz Exp $
+@comment $NetBSD: PLIST,v 1.3 2006/03/05 23:35:49 wiz Exp $
bin/blbump
+bin/finddepends
bin/revbump
man/man1/blbump.1
+man/man1/finddepends.1
man/man1/revbump.1
diff --git a/pkgtools/revbump/files/blbump.1 b/pkgtools/revbump/files/blbump.1
index 7186f5a1b22..a4708b0f007 100644
--- a/pkgtools/revbump/files/blbump.1
+++ b/pkgtools/revbump/files/blbump.1
@@ -1,4 +1,4 @@
-.\" $NetBSD: blbump.1,v 1.1.1.1 2005/01/05 00:31:39 wiz Exp $
+.\" $NetBSD: blbump.1,v 1.2 2006/03/05 23:35:49 wiz Exp $
.\"
.\" Copyright (c) 2003, 2004, 2005 The NetBSD Foundation, Inc.
.\"
@@ -31,7 +31,7 @@
.\" OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
.\" IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
-.Dd January 4, 2005
+.Dd March 6, 2006
.Dt BLBUMP 1
.Os
.Sh NAME
@@ -62,4 +62,5 @@ reports successful updates on stdout, and prints the package name
.Ar category/package
form) on stdout for each package where it failed.
.Sh SEE ALSO
+.Xr finddepends 1 ,
.Xr revbump 1
diff --git a/pkgtools/revbump/files/finddepends b/pkgtools/revbump/files/finddepends
new file mode 100644
index 00000000000..bae857ffda5
--- /dev/null
+++ b/pkgtools/revbump/files/finddepends
@@ -0,0 +1,120 @@
+#!@PERL@ -w
+#
+# $NetBSD: finddepends,v 1.1 2006/03/05 23:35:49 wiz Exp $
+#
+# Copyright (c) 2006 The NetBSD Foundation, Inc.
+#
+# This code was originally contributed to the NetBSD Foundation, Inc.
+# by Thomas Klausner <wiz@NetBSD.org>.
+#
+# 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. Neither the name of author nor the names of its contributors may
+# be used to endorse or promote products derived from this software
+# without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. 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 FOUNDATION 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.
+#
+
+$PKGSRCDIR = $ENV{PKGSRCDIR};
+if (! $PKGSRCDIR) {
+ $PKGSRCDIR = "/usr/pkgsrc";
+}
+
+sub usage {
+ print STDERR "usage: finddepends package\n\n";
+ print STDERR "Find all packages that depend on the argument package.\n";
+ exit 0;
+}
+
+usage if (1 ne @ARGV);
+
+$arg = shift;
+
+@searchlist = ();
+push @searchlist, $arg;
+
+if (! -d $PKGSRCDIR || ! -d "$PKGSRCDIR/doc" || ! -d "$PKGSRCDIR/mk") {
+ print STDERR "Invalid pkgsrc directory $PKGSRCDIR\n";
+ exit 1;
+}
+
+@bl3files = <$PKGSRCDIR/*/*/buildlink3.mk>;
+%bl3content = ();
+foreach $bl3 (@bl3files) {
+ open OUT, $bl3 or die "can't open $bl3";
+ $content = "";
+ while (<OUT>) {
+ chomp($_);
+ $content .= $_;
+ }
+ close OUT;
+ $bl3content{$bl3} = $content;
+}
+
+@bl3result = ();
+while ($pattern = pop @searchlist) {
+# print "* Looking for $pattern\n";
+ for $key (keys %bl3content) {
+# print "searching $key ($bl3content{$key})\n\n";
+ if ($bl3content{$key} =~ m/$pattern/) {
+# print "\n\n ******** MATCH $key \n\n";
+# print "** $pattern found in $key\n";
+# print "** BUMP $key\n";
+ delete($bl3content{$key});
+# print "\n\n **** ADDING $key \n\n";
+ $key =~ s,$PKGSRCDIR/,,;
+# print "** Adding $key\n";
+ print "$key\n";
+ push @searchlist, $key;
+ push @bl3result, $key;
+ }
+ }
+}
+
+print "\n";
+
+@makefiles = <$PKGSRCDIR/*/*/Makefile*>;
+
+for $makefile (@makefiles) {
+# print "* reading $makefile\n";
+ open OUT, $makefile or die "can't open $bl3";
+ $content = "";
+ while (<OUT>) {
+ chomp($_);
+ $content .= $_;
+ }
+ close OUT;
+ $found = 0;
+ for $pattern (@bl3result) {
+ if ($content =~ m/$pattern/) {
+ $found = 1;
+ last;
+ }
+ }
+# print "** BUMP $makefile\n" if ($found);
+ if ($found) {
+ $makefile =~ s,$PKGSRCDIR/,,;
+ print "$makefile\n";
+ }
+}
+
+exit 0;
diff --git a/pkgtools/revbump/files/finddepends.1 b/pkgtools/revbump/files/finddepends.1
new file mode 100644
index 00000000000..a173fa1569f
--- /dev/null
+++ b/pkgtools/revbump/files/finddepends.1
@@ -0,0 +1,69 @@
+.\" $NetBSD: finddepends.1,v 1.1 2006/03/05 23:35:49 wiz Exp $
+.\"
+.\" Copyright (c) 2006 The NetBSD Foundation, Inc.
+.\"
+.\" This code was originally contributed to the NetBSD Foundation, Inc.
+.\" by Thomas Klausner <wiz@NetBSD.org>.
+.\"
+.\" 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. Neither the name of author nor the names of its contributors may
+.\" be used to endorse or promote products derived from this software
+.\" without specific prior written permission.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. 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 FOUNDATION 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 March 6, 2006
+.Dt FINDDEPENDS 1
+.Os
+.Sh NAME
+.Nm finddepends
+.Nd tool for finding packages including a particular file
+.Sh SYNOPSIS
+.Nm
+.Ar pattern
+.Sh DESCRIPTION
+.Nm
+is a perl script for pkgsrc developers that helps finding packages
+affected by a recursive PKGREVISION bump.
+Given a
+.Ar pattern
+on the command line, it will recursively find all buildlink3.mk files
+that include it, and then find all Makefiles that include any of the
+buildlink3.mk files.
+.Pp
+See
+.Xr revbump 1
+for an example of a complete recursive PKGREVISION bump.
+.Sh ENVIRONMENT
+.Ev PKGSRCDIR
+pkgsrc root directory.
+Defaults to
+.Pa /usr/pkgsrc .
+.Sh EXAMPLES
+.Dl finddepends security/libtasn1
+.Pp
+would first output all buildlink3.mk files that include
+security/libtasn1, and then all Makefiles that include any of the
+found buildlink3.mk files.
+.Sh SEE ALSO
+.Xr blbump 1 ,
+.Xr revbump 1
diff --git a/pkgtools/revbump/files/revbump.1 b/pkgtools/revbump/files/revbump.1
index 1af07c981c0..931d3580ed7 100644
--- a/pkgtools/revbump/files/revbump.1
+++ b/pkgtools/revbump/files/revbump.1
@@ -1,6 +1,6 @@
-.\" $NetBSD: revbump.1,v 1.1.1.1 2005/01/05 00:31:38 wiz Exp $
+.\" $NetBSD: revbump.1,v 1.2 2006/03/05 23:35:49 wiz Exp $
.\"
-.\" Copyright (c) 2003, 2004, 2005 The NetBSD Foundation, Inc.
+.\" Copyright (c) 2003, 2004, 2005, 2006 The NetBSD Foundation, Inc.
.\"
.\" This code was originally contributed to the NetBSD Foundation, Inc.
.\" by Julio Merino <jmmv@NetBSD.org> and Thomas Klausner <wiz@NetBSD.org>.
@@ -31,7 +31,7 @@
.\" OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
.\" IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
-.Dd January 4, 2005
+.Dd March 6, 2006
.Dt REVBUMP 1
.Os
.Sh NAME
@@ -65,7 +65,7 @@ form) on stdout for each package where it failed.
.Pp
would bump the PKGREVISIONs of gmake and glib2, as would
.Bd -literal -offset indent
-revbump << EOF
+revbump \*[Lt]\*[Lt] EOF
devel/gmake
x11/glib2
EOF
@@ -79,22 +79,26 @@ and
would be:
.Bd -literal -offset indent
cd /usr/pkgsrc
-cvs update
-make index
-make show-deps PKG=openssl > deps
-revbump < deps > deps.manual
-[handle the PKGREVISION bumps in deps.manual manually]
-blbump < deps > deps.manual
-[handle the *RECOMMENDED* bumps in deps.manual manually]
-cvs diff
-[look for PYPKGPREFIX -> py22 or py23pth expansions
+finddepends security/openssl \*[Gt] allbump
+grep buildlink3.mk allbump \*[Gt] | sed "s/.buildlink3.mk//" | bl3bump
+grep -v buildlink3.mk allbump \*[Gt] | sed "s/.Makefile$//" | makebump
+blbump \*[Lt] bl3bump \*[Gt] bl3bump.manual
+[handle the *RECOMMENDED* bumps in bl3bump.manual manually]
+revbump \*[Lt] makebump \*[Gt] makebump.manual
+[handle the PKGREVISION bumps in makebump.manual manually;
+ this will include any Makefile.common files - the files that include
+ them will currently need to be found manually]
+cvs diff `cat allbump`
+[look for PYPKGPREFIX -\*[Gt] py22 or py23pth expansions
in buildlink files and any unrelated diffs you have in your
local tree, and fix them]
-lintpkgsrc -d > deps.manual
+lintpkgsrc -d
[fix broken dependencies noted by this (usually meta-pkg/kde3,
subversion, nessus)]
-cvs diff
-cvs commit
+cvs diff `cat allbump`
+cvs commit `cat allbump`
+rm allbump bl3bump* makebump*
.Ed
.Sh SEE ALSO
-.Xr blbump 1
+.Xr blbump 1 ,
+.Xr finddepends 1