diff options
author | taca <taca> | 2011-09-12 16:35:43 +0000 |
---|---|---|
committer | taca <taca> | 2011-09-12 16:35:43 +0000 |
commit | 9b871340c60d4b1c43d3ba6b8b1b1069bc3c48b4 (patch) | |
tree | d370d581320fea504a769aa1a04f4fe4354ef830 | |
parent | 77c9113a0e28ae8eedc2b50f6b388404c1c98886 (diff) | |
download | pkgsrc-9b871340c60d4b1c43d3ba6b8b1b1069bc3c48b4.tar.gz |
* Avoid to use timelocal.pl since it cause warning with perl 5.14 now.
* Allow deleting remote directories. (It is needed to put local file tree
to remote with mirror.
Bump PKGREVISION.
-rw-r--r-- | net/mirror/Makefile | 5 | ||||
-rw-r--r-- | net/mirror/distinfo | 8 | ||||
-rw-r--r-- | net/mirror/patches/patch-ac | 46 | ||||
-rw-r--r-- | net/mirror/patches/patch-ae | 53 | ||||
-rw-r--r-- | net/mirror/patches/patch-ag | 21 |
5 files changed, 105 insertions, 28 deletions
diff --git a/net/mirror/Makefile b/net/mirror/Makefile index e533f09c994..af8ff4992b5 100644 --- a/net/mirror/Makefile +++ b/net/mirror/Makefile @@ -1,13 +1,14 @@ -# $NetBSD: Makefile,v 1.34 2011/03/17 21:52:23 zafer Exp $ +# $NetBSD: Makefile,v 1.35 2011/09/12 16:35:43 taca Exp $ DISTNAME= mirror-2.9 -PKGREVISION= 2 +PKGREVISION= 3 CATEGORIES= net MASTER_SITES= # ftp://src.doc.ic.ac.uk/computing/archiving/mirror/ MAINTAINER= pkgsrc-users@NetBSD.org HOMEPAGE= http://www.sunsite.org.uk/packages/mirror/ COMMENT= Mirror packages on remote sites +LICENSE= mit PKG_DESTDIR_SUPPORT= user-destdir diff --git a/net/mirror/distinfo b/net/mirror/distinfo index 7d97b96e735..175aaff499c 100644 --- a/net/mirror/distinfo +++ b/net/mirror/distinfo @@ -1,12 +1,12 @@ -$NetBSD: distinfo,v 1.5 2010/02/11 22:08:58 joerg Exp $ +$NetBSD: distinfo,v 1.6 2011/09/12 16:35:43 taca Exp $ SHA1 (mirror-2.9.tar.gz) = 7a4f7a395cfff06be04a449a050b32e2c055e6c4 RMD160 (mirror-2.9.tar.gz) = 2896ba289e182a8be09c50b7d1de8510d9caf188 Size (mirror-2.9.tar.gz) = 123194 bytes SHA1 (patch-aa) = 04ba59e036a946eeff5c1a8cea08465c21a92dd8 SHA1 (patch-ab) = 09045d218a86890f95e381f355fa61c3dfc34ef0 -SHA1 (patch-ac) = 5dd115284903102cf1f83de57d2aacdf9addf2f7 +SHA1 (patch-ac) = 816da27263d8883bc073f425d95b593c0a6f5ad2 SHA1 (patch-ad) = 24b9dd4124756d2c058309e306da0ca022719ac6 -SHA1 (patch-ae) = 888cf027b60ac06205e7003f96a94a1bae849be0 +SHA1 (patch-ae) = 2efb5c4cc8f25b897d163e28a908b9745a553229 SHA1 (patch-af) = d83755dca89242a6822e5531a481b1735089242a -SHA1 (patch-ag) = e132b4a089d042d5664bee394197db8ac7ca2f3c +SHA1 (patch-ag) = 31574a37bb09587ee7496a98c985865127a2fb0e diff --git a/net/mirror/patches/patch-ac b/net/mirror/patches/patch-ac index cc5a959f610..06c4b1a970a 100644 --- a/net/mirror/patches/patch-ac +++ b/net/mirror/patches/patch-ac @@ -1,8 +1,14 @@ -$NetBSD: patch-ac,v 1.4 2000/03/26 22:33:18 kim Exp $ +$NetBSD: patch-ac,v 1.5 2011/09/12 16:35:43 taca Exp $ ---- mirror.pl.orig Mon Jun 8 06:55:27 1998 -+++ mirror.pl Sat Mar 25 02:55:39 2000 -@@ -104,7 +104,7 @@ +* Fix path for pkgsrc. +* Use md5(1) instead of sum(1). +* Add -f option to compress program. +* Fix deleting remote directories. +* Fix display of transfer direction. + +--- mirror.pl.orig 1998-06-08 10:55:27.000000000 +0000 ++++ mirror.pl +@@ -104,7 +104,7 @@ $load_defaults = 1; # Try to find the default location of various programs via # the users PATH then using $extra_path if( ! $on_win ){ @@ -11,7 +17,7 @@ $NetBSD: patch-ac,v 1.4 2000/03/26 22:33:18 kim Exp $ } if( $extra_path ne '' ){ $ENV{ 'PATH' } .= $path_sep . $extra_path; -@@ -159,19 +159,20 @@ +@@ -159,19 +159,20 @@ if( ! $mail_prog ){ $rm_prog = &find_prog( 'rm' ); # Generate checksums @@ -36,7 +42,16 @@ $NetBSD: patch-ac,v 1.4 2000/03/26 22:33:18 kim Exp $ unshift( @INC, $dir ); # Debian GNU/Linux stores mirror.defaults in /etc/mirror -@@ -1807,7 +1808,7 @@ +@@ -1022,7 +1023,7 @@ sub do_mirror + &pr_variables( "\n" ); + } + elsif( $package && ! $pretty_print ){ +- if( $get_patt ){ ++ if( $get_file ){ + &msg( "package=$package $site:$remote_dir -> $local_dir\n"); + } + else { +@@ -1807,7 +1808,7 @@ sub get_remote_directory_details local( $f ); $f = $dirtmp; $f =~ s/($shell_metachars)/\\$1/g; @@ -45,7 +60,7 @@ $NetBSD: patch-ac,v 1.4 2000/03/26 22:33:18 kim Exp $ } if( ! open( DIRTMP, $dirtmp ) ){ &msg( "Cannot open $dirtmp\n" ); -@@ -1845,7 +1846,7 @@ +@@ -1845,7 +1846,7 @@ sub get_remote_directory_details $f = $dirtmp; $dirtmp =~ s/\.($sys_compress_suffix|$gzip_suffix|$old_gzip_suffix)$//; $udirtmp =~ s/\.($sys_compress_suffix|$gzip_suffix|$ol_gzip_suffix)$//; @@ -54,7 +69,7 @@ $NetBSD: patch-ac,v 1.4 2000/03/26 22:33:18 kim Exp $ &msg( "Cannot uncompress directory listing\n" ); return 0; } -@@ -2760,7 +2761,7 @@ +@@ -2760,7 +2761,7 @@ sub transfer_file local( $f ) = $src_file; $f =~ s/($shell_metachars)/\\$1/g; $comptemp = "$big_temp/.out$$"; @@ -63,7 +78,7 @@ $NetBSD: patch-ac,v 1.4 2000/03/26 22:33:18 kim Exp $ $src_file = $comptemp; } -@@ -2840,10 +2841,10 @@ +@@ -2840,10 +2841,10 @@ sub transfer_file # Am I doing compress to gzip conversion? if( $compress_conv_patt && $src_path =~ /$compress_conv_patt/ && $compress_suffix eq $gzip_suffix ){ @@ -76,3 +91,16 @@ $NetBSD: patch-ac,v 1.4 2000/03/26 22:33:18 kim Exp $ } &sys( $comp ); $temp =~ s/\\($shell_metachars)/$1/g; +@@ -3174,9 +3175,9 @@ sub do_delete + &msg( $log, "rmdir $cwd/$del failed: $!\n" ); + } + else { +- &msg( $log, "delete DIR $del\n" ); +- &ftp'delete( "$del" ) || +- &msg( $log, "ftp delete DIR $del failed\n" ); ++ &msg( $log, "deldir DIR $del\n" ); ++ &ftp'deldir( "$del" ) || ++ &msg( $log, "ftp deldir DIR $del failed\n" ); + } + } + else { diff --git a/net/mirror/patches/patch-ae b/net/mirror/patches/patch-ae index 52d17c9d889..bf5c4e14d7a 100644 --- a/net/mirror/patches/patch-ae +++ b/net/mirror/patches/patch-ae @@ -1,8 +1,12 @@ -$NetBSD: patch-ae,v 1.6 2000/04/20 03:22:50 kim Exp $ +$NetBSD: patch-ae,v 1.7 2011/09/12 16:35:43 taca Exp $ ---- ftp.pl.orig Fri Jun 5 05:10:27 1998 -+++ ftp.pl Wed Apr 19 23:14:00 2000 -@@ -233,7 +233,7 @@ +* Enable deleting remote directories. +* Proper signal handling. +* Miscellaneous bug fixes. + +--- ftp.pl.orig 1998-06-05 09:10:27.000000000 +0000 ++++ ftp.pl +@@ -233,7 +233,7 @@ sub timed_open } else { print $showfd "proxy connection failed " if $proxy; @@ -11,7 +15,7 @@ $NetBSD: patch-ae,v 1.6 2000/04/20 03:22:50 kim Exp $ return 0; } } -@@ -270,6 +270,14 @@ +@@ -270,6 +270,14 @@ sub ftp'set_signals $SIG{ 'PIPE' } = "ftp'ftp__sighandler"; } @@ -26,7 +30,7 @@ $NetBSD: patch-ae,v 1.6 2000/04/20 03:22:50 kim Exp $ # &ftp'set_namemap( function to map outgoing name, function to map incoming ) sub ftp'set_namemap { -@@ -486,7 +494,7 @@ +@@ -486,7 +494,7 @@ sub pasv return 0; } if( $ret == 1 ) { @@ -35,7 +39,7 @@ $NetBSD: patch-ae,v 1.6 2000/04/20 03:22:50 kim Exp $ $newhost = sprintf( "%d.%d.%d.%d", $1, $2, $3, $4 ); $newport = $5 * 256 + $6; } -@@ -581,6 +589,9 @@ +@@ -581,6 +589,9 @@ sub ftp'dir_close return 0; } @@ -45,7 +49,7 @@ $NetBSD: patch-ae,v 1.6 2000/04/20 03:22:50 kim Exp $ # read the close # $ret = &expect($timeout, -@@ -590,8 +601,6 @@ +@@ -590,8 +601,6 @@ sub ftp'dir_close $ret = 0; } @@ -54,7 +58,7 @@ $NetBSD: patch-ae,v 1.6 2000/04/20 03:22:50 kim Exp $ if( ! $ret ){ return 0; -@@ -708,6 +717,7 @@ +@@ -708,6 +717,7 @@ sub ftp'get if( ! $service_open ){ return 0; } @@ -62,3 +66,34 @@ $NetBSD: patch-ae,v 1.6 2000/04/20 03:22:50 kim Exp $ if( $loc_fname eq "" ){ $loc_fname = $rem_fname; +@@ -917,10 +927,27 @@ sub delete + + sub deldir + { +- local( $fname ) = @_; ++ local( $rem_fname ) = @_; ++ local( $ret ); ++ ++ if( ! $service_open ){ ++ return 0; ++ } + +- # not yet implemented +- # RMD ++ if( $mapunixout ){ ++ $rem_fname = eval "&$mapunixout( \$rem_fname, 'f' )"; ++ } ++ ++ &send( "RMD $rem_fname" ); ++ ++ $ret = &expect( $timeout, ++ 2, 1 ); # Deleted $rem_fname ++ if( $ret == 99 ){ ++ &service_closed(); ++ $ret = 0; ++ } ++ ++ return $ret == 1; + } + + # &ftp'put( local filename, remote filename, restart where left off ) diff --git a/net/mirror/patches/patch-ag b/net/mirror/patches/patch-ag index 19e2e0be0ac..79ba7876455 100644 --- a/net/mirror/patches/patch-ag +++ b/net/mirror/patches/patch-ag @@ -1,8 +1,21 @@ -$NetBSD: patch-ag,v 1.1 2000/07/20 01:45:24 kim Exp $ +$NetBSD: patch-ag,v 1.2 2011/09/12 16:35:43 taca Exp $ ---- dateconv.pl.orig Fri May 29 15:04:32 1998 -+++ dateconv.pl Wed Jul 19 21:32:52 2000 -@@ -149,5 +149,5 @@ +* Avoid to use timelocal.pl which cause obsolete warning with perl 5.14. +* Make sure to use 4-digit year. + +--- dateconv.pl.orig 1998-05-29 19:04:32.000000000 +0000 ++++ dateconv.pl +@@ -47,7 +47,8 @@ sub lstime_to_standard + } + + +-require 'timelocal.pl'; ++use Time::Local; ++ + package dateconv; + + # Use timelocal rather than gmtime. +@@ -149,5 +150,5 @@ sub main'time_to_standard local( $sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst ) = gmtime( $time ); |