summaryrefslogtreecommitdiff
path: root/net/mirror
diff options
context:
space:
mode:
authorkim <kim@pkgsrc.org>1998-08-29 18:05:56 +0000
committerkim <kim@pkgsrc.org>1998-08-29 18:05:56 +0000
commitc84f7f75303a85c5759eb9928227c2066be96055 (patch)
treeee681c2dbaea39acec959f7e1f190eba2a2445af /net/mirror
parent1324fee004b68d31aab714b6f078cb09c20bd5ef (diff)
downloadpkgsrc-c84f7f75303a85c5759eb9928227c2066be96055.tar.gz
- Combine all patches for mirror.pl into patch-ab (remove patch-ad).
- Move all sed stuff into scrips/configure so it can be done in one pass (no post-configure target in Makefile anymore). - Use "compress" for $compress_prog instead of gzip; our compress needs the -f flag to make it quiet (additional pathes to mirror.pl) - Fix PASV handling (too strict a regexp -- breaks on Win NT servers that emulate UNIX behaviour -- NT added a trailing dot to the 227 message and ftp.pl was not tolerating that) - Add $PREFIX/bin and $PREFIX/sbin to $extra_path (leaving /usr/local directories in) - Do not modify ${WRKSRC}/mirror, it is a symlink in the distribution
Diffstat (limited to 'net/mirror')
-rw-r--r--net/mirror/Makefile11
-rw-r--r--net/mirror/patches/patch-ab23
-rw-r--r--net/mirror/patches/patch-ac148
-rw-r--r--net/mirror/patches/patch-ad38
-rw-r--r--net/mirror/patches/patch-ae20
-rw-r--r--net/mirror/scripts/configure14
6 files changed, 126 insertions, 128 deletions
diff --git a/net/mirror/Makefile b/net/mirror/Makefile
index 4e7875ad00a..000f0aea444 100644
--- a/net/mirror/Makefile
+++ b/net/mirror/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.6 1998/06/22 12:58:34 agc Exp $
+# $NetBSD: Makefile,v 1.7 1998/08/29 18:05:56 kim Exp $
# FreeBSD Id: Makefile,v 1.6 1996/12/01 01:22:54 obrien Exp
#
@@ -13,15 +13,6 @@ USE_PERL5= yes
NO_WRKSUBDIR= yes
MAKEFILE= makefile
-post-configure:
- cd ${WRKSRC} ; ${SED} \
- s:/usr/local:${PREFIX}: <mirror.pl >mirror.pl.BAK ; \
- ${MV} mirror.pl.BAK mirror.pl
- cd ${WRKSRC} ; for i in do_unlinks mirror mirror.pl mm \
- pkgs_to_mmin ; do \
- ${SED} s:/usr/bin/perl:${PREFIX}/bin/perl: <$$i >$$i.BAK ; \
- ${MV} $$i.BAK $$i ; done
-
pre-install:
${MKDIR} ${PREFIX}/lib/mirror
diff --git a/net/mirror/patches/patch-ab b/net/mirror/patches/patch-ab
index 22c315f67f0..d934a61dc1c 100644
--- a/net/mirror/patches/patch-ab
+++ b/net/mirror/patches/patch-ab
@@ -1,8 +1,8 @@
-$NetBSD: patch-ab,v 1.3 1998/08/07 11:10:45 agc Exp $
+$NetBSD: patch-ab,v 1.4 1998/08/29 18:05:56 kim Exp $
---- mirror.defaults.orig Fri Jul 28 22:00:31 1995
-+++ mirror.defaults Tue Oct 28 01:40:02 1997
-@@ -11,27 +11,27 @@
+--- mirror.defaults.orig Fri Jul 28 16:00:31 1995
++++ mirror.defaults Sat Aug 29 11:50:20 1998
+@@ -11,20 +11,20 @@
# The LOCAL hostname - if not the same as `hostname`
# (I advertise the name sunsite.doc.ic.ac.uk but the machine is
# really phoenix.doc.ic.ac.uk.)
@@ -30,20 +30,15 @@ $NetBSD: patch-ab,v 1.3 1998/08/07 11:10:45 agc Exp $
# Don't overwrite my mirror log with the remote one.
# Don't pull back any of their mirror temporary files.
# nor any FSP or gopher files...
- exclude_patt=(^|/)(\.mirror$|core$|\.cap|\.in\..*\.$|MIRROR\.LOG|#.*#|\.FSP|\.cache|\.zipped|\.notar|\.message|lost\+found/|Network Trash Folder)
- # Try to compress everything
- compress_patt=.
-- compress_prog=compress
-+ compress_prog=gzip
- # Don't compress information files, files that don't benifit from
- # being compressed, files that tell ftpd, gopher, wais... to do things,
- # the sources for compression programs...
-@@ -44,7 +44,7 @@
+@@ -44,9 +44,9 @@
# shk is multimedia? used on apple2s.
compress_excl+|-z(\d+)?$|\.tgz|_tgz|\.tar\.Z|\.tar\.gz|\.taz$|\.arc$|\.zip$|\.lzh$|\.zoo$|\.exe$|\.lha$|\.zom$|\.gif$|\.jpeg$|\.jpg$|\.mpeg$|\.au$|\.shk$|read.*me|index|info|faq|gzip|compress|(^|/)\.\.?$
# Don't delete own mirror log, .notar or .cache files (incl in subdirs)
-# delete_excl=(^|/)\.(mirror|notar|cache)$
+ delete_excl=(^|/)\.(mirror|notar|cache)$
# Ignore any local readme and .mirror files
- local_ignore=README.doc.ic|(^|/)\.(mirror|notar)$
+- local_ignore=README.doc.ic|(^|/)\.(mirror|notar)$
++ local_ignore=(^|/)\.(mirror|notar)$
# Automatically delete local copies of files that the
+ # remote site has zapped
+ do_deletes=true
diff --git a/net/mirror/patches/patch-ac b/net/mirror/patches/patch-ac
index 9f10f861e4b..a5cebcd10b9 100644
--- a/net/mirror/patches/patch-ac
+++ b/net/mirror/patches/patch-ac
@@ -1,63 +1,87 @@
-$NetBSD: patch-ac,v 1.2 1998/08/07 11:10:45 agc Exp $
+$NetBSD: patch-ac,v 1.3 1998/08/29 18:05:56 kim Exp $
-*** mirror.pl.orig Sat Mar 16 15:46:09 1996
---- mirror.pl Sat Mar 16 15:51:49 1996
-***************
-*** 75,81 ****
-
- # Try to find the default localation of various programs via
- # the users PATH then using $extra_path
-! $extra_path = '/usr/local/bin:/usr/new/bin:/usr/public/bin:/usr/ucb:/usr/bin:/bin:/etc:/usr/etc:/usr/local/etc';
- $ENV{ 'PATH' } .= ':' . $extra_path;
-
- &trap_signals();
---- 75,81 ----
-
- # Try to find the default localation of various programs via
- # the users PATH then using $extra_path
-! $extra_path = '/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin';
- $ENV{ 'PATH' } .= ':' . $extra_path;
-
- &trap_signals();
-***************
-*** 128,146 ****
- $rm_prog = &find_prog( 'rm' );
-
- # Generate checksums
-! $sum_prog = &find_prog( 'sum' );
-
- # SPECIAL NOTE: This is eval'd, so DONT put double-quotes (") in it.
- # You can get local variables to appear as in the second example:
-! $mail_subject = '-s \'mirror update\'';
-! # $mail_subject = ' -s \'mirror update of $package\'';
-
- # When scanning the local directory, how often to prod the remote
- # system to keep the connection alive
- $prod_interval = 60;
-
- # Put the directory that mirror is actually in at the start of PERLLIB.
-! $dir = &real_dir_from_path( $0 );
- unshift( @INC, $dir );
-
- # Make sure that your PERLLIB environment variable can get you
---- 128,147 ----
- $rm_prog = &find_prog( 'rm' );
-
- # Generate checksums
-! $sum_prog = &find_prog( 'md5' );
-
- # SPECIAL NOTE: This is eval'd, so DONT put double-quotes (") in it.
- # You can get local variables to appear as in the second example:
-! # $mail_subject = '-s \'mirror update\'';
-! $mail_subject = ' -s \'mirror update of $package\'';
-
- # When scanning the local directory, how often to prod the remote
- # system to keep the connection alive
- $prod_interval = 60;
-
- # Put the directory that mirror is actually in at the start of PERLLIB.
-! # $dir = &real_dir_from_path( $0 );
-! $dir = "!!PREFIX!!/lib/mirror";
- unshift( @INC, $dir );
-
- # Make sure that your PERLLIB environment variable can get you
+--- mirror.pl.orig Mon Sep 18 13:55:25 1995
++++ mirror.pl Sat Aug 29 12:06:10 1998
+@@ -75,7 +75,7 @@
+
+ # Try to find the default localation of various programs via
+ # the users PATH then using $extra_path
+-$extra_path = '/usr/local/bin:/usr/new/bin:/usr/public/bin:/usr/ucb:/usr/bin:/bin:/etc:/usr/etc:/usr/local/etc';
++$extra_path = '/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:!!PREFIX!!/bin:!!PREFIX!!/sbin';
+ $ENV{ 'PATH' } .= ':' . $extra_path;
+
+ &trap_signals();
+@@ -128,19 +128,20 @@
+ $rm_prog = &find_prog( 'rm' );
+
+ # Generate checksums
+-$sum_prog = &find_prog( 'sum' );
++$sum_prog = &find_prog( 'md5' );
+
+ # SPECIAL NOTE: This is eval'd, so DONT put double-quotes (") in it.
+ # You can get local variables to appear as in the second example:
+-$mail_subject = '-s \'mirror update\'';
+-# $mail_subject = ' -s \'mirror update of $package\'';
++# $mail_subject = '-s \'mirror update\'';
++$mail_subject = ' -s \'mirror update of $package\'';
+
+ # When scanning the local directory, how often to prod the remote
+ # system to keep the connection alive
+ $prod_interval = 60;
+
+ # Put the directory that mirror is actually in at the start of PERLLIB.
+-$dir = &real_dir_from_path( $0 );
++# $dir = &real_dir_from_path( $0 );
++$dir = "!!PREFIX!!/lib/mirror";
+ unshift( @INC, $dir );
+
+ # Make sure that your PERLLIB environment variable can get you
+@@ -1695,7 +1696,7 @@
+ $f = $dirtmp;
+ $dirtmp =~ s/\.($sys_compress_suffix|$gzip_suffix|$old_gzip_suffix)$//;
+ $udirtmp =~ s/\.($sys_compress_suffix|$gzip_suffix|$old_gzip_suffix)$//;
+- &sys( "$unsquish -d < \"$f\" > \"$dirtmp\"" );
++ &sys( "$unsquish -f -d < \"$f\" > \"$dirtmp\"" );
+ unlink( $uf );
+ }
+ else {
+@@ -2542,7 +2543,7 @@
+ local( $f ) = $src_file;
+ $f =~ s/($shell_metachars)/\\$1/g;
+ $comptemp = "$big_temp/.out$$";
+- &sys( "$compress_prog < \"$f\" > \"$comptemp\"" );
++ &sys( "$compress_prog -f < \"$f\" > \"$comptemp\"" );
+ $src_file = $comptemp;
+ }
+
+@@ -2613,10 +2614,10 @@
+ # Am I doing compress to gzip conversion?
+ if( $src_path =~ /$compress_conv_patt/ &&
+ $compress_suffix eq $gzip_suffix ){
+- $comp = "$sys_compress_prog -d < \"$f\" | $gzip_prog > \"$temp\"";
++ $comp = "$sys_compress_prog -f -d < \"$f\" | $gzip_prog > \"$temp\"";
+ }
+ else {
+- $comp = "$compress_prog < \"$f\" > \"$temp\"";
++ $comp = "$compress_prog -f < \"$f\" > \"$temp\"";
+ }
+ &sys( $comp );
+ $temp =~ s/\\($shell_metachars)/$1/g;
+@@ -3227,7 +3228,7 @@
+
+ &msg( "creating assocs ...\n" ) if $debug > 2;
+ foreach $map ( @assocs ){
+- eval "\$$map = \"\$big_tmp/$map.$$\"";
++ eval "\$$map = \"\$big_temp/$map.$$\"";
+ eval "dbmopen( $map, \$$map, 0644 )";
+ }
+ &msg( "creating assocs done\n" ) if $debug > 2;
+@@ -3239,7 +3240,7 @@
+
+ &msg( "deleting assocs ...\n" ) if $debug > 2;
+ foreach $map ( @assocs ){
+- eval "\$$map = \"\$big_tmp/$map.$$\"";
++ eval "\$$map = \"\$big_temp/$map.$$\"";
+ eval "dbmclose( $map )";
+ &unlink_dbm( eval "\$$map" );
+ eval "\%$map = ()";
diff --git a/net/mirror/patches/patch-ad b/net/mirror/patches/patch-ad
deleted file mode 100644
index c3cd8d4db0d..00000000000
--- a/net/mirror/patches/patch-ad
+++ /dev/null
@@ -1,38 +0,0 @@
-$NetBSD: patch-ad,v 1.2 1998/08/07 11:10:46 agc Exp $
-
-*** mirror.pl.orig Sat Aug 10 12:28:16 1996
---- mirror.pl Sat Aug 10 12:28:54 1996
-***************
-*** 3228,3234 ****
-
- &msg( "creating assocs ...\n" ) if $debug > 2;
- foreach $map ( @assocs ){
-! eval "\$$map = \"\$big_tmp/$map.$$\"";
- eval "dbmopen( $map, \$$map, 0644 )";
- }
- &msg( "creating assocs done\n" ) if $debug > 2;
---- 3228,3234 ----
-
- &msg( "creating assocs ...\n" ) if $debug > 2;
- foreach $map ( @assocs ){
-! eval "\$$map = \"\$big_temp/$map.$$\"";
- eval "dbmopen( $map, \$$map, 0644 )";
- }
- &msg( "creating assocs done\n" ) if $debug > 2;
-***************
-*** 3240,3246 ****
-
- &msg( "deleting assocs ...\n" ) if $debug > 2;
- foreach $map ( @assocs ){
-! eval "\$$map = \"\$big_tmp/$map.$$\"";
- eval "dbmclose( $map )";
- &unlink_dbm( eval "\$$map" );
- eval "\%$map = ()";
---- 3240,3246 ----
-
- &msg( "deleting assocs ...\n" ) if $debug > 2;
- foreach $map ( @assocs ){
-! eval "\$$map = \"\$big_temp/$map.$$\"";
- eval "dbmclose( $map )";
- &unlink_dbm( eval "\$$map" );
- eval "\%$map = ()";
diff --git a/net/mirror/patches/patch-ae b/net/mirror/patches/patch-ae
new file mode 100644
index 00000000000..c7bbf8ba7e4
--- /dev/null
+++ b/net/mirror/patches/patch-ae
@@ -0,0 +1,20 @@
+--- ftp.pl.orig Tue May 23 17:53:25 1995
++++ ftp.pl Sat Aug 29 12:08:42 1998
+@@ -430,7 +430,7 @@
+ return 0;
+ }
+ if( $ret == 1 ) {
+- $response =~ m/^227 Entering Passive Mode \((\d+),(\d+),(\d+),(\d+),(\d+),(\d+)\)$/;
++ $response =~ m/^227 .*\((\d+),(\d+),(\d+),(\d+),(\d+),(\d+)\)/;
+ $newhost = sprintf( "%d.%d.%d.%d", $1, $2, $3, $4 );
+ $newport = $5 * 256 + $6;
+ }
+@@ -443,7 +443,7 @@
+ }
+ else {
+ print $showfd "proxy connection failed " if $proxy;
+- print $showfd "Cannot open ftp to $connect_site\n" if $ftp_show;
++ print $showfd "Cannot open ftp to $newhost:$newport\n" if $ftp_show;
+ return 0;
+ }
+ }
diff --git a/net/mirror/scripts/configure b/net/mirror/scripts/configure
index b07f3cc7e34..3a2a1efb99e 100644
--- a/net/mirror/scripts/configure
+++ b/net/mirror/scripts/configure
@@ -1,9 +1,15 @@
#!/bin/sh
#
-# $NetBSD: configure,v 1.2 1998/08/07 11:10:46 agc Exp $
+# $NetBSD: configure,v 1.3 1998/08/29 18:05:57 kim Exp $
#
# Id: configure,v 1.1.1.1 1997/10/27 05:01:31 hubertf Exp
#
-
-mv ${WRKSRC}/mirror.pl ${WRKSRC}/mirror.pl.bak
-sed <${WRKSRC}/mirror.pl.bak >${WRKSRC}/mirror.pl s+!!PREFIX!!+$PREFIX+g
+cd ${WRKSRC}
+for i in do_unlinks mirror.pl mm pkgs_to_mmin
+do
+ sed \
+ -e s:!!PREFIX!!:$PREFIX:g \
+ -e s:/usr/bin/perl:${PREFIX}/bin/perl: \
+ <$i >$i.BAK
+ mv -f $i.BAK $i
+done