Mon Apr 22 18:28:54 2024 UTC (30d)
Pullup ticket #6846 - requested by bouyer
net/mirror: build fix

Revisions pulled up:
- net/mirror/Makefile                                           1.47
- net/mirror/distinfo                                           1.10-1.11
- net/mirror/patches/patch-ac                                   1.6
- net/mirror/patches/patch-ad                                   1.6
- net/mirror/patches/patch-ae                                   1.8-1.9
- net/mirror/patches/patch-ag                                   1.3
- net/mirror/patches/patch-lsparse.pl                           1.1

---
   Module Name:	pkgsrc
   Committed By:	bouyer
   Date:		Thu Apr 11 10:23:44 UTC 2024

   Modified Files:
   	pkgsrc/net/mirror: Makefile distinfo
   	pkgsrc/net/mirror/patches: patch-ac patch-ad patch-ae patch-ag
   Added Files:
   	pkgsrc/net/mirror/patches: patch-lsparse.pl

   Log Message:
   Fix warning:
   Old package separator "'" deprecated at ...
   Bump PKGREVISION

---
   Module Name:	pkgsrc
   Committed By:	bouyer
   Date:		Thu Apr 11 17:11:01 UTC 2024

   Modified Files:
   	pkgsrc/net/mirror: distinfo
   	pkgsrc/net/mirror/patches: patch-ae

   Log Message:
   Remove $Id: from patch-ae, so that CVS doesn't change it
   Regen distinfo


(bsiegert)
diff -r1.46 -r1.46.14.1 pkgsrc/net/mirror/Makefile
diff -r1.9 -r1.9.20.1 pkgsrc/net/mirror/distinfo
diff -r1.5 -r1.5.102.1 pkgsrc/net/mirror/patches/patch-ac
diff -r1.5 -r1.5.176.1 pkgsrc/net/mirror/patches/patch-ad
diff -r1.7 -r1.7.102.1 pkgsrc/net/mirror/patches/patch-ae
diff -r1.2 -r1.2.102.1 pkgsrc/net/mirror/patches/patch-ag
diff -r0 -r1.1.2.2 pkgsrc/net/mirror/patches/patch-lsparse.pl

cvs diff -r1.46 -r1.46.14.1 pkgsrc/net/mirror/Makefile (expand / switch to unified diff)

--- pkgsrc/net/mirror/Makefile 2022/06/28 11:35:02 1.46
+++ pkgsrc/net/mirror/Makefile 2024/04/22 18:28:54 1.46.14.1
@@ -1,17 +1,17 @@ @@ -1,17 +1,17 @@
1# $NetBSD: Makefile,v 1.46 2022/06/28 11:35:02 wiz Exp $ 1# $NetBSD: Makefile,v 1.46.14.1 2024/04/22 18:28:54 bsiegert Exp $
2 2
3DISTNAME= mirror-2.9 3DISTNAME= mirror-2.9
4PKGREVISION= 13 4PKGREVISION= 14
5CATEGORIES= net 5CATEGORIES= net
6MASTER_SITES= # ftp://src.doc.ic.ac.uk/computing/archiving/mirror/ 6MASTER_SITES= # ftp://src.doc.ic.ac.uk/computing/archiving/mirror/
7 7
8MAINTAINER= pkgsrc-users@NetBSD.org 8MAINTAINER= pkgsrc-users@NetBSD.org
9HOMEPAGE= http://www.sunsite.org.uk/packages/mirror/ 9HOMEPAGE= http://www.sunsite.org.uk/packages/mirror/
10COMMENT= Mirror packages on remote sites 10COMMENT= Mirror packages on remote sites
11LICENSE= mit 11LICENSE= mit
12 12
13WRKSRC= ${WRKDIR} 13WRKSRC= ${WRKDIR}
14MAKE_FILE= makefile 14MAKE_FILE= makefile
15MAKE_FLAGS+= GRP=${BINGRP} 15MAKE_FLAGS+= GRP=${BINGRP}
16 16
17USE_TOOLS+= perl:run 17USE_TOOLS+= perl:run

cvs diff -r1.9 -r1.9.20.1 pkgsrc/net/mirror/distinfo (expand / switch to unified diff)

--- pkgsrc/net/mirror/distinfo 2021/10/26 11:06:00 1.9
+++ pkgsrc/net/mirror/distinfo 2024/04/22 18:28:54 1.9.20.1
@@ -1,12 +1,13 @@ @@ -1,12 +1,13 @@
1$NetBSD: distinfo,v 1.9 2021/10/26 11:06:00 nia Exp $ 1$NetBSD: distinfo,v 1.9.20.1 2024/04/22 18:28:54 bsiegert Exp $
2 2
3BLAKE2s (mirror-2.9.tar.gz) = 9af6c135528b0a26418a229f6f943f70913a07fef1fffa2954685fa2d17e4bb6 3BLAKE2s (mirror-2.9.tar.gz) = 9af6c135528b0a26418a229f6f943f70913a07fef1fffa2954685fa2d17e4bb6
4SHA512 (mirror-2.9.tar.gz) = afed2e62b95d1dd52aac32f3a608c0e08813c78d1bed8f5066bc4d6ac031c05ffeb7c7594a1c565dbf015086d7b3a907f35132ea850a3b93c31377e69dfa0654 4SHA512 (mirror-2.9.tar.gz) = afed2e62b95d1dd52aac32f3a608c0e08813c78d1bed8f5066bc4d6ac031c05ffeb7c7594a1c565dbf015086d7b3a907f35132ea850a3b93c31377e69dfa0654
5Size (mirror-2.9.tar.gz) = 123194 bytes 5Size (mirror-2.9.tar.gz) = 123194 bytes
6SHA1 (patch-aa) = 04ba59e036a946eeff5c1a8cea08465c21a92dd8 6SHA1 (patch-aa) = 04ba59e036a946eeff5c1a8cea08465c21a92dd8
7SHA1 (patch-ab) = 09045d218a86890f95e381f355fa61c3dfc34ef0 7SHA1 (patch-ab) = 09045d218a86890f95e381f355fa61c3dfc34ef0
8SHA1 (patch-ac) = 816da27263d8883bc073f425d95b593c0a6f5ad2 8SHA1 (patch-ac) = 4f018248392769e4da9e87ec16c509b3ac87d0e0
9SHA1 (patch-ad) = 24b9dd4124756d2c058309e306da0ca022719ac6 9SHA1 (patch-ad) = 9cbc9ce613cc0588d22186d542012fb911ab166f
10SHA1 (patch-ae) = 2efb5c4cc8f25b897d163e28a908b9745a553229 10SHA1 (patch-ae) = 75c1433f01da0a38b7983f04d435fce2bb6cc7f7
11SHA1 (patch-af) = d83755dca89242a6822e5531a481b1735089242a 11SHA1 (patch-af) = d83755dca89242a6822e5531a481b1735089242a
12SHA1 (patch-ag) = 31574a37bb09587ee7496a98c985865127a2fb0e 12SHA1 (patch-ag) = f402c883c3fe8967f7dc6b847969915ae367f678
 13SHA1 (patch-lsparse.pl) = 9048fc10b06616c87fa7eafd64eb098e30ac3b7e

cvs diff -r1.5 -r1.5.102.1 pkgsrc/net/mirror/patches/patch-ac (expand / switch to unified diff)

--- pkgsrc/net/mirror/patches/patch-ac 2011/09/12 16:35:43 1.5
+++ pkgsrc/net/mirror/patches/patch-ac 2024/04/22 18:28:54 1.5.102.1
@@ -1,106 +1,592 @@ @@ -1,106 +1,592 @@
1$NetBSD: patch-ac,v 1.5 2011/09/12 16:35:43 taca Exp $ 1$NetBSD: patch-ac,v 1.5.102.1 2024/04/22 18:28:54 bsiegert Exp $
2 2
3* Fix path for pkgsrc. 3* Fix path for pkgsrc.
4* Use md5(1) instead of sum(1). 4* Use md5(1) instead of sum(1).
5* Add -f option to compress program. 5* Add -f option to compress program.
6* Fix deleting remote directories. 6* Fix deleting remote directories.
7* Fix display of transfer direction. 7* Fix display of transfer direction.
 8* Fix deprecation warning (change ' to ::) for newer perl
8 9
9--- mirror.pl.orig 1998-06-08 10:55:27.000000000 +0000 10--- mirror.pl.orig 2024-04-11 11:08:05.973997402 +0200
10+++ mirror.pl 11+++ mirror.pl 2024-04-11 11:07:48.794686287 +0200
11@@ -104,7 +104,7 @@ $load_defaults = 1; 12@@ -38,7 +38,7 @@
 13 # Allow for remote_account pasword.
 14 # Only one arg to undef, for early perl5's
 15 # Use all capitals for file descriptors.
 16-# Use ftp'close not ftp'quit
 17+# Use ftp::close not ftp::quit
 18 # Avoid file renaming under MACos
 19 # Corrected file deleting.
 20 #
 21@@ -51,7 +51,7 @@
 22 # Allow strip_cr (from Andrew).
 23 # More symlink handling...
 24 # Set type for vms correctly.
 25-# Changed response from ftp'delete, also corrected path used.
 26+# Changed response from ftp::delete, also corrected path used.
 27 #
 28 # Revision 2.4 1994/04/29 20:11:09 lmjm
 29 # Use correct variable for hostname
 30@@ -104,7 +104,7 @@
12 # Try to find the default location of various programs via 31 # Try to find the default location of various programs via
13 # the users PATH then using $extra_path 32 # the users PATH then using $extra_path
14 if( ! $on_win ){ 33 if( ! $on_win ){
15- $extra_path = '/usr/local/bin:/usr/new/bin:/usr/public/bin:/usr/ucb:/usr/bin:/bin:/etc:/usr/etc:/usr/local/etc'; 34- $extra_path = '/usr/local/bin:/usr/new/bin:/usr/public/bin:/usr/ucb:/usr/bin:/bin:/etc:/usr/etc:/usr/local/etc';
16+ $extra_path = '/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:!!PREFIX!!/bin:!!PREFIX!!/sbin'; 35+ $extra_path = '/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:!!PREFIX!!/bin:!!PREFIX!!/sbin';
17 } 36 }
18 if( $extra_path ne '' ){ 37 if( $extra_path ne '' ){
19 $ENV{ 'PATH' } .= $path_sep . $extra_path; 38 $ENV{ 'PATH' } .= $path_sep . $extra_path;
20@@ -159,19 +159,20 @@ if( ! $mail_prog ){ 39@@ -159,19 +159,20 @@
21 $rm_prog = &find_prog( 'rm' ); 40 $rm_prog = &find_prog( 'rm' );
22  41
23 # Generate checksums 42 # Generate checksums
24-$sum_prog = &find_prog( 'sum' ); 43-$sum_prog = &find_prog( 'sum' );
25+$sum_prog = &find_prog( 'md5' ); 44+$sum_prog = &find_prog( 'md5' );
26  45
27 # SPECIAL NOTE: This is eval'd, so DONT put double-quotes (") in it. 46 # SPECIAL NOTE: This is eval'd, so DONT put double-quotes (") in it.
28 # You can get local variables to appear as in the second example: 47 # You can get local variables to appear as in the second example:
29-$mail_subject = '-s \'mirror update\''; 48-$mail_subject = '-s \'mirror update\'';
30-# $mail_subject = ' -s \'mirror update of $package\''; 49-# $mail_subject = ' -s \'mirror update of $package\'';
31+# $mail_subject = '-s \'mirror update\''; 50+# $mail_subject = '-s \'mirror update\'';
32+$mail_subject = ' -s \'mirror update of $package\''; 51+$mail_subject = ' -s \'mirror update of $package\'';
33  52
34 # When scanning the local directory, how often to prod the remote 53 # When scanning the local directory, how often to prod the remote
35 # system to keep the connection alive 54 # system to keep the connection alive
36 $prod_interval = 60; 55 $prod_interval = 60;
37  56
38 # Put the directory that mirror is actually in at the start of PERLLIB. 57 # Put the directory that mirror is actually in at the start of PERLLIB.
39-$dir = &real_dir_from_path( $0 ); 58-$dir = &real_dir_from_path( $0 );
40+# $dir = &real_dir_from_path( $0 ); 59+# $dir = &real_dir_from_path( $0 );
41+$dir = "!!PREFIX!!/lib/mirror"; 60+$dir = "!!PREFIX!!/lib/mirror";
42 unshift( @INC, $dir ); 61 unshift( @INC, $dir );
43  62
44 # Debian GNU/Linux stores mirror.defaults in /etc/mirror 63 # Debian GNU/Linux stores mirror.defaults in /etc/mirror
45@@ -1022,7 +1023,7 @@ sub do_mirror 64@@ -259,7 +260,7 @@
 65 $default{ 'remote_gpass' } = '';
 66 $default{ 'timeout' } = 120; # timeout ftp requests after this many seconds
 67 $default{ 'failed_gets_excl' } = ''; # failed messages to ignore while getting,
 68- # if failed to ftp'get
 69+ # if failed to ftp::get
 70 $default{ 'ftp_port' } = 21; # port number of remote ftp daemon
 71 $default{ 'proxy' } = 0; # normally use regular ftp
 72 $default{ 'proxy_ftp_port' } = 4514; # default from Sun
 73@@ -656,7 +657,7 @@
 74 # THIS DOES NOT YET WORK!!!!!
 75 $dumped_version = 1;
 76 warn "Dumping perl\n";
 77- dump parse_args;
 78+ CORE::dump parse_args;
 79 }
 80
 81 warn "Unknown arg $arg, skipping\n";
 82@@ -1022,7 +1023,7 @@
46 &pr_variables( "\n" ); 83 &pr_variables( "\n" );
47 } 84 }
48 elsif( $package && ! $pretty_print ){ 85 elsif( $package && ! $pretty_print ){
49- if( $get_patt ){ 86- if( $get_patt ){
50+ if( $get_file ){ 87+ if( $get_file ){
51 &msg( "package=$package $site:$remote_dir -> $local_dir\n"); 88 &msg( "package=$package $site:$remote_dir -> $local_dir\n");
52 } 89 }
53 else { 90 else {
54@@ -1807,7 +1808,7 @@ sub get_remote_directory_details 91@@ -1053,10 +1054,10 @@
 92
 93 if( $debug ){
 94 # Keep the ftp debugging lower than the rest.
 95- &ftp'debug( $debug - 1);
 96+ &ftp::debug( $debug - 1);
 97 }
 98 else {
 99- &ftp'debug( $verbose );
 100+ &ftp::debug( $verbose );
 101 }
 102
 103 if( $recurse_hard ){
 104@@ -1069,19 +1070,19 @@
 105 }
 106
 107 if( ! $interactive ){
 108- $ftp'showfd = 'STDOUT';
 109+ $ftp::showfd = 'STDOUT';
 110 }
 111- &ftp'set_timeout( $timeout );
 112- &ftp'set_signals( "main'msg" );
 113+ &ftp::set_timeout( $timeout );
 114+ &ftp::set_signals( "main'msg" );
 115
 116 # set passive ftp mode
 117 if( $passive_ftp ){
 118- $ftp'use_pasv = 1;
 119+ $ftp::use_pasv = 1;
 120 }
 121
 122 # Are we using the SOCKS version of perl?
 123 if( $using_socks ){
 124- $chat'using_socks = 1;
 125+ $chat::using_socks = 1;
 126 }
 127
 128 # Useful string in prints
 129@@ -1216,13 +1217,13 @@
 130 if( $con == 1 ){
 131 &msg( "login as $remote_user\n" ) if $debug > 1;
 132 $curr_remote_user = $remote_user;
 133- if( ! &ftp'login( $remote_user, $remote_password, $remote_account ) ){
 134+ if( ! &ftp::login( $remote_user, $remote_password, $remote_account ) ){
 135 &msg( "Cannot login, skipping package\n" );
 136 &disconnect();
 137 &msg( "\n" );
 138 return $exit_status;
 139 }
 140- $can_restart = (&ftp'restart(0) == 1);
 141+ $can_restart = (&ftp::restart(0) == 1);
 142 if( $debug > 1 ){
 143 &msg( "Can " . ($can_restart ? '' : "not ") . "do restarts\n" );
 144
 145@@ -1233,7 +1234,7 @@
 146 &msg( "Already connected to site $site\n" ) if $debug;
 147 }
 148
 149- if( ! &ftp'type( $text_mode ? 'A' : 'I' ) ){
 150+ if( ! &ftp::type( $text_mode ? 'A' : 'I' ) ){
 151 &msg( "Cannot set type\n" );
 152 }
 153
 154@@ -1244,16 +1245,16 @@
 155 # setting the namemap functions.
 156 if( $remote_fs =~ /vms/i ){
 157 $vms = 1;
 158- &ftp'set_namemap( "main'unix2vms", "main'vms2unix" );
 159+ &ftp::set_namemap( "main'unix2vms", "main'vms2unix" );
 160 }
 161 else {
 162 $vms = 0;
 163 # No mapping necessary
 164- &ftp'set_namemap( '' );
 165+ &ftp::set_namemap( '' );
 166 }
 167
 168 if( ! $get_file || $remote_idle ){
 169- local( @rhelp ) = &ftp'site_commands();
 170+ local( @rhelp ) = &ftp::site_commands();
 171 $remote_has_chmod = grep( $_ eq 'CHMOD', @rhelp);
 172 $remote_has_rename = grep( $_ eq 'RNFR', @rhelp) && grep( $_ eq 'RNTO', @rhelp);
 173 $remote_has_idle = grep( $_ eq 'IDLE', @rhelp);
 174@@ -1264,7 +1265,7 @@
 175 }
 176
 177 if( $remote_has_idle && $remote_idle ){
 178- if( ! &ftp'quote( "site idle $remote_idle" ) ){
 179+ if( ! &ftp::quote( "site idle $remote_idle" ) ){
 180 &msg( "Cannot set remote idle\n" );
 181 }
 182 elsif( $debug > 2 ){
 183@@ -1273,7 +1274,7 @@
 184 }
 185
 186 if( $remote_group ){
 187- if( ! &ftp'quote( "site group $remote_group" ) ){
 188+ if( ! &ftp::quote( "site group $remote_group" ) ){
 189 &msg( "Cannot set remote group\n" );
 190 }
 191 elsif( $debug > 2 ){
 192@@ -1282,7 +1283,7 @@
 193 }
 194
 195 if( $remote_gpass ){
 196- if( ! &ftp'quote( "site gpass $remote_gpass" ) ){
 197+ if( ! &ftp::quote( "site gpass $remote_gpass" ) ){
 198 &msg( "Cannot set remote gpass\n" );
 199 }
 200 elsif( $debug > 2 ){
 201@@ -1496,11 +1497,11 @@
 202 {
 203 if( $connected ){
 204 &msg( "disconnecting from $connected\n" ) if $debug;
 205- if( ! $ftp'fatalerror ){
 206- &ftp'close();
 207+ if( ! $ftp::fatalerror ){
 208+ &ftp::close();
 209 }
 210 else {
 211- &ftp'service_closed();
 212+ &ftp::service_closed();
 213 }
 214 }
 215 $connected = '';
 216@@ -1524,11 +1525,11 @@
 217 &disconnect();
 218
 219 if( $proxy ){
 220- $ftp'proxy = $proxy;
 221- $ftp'proxy_gateway = $proxy_gateway;
 222- $ftp'proxy_ftp_port = $proxy_ftp_port;
 223+ $ftp::proxy = $proxy;
 224+ $ftp::proxy_gateway = $proxy_gateway;
 225+ $ftp::proxy_ftp_port = $proxy_ftp_port;
 226 }
 227- $res = &ftp'open( $site, $ftp_port, $retry_call, $attempts );
 228+ $res = &ftp::open( $site, $ftp_port, $retry_call, $attempts );
 229 if( $res == 1 ){
 230 # Connected
 231 $connected = $site;
 232@@ -1544,7 +1545,7 @@
 233 if( $debug > 2 ){
 234 &msg( " prodding remote ftpd\n" );
 235 }
 236- &ftp'pwd();
 237+ &ftp::pwd();
 238 }
 239
 240 # checkout and fixup any regexps.
 241@@ -1774,7 +1775,7 @@
 242 $remote_type[ 0 ] = 0;
 243 $remote_mode[ 0 ] = 0;
 244
 245- if( $remote_fs !~ /cms/ && ! &ftp'cwd( $remote_dir ) ){
 246+ if( $remote_fs !~ /cms/ && ! &ftp::cwd( $remote_dir ) ){
 247 if( $get_file ){
 248 # no files to get
 249 return 0;
 250@@ -1783,8 +1784,8 @@
 251 &msg( "Failed to change to remote directory ($remote_dir) trying to create it\n" );
 252 &mkdirs( $remote_dir );
 253
 254- if( ! &ftp'cwd( $remote_dir ) ){
 255- &msg( "Cannot change to remote directory ($remote_dir) because: $ftp'response\n" );
 256+ if( ! &ftp::cwd( $remote_dir ) ){
 257+ &msg( "Cannot change to remote directory ($remote_dir) because: $ftp::response\n" );
 258 return 0;
 259 }
 260 }
 261@@ -1807,7 +1808,7 @@
55 local( $f ); 262 local( $f );
56 $f = $dirtmp; 263 $f = $dirtmp;
57 $f =~ s/($shell_metachars)/\\$1/g; 264 $f =~ s/($shell_metachars)/\\$1/g;
58- $dirtmp = "$unsquish -d < \"$f\" |"; 265- $dirtmp = "$unsquish -d < \"$f\" |";
59+ $dirtmp = "$unsquish -f -d < \"$f\" |"; 266+ $dirtmp = "$unsquish -f -d < \"$f\" |";
60 } 267 }
61 if( ! open( DIRTMP, $dirtmp ) ){ 268 if( ! open( DIRTMP, $dirtmp ) ){
62 &msg( "Cannot open $dirtmp\n" ); 269 &msg( "Cannot open $dirtmp\n" );
63@@ -1845,7 +1846,7 @@ sub get_remote_directory_details 270@@ -1827,7 +1828,7 @@
 271 }
 272
 273 &msg( " Getting directory listing from remote file $ls_lR_file\n" ) if $debug;
 274- if( ! &ftp'get( $ls_lR_file, $dirtmp, 0 ) ){
 275+ if( ! &ftp::get( $ls_lR_file, $dirtmp, 0 ) ){
 276 &msg( "Cannot get dir listing file\n" );
 277 return 0;
 278 }
 279@@ -1845,7 +1846,7 @@
64 $f = $dirtmp; 280 $f = $dirtmp;
65 $dirtmp =~ s/\.($sys_compress_suffix|$gzip_suffix|$old_gzip_suffix)$//; 281 $dirtmp =~ s/\.($sys_compress_suffix|$gzip_suffix|$old_gzip_suffix)$//;
66 $udirtmp =~ s/\.($sys_compress_suffix|$gzip_suffix|$ol_gzip_suffix)$//; 282 $udirtmp =~ s/\.($sys_compress_suffix|$gzip_suffix|$ol_gzip_suffix)$//;
67- if( &sys( "$unsquish -d < \"$f\" > \"$dirtmp\"" ) != 0 ){ 283- if( &sys( "$unsquish -d < \"$f\" > \"$dirtmp\"" ) != 0 ){
68+ if( &sys( "$unsquish -f -d < \"$f\" > \"$dirtmp\"" ) != 0 ){ 284+ if( &sys( "$unsquish -f -d < \"$f\" > \"$dirtmp\"" ) != 0 ){
69 &msg( "Cannot uncompress directory listing\n" ); 285 &msg( "Cannot uncompress directory listing\n" );
70 return 0; 286 return 0;
71 } 287 }
72@@ -2760,7 +2761,7 @@ sub transfer_file 288@@ -1860,7 +1861,7 @@
 289 }
 290 else {
 291 $use_ls = 1;
 292- if( ! &ftp'type( 'A' ) ){
 293+ if( ! &ftp::type( 'A' ) ){
 294 &msg( "Cannot set type to ascii for dir listing, ignored\n" );
 295 $type_changed = 0;
 296 }
 297@@ -1869,21 +1870,21 @@
 298 }
 299 }
 300
 301- $lsparse'fstype = $remote_fs;
 302- $lsparse'name = "$site:$package";
 303+ $lsparse::fstype = $remote_fs;
 304+ $lsparse::name = "$site:$package";
 305
 306 if( $use_ls ){
 307 local( $flags ) = $flags_nonrecursive;
 308 if( $recursive && ! $recurse_hard ){
 309 $flags = $flags_recursive;
 310 }
 311- $lsparse'report_subdirs = (! $recurse_hard && $algorithm == 0);
 312- if( !&ftp'dir_open( $flags ) ){
 313- &msg( "Cannot get remote directory listing because: $ftp'response\n" );
 314+ $lsparse::report_subdirs = (! $recurse_hard && $algorithm == 0);
 315+ if( !&ftp::dir_open( $flags ) ){
 316+ &msg( "Cannot get remote directory listing because: $ftp::response\n" );
 317 return 0;
 318 }
 319
 320- $rls = "ftp'NS";
 321+ $rls = "ftp::NS";
 322 }
 323
 324 $rcwd = '';
 325@@ -1892,8 +1893,8 @@
 326 # relative to the remote_dir
 327 $rcwd = $remote_dir;
 328 }
 329- $dateconv'use_timelocal = $use_timelocal;
 330- if( !&lsparse'reset( $rcwd ) ){
 331+ $dateconv::use_timelocal = $use_timelocal;
 332+ if( !&lsparse::reset( $rcwd ) ){
 333 &msg( "$remote_fs: unknown fstype\n" );
 334 return 0;
 335 }
 336@@ -1923,7 +1924,7 @@
 337 # Could optimise this out - but it makes sure that
 338 # the other end gets a command straight after a possibly
 339 # long dir listing.
 340- if( ! &ftp'type( $text_mode ? 'A' : 'I' ) ){
 341+ if( ! &ftp::type( $text_mode ? 'A' : 'I' ) ){
 342 local( $msg ) = "Cannot reset type after dir listing, ";
 343 if( $type_changed ){
 344 # I changed it before - so I must be able to
 345@@ -1995,7 +1996,7 @@
 346 while( 1 ){
 347 while( !eof( $rls ) ){
 348 ( $path, $size, $time, $type, $mode ) =
 349- &lsparse'line( $rls );
 350+ &lsparse::line( $rls );
 351 last if $path eq '';
 352 if( $ls_fix_mappings ){
 353 local( $old_path ) = $path;
 354@@ -2086,9 +2087,9 @@
 355 }
 356
 357 if( $use_ls ){
 358- if( ! &ftp'dir_close() ){
 359+ if( ! &ftp::dir_close() ){
 360 &msg( "Failure at end of remote directory" .
 361- " ($rdir) because: $ftp'response\n" );
 362+ " ($rdir) because: $ftp::response\n" );
 363 return 0;
 364 }
 365 }
 366@@ -2098,9 +2099,9 @@
 367 while( 1 ){
 368 if( $#dir_list < 0 ){
 369 # Make sure we end in the right directory.
 370- if( ! &ftp'cwd( $remote_dir ) ){
 371+ if( ! &ftp::cwd( $remote_dir ) ){
 372 &msg( "Cannot change to remote directory" .
 373- " ($rdir) because: $ftp'response\n" );
 374+ " ($rdir) because: $ftp::response\n" );
 375 return 0;
 376 }
 377 $done = 1;
 378@@ -2111,9 +2112,9 @@
 379 if( $debug > 2 ){
 380 print "scanning: $remote_dir / $rcwd\n";
 381 }
 382- if( ! &ftp'cwd( $rdir ) ){
 383+ if( ! &ftp::cwd( $rdir ) ){
 384 &msg( "Cannot change to remote directory" .
 385- " ($rdir) because: $ftp'response\n" );
 386+ " ($rdir) because: $ftp::response\n" );
 387 next;
 388 }
 389 last;
 390@@ -2121,12 +2122,12 @@
 391 if( $done ){
 392 last;
 393 }
 394- if( !&ftp'dir_open( $flags_nonrecursive ) ){
 395+ if( !&ftp::dir_open( $flags_nonrecursive ) ){
 396 &msg( "Cannot get remote directory" .
 397- " listing because: $ftp'response\n" );
 398+ " listing because: $ftp::response\n" );
 399 return 0;
 400 }
 401- &lsparse'reset( $rcwd );
 402+ &lsparse::reset( $rcwd );
 403
 404 # round the loop again.
 405 next;
 406@@ -2517,7 +2518,7 @@
 407
 408 if( $external_mapping ){
 409 $old_name = $name;
 410- local( $tmp ) = &extmap'map( $name );
 411+ local( $tmp ) = &extmap::map( $name );
 412 if( $tmp ne $old_name ){
 413 $name = $tmp;
 414 }
 415@@ -2678,11 +2679,11 @@
 416 &transfer_file( $src_path, $dest_path,
 417 $attribs, $remote_time[ $srci ] );
 418 if( $get_file && $newpath eq '' ){
 419- &msg( $log, "Failed to $XFER file $ftp'response\n" );
 420- if( $ftp'response =~ /timeout|timed out/i ){
 421+ &msg( $log, "Failed to $XFER file $ftp::response\n" );
 422+ if( $ftp::response =~ /timeout|timed out/i ){
 423 $timeouts++;
 424 }
 425- if( $ftp'fatalerror || $timeouts > $max_timeouts ){
 426+ if( $ftp::fatalerror || $timeouts > $max_timeouts ){
 427 &msg( $log, "Fatal error talking to site, skipping rest of transfers\n" );
 428 &disconnect();
 429 return;
 430@@ -2742,11 +2743,11 @@
 431 }
 432
 433 if( $vms ){
 434- &ftp'type( ($src_path =~ /$vms_xfer_text/i) ? 'A' : 'I' );
 435+ &ftp::type( ($src_path =~ /$vms_xfer_text/i) ? 'A' : 'I' );
 436 }
 437
 438 if( $remote_fs eq 'macos' && ! $get_file ){
 439- &ftp'type( 'A' );
 440+ &ftp::type( 'A' );
 441 }
 442
 443 if( ! $get_file ){
 444@@ -2760,7 +2761,7 @@
73 local( $f ) = $src_file; 445 local( $f ) = $src_file;
74 $f =~ s/($shell_metachars)/\\$1/g; 446 $f =~ s/($shell_metachars)/\\$1/g;
75 $comptemp = "$big_temp/.out$$"; 447 $comptemp = "$big_temp/.out$$";
76- &sys( "$compress_prog < \"$f\" > \"$comptemp\"" ); 448- &sys( "$compress_prog < \"$f\" > \"$comptemp\"" );
77+ &sys( "$compress_prog -f < \"$f\" > \"$comptemp\"" ); 449+ &sys( "$compress_prog -f < \"$f\" > \"$comptemp\"" );
78 $src_file = $comptemp; 450 $src_file = $comptemp;
79 } 451 }
80  452
81@@ -2840,10 +2841,10 @@ sub transfer_file 453@@ -2768,15 +2769,15 @@
 454 $temp = $dest_path;
 455 }
 456
 457- if( ! &ftp'put( $src_file, $temp, $restart ) ){
 458- &msg( $log, "Failed to put $src_file: $ftp'response\n" );
 459+ if( ! &ftp::put( $src_file, $temp, $restart ) ){
 460+ &msg( $log, "Failed to put $src_file: $ftp::response\n" );
 461 unlink( $comptemp ) if $comptemp;
 462 return '';
 463 }
 464
 465 unlink( $comptemp ) if $comptemp;
 466- if( !$no_rename && ! &ftp'rename( $temp, $dest_path ) ){
 467- &msg( $log, "Failed to remote rename $temp to $dest_path: $ftp'response\n" );
 468+ if( !$no_rename && ! &ftp::rename( $temp, $dest_path ) ){
 469+ &msg( $log, "Failed to remote rename $temp to $dest_path: $ftp::response\n" );
 470 return '';
 471 }
 472
 473@@ -2800,11 +2801,11 @@
 474 # it.
 475
 476 # Get a file
 477- &ftp'dostrip( $strip_cr );
 478+ &ftp::dostrip( $strip_cr );
 479 $start_time = time;
 480- if( ! &ftp'get( $src_path, $temp, $restart ) ){
 481- if( !$failed_gets_excl || $ftp'response !~ /$failed_gets_excl/ ){
 482- &msg( $log, "Failed to get $src_path: $ftp'response\n" );
 483+ if( ! &ftp::get( $src_path, $temp, $restart ) ){
 484+ if( !$failed_gets_excl || $ftp::response !~ /$failed_gets_excl/ ){
 485+ &msg( $log, "Failed to get $src_path: $ftp::response\n" );
 486 }
 487
 488 # Time stamp the temp file to allow for a restart
 489@@ -2823,7 +2824,7 @@
 490
 491 # delete source file after successful transfer
 492 if( $delete_source ){
 493- if( &ftp'delete( $src_path ) ){
 494+ if( &ftp::delete( $src_path ) ){
 495 &msg( $log, "Deleted remote $src_path\n");
 496 }
 497 else {
 498@@ -2840,10 +2841,10 @@
82 # Am I doing compress to gzip conversion? 499 # Am I doing compress to gzip conversion?
83 if( $compress_conv_patt && $src_path =~ /$compress_conv_patt/ && 500 if( $compress_conv_patt && $src_path =~ /$compress_conv_patt/ &&
84 $compress_suffix eq $gzip_suffix ){ 501 $compress_suffix eq $gzip_suffix ){
85- $comp = "$sys_compress_prog -d < \"$f\" | $gzip_prog > \"$temp\""; 502- $comp = "$sys_compress_prog -d < \"$f\" | $gzip_prog > \"$temp\"";
86+ $comp = "$sys_compress_prog -f -d < \"$f\" | $gzip_prog > \"$temp\""; 503+ $comp = "$sys_compress_prog -f -d < \"$f\" | $gzip_prog > \"$temp\"";
87 } 504 }
88 else { 505 else {
89- $comp = "$compress_prog < \"$f\" > \"$temp\""; 506- $comp = "$compress_prog < \"$f\" > \"$temp\"";
90+ $comp = "$compress_prog -f < \"$f\" > \"$temp\""; 507+ $comp = "$compress_prog -f < \"$f\" > \"$temp\"";
91 } 508 }
92 &sys( $comp ); 509 &sys( $comp );
93 $temp =~ s/\\($shell_metachars)/$1/g; 510 $temp =~ s/\\($shell_metachars)/$1/g;
94@@ -3174,9 +3175,9 @@ sub do_delete 511@@ -3174,9 +3175,9 @@
95 &msg( $log, "rmdir $cwd/$del failed: $!\n" ); 512 &msg( $log, "rmdir $cwd/$del failed: $!\n" );
96 } 513 }
97 else { 514 else {
98- &msg( $log, "delete DIR $del\n" ); 515- &msg( $log, "delete DIR $del\n" );
99- &ftp'delete( "$del" ) || 516- &ftp'delete( "$del" ) ||
100- &msg( $log, "ftp delete DIR $del failed\n" ); 517- &msg( $log, "ftp delete DIR $del failed\n" );
101+ &msg( $log, "deldir DIR $del\n" ); 518+ &msg( $log, "deldir DIR $del\n" );
102+ &ftp'deldir( "$del" ) || 519+ &ftp::deldir( "$del" ) ||
103+ &msg( $log, "ftp deldir DIR $del failed\n" ); 520+ &msg( $log, "ftp deldir DIR $del failed\n" );
104 } 521 }
105 } 522 }
106 else { 523 else {
 524@@ -3184,7 +3185,7 @@
 525 &msg( $log, "NEED TO rmdir $cwd/$del\n" );
 526 }
 527 else {
 528- &msg( $log, "NEED TO ftp'deldir $del\n" );
 529+ &msg( $log, "NEED TO ftp::deldir $del\n" );
 530 }
 531 }
 532 return;
 533@@ -3199,7 +3200,7 @@
 534 }
 535 else {
 536 &msg( $log, "delete FILE $del\n" );
 537- &ftp'delete( "$del" ) ||
 538+ &ftp::delete( "$del" ) ||
 539 &msg( $log, "ftp delete FILE $del failed\n" );
 540 }
 541 }
 542@@ -3208,7 +3209,7 @@
 543 &msg( $log, "NEED TO unlink $cwd/$del\n" );
 544 }
 545 else {
 546- &msg( $log, "NEED TO ftp'delete $del\n" );
 547+ &msg( $log, "NEED TO ftp::delete $del\n" );
 548 }
 549 }
 550 }
 551@@ -3345,12 +3346,12 @@
 552 }
 553 else {
 554 # make a remote directory
 555- $val = &ftp'mkdir( $dir );
 556+ $val = &ftp::mkdir( $dir );
 557
 558 # The mkdir might have failed due to bad mode
 559 # So try to chmod it anyway
 560 if( $remote_has_chmod ){
 561- $val = &ftp'chmod( $dir, $mode );
 562+ $val = &ftp::chmod( $dir, $mode );
 563 }
 564 }
 565
 566@@ -3369,14 +3370,14 @@
 567 }
 568 else {
 569 # check if remote directory exists
 570- local($old_dir) = &ftp'pwd();
 571+ local($old_dir) = &ftp::pwd();
 572
 573- $val = &ftp'cwd($dir);
 574+ $val = &ftp::cwd($dir);
 575
 576 # If I didn't manage to change dir should be where I was!
 577 if( $val ){
 578 # go back to the original directory
 579- &ftp'cwd($old_dir) || die "Cannot cd to original remote directory";
 580+ &ftp::cwd($old_dir) || die "Cannot cd to original remote directory";
 581 }
 582 }
 583 return $val;
 584@@ -3430,7 +3431,7 @@
 585 else {
 586 # change the remote file
 587 if( $remote_has_chmod ){
 588- &ftp'chmod( $path, $mode );
 589+ &ftp::chmod( $path, $mode );
 590 }
 591 }
 592 }

cvs diff -r1.5 -r1.5.176.1 pkgsrc/net/mirror/patches/patch-ad (expand / switch to unified diff)

--- pkgsrc/net/mirror/patches/patch-ad 1999/12/28 18:15:43 1.5
+++ pkgsrc/net/mirror/patches/patch-ad 2024/04/22 18:28:54 1.5.176.1
@@ -1,68 +1,180 @@ @@ -1,68 +1,180 @@
1$NetBSD: patch-ad,v 1.5 1999/12/28 18:15:43 itojun Exp $ 1$NetBSD: patch-ad,v 1.5.176.1 2024/04/22 18:28:54 bsiegert Exp $
2 2
3--- lchat.pl.orig Wed Jun 7 22:19:22 1995 3--- lchat.pl.orig 2024-04-11 11:08:05.970309238 +0200
4+++ lchat.pl Wed May 12 18:10:54 1999 4+++ lchat.pl 2024-04-11 11:07:48.798330768 +0200
5@@ -79,7 +79,7 @@ 5@@ -34,7 +34,7 @@
 6 # Lots of changes. See CHANGES since 2.8 file.
 7 #
 8 # Revision 2.3 1994/02/03 13:45:35 lmjm
 9-# Correct chat'read (bfriesen@simple.sat.tx.us)
 10+# Correct chat::read (bfriesen@simple.sat.tx.us)
 11 #
 12 # Revision 2.2 1993/12/14 11:09:03 lmjm
 13 # Only include sys/socket.ph if not already there.
 14@@ -55,7 +55,7 @@
 15 eval "use Socket";
 16 }
 17 else {
 18- unless( defined &'PF_INET ){
 19+ unless( defined &::PF_INET ){
 20 eval "sub ATT { 0; } sub INTEL { 0; }";
 21 do 'sys/socket.ph';
 22 }
 23@@ -65,18 +65,18 @@
 24 if( $] =~ /^5\.\d+$/ ){
 25 # Perl 5 has a special way of getting them via the 'use Socket'
 26 # above.
 27- $main'pf_inet = &Socket'PF_INET;
 28- $main'sock_stream = &Socket'SOCK_STREAM;
 29+ $main::pf_inet = &Socket::PF_INET;
 30+ $main::sock_stream = &Socket::SOCK_STREAM;
 31 local($name, $aliases, $proto) = getprotobyname( 'tcp' );
 32- $main'tcp_proto = $proto;
 33+ $main::tcp_proto = $proto;
 34 }
 35-elsif( defined( &'PF_INET ) ){
 36+elsif( defined( &::PF_INET ) ){
 37 # Perl 4 needs to have the socket.ph file created when perl was
 38 # installed.
 39- $main'pf_inet = &'PF_INET;
 40- $main'sock_stream = &'SOCK_STREAM;
 41+ $main::pf_inet = &::PF_INET;
 42+ $main::sock_stream = &::SOCK_STREAM;
 43 local($name, $aliases, $proto) = getprotobyname( 'tcp' );
 44- $main'tcp_proto = $proto;
 45+ $main::tcp_proto = $proto;
 46 }
 47 else {
 48 # Whoever installed perl didn't run h2ph !!!
 49@@ -84,9 +84,9 @@
 50 # last resort
 51 # Use hardwired versions
 52 # but who the heck would change these anyway? (:-)
 53- $main'pf_inet = 2;
 54- $main'sock_stream = 1; # Sigh... On Solaris set this to 2
 55- $main'tcp_proto = 6;
 56+ $main::pf_inet = 2;
 57+ $main::sock_stream = 1; # Sigh... On Solaris set this to 2
 58+ $main::tcp_proto = 6;
 59 warn "lchat.pl: using hardwired in network constantants";
 60 }
 61
 62@@ -108,7 +108,7 @@
 63 }
 64
 65
 66-## &chat'open_port("server.address",$port_number);
 67+## &chat::open_port("server.address",$port_number);
 68 ## opens a named or numbered TCP server
 69 sub open_port { ## public
 70 local($server, $port) = @_;
 71@@ -117,7 +117,7 @@
6  72
7 # We may be multi-homed, start with 0, fixup once connexion is made 73 # We may be multi-homed, start with 0, fixup once connexion is made
8 $thisaddr = "\0\0\0\0" ; 74 $thisaddr = "\0\0\0\0" ;
9- $thisproc = pack($sockaddr, 2, 0, $thisaddr); 75- $thisproc = pack($sockaddr, 2, 0, $thisaddr);
10+ $thisproc = pack_sockaddr_in(0, $thisaddr); 76+ $thisproc = pack_sockaddr_in(0, $thisaddr);
11  77
12 if ($server =~ /^(\d+)+\.(\d+)\.(\d+)\.(\d+)$/) { 78 if ($server =~ /^(\d+)+\.(\d+)\.(\d+)\.(\d+)$/) {
13 $serveraddr = pack('C4', $1, $2, $3, $4); 79 $serveraddr = pack('C4', $1, $2, $3, $4);
14@@ -90,7 +90,7 @@ 80@@ -128,8 +128,8 @@
15 } 81 }
16 $serveraddr = $x[4]; 82 $serveraddr = $x[4];
17 } 83 }
18- $serverproc = pack($sockaddr, 2, $port, $serveraddr); 84- $serverproc = pack($sockaddr, 2, $port, $serveraddr);
 85- unless (socket(S, $main'pf_inet, $main'sock_stream, $main'tcp_proto)) {
19+ $serverproc = pack_sockaddr_in($port, $serveraddr); 86+ $serverproc = pack_sockaddr_in($port, $serveraddr);
20 unless (socket(S, $main'pf_inet, $main'sock_stream, $main'tcp_proto)) { 87+ unless (socket(S, $main::pf_inet, $main::sock_stream, $main::tcp_proto)) {
21 ($!) = ($!, close(S)); # close S while saving $! 88 ($!) = ($!, close(S)); # close S while saving $!
22 return undef; 89 return undef;
23@@ -99,12 +99,12 @@ 90 }
 91@@ -137,12 +137,12 @@
24 # The SOCKS documentation claims that this bind before the connet 92 # The SOCKS documentation claims that this bind before the connet
25 # is unnecessary. Not just, that, but when used with SOCKS, 93 # is unnecessary. Not just, that, but when used with SOCKS,
26 # a connect() must not follow a bind(). -Erez Zadok. 94 # a connect() must not follow a bind(). -Erez Zadok.
27- unless( $using_socks ){ 95- unless( $using_socks ){
28- unless (bind(S, $thisproc)) { 96- unless (bind(S, $thisproc)) {
29- ($!) = ($!, close(S)); # close S while saving $! 97- ($!) = ($!, close(S)); # close S while saving $!
30- return undef; 98- return undef;
31- } 99- }
32- } 100- }
33+# unless( $using_socks ){ 101+# unless( $using_socks ){
34+# unless (bind(S, $thisproc)) { 102+# unless (bind(S, $thisproc)) {
35+# ($!) = ($!, close(S)); # close S while saving $! 103+# ($!) = ($!, close(S)); # close S while saving $!
36+# return undef; 104+# return undef;
37+# } 105+# }
38+# } 106+# }
39 unless (connect(S, $serverproc)) { 107 unless (connect(S, $serverproc)) {
40 ($!) = ($!, close(S)); # close S while saving $! 108 ($!) = ($!, close(S)); # close S while saving $!
41 return undef; 109 return undef;
42@@ -114,7 +114,7 @@ 110@@ -152,7 +152,7 @@
43 # multi-homed, with IP forwarding off, so fix-up. 111 # multi-homed, with IP forwarding off, so fix-up.
44 local($fam,$lport); 112 local($fam,$lport);
45 ($fam,$lport,$thisaddr) = unpack($sockaddr, getsockname(S)); 113 ($fam,$lport,$thisaddr) = unpack($sockaddr, getsockname(S));
46- $thisproc = pack($sockaddr, 2, 0, $thisaddr); 114- $thisproc = pack($sockaddr, 2, 0, $thisaddr);
47+ $thisproc = pack_sockaddr_in(0, $thisaddr); 115+ $thisproc = pack_sockaddr_in(0, $thisaddr);
48 # end of post-connect fixup 116 # end of post-connect fixup
49 select((select(S), $| = 1)[0]); 117 select((select(S), $| = 1)[0]);
50 return 1; 118 return 1;
51@@ -129,7 +129,7 @@ 119@@ -167,7 +167,7 @@
52  120
53 # We may be multi-homed, start with 0, fixup once connexion is made 121 # We may be multi-homed, start with 0, fixup once connexion is made
54 $thisaddr = "\0\0\0\0" ; 122 $thisaddr = "\0\0\0\0" ;
55- $thisproc = pack($sockaddr, 2, 0, $thisaddr); 123- $thisproc = pack($sockaddr, 2, 0, $thisaddr);
56+ $thisproc = pack_sockaddr_in(0, $thisaddr); 124+ $thisproc = pack_sockaddr_in(0, $thisaddr);
57  125
58 if ($server =~ /^(\d+)+\.(\d+)\.(\d+)\.(\d+)$/) { 126 if ($server =~ /^(\d+)+\.(\d+)\.(\d+)\.(\d+)$/) {
59 $serveraddr = pack('C4', $1, $2, $3, $4); 127 $serveraddr = pack('C4', $1, $2, $3, $4);
60@@ -151,7 +151,7 @@ 128@@ -189,7 +189,7 @@
61 # multi-homed, with IP forwarding off, so fix-up. 129 # multi-homed, with IP forwarding off, so fix-up.
62 local($fam,$lport); 130 local($fam,$lport);
63 ($fam,$lport,$thisaddr) = unpack($sockaddr, getsockname($newsock)); 131 ($fam,$lport,$thisaddr) = unpack($sockaddr, getsockname($newsock));
64- $thisproc = pack($sockaddr, 2, 0, $thisaddr); 132- $thisproc = pack($sockaddr, 2, 0, $thisaddr);
65+ $thisproc = pack_sockaddr_in(0, $thisaddr); 133+ $thisproc = pack_sockaddr_in(0, $thisaddr);
66 # end of post-connect fixup 134 # end of post-connect fixup
67 select((select($newsock), $| = 1)[0]); 135 select((select($newsock), $| = 1)[0]);
68 return 1; 136 return 1;
 137@@ -197,7 +197,7 @@
 138 ##############################################################################
 139
 140
 141-## $return = &chat'expect($timeout_time,
 142+## $return = &chat::expect($timeout_time,
 143 ## $pat1, $body1, $pat2, $body2, ... )
 144 ## $timeout_time is the time (either relative to the current time, or
 145 ## absolute, ala time(2)) at which a timeout event occurs.
 146@@ -293,7 +293,7 @@
 147 select($rmask, undef, undef, $endtime - time);
 148 if ($nfound) {
 149 $nread = sysread(S, $thisbuf, 1024);
 150- if( $chat'debug ){
 151+ if( $chat::debug ){
 152 print STDERR "sysread $nread ";
 153 print STDERR ">>$thisbuf<<\n";
 154 }
 155@@ -316,21 +316,21 @@
 156 & $subname();
 157 }
 158
 159-## &chat'print(@data)
 160+## &chat::print(@data)
 161 sub print { ## public
 162 print S @_;
 163- if( $chat'debug ){
 164+ if( $chat::debug ){
 165 print STDERR "printed:";
 166 print STDERR @_;
 167 }
 168 }
 169
 170-## &chat'close()
 171+## &chat::close()
 172 sub close { ## public
 173 close(S);
 174 }
 175
 176-# &chat'read(*buf, $ntoread )
 177+# &chat::read(*buf, $ntoread )
 178 # blocking read. returns no. of bytes read and puts data in $buf.
 179 # If called with ntoread < 0 then just do the accept and return 0.
 180 sub read { ## public

cvs diff -r1.7 -r1.7.102.1 pkgsrc/net/mirror/patches/patch-ae (expand / switch to unified diff)

--- pkgsrc/net/mirror/patches/patch-ae 2011/09/12 16:35:43 1.7
+++ pkgsrc/net/mirror/patches/patch-ae 2024/04/22 18:28:54 1.7.102.1
@@ -1,82 +1,370 @@ @@ -1,82 +1,370 @@
1$NetBSD: patch-ae,v 1.7 2011/09/12 16:35:43 taca Exp $ 1$NetBSD: patch-ae,v 1.7.102.1 2024/04/22 18:28:54 bsiegert Exp $
2 2
3* Enable deleting remote directories. 3* Enable deleting remote directories.
4* Proper signal handling. 4* Proper signal handling.
5* Miscellaneous bug fixes. 5* Miscellaneous bug fixes.
 6* Fix deprecation warning (change ' to ::) for newer perl
6 7
7--- ftp.pl.orig 1998-06-05 09:10:27.000000000 +0000 8--- ftp.pl.orig 2024-04-11 11:08:05.969004188 +0200
8+++ ftp.pl 9+++ ftp.pl 2024-04-11 11:07:48.797471889 +0200
9@@ -233,7 +233,7 @@ sub timed_open 10@@ -28,16 +28,16 @@
 11 # $ftp_port = 21;
 12 # $retry_call = 1;
 13 # $attempts = 2;
 14-# if( &ftp'open( $site, $ftp_port, $retry_call, $attempts ) != 1 ){
 15+# if( &ftp::open( $site, $ftp_port, $retry_call, $attempts ) != 1 ){
 16 # die "failed to open ftp connection";
 17 # }
 18-# if( ! &ftp'login( $user, $pass ) ){
 19+# if( ! &ftp::login( $user, $pass ) ){
 20 # die "failed to login";
 21 # }
 22-# &ftp'type( $text_mode ? 'A' : 'I' );
 23-# if( ! &ftp'get( $remote_filename, $local_filename, 0 ) ){
 24+# &ftp::type( $text_mode ? 'A' : 'I' );
 25+# if( ! &ftp::get( $remote_filename, $local_filename, 0 ) ){
 26 # die "failed to get file";
 27 # }
 28-# &ftp'close();
 29+# &ftp::close();
 30 #
 31 #
 32@@ -94,9 +94,9 @@
 33
 34 # This is a "global" it contains the last response from the remote ftp server
 35 # for use in error messages
 36-$ftp'response = "";
 37+$ftp::response = "";
 38
 39-# Also ftp'NS is the socket containing the data coming in from the remote ls
 40+# Also ftp::NS is the socket containing the data coming in from the remote ls
 41 # command.
 42
 43 # The size of block to be read or written when talking to the remote
 44@@ -115,12 +115,12 @@
 45 $real_site = "";
 46
 47 # "Global" Where error/log reports are sent to
 48-$ftp'showfd = 'STDERR';
 49+$ftp::showfd = 'STDERR';
 50
 51 # Should a 421 be treated as a connection close and return 99 from
 52-# ftp'expect. This is against rfc1123 recommendations but I've found
 53+# ftp::expect. This is against rfc1123 recommendations but I've found
 54 # it to be a wise default.
 55-$ftp'drop_on_421 = 1;
 56+$ftp::drop_on_421 = 1;
 57
 58 # Name of a function to call on a pathname to map it into a remote
 59 # pathname.
 60@@ -131,7 +131,7 @@
 61 $ftp_show = 0;
 62
 63 # Global set on a error that aborts the connection
 64-$ftp'fatalerror = 0;
 65+$ftp::fatalerror = 0;
 66
 67 # Whether to keep the continuation messages so the user can look at them
 68 $keep_continuations = 0;
 69@@ -140,7 +140,7 @@
 70 $read_in = undef;
 71
 72 # should we use the PASV extension to the ftp protocol?
 73-$ftp'use_pasv = 0; # 0=no (default), 1=yes
 74+$ftp::use_pasv = 0; # 0=no (default), 1=yes
 75
 76 # Variable only used if proxying
 77 $proxy = $proxy_gateway = $proxy_ftp_port = '';
 78@@ -150,30 +150,30 @@
 79 # (Normally set elsewhere - this is just a sensible default.)
 80 # Is expected to take count and code as arguments and prompt
 81 # for the secret key with 'password:' on stdout and then print the password.
 82-$ftp'keygen_prog = '/usr/local/bin/key';
 83+$ftp::keygen_prog = '/usr/local/bin/key';
 84
 85 # Uncomment to turn on lots of debugging.
 86 # &debug( 10 );
 87
 88-# Limit how much data any one ftp'get can pull back
 89+# Limit how much data any one ftp::get can pull back
 90 # Negative values cause the size check to be skipped.
 91 $max_get_size = -1;
 92
 93 # Where I am connected to.
 94 $connect_site = '';
 95
 96-# &ftp'debug( debugging_level )
 97+# &ftp::debug( debugging_level )
 98 # Turn on debugging ranging from 1 = some to 10 = everything
 99-sub ftp'debug
 100+sub ftp::debug
 101 {
 102 $ftp_show = $_[0];
 103 if( $ftp_show > 9 ){
 104- $chat'debug = 1;
 105+ $chat::debug = 1;
 106 }
 107 }
 108
 109-# &ftp'set_timeout( seconds )
 110-sub ftp'set_timeout
 111+# &ftp::set_timeout( seconds )
 112+sub ftp::set_timeout
 113 {
 114 local( $to ) = @_;
 115 return if $to == $timeout;
 116@@ -226,21 +226,21 @@
 117 $connect_site = $site;
 118 $connect_port = $ftp_port;
 119 }
 120- if( ! &chat'open_port( $connect_site, $connect_port ) ){
 121+ if( ! &chat::open_port( $connect_site, $connect_port ) ){
 122 if( $retry_call ){
 123 print $showfd "Failed to connect\n" if $ftp_show;
 124 next;
10 } 125 }
11 else { 126 else {
12 print $showfd "proxy connection failed " if $proxy; 127 print $showfd "proxy connection failed " if $proxy;
13- print $showfd "Cannot open ftp to $connect_site\n" if $ftp_show; 128- print $showfd "Cannot open ftp to $connect_site\n" if $ftp_show;
14+ print $showfd "Cannot open ftp to $newhost:$newport\n" if $ftp_show; 129+ print $showfd "Cannot open ftp to $newhost:$newport\n" if $ftp_show;
15 return 0; 130 return 0;
16 } 131 }
17 } 132 }
18@@ -270,6 +270,14 @@ sub ftp'set_signals 133 $ret = &expect( $timeout,
19 $SIG{ 'PIPE' } = "ftp'ftp__sighandler"; 134 2, 1 ); # ready for login to $site
 135 if( $ret != 1 ){
 136- &chat'close();
 137+ &chat::close();
 138 next;
 139 }
 140 return 1;
 141@@ -264,14 +264,22 @@
 142 }
 143
 144 # Setup a signal handler for possible errors.
 145-sub ftp'set_signals
 146+sub ftp::set_signals
 147 {
 148 $ftp_logger = @_;
 149- $SIG{ 'PIPE' } = "ftp'ftp__sighandler";
 150+ $SIG{ 'PIPE' } = "ftp::ftp__sighandler";
20 } 151 }
21  152
 153-# &ftp'set_namemap( function to map outgoing name, function to map incoming )
 154-sub ftp'set_namemap
22+# Setup a signal handler for user interrupts. 155+# Setup a signal handler for user interrupts.
23+sub ftp'set_user_signals 156+sub ftp::set_user_signals
24+{ 157+{
25+ $ftp_logger = @_; 158+ $ftp_logger = @_;
26+ $SIG{ 'INT' } = "ftp'ftp__sighandler"; 159+ $SIG{ 'INT' } = "ftp::ftp__sighandler";
27+} 160+}
28+  161+
29+ 162+
30 # &ftp'set_namemap( function to map outgoing name, function to map incoming ) 163+# &ftp::set_namemap( function to map outgoing name, function to map incoming )
31 sub ftp'set_namemap 164+sub ftp::set_namemap
32 { 165 {
33@@ -486,7 +494,7 @@ sub pasv 166 ($mapunixout, $mapunixin) = @_;
 167 if( $debug ) {
 168@@ -280,12 +288,12 @@
 169 }
 170
 171
 172-# &ftp'open( hostname or address,
 173+# &ftp::open( hostname or address,
 174 # port to use,
 175 # retry on call failure,
 176 # number of attempts to retry )
 177 # returns 1 if connected, 0 otherwise
 178-sub ftp'open
 179+sub ftp::open
 180 {
 181 local( $site, $ftp_port, $retry_call, $attempts ) = @_;
 182
 183@@ -312,9 +320,9 @@
 184 return $ret;
 185 }
 186
 187-# &ftp'login( user, password, account )
 188+# &ftp::login( user, password, account )
 189 # the account part is optional unless the remote service requires one.
 190-sub ftp'login
 191+sub ftp::login
 192 {
 193 local( $remote_user, $remote_password, $remote_account ) = @_;
 194 local( $ret );
 195@@ -351,11 +359,11 @@
 196 # check for s/key challenge - eg, [s/key 994 ph29005]
 197 # If we are talking to skey then use remote_password as the
 198 # secret to generate a real password
 199- if( $ftp'response =~ m#\[s/key (\d+) (\w+)\]# ){
 200+ if( $ftp::response =~ m#\[s/key (\d+) (\w+)\]# ){
 201 local( $count, $code ) = ($1, $2);
 202
 203 # TODO: report open failure & remove need for echo
 204- open( SKEY, "echo $remote_password | $ftp'keygen_prog $count $code |" );
 205+ open( SKEY, "echo $remote_password | $ftp::keygen_prog $count $code |" );
 206 while( <SKEY> ){
 207 if( ! /password:/ ){
 208 chop( $remote_password = $_ );
 209@@ -411,21 +419,21 @@
 210 sub service_closed
 211 {
 212 $service_open = 0;
 213- &chat'close();
 214+ &chat::close();
 215 }
 216
 217 # Close down the current ftp connecting in an orderly way.
 218-sub ftp'close
 219+sub ftp::close
 220 {
 221 &quit();
 222 $service_open = 0;
 223- &chat'close();
 224+ &chat::close();
 225 }
 226
 227-# &ftp'cwd( directory )
 228+# &ftp::cwd( directory )
 229 # Change to the given directory
 230 # return 1 if successful, 0 otherwise
 231-sub ftp'cwd
 232+sub ftp::cwd
 233 {
 234 local( $dir ) = @_;
 235 local( $ret );
 236@@ -460,7 +468,7 @@
 237 sub pasv
 238 {
 239 # At some point I need to close/free S2, no?
 240- unless( socket( S2, $main'pf_inet, $main'sock_stream, $main'tcp_proto ) ){
 241+ unless( socket( S2, $main::pf_inet, $main::sock_stream, $main::tcp_proto ) ){
 242 ($!) = ($!, close(S2)); # close S2 while saving $!
 243 return undef;
 244 }
 245@@ -486,7 +494,7 @@
34 return 0; 246 return 0;
35 } 247 }
36 if( $ret == 1 ) { 248 if( $ret == 1 ) {
37- if( $response =~ m/^227 Entering Passive Mode \((\d+),(\d+),(\d+),(\d+),(\d+),(\d+)\)/ ){ 249- if( $response =~ m/^227 Entering Passive Mode \((\d+),(\d+),(\d+),(\d+),(\d+),(\d+)\)/ ){
38+ if($response =~ m/^227 .*\((\d+),(\d+),(\d+),(\d+),(\d+),(\d+)\)/){ 250+ if($response =~ m/^227 .*\((\d+),(\d+),(\d+),(\d+),(\d+),(\d+)\)/){
39 $newhost = sprintf( "%d.%d.%d.%d", $1, $2, $3, $4 ); 251 $newhost = sprintf( "%d.%d.%d.%d", $1, $2, $3, $4 );
40 $newport = $5 * 256 + $6; 252 $newport = $5 * 256 + $6;
41 } 253 }
42@@ -581,6 +589,9 @@ sub ftp'dir_close 254@@ -497,7 +505,7 @@
 255 }
 256
 257 # now need to connect() the new socket
 258- if( ! &chat'open_newport( $newhost, $newport, *S2 ) ){
 259+ if( ! &chat::open_newport( $newhost, $newport, *S2 ) ){
 260 if( $retry_call ){
 261 print $showfd "Failed to connect newport\n" if $ftp_show;
 262 next;
 263@@ -511,12 +519,12 @@
 264 }
 265
 266
 267-# &ftp'dir( remote LIST options )
 268+# &ftp::dir( remote LIST options )
 269 # Start a list going with the given options.
 270 # Presuming that the remote deamon uses the ls command to generate the
 271 # data to send back then then you can send it some extra options (eg: -lRa)
 272 # return 1 if sucessful, 0 otherwise
 273-sub ftp'dir_open
 274+sub ftp::dir_open
 275 {
 276 local( $options ) = @_;
 277 local( $ret );
 278@@ -573,7 +581,7 @@
 279
 280 # Close down reading the result of a remote ls command
 281 # return 1 if successful, 0 otherwise
 282-sub ftp'dir_close
 283+sub ftp::dir_close
 284 {
 285 local( $ret );
 286
 287@@ -581,6 +589,9 @@
43 return 0; 288 return 0;
44 } 289 }
45  290
46+ # shut down our end of the socket 291+ # shut down our end of the socket
47+ &close_data_socket; 292+ &close_data_socket;
48+ 293+
49 # read the close 294 # read the close
50 # 295 #
51 $ret = &expect($timeout, 296 $ret = &expect($timeout,
52@@ -590,8 +601,6 @@ sub ftp'dir_close 297@@ -590,8 +601,6 @@
53 $ret = 0; 298 $ret = 0;
54 } 299 }
55  300
56- # shut down our end of the socket 301- # shut down our end of the socket
57- &close_data_socket; 302- &close_data_socket;
58  303
59 if( ! $ret ){ 304 if( ! $ret ){
60 return 0; 305 return 0;
61@@ -708,6 +717,7 @@ sub ftp'get 306@@ -602,7 +611,7 @@
 307
 308 # Quit from the remote ftp server
 309 # return 1 if successful and 0 on failure
 310-# Users should be calling &ftp'close();
 311+# Users should be calling &ftp::close();
 312 sub quit
 313 {
 314 local( $ret );
 315@@ -687,20 +696,20 @@
 316 return syswrite( NS, $ftpbuf, $ftpbufsize );
 317 }
 318
 319-# &ftp'dostrip( true or false )
 320+# &ftp::dostrip( true or false )
 321 # Turn on or off stripping of incoming carriage returns.
 322-sub ftp'dostrip
 323+sub ftp::dostrip
 324 {
 325 ($strip_cr ) = @_;
 326 }
 327
 328-# &ftp'get( remote file, local file, try restarting where last xfer failed )
 329+# &ftp::get( remote file, local file, try restarting where last xfer failed )
 330 # Get a remote file back into a local file.
 331 # If no loc_fname passed then uses rem_fname.
 332 # If $restart set and the remote site supports it then restart where
 333 # last xfer left off.
 334 # returns 1 on success, 0 otherwise
 335-sub ftp'get
 336+sub ftp::get
 337 {
 338 local($rem_fname, $loc_fname, $restart ) = @_;
 339 local( $ret );
 340@@ -708,6 +717,7 @@
62 if( ! $service_open ){ 341 if( ! $service_open ){
63 return 0; 342 return 0;
64 } 343 }
65+ chmod 0600, $loc_fname; 344+ chmod 0600, $loc_fname;
66  345
67 if( $loc_fname eq "" ){ 346 if( $loc_fname eq "" ){
68 $loc_fname = $rem_fname; 347 $loc_fname = $rem_fname;
69@@ -917,10 +927,27 @@ sub delete 348@@ -887,7 +897,7 @@
 349 return $ret;
 350 }
 351
 352-# &ftp'delete( remote filename )
 353+# &ftp::delete( remote filename )
 354 # Delete a file from the remote site.
 355 # returns 1 if successful, 0 otherwise
 356 sub delete
 357@@ -917,15 +927,32 @@
70  358
71 sub deldir 359 sub deldir
72 { 360 {
73- local( $fname ) = @_; 361- local( $fname ) = @_;
74+ local( $rem_fname ) = @_; 362+ local( $rem_fname ) = @_;
75+ local( $ret ); 363+ local( $ret );
76+ 364+
77+ if( ! $service_open ){ 365+ if( ! $service_open ){
78+ return 0; 366+ return 0;
79+ } 367+ }
80  368
81- # not yet implemented 369- # not yet implemented
82- # RMD 370- # RMD
@@ -86,14 +374,143 @@ $NetBSD: patch-ae,v 1.7 2011/09/12 16:35 @@ -86,14 +374,143 @@ $NetBSD: patch-ae,v 1.7 2011/09/12 16:35
86+ 374+
87+ &send( "RMD $rem_fname" ); 375+ &send( "RMD $rem_fname" );
88+ 376+
89+ $ret = &expect( $timeout,  377+ $ret = &expect( $timeout,
90+ 2, 1 ); # Deleted $rem_fname 378+ 2, 1 ); # Deleted $rem_fname
91+ if( $ret == 99 ){ 379+ if( $ret == 99 ){
92+ &service_closed(); 380+ &service_closed();
93+ $ret = 0; 381+ $ret = 0;
94+ } 382+ }
95+ 383+
96+ return $ret == 1; 384+ return $ret == 1;
97 } 385 }
98  386
99 # &ftp'put( local filename, remote filename, restart where left off ) 387-# &ftp'put( local filename, remote filename, restart where left off )
 388+# &ftp::put( local filename, remote filename, restart where left off )
 389 # Similar to get but sends file to the remote site.
 390-sub ftp'put
 391+sub ftp::put
 392 {
 393 local( $loc_fname, $rem_fname ) = @_;
 394 local( $strip_cr );
 395@@ -1091,9 +1118,9 @@
 396 return $ret;
 397 }
 398
 399-# &ftp'restart( byte_offset )
 400+# &ftp::restart( byte_offset )
 401 # Restart the next transfer from the given offset
 402-sub ftp'restart
 403+sub ftp::restart
 404 {
 405 local( $restart_point, $ret ) = @_;
 406
 407@@ -1115,7 +1142,7 @@
 408 return $ret;
 409 }
 410
 411-# &ftp'type( 'A' or 'I' )
 412+# &ftp::type( 'A' or 'I' )
 413 # set transfer type to Ascii or Image.
 414 sub type
 415 {
 416@@ -1143,7 +1170,7 @@
 417 @site_command_list = ();
 418
 419 # routine to query the remote server for 'SITE' commands supported
 420-sub ftp'site_commands
 421+sub ftp::site_commands
 422 {
 423 local( $ret );
 424
 425@@ -1183,7 +1210,7 @@
 426 }
 427
 428 # return the pwd, or null if we can't get the pwd
 429-sub ftp'pwd
 430+sub ftp::pwd
 431 {
 432 local( $ret, $cwd );
 433
 434@@ -1214,7 +1241,7 @@
 435 return $cwd;
 436 }
 437
 438-# &ftp'mkdir( directory name )
 439+# &ftp::mkdir( directory name )
 440 # Create a directory on the remote site
 441 # return 1 for success, 0 otherwise
 442 sub mkdir
 443@@ -1244,7 +1271,7 @@
 444 return $ret;
 445 }
 446
 447-# &ftp'chmod( pathname, new mode )
 448+# &ftp::chmod( pathname, new mode )
 449 # Change the mode of a file on the remote site.
 450 # return 1 for success, 0 for failure
 451 sub chmod
 452@@ -1274,10 +1301,10 @@
 453 return $ret;
 454 }
 455
 456-# &ftp'rename( old name, new name )
 457+# &ftp::rename( old name, new name )
 458 # Rename a file on the remote site.
 459 # returns 1 if successful, 0 otherwise
 460-sub ftp'rename
 461+sub ftp::rename
 462 {
 463 local( $old_name, $new_name ) = @_;
 464 local( $ret );
 465@@ -1325,8 +1352,8 @@
 466 }
 467
 468
 469-# &ftp'quote( site command );
 470-sub ftp'quote
 471+# &ftp::quote( site command );
 472+sub ftp::quote
 473 {
 474 local( $cmd ) = @_;
 475 local( $ret );
 476@@ -1364,7 +1391,7 @@
 477 }
 478
 479 #
 480-# create the list of parameters for chat'expect
 481+# create the list of parameters for chat::expect
 482 #
 483 # expect( time_out, {value, return value} );
 484 # the last response is stored in $response
 485@@ -1427,7 +1454,7 @@
 486 if( $ftp_show > 9 ){
 487 &printargs( $time_out, @expect_args );
 488 }
 489- $ret = &chat'expect( $time_out, @expect_args );
 490+ $ret = &chat::expect( $time_out, @expect_args );
 491 }
 492
 493 return $ret;
 494@@ -1449,10 +1476,10 @@
 495
 496 $sockaddr = 'S n a4 x8';
 497
 498- ($a,$b,$c,$d) = unpack( 'C4', $chat'thisaddr );
 499- $this = $chat'thisproc;
 500+ ($a,$b,$c,$d) = unpack( 'C4', $chat::thisaddr );
 501+ $this = $chat::thisproc;
 502
 503- if( ! socket( S, $main'pf_inet, $main'sock_stream, $main'tcp_proto ) ){
 504+ if( ! socket( S, $main::pf_inet, $main::sock_stream, $main::tcp_proto ) ){
 505 warn "socket: $!";
 506 return 0;
 507 }
 508@@ -1505,7 +1532,7 @@
 509 print $showfd "---> $sc\n";
 510 }
 511
 512- &chat'print( "$send_cmd\r\n" );
 513+ &chat::print( "$send_cmd\r\n" );
 514 }
 515
 516 sub accept

cvs diff -r1.2 -r1.2.102.1 pkgsrc/net/mirror/patches/patch-ag (expand / switch to unified diff)

--- pkgsrc/net/mirror/patches/patch-ag 2011/09/12 16:35:43 1.2
+++ pkgsrc/net/mirror/patches/patch-ag 2024/04/22 18:28:54 1.2.102.1
@@ -1,24 +1,53 @@ @@ -1,24 +1,53 @@
1$NetBSD: patch-ag,v 1.2 2011/09/12 16:35:43 taca Exp $ 1$NetBSD: patch-ag,v 1.2.102.1 2024/04/22 18:28:54 bsiegert Exp $
2 2
3* Avoid to use timelocal.pl which cause obsolete warning with perl 5.14. 3* Avoid to use timelocal.pl which cause obsolete warning with perl 5.14.
4* Make sure to use 4-digit year. 4* Make sure to use 4-digit year.
 5* Fix deprecation warning (change ' to ::) for newer perl
5 6
6--- dateconv.pl.orig 1998-05-29 19:04:32.000000000 +0000 7--- dateconv.pl.orig 2024-04-11 11:08:05.967542752 +0200
7+++ dateconv.pl 8+++ dateconv.pl 2024-04-11 11:07:48.795406481 +0200
8@@ -47,7 +47,8 @@ sub lstime_to_standard 9@@ -47,7 +47,8 @@
9 } 10 }
10  11
11  12
12-require 'timelocal.pl'; 13-require 'timelocal.pl';
13+use Time::Local; 14+use Time::Local;
14+ 15+
15 package dateconv; 16 package dateconv;
16  17
17 # Use timelocal rather than gmtime. 18 # Use timelocal rather than gmtime.
18@@ -149,5 +150,5 @@ sub main'time_to_standard 19@@ -74,7 +75,7 @@
 20 # input date and time string from ftp "ls -l", such as Mmm dd yyyy or
 21 # Mmm dd HH:MM,
 22 # return $time number via gmlocal( $string ).
 23-sub main'lstime_to_time
 24+sub main::lstime_to_time
 25 {
 26 package dateconv;
 27
 28@@ -133,15 +134,15 @@
 29 $year += 50 if 37 < $year && $year < 70 ;
 30
 31 if( $use_timelocal ){
 32- return &'timelocal( $secs, $mins, $hours, $day, $month, $year );
 33+ return &::timelocal( $secs, $mins, $hours, $day, $month, $year );
 34 }
 35 else {
 36- return &'timegm( $secs, $mins, $hours, $day, $month, $year );
 37+ return &::timegm( $secs, $mins, $hours, $day, $month, $year );
 38 }
 39 }
 40
 41 # input time number, output GMT string as "dd Mmm YY HH:MM"
 42-sub main'time_to_standard
 43+sub main::time_to_standard
 44 {
 45 package dateconv;
 46
 47@@ -149,5 +150,5 @@
19  48
20 local( $sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst ) = 49 local( $sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst ) =
21 gmtime( $time ); 50 gmtime( $time );
22- return sprintf( "%2d $months[ $mon + 1 ] %2d %02d:%02d", $mday, $year, $hour, $min ); 51- return sprintf( "%2d $months[ $mon + 1 ] %2d %02d:%02d", $mday, $year, $hour, $min );
23+ return sprintf( "%2d $months[ $mon + 1 ] %4d %02d:%02d", $mday, $year + 1900, $hour, $min ); 52+ return sprintf( "%2d $months[ $mon + 1 ] %4d %02d:%02d", $mday, $year + 1900, $hour, $min );
24 } 53 }

File Added: pkgsrc/net/mirror/patches/patch-lsparse.pl
$NetBSD: patch-lsparse.pl,v 1.1.2.2 2024/04/22 18:28:54 bsiegert Exp $

* Fix deprecation warning (change ' to ::) for newer perl

--- lsparse.pl.orig	1998-05-29 21:04:23.000000000 +0200
+++ lsparse.pl	2024-04-11 11:07:48.800742520 +0200
@@ -14,7 +14,7 @@
 # This software is provided "as is" without express or implied warranty.
 #
 # Parse "ls -lR" type listings
-# use lsparse'reset( dirname ) repeately
+# use lsparse::reset( dirname ) repeately
 #
 # By Lee McLoughlin <lmjm@icparc.ic.ac.uk>
 #
@@ -61,18 +61,18 @@
 local( $match );
 
 # The filestore type being scanned
-$lsparse'fstype = 'unix';
+$lsparse::fstype = 'unix';
 
 # Keep whatever case is on the remote system.  Otherwise lowercase it.
-$lsparse'vms_keep_case = '';
+$lsparse::vms_keep_case = '';
 
 # A name to report when errors occur
-$lsparse'name = 'unknown';
+$lsparse::name = 'unknown';
 
 # Wether to report subdirs when finding them in a directory
 # or when their details appear.  (If you report early then mirro might
 # recreate locally remote restricted directories.)
-$lsparse'report_subdir = 0;	# Report when finding details.
+$lsparse::report_subdir = 0;	# Report when finding details.
 
 
 # Name of routine to call to parse incoming listing lines
@@ -81,7 +81,7 @@
 # Set the directory that is being scanned and
 # check that the scan routing for this fstype exists
 # returns false if the fstype is unknown.
-sub lsparse'reset
+sub lsparse::reset
 {
 	$here = $currdir = $_[0];
 	$now = time;
@@ -91,17 +91,17 @@
 	$vms_strip =~ s,^/+,,;
 	$vms_strip =~ s,/+$,,;
 
-	$ls_line = "lsparse'line_$fstype";
+	$ls_line = "lsparse::line_$fstype";
 	return( defined( &$ls_line ) );
 }
 
 # See line_unix following routine for call/return details.
 # This calls the filestore specific parser.
-sub lsparse'line
+sub lsparse::line
 {
 	local( $fh ) = @_;
 
-	# ls_line is setup in lsparse'reset to the name of the function
+	# ls_line is setup in lsparse::reset to the name of the function
 	local( $path, $size, $time, $type, $mode ) =
 		eval "&$ls_line( \$fh )";
 
@@ -119,7 +119,7 @@
 # time is a Un*x time value for the file
 # type is "f" for a file, "d" for a directory and
 #         "l linkname" for a symlink
-sub lsparse'line_unix
+sub lsparse::line_unix
 {
 	local( $fh ) = @_;
 	local( $non_crud, $perm_denied );
@@ -132,7 +132,7 @@
 
 	while( <$fh> ){
 		# Store listing
-		print main'STORE $_;
+		print main::STORE $_;
 
 		# Stomp on carriage returns
 		s/\015//g;
@@ -168,7 +168,7 @@
 		if( $perm_denied ){
 			$perm_denied = "";
 			warn "Warning: input corrupted by 'Permission denied'",
-				"errors, about line $. of $lsparse'name\n";
+				"errors, about line $. of $lsparse::name\n";
 			next;
 		}
 		# Not found's are like Permission denied's.  They can start part
@@ -180,7 +180,7 @@
 		if( $not_found ){
 			$not_found = "";
 			warn "Warning: input corrupted by 'not found' errors",
-				" about line $. of $lsparse'name\n";
+				" about line $. of $lsparse::name\n";
 			next;
 		}
 		
@@ -196,7 +196,7 @@
 				next;
 			}
 
-			local( $time ) = &main'lstime_to_time( $lsdate );
+			local( $time ) = &main::lstime_to_time( $lsdate );
 			local( $type ) = '?';
 			local( $mode ) = 0;
 
@@ -316,7 +316,7 @@
 # time is a Un*x time value for the file
 # type is "f" for a file, "d" for a directory and
 #         "l linkname" for a symlink
-sub lsparse'line_dls
+sub lsparse::line_dls
 {
 	local( $fh ) = @_;
 	local( $non_crud, $perm_denied );
@@ -327,7 +327,7 @@
 
 	while( <$fh> ){
 		# Store listing
-		print main'STORE $_;
+		print main::STORE $_;
 
 		# Stomp on carriage returns
 		s/\015//g;
@@ -350,7 +350,7 @@
 			}
 			else {
 				# a file
-				$time = &main'lstime_to_time( $lsdate );
+				$time = &main::lstime_to_time( $lsdate );
 				$type = 'f';
 				$mode = 0444;
 			}
@@ -400,7 +400,7 @@
 # time is a Un*x time value for the file
 # type is "f" for a file, "d" for a directory and
 #         "l linkname" for a symlink
-sub lsparse'line_netware
+sub lsparse::line_netware
 {
 	local( $fh ) = @_;
 
@@ -410,7 +410,7 @@
 
 	while( <$fh> ){
 		# Store listing
-		print main'STORE $_;
+		print main::STORE $_;
 
 		# Stomp on carriage returns
 		s/\015//g;
@@ -435,7 +435,7 @@
 			if( $file eq '.' || $file eq '..' ){
 				next;
 			}
-			local( $time ) = &main'lstime_to_time( $lsdate );
+			local( $time ) = &main::lstime_to_time( $lsdate );
 			local( $type ) = '?';
 			local( $mode ) = 0;
 
@@ -509,7 +509,7 @@
 # time is a Un*x time value for the file
 # type is "f" for a file, "d" for a directory and
 #         "l linkname" for a symlink
-sub lsparse'line_vms
+sub lsparse::line_vms
 {
 	local( $fh ) = @_;
 	local( $non_crud, $perm_denied );
@@ -520,7 +520,7 @@
 
 	while( <$fh> ){
 		# Store listing
-		print main'STORE $_;
+		print main::STORE $_;
 
 		# Stomp on carriage returns
 		s/\015//g;
@@ -543,7 +543,7 @@
 		}
 
 		# Upper case is so ugly
-		if( ! $lsparse'vms_keep_case ){
+		if( ! $lsparse::vms_keep_case ){
 			tr/A-Z/a-z/;
 		}
 
@@ -584,7 +584,7 @@
 		$size = 0;
 		
 		if( $got ){
-			local( $time ) = &main'lstime_to_time( $lsdate );
+			local( $time ) = &main::lstime_to_time( $lsdate );
 			local( $type ) = 'f';
 			local( $mode ) = 0444;
 
@@ -610,7 +610,7 @@
 				$mode = 0555;
 			}
 
-			$lsparse'vers = $vers;
+			$lsparse::vers = $vers;
 
 #print "file=|$file| match=|$match| vms_strip=|$vms_strip|\n";
 			$file =~ s,^,/,;
@@ -653,7 +653,7 @@
 # time is a Un*x time value for the file
 # type is "f" for a file, "d" for a directory and
 #         "l linkname" for a symlink
-sub lsparse'line_dosftp
+sub lsparse::line_dosftp
 {
 	local( $fh ) = @_;
 
@@ -670,7 +670,7 @@
 			$_ = <$fh>;
 
 			# Store listing
-			print main'STORE $_;
+			print main::STORE $_;
 
 			# Ignore the summary at the end and blank lines
 			if( /^\d+ files?\./ || /^\s+$/ ){
@@ -691,7 +691,7 @@
 
 			# TODO: fix hacky 19$yr
 			local( $lsdate ) = "$day-$mon-19$yr $hrs:$min";
-			local( $time ) = &main'lstime_to_time( $lsdate );
+			local( $time ) = &main::lstime_to_time( $lsdate );
 			local( $type ) = '?';
 			local( $mode ) = 0;
 
@@ -736,7 +736,7 @@
 # 03-08-94  07:17AM                 5504 article.xfiles.intro
 # 02-28-94  11:44AM                 3262 article1.gillian.anderson
 
-sub lsparse'line_dosish
+sub lsparse::line_dosish
 {
 	local( $fh ) = @_;
 
@@ -748,7 +748,7 @@
 		$_ = <$fh>;
 
 		# Store listing
-		print main'STORE $_;
+		print main::STORE $_;
 
 		# Ignore blank lines
 		if( /^\s+$/ ){
@@ -775,7 +775,7 @@
 
 			# TODO: fix hacky 19$yr
 			local( $lsdate ) = "$day-$mon-19$yr $hrs:$min";
-			local( $time ) = &main'lstime_to_time( $lsdate );
+			local( $time ) = &main::lstime_to_time( $lsdate );
 			local( $type ) = ($dir_or_size eq '<DIR>' ? 'd' : 'f');
 			local( $mode ) = 0;
 			local( $size ) = 0;
@@ -842,7 +842,7 @@
 # WPKIT1.EXE          960338      06/21/95        17:01
 # CMT.CSV                  0      07/06/95        14:56
 
-sub lsparse'line_supertcp
+sub lsparse::line_supertcp
 {
     local( $fh ) = @_;
 
@@ -860,7 +860,7 @@
 	    $_ = <$fh>;
 
 	    # Store listing
-	    print main'STORE $_;
+	    print main::STORE $_;
 
 	    # Ignore the summary at the end and blank lines
 	    if( /^\d+ files?\./ || /^\s+$/ ){
@@ -885,7 +885,7 @@
 	    $pending = $5;
 
 	    local( $lsdate ) = "$day-$mon-$yr $time";
-	    local( $time ) = &main'lstime_to_time( $lsdate );
+	    local( $time ) = &main::lstime_to_time( $lsdate );
             local( $type ) = '?';
 	    local( $mode ) = 0;
 
@@ -931,7 +931,7 @@
 #               372      A          08-09-95   10:26  Aussie_1.bag
 #            310992                 06-28-94   09:56  INSTALL.EXE
 
-sub lsparse'line_os2
+sub lsparse::line_os2
 {
 	local( $fh ) = @_;
 
@@ -943,7 +943,7 @@
 		$_ = <$fh>;
 
 		# Store listing
-		print main'STORE $_;
+		print main::STORE $_;
 
 		# Ignore blank lines
 		if( /^\s+$/ ){
@@ -971,7 +971,7 @@
 
 			# TODO: fix hacky 19$yr
 			local( $lsdate ) = "$day-$mon-19$yr $hrs:$min";
-			local( $time ) = &main'lstime_to_time( $lsdate );
+			local( $time ) = &main::lstime_to_time( $lsdate );
 			local( $type ) = ($dir eq 'DIR' ? 'd' : 'f');
 			local( $mode ) = 0;
 
@@ -999,7 +999,7 @@
 # time is a Un*x time value for the file
 # type is "f" for a file, "d" for a directory and
 #         "l linkname" for a symlink
-sub lsparse'line_chameleon
+sub lsparse::line_chameleon
 {
     local( $fh ) = @_;
 
@@ -1038,7 +1038,7 @@
 	    $pending = $5;
 
 	    local( $lsdate ) = "$day-$mon-$yr $time";
-	    local( $time ) = &main'lstime_to_time( $lsdate );
+	    local( $time ) = &main::lstime_to_time( $lsdate );
             local( $type ) = '?';
 	    local( $mode ) = 0;
 
@@ -1076,7 +1076,7 @@
 # time is a Un*x time value for the file
 # type is "f" for a file, "d" for a directory and
 #         "l linkname" for a symlink
-sub lsparse'line_macos
+sub lsparse::line_macos
 {
 	local( $fh ) = @_;
 	local( $non_crud, $perm_denied );
@@ -1087,7 +1087,7 @@
 
 	while( <$fh> ){
 		# Store listing
-		print main'STORE $_;
+		print main::STORE $_;
 
 		# Stomp on carriage returns
 		s/\015//g;
@@ -1098,7 +1098,7 @@
 		if( /^([\-rwxd]{10}).*\s(\d+\s+)?(\S+)\s+\d+\s*(\w\w\w\s+\d+\s*(\d+:\d+|\d\d\d\d))\s+(.*)\n/ ){
 			local( $kind, $size, $lsdate, $file ) = ($1, $3, $4, $6);
 			
-			local( $time ) = &main'lstime_to_time( $lsdate );
+			local( $time ) = &main::lstime_to_time( $lsdate );
 			local( $type ) = '?';
 			local( $mode ) = 0;
 
@@ -1126,18 +1126,18 @@
 
 
 # --------------------- parse lsparse log file format
-# lsparse'line_lsparse() is for input in lsparse's internal form,
+# lsparse::line_lsparse() is for input in lsparse's internal form,
 # as it might have been written to a log file during a previous
 # run of a program that uses lsparse.  The format is:
 #     filename size time type mode
 # where size and time are in decimal, mode is in decimal or octal,
 # and type is one or two words.
-sub lsparse'line_lsparse
+sub lsparse::line_lsparse
 {
 	local( $fh ) = @_;
 
-	if( $lsparse'readtime ){
-		alarm( $lsparse'readtime );
+	if( $lsparse::readtime ){
+		alarm( $lsparse::readtime );
 	}
 
 	if( eof( $fh ) ){
@@ -1147,7 +1147,7 @@
 
 	while( <$fh> ){
 		# Store listing
-		print main'STORE $_;
+		print main::STORE $_;
 
 		if( /^(\S+)\s+(\d+)\s+(\d+)\s+((l\s+)?\S+)\s+(\d+)\n$/ ){
 			# looks good.
@@ -1174,12 +1174,12 @@
 # This is the format used at sumex-aim.stanford.edu for the info-mac area.
 # (see info-mac/help/all-files.txt.gz).
 #
-sub lsparse'line_infomac
+sub lsparse::line_infomac
 {
 	local( $fh ) = @_;
 
-	if( $lsparse'readtime ){
-		alarm( $lsparse'readtime );
+	if( $lsparse::readtime ){
+		alarm( $lsparse::readtime );
 	}
 
 	if( eof( $fh ) ){
@@ -1189,13 +1189,13 @@
 
 	while( <$fh> ){
 		# Store listing
-		print main'STORE $_;
+		print main::STORE $_;
 
 		next if /^;/;
 		if( /^([l-].)\s*(\d+)\s*(\w\w\w\s+\d+\s*(\d+:\d+|\d\d\d\d))\s+(.*)\n/ ){
 			local( $kind, $size, $lsdate, $file ) = ($1, $2, $3, $5);
 			
-			local( $time ) = &main'lstime_to_time( $lsdate );
+			local( $time ) = &main::lstime_to_time( $lsdate );
 
 			# This should be a symlink
 			if( $kind =~ /^l/ && $file =~ /(.*) -> (.*)/ ){
@@ -1226,12 +1226,12 @@
 # +i8388621.48638,m848117771,r,s1336,     qmsmac.html
 # +i8388621.88705,m850544954,/,   txt
 #
-sub lsparse'line_eplf
+sub lsparse::line_eplf
 {
 	local( $fh ) = @_;
 
-	if( $lsparse'readtime ){
-		alarm( $lsparse'readtime );
+	if( $lsparse::readtime ){
+		alarm( $lsparse::readtime );
 	}
 
 	if( eof( $fh ) ){
@@ -1243,7 +1243,7 @@
 		s/\015//g;
 
 		# Store listing
-		print main'STORE $_;
+		print main::STORE $_;
 
 # +i8388621.48638,m848117771,r,s1336,     qmsmac.html
 # +i8388621.88705,m850544954,/,   txt
@@ -1272,12 +1272,12 @@
 # --------------------- CTAN files list
 #    22670 Mon Jul 20 12:36:34 1992 pub/tex/biblio/bibtex/contrib/aaai-named.bst
 #
-sub lsparse'line_ctan
+sub lsparse::line_ctan
 {
 	local( $fh ) = @_;
 
-	if( $lsparse'readtime ){
-		alarm( $lsparse'readtime );
+	if( $lsparse::readtime ){
+		alarm( $lsparse::readtime );
 	}
 
 	if( eof( $fh ) ){
@@ -1287,12 +1287,12 @@
 
 	while( <$fh> ){
 		# Store listing
-		print main'STORE $_;
+		print main::STORE $_;
 
 		if( /^\s*(\d+)\s+(\w\w\w\s+\w\w\w\s+\d+\s+\d+:\d+:\d+\s+\d+)\s+(.*)\n/ ){
 			local( $size, $lsdate, $file ) = ($1, $2, $3);
 			
-			local( $time ) = &main'lstime_to_time( $lsdate );
+			local( $time ) = &main::lstime_to_time( $lsdate );
 
 			return( $file, $size, $time, 'f', 0444 );
 		}
@@ -1317,12 +1317,12 @@
 # time is a Un*x time value for the file -- this is good from the m/f
 # type is always "f" for a file
 
-sub lsparse'line_cms
+sub lsparse::line_cms
 {
 	local( $fh ) = @_;
 
-	if( $lsparse'readtime ){
-		alarm( $lsparse'readtime );
+	if( $lsparse::readtime ){
+		alarm( $lsparse::readtime );
 	}
 
 	if( eof( $fh ) ){
@@ -1331,21 +1331,21 @@
 	}
 	while( <$fh> ){
 		# Store listing
-		print main'STORE $_;
+		print main::STORE $_;
 
 		chop;
 		next unless /\d+\/\d+\/\d+\s+\d+:\d+:\d+/;
 		s/^\s+//;
 
 		# Upper case is so ugly
-		if( ! $lsparse'vms_keep_case ){
+		if( ! $lsparse::vms_keep_case ){
 			tr/A-Z/a-z/;
 		}
 
 		local( $fname, $ftype, $fdisk, $rectype, $lrecl, $recs,
 		      $blocks, $ldate, $tod ) = split(/\s+/, $_);
 		return( join('.', ($fname, $ftype, $fdisk)),
-		       $lrecl * $recs, &main'lstime_to_time( "$ldate $tod" ),
+		       $lrecl * $recs, &main::lstime_to_time( "$ldate $tod" ),
 		       'f' );
 	}
 	alarm( 0 );