aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormandree <mandree@FreeBSD.org>2016-04-12 13:54:17 +0800
committermandree <mandree@FreeBSD.org>2016-04-12 13:54:17 +0800
commitfc075cb03ee3c4106ca6669fa56a9c0296caf11e (patch)
tree437f9d18e16b47602ebb5a2028d5d7064d3e5429
parent98212db91a6ee4451f63914824f252b202fd7354 (diff)
downloadfreebsd-ports-gnome-fc075cb03ee3c4106ca6669fa56a9c0296caf11e.tar.gz
freebsd-ports-gnome-fc075cb03ee3c4106ca6669fa56a9c0296caf11e.tar.zst
freebsd-ports-gnome-fc075cb03ee3c4106ca6669fa56a9c0296caf11e.zip
Drop maintainership.
If portmgr@ needs to commit against better advise, two years after this was first discussed without any motion of the upstream. Drop a few more maintainerships along the way.
-rwxr-xr-xTools/scripts/bump_revision.pl206
-rw-r--r--databases/db48/Makefile2
-rw-r--r--databases/db5/Makefile2
-rw-r--r--databases/db6/Makefile2
-rw-r--r--deskutils/docear/Makefile2
-rw-r--r--sysutils/busybox/Makefile2
6 files changed, 139 insertions, 77 deletions
diff --git a/Tools/scripts/bump_revision.pl b/Tools/scripts/bump_revision.pl
index f8bccee44966..71de603d1d69 100755
--- a/Tools/scripts/bump_revision.pl
+++ b/Tools/scripts/bump_revision.pl
@@ -1,33 +1,53 @@
-#!/usr/bin/env perl -w
+#!/usr/bin/env perl -wT
# $FreeBSD$
#
+# This Perl script helps with bumping the PORTREVISION of all ports
+# that depend on a set of ports, for instance, when in the latter set
+# one of the port bumped the .so library version.
+#
+# It is best executed with the working directory set to the base of a
+# ports tree, usually /usr/ports.
+#
+# You must use either the -l (shaLlow, avoid grandparent dependencies,
+# slower) or -g option (include grandparend dependencies) option.
+#
# MAINTAINER= gerald@FreeBSD.org
#
-use Getopt::Std;
use strict;
+use Getopt::Std;
+use Carp 'verbose';
use Cwd;
use Data::Dumper;
use File::Basename;
-use vars qw/$opt_c $opt_n $opt_i $opt_u/;
+use vars qw/$opt_c $opt_n $opt_i $opt_u $opt_l $opt_g/;
+
+$ENV{'PATH'} = '/bin:/usr/bin:/usr/local/bin';
sub usage {
print <<EOF;
Usage: $0 [options] [<category>/]<portname>
- -c - Just check
- -n - No tmpdir, just use dirname(INDEX)
- -u <username> - Your freebsd.org username. Defaults to \$ENV{USER}.
- -i <filename> - Use this for INDEX name. Defaults to /usr/ports/INDEX.
+Mandatory flags:
+ -l - shaLlow, only bump ports with direct dependencies.
+ -g - Grandchildren, also bump for indirect dependencies.
+
+Optional flags:
+ -c - Check only (dry-run), do not change Makefiles.
+ -n - No tmpdir, just use the directory where INDEX resides.
+ -i <filename> - Use this for INDEX name. Defaults to /usr/ports/INDEX-n,
+ where n is the major version of the OS, or /usr/ports/INDEX if missing.
Improvements, suggestions,questions -> gerald\@FreeBSD.org
EOF
exit 1;
}
+$| = 1;
+
sub bumpMakefile {
my ($p) = @_;
@@ -39,6 +59,7 @@ sub bumpMakefile {
next;
}
my @lines = <$fin>;
+ if ($!) { die "Error while reading $makefile: $!. Aborting"; }
close($fin) or die "Can't close $makefile b/c $!";
chomp(@lines);
@@ -50,7 +71,7 @@ sub bumpMakefile {
}
my $printedrev = 0;
- open(my $fout, '>', "$makefile");
+ open(my $fout, '>', "$makefile.bumped");
foreach my $line (@lines) {
if (!$printedrev) {
if ($line =~ /^CATEGORIES??=/ || $line =~ /^PORTEPOCH??=/) {
@@ -72,23 +93,40 @@ sub bumpMakefile {
print $fout "$line\n";
}
close($fout) or die "Can't close $makefile b/c $!";
+ rename "$makefile.bumped", $makefile or die "Can't rename $makefile.bumped to $makefile: $!";
}
-my $INDEX = "/usr/ports/INDEX";
-my $USER = $ENV{USER};
+my $osversion = `uname -r`;
+chomp $osversion;
+$osversion =~ s/\..*//;
+
+my $INDEX = "/usr/ports/INDEX-$osversion";
+if (!-f $INDEX) { $INDEX = "/usr/ports/INDEX"; }
+
+my $shallow = 0;
{
$opt_i = "";
$opt_u = "";
- getopts("cni:u:");
+ getopts("cgi:lnu:");
$INDEX = $opt_i if ($opt_i);
- $USER = $opt_u if ($opt_u);
+ $shallow = $opt_l if $opt_l;
+ if (not $opt_l and not $opt_g) {
+ die "Neither -g nor -l given. Aborting";
+ }
- die "$INDEX doesn't seem to exist. Please check the value supplied with -i or use -i." unless(-f $INDEX);
+ die "$INDEX doesn't seem to exist. Please check the value supplied with -i, or use -i /path/to/INDEX." unless(-f $INDEX);
}
-my $PORT = $ARGV[0];
-usage() unless($PORT);
+usage() unless(@ARGV);
-my $CVSROOT = $ENV{CVSROOT} // ':ext:$USER\@pcvs.freebsd.org:/home/pcvs';
+my $TMPDIR = File::Basename::dirname($INDEX);
+
+#
+# Sanity checking
+#
+if (-d "$TMPDIR/.svn" and not $opt_n and not $opt_c) {
+ print "$TMPDIR/.svn exists, do you want to use the -n option? Press Ctrl-C to abort.\n";
+ sleep 5;
+}
#
# Read the index, save some interesting keys
@@ -98,89 +136,113 @@ my %index = ();
print "Reading $INDEX\n";
open(my $fin, '<', "$INDEX") or die "Cannot open $INDEX for reading.";
my @lines = <$fin>;
+ if ($!) { die "Error while reading $INDEX: $! Aborting"; }
chomp(@lines);
close($fin);
- foreach my $line (@lines) {
- my @a = split(/\|/, $line);
- my @b = split(/\//, $a[1]);
+ my @a;
+ my @b;
+ my $port;
+ map {
+ @a = split(/\|/, $_);
+ @b = split(/\//, $a[1]);
- my $port = $b[-2]."/".$b[-1];
+ $port = $b[-2]."/".$b[-1];
- $index{$port}{portname} = $b[-1];
- $index{$port}{portnameversion} = $a[0];
- $index{$port}{portdir} = $a[1];
- $index{$port}{comment} = $a[3];
- $index{$port}{deps} = ();
+ @{ $index{$port} }{'portname', 'portnameversion', 'portdir', 'comment', 'deps'}
+ = ($b[-1], $a[0], $a[1], $a[3], ());
if ($a[8]) {
@b = split(" ", $a[8]);
- foreach my $b (@b) {
- $index{$port}{deps}{$b} = 1;
- }
+ @{ $index{$port}{deps} }{@b} = (1) x @b;
}
- }
- my @k = keys(%index);
- print "- Processed ", $#k+1, " entries.\n";
+
+ } @lines;
+ print "- Processed ", scalar keys(%index), " entries.\n";
}
-#
-# See if the port does really exists.
-# If specified as category/portname, that should be enough.
-# If specified as portname, check all indexes for existence or duplicates.
-#
-unless (defined $index{$PORT}) {
- my $count = 0;
- my $n = "";
- foreach my $p (keys(%index)) {
- if ($p =~ /\/$PORT$/) {
- $n .= " " if ($n);
- $n .= $p;
- $count++;
+my %DEPPORTS = ();
+
+foreach my $PORT (@ARGV) {
+ #
+ # See if the port does really exists.
+ # If specified as category/portname, that should be enough.
+ # If specified as portname, check all indexes for existence or duplicates.
+ #
+ unless (defined $index{$PORT}) {
+ my @found = grep /\/$PORT$/, keys(%index);
+ my $count = @found;
+
+ if ($count == 0) {
+ die "Cannot find ${PORT} in ${INDEX}.";
+ } elsif ($count == 1) {
+ $PORT = $found[0];
+ } else {
+ my $n = join(" ", @found);
+ die "Found ${PORT} more than once in ${INDEX}: $n. Try category/$PORT.\nAborting";
}
}
- if ($count == 0) {
- die "Cannot find ${PORT} in ${INDEX}.";
- } elsif ($count == 1) {
- $PORT = $n;
- } else {
- die "Found ${PORT} more than once in ${INDEX}: $n. Try category/portname.";
+
+ my $PORTNAMEVERSION = $index{$PORT}{portnameversion};
+ print "Found $PORT as $PORTNAMEVERSION\n";
+
+ #
+ # Figure out all the ports depending on this one.
+ #
+ {
+ print "Searching for ports depending on $PORT\n";
+
+ foreach my $p (keys(%index)) {
+ if (defined $index{$p}{'deps'}{$PORTNAMEVERSION}) {
+ $DEPPORTS{$p} = 1;
+ }
+ }
+ print "- Found ", scalar keys(%DEPPORTS), " ports depending on $PORT.\n";
}
}
-my $PORTNAMEVERSION = $index{$PORT}{portnameversion};
-print "Found $PORT as $PORTNAMEVERSION\n";
-
#
-# Figure out all the ports depending on this one.
+# In shallow mode, strip all those who don't have a direct dependency
#
-my %DEPPORTS = ();
-my $ports = "";
-{
- print "Searching for ports depending on $PORT\n";
- foreach my $p (keys(%index)) {
- if (defined $index{$p}{deps}{$PORTNAMEVERSION}) {
- $DEPPORTS{$p} = 1;
- $ports .= " " if ($ports);
- $ports .= "ports/$p";
+sub direct_dependence($@) {
+ my ($port, @requisites) = @_;
+ open F, '-|', '/usr/bin/make', '-C', $port, qw/-V _RUN_DEPENDS -V _LIB_DEPENDS/ or die "cannot launch make: $!";
+ my @lines = <F>;
+ chomp @lines;
+ my $deps = join(" ", @lines);
+ my %deps = map { $_ =~ s[/usr/ports/][]; ($_ => 1) } split " ", $deps;
+ if ($!) { die "cannot read depends from make: $!"; }
+ close F or die "cannot read depends from make: $!";
+ my $required = grep { $_ } map { defined $deps{$_} } @requisites;
+ return $required;
+}
+if ($shallow) {
+ my $n = keys %DEPPORTS;
+ my $idx = 1;
+ foreach my $p (keys %DEPPORTS) {
+ print "- Checking requisites of port $idx/$n...\r";
+ ++$idx;
+ unless (direct_dependence($p, @ARGV)) {
+ delete $DEPPORTS{$p};
}
}
- my @k = keys(%DEPPORTS);
- print "- Found ", $#k+1, " ports depending on it.\n";
+ print "- Found ", scalar keys(%DEPPORTS), " ports depending directly on either of @ARGV.\n";
}
+my $ports = join(" ", keys %DEPPORTS);
+
#
# Create a temp directory and cvs checkout the ports
# (don't do error checking, too complicated right now)
#
-
-my $TMPDIR = File::Basename::dirname($INDEX);
-unless ($opt_n) {
- $TMPDIR = getcwd() . "/.tmpdir.$$";
+unless ($opt_n or $opt_c) {
+ $TMPDIR = ".bump_rev_tmpdir.$$";
+ print "svn checkout into $TMPDIR...\n";
mkdir($TMPDIR, 0755);
chdir($TMPDIR);
- system "cvs -d $CVSROOT co -T $ports";
- chdir($TMPDIR);
+ system "svn checkout --depth=immediates svn+ssh://svn.freebsd.org/ports/head/ ports" and die "SVN checkout failed (wait value $?), aborting";
+ chdir('ports');
+ system "svn update --set-depth=infinity $ports" and die "SVN checkout failed (wait value $?), aborting";
}
#
@@ -188,7 +250,7 @@ unless ($opt_n) {
#
{
print "Updating Makefiles\n";
- foreach my $p (keys(%DEPPORTS)) {
+ foreach my $p (sort keys(%DEPPORTS)) {
print "- Updating Makefile of $p\n";
next if $opt_c;
bumpMakefile "$p";
diff --git a/databases/db48/Makefile b/databases/db48/Makefile
index 806ce6cea9fd..2b7719dfd454 100644
--- a/databases/db48/Makefile
+++ b/databases/db48/Makefile
@@ -10,7 +10,7 @@ PKGNAMEPREFIX?=
DISTNAME= db-${PORTVERSION:R}
DIST_SUBDIR= bdb
-MAINTAINER= mandree@FreeBSD.org
+MAINTAINER= ports@FreeBSD.org
COMMENT= Berkeley DB package, revision 4.8
LICENSE= BSD3CLAUSE
diff --git a/databases/db5/Makefile b/databases/db5/Makefile
index a323233c9ed3..f7a4b7e2c6fe 100644
--- a/databases/db5/Makefile
+++ b/databases/db5/Makefile
@@ -12,7 +12,7 @@ PKGNAMEPREFIX?=
DISTNAME= db-${PORTVERSION}
DIST_SUBDIR= bdb
-MAINTAINER= mandree@FreeBSD.org
+MAINTAINER= ports@FreeBSD.org
COMMENT= The Oracle Berkeley DB, revision ${BDBVER}
BDBVER= ${PORTVERSION:R}
diff --git a/databases/db6/Makefile b/databases/db6/Makefile
index b5edd1588c29..542885d4a7c5 100644
--- a/databases/db6/Makefile
+++ b/databases/db6/Makefile
@@ -10,7 +10,7 @@ PKGNAMEPREFIX?=
DISTNAME= db-${PORTVERSION}
DIST_SUBDIR= bdb
-MAINTAINER= mandree@FreeBSD.org
+MAINTAINER= ports@FreeBSD.org
COMMENT= The Oracle Berkeley DB, revision ${BDBVER}
LICENSE= AGPLv3
diff --git a/deskutils/docear/Makefile b/deskutils/docear/Makefile
index bc0a4d584ed7..11d4d33bff2a 100644
--- a/deskutils/docear/Makefile
+++ b/deskutils/docear/Makefile
@@ -11,7 +11,7 @@ MASTER_SITES= http://docear.org/downloads/${PORTVERSION}${_suffix}/ \
DISTNAME= docear_linux
DIST_SUBDIR= ${PORTNAME}-${PORTVERSION}${_suffix}
-MAINTAINER= mandree@FreeBSD.org
+MAINTAINER= ports@FreeBSD.org
COMMENT= Mind Mapping tool with Reference, Library, and PDF Management
LICENSE= GPLv2
diff --git a/sysutils/busybox/Makefile b/sysutils/busybox/Makefile
index 572060dc3eb3..c0f7a510f8cf 100644
--- a/sysutils/busybox/Makefile
+++ b/sysutils/busybox/Makefile
@@ -9,7 +9,7 @@ MASTER_SITES= http://www.busybox.net/downloads/ LOCAL/mandree
PATCH_SITES= http://www.busybox.net/downloads/fixes-${PORTVERSION}/
PATCH_DIST_STRIP= -p1
-MAINTAINER= mandree@FreeBSD.org
+MAINTAINER= ports@FreeBSD.org
COMMENT= Busybox for FreeBSD
LICENSE= GPLv2