diff options
author | cy <cy@FreeBSD.org> | 2011-07-18 15:03:14 +0800 |
---|---|---|
committer | cy <cy@FreeBSD.org> | 2011-07-18 15:03:14 +0800 |
commit | 705f5693f2c0faa3448b1ca42dbc61fee4b2f980 (patch) | |
tree | 2276380f9bed0bd402d40fb08172e428ffb5ef46 /ftp | |
parent | 5e7c07f7dd0bd4ac3b3fc653fefdaa8b478877dc (diff) | |
download | freebsd-ports-graphics-705f5693f2c0faa3448b1ca42dbc61fee4b2f980.tar.gz freebsd-ports-graphics-705f5693f2c0faa3448b1ca42dbc61fee4b2f980.tar.zst freebsd-ports-graphics-705f5693f2c0faa3448b1ca42dbc61fee4b2f980.zip |
Resurrect this port. Adjust master sites and assume maintainership.
Diffstat (limited to 'ftp')
-rw-r--r-- | ftp/mirror/Makefile | 42 | ||||
-rw-r--r-- | ftp/mirror/distinfo | 4 | ||||
-rw-r--r-- | ftp/mirror/files/patch-aa | 73 | ||||
-rw-r--r-- | ftp/mirror/files/patch-ab | 80 | ||||
-rw-r--r-- | ftp/mirror/files/patch-ac | 50 | ||||
-rw-r--r-- | ftp/mirror/files/patch-ae | 36 | ||||
-rw-r--r-- | ftp/mirror/files/patch-lchat.pl | 164 | ||||
-rw-r--r-- | ftp/mirror/pkg-descr | 7 | ||||
-rw-r--r-- | ftp/mirror/scripts/configure | 7 |
9 files changed, 463 insertions, 0 deletions
diff --git a/ftp/mirror/Makefile b/ftp/mirror/Makefile new file mode 100644 index 00000000000..577062b224b --- /dev/null +++ b/ftp/mirror/Makefile @@ -0,0 +1,42 @@ +# New ports collection makefile for: mirror +# Date created: 15 May 1995 +# Whom: torstenb +# +# $FreeBSD$ +# + +PORTNAME= mirror +PORTVERSION= 2.9 +PORTREVISION= 1 +CATEGORIES= ftp +MASTER_SITES= ftp://sunsite.ualberta.ca/pub/Mirror/mirror/ \ + http://komquats.com/distfiles/ \ + ${MASTER_SITE_LOCAL}/cy/ + +PATCH_SITES= ${MASTER_SITES} +PATCHFILES= ftp.pl_wupatch + +MAINTAINER= cy@FreeBSD.org +COMMENT= Mirror packages on remote sites + +PLIST_FILES= bin/mirror \ + bin/do_unlinks \ + bin/pkgs_to_mmin \ + bin/mirror-master \ + lib/mirror/lchat.pl \ + lib/mirror/dateconv.pl \ + lib/mirror/ftp.pl \ + lib/mirror/lsparse.pl \ + lib/mirror/mirror.defaults.sample + +PLIST_DIRS= lib/mirror + +USE_PERL5= yes +NO_WRKSUBDIR= yes +MAKEFILE= makefile +MAN1= mirror.1 mirror-master.1 + +pre-install: + @${MKDIR} ${PREFIX}/lib/mirror + +.include <bsd.port.mk> diff --git a/ftp/mirror/distinfo b/ftp/mirror/distinfo new file mode 100644 index 00000000000..6d52ace3643 --- /dev/null +++ b/ftp/mirror/distinfo @@ -0,0 +1,4 @@ +SHA256 (mirror-2.9.tar.gz) = bc58fa4420763255881f7ff9b854027ced145730792a967e2981867e91da59b2 +SIZE (mirror-2.9.tar.gz) = 123194 +SHA256 (ftp.pl_wupatch) = 5cd1a70b6dc64af123602cdac4a107372bbf87fa7813326428a5f98753cdae31 +SIZE (ftp.pl_wupatch) = 958 diff --git a/ftp/mirror/files/patch-aa b/ftp/mirror/files/patch-aa new file mode 100644 index 00000000000..8cfb9afd12c --- /dev/null +++ b/ftp/mirror/files/patch-aa @@ -0,0 +1,73 @@ +*** makefile.orig Mon Jun 1 20:28:47 1998 +--- makefile Mon Jun 8 13:59:10 1998 +*************** +*** 41,47 **** + $(WEBFILES) + + all: +! echo try make mirror.tar + + mirror.tar: $(FILES) + rev=`./mirror.pl -v | perl -ane 'print "$$F[2]\n";'`; echo $rev; \ +--- 41,47 ---- + $(WEBFILES) + + all: +! # echo try make mirror.tar + + mirror.tar: $(FILES) + rev=`./mirror.pl -v | perl -ane 'print "$$F[2]\n";'`; echo $rev; \ +*************** +*** 65,89 **** + # mode to install executables + EXMODE = 755 + # group to own all the files +! GRP = gnu + # directory to install .pl (perl library) files +! PLDIR = /usr/local/perl5/lib/perl5 + # directory to install public executables +! BINDIR = /usr/local/sbin + # directory to install man pages +! MANDIR = /usr/local/man/man1 + + install: +! install -m $(PLMODE) -g $(GRP) lchat.pl $(PLDIR) +! install -m $(PLMODE) -g $(GRP) dateconv.pl $(PLDIR) +! install -m $(PLMODE) -g $(GRP) ftp.pl $(PLDIR) +! install -m $(PLMODE) -g $(GRP) lsparse.pl $(PLDIR) +! install -m $(EXMODE) -g $(GRP) mirror.pl $(BINDIR)/mirror +! install -m $(EXMODE) -g $(GRP) do_unlinks.pl $(BINDIR)/do_unlinks +! install -m $(EXMODE) -g $(GRP) pkgs_to_mmin.pl $(BINDIR)/pkgs_to_mmin +! install -m $(EXMODE) -g $(GRP) mm.pl $(BINDIR)/mirror-master +! install -m $(PLMODE) -g $(GRP) mirror.man $(MANDIR)/mirror.1 +! install -m $(PLMODE) -g $(GRP) mm.man $(MANDIR)/mirror-master.1 + + # directory to install .pl (perl library) files for rperl + RPLDIR = /usr/local/rperl5/lib/perl5 +--- 65,89 ---- + # mode to install executables + EXMODE = 755 + # group to own all the files +! GRP = bin + # directory to install .pl (perl library) files +! PLDIR = ${PREFIX}/lib/mirror + # directory to install public executables +! BINDIR = ${PREFIX}/bin + # directory to install man pages +! MANDIR = ${PREFIX}/man/man1 + + install: +! install -c -m $(PLMODE) -g $(GRP) lchat.pl $(PLDIR) +! install -c -m $(PLMODE) -g $(GRP) dateconv.pl $(PLDIR) +! install -c -m $(PLMODE) -g $(GRP) ftp.pl $(PLDIR) +! install -c -m $(PLMODE) -g $(GRP) lsparse.pl $(PLDIR) +! install -c -m $(EXMODE) -g $(GRP) mirror.pl $(BINDIR)/mirror +! install -c -m $(EXMODE) -g $(GRP) do_unlinks.pl $(BINDIR)/do_unlinks +! install -c -m $(EXMODE) -g $(GRP) pkgs_to_mmin.pl $(BINDIR)/pkgs_to_mmin +! install -c -m $(EXMODE) -g $(GRP) mm.pl $(BINDIR)/mirror-master +! install -c -m $(PLMODE) -g $(GRP) mirror.man $(MANDIR)/mirror.1 +! install -c -m $(PLMODE) -g $(GRP) mm.man $(MANDIR)/mirror-master.1 +! install -c -m $(PLMODE) -g $(GRP) mirror.defaults $(PLDIR)/mirror.defaults.sample + + # directory to install .pl (perl library) files for rperl + RPLDIR = /usr/local/rperl5/lib/perl5 diff --git a/ftp/mirror/files/patch-ab b/ftp/mirror/files/patch-ab new file mode 100644 index 00000000000..863467fc659 --- /dev/null +++ b/ftp/mirror/files/patch-ab @@ -0,0 +1,80 @@ +*** mirror.defaults.orig Fri May 29 20:57:46 1998 +--- mirror.defaults Mon Jun 8 14:01:11 1998 +*************** +*** 11,39 **** + # The LOCAL hostname - if not the same as `hostname` + # (I advertise the name sunsite.org.uk but the machine is + # really swallow.sunsite.org.uk.) +! hostname=sunsite.org.uk + # Keep all local_dirs relative to here +! local_dir=/public/ + # The local_dir must exist FIRST + #local_dir_check=true +! remote_password=wizards@sunsite.org.uk + mail_to= + # Don't mirror file modes. Set all dirs/files to these + dir_mode=0755 + file_mode=0444 + # By defaults files are owned by root.zero +! user=0 +! group=0 + # # Keep a log file in each updated directory + # update_log=.mirror +! update_log= + # 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$|\.mirror\.log|core$|\.cap|\.in\..*\.$|MIRROR\.LOG|#.*#|\.FSP|\.cache|\.zipped|\.notar|\.message|lost\+found/|Network Trash Folder)|suky.mpe?g + # Do not to compress anything + compress_patt= +! compress_prog=compress + # 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... +--- 11,39 ---- + # The LOCAL hostname - if not the same as `hostname` + # (I advertise the name sunsite.org.uk but the machine is + # really swallow.sunsite.org.uk.) +! # hostname=sunsite.org.uk + # Keep all local_dirs relative to here +! local_dir=/home/ftp/pub + # The local_dir must exist FIRST + #local_dir_check=true +! # remote_password=wizards@sunsite.org.uk + mail_to= + # Don't mirror file modes. Set all dirs/files to these + dir_mode=0755 + file_mode=0444 + # By defaults files are owned by root.zero +! # user=0 +! # group=0 + # # Keep a log file in each updated directory + # update_log=.mirror +! # update_log= + # 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$|\.mirror\.log|core$|\.cap|\.in\..*\.$|MIRROR\.LOG|#.*#|\.FSP|\.cache|\.zipped|\.notar|\.message|lost\+found/|Network Trash Folder)|suky.mpe?g + # Do not to compress anything + compress_patt= +! 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... +*************** +*** 47,53 **** + # rpm and deb are package formats used on RedHat and Debian Linux + compress_excl+|-z(\d+)?$|\.tgz|_tgz|\.tar\.Z|\.tar\.gz|\.taz$|\.arc$|\.zip$|\.lzh$|\.zoo$|\.exe$|\.lha$|\.zom$|\.gif$|\.jpeg$|\.jpg$|\.mpeg$|\.au$|\.shk$|rpm$|deb$|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)$ + # Ignore any local readme and .mirror files + local_ignore=README.doc.ic|(^|/)\.(mirror|notar)$ + # Automatically delete local copies of files that the +--- 47,53 ---- + # rpm and deb are package formats used on RedHat and Debian Linux + compress_excl+|-z(\d+)?$|\.tgz|_tgz|\.tar\.Z|\.tar\.gz|\.taz$|\.arc$|\.zip$|\.lzh$|\.zoo$|\.exe$|\.lha$|\.zom$|\.gif$|\.jpeg$|\.jpg$|\.mpeg$|\.au$|\.shk$|rpm$|deb$|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)$ + # Ignore any local readme and .mirror files + local_ignore=README.doc.ic|(^|/)\.(mirror|notar)$ + # Automatically delete local copies of files that the diff --git a/ftp/mirror/files/patch-ac b/ftp/mirror/files/patch-ac new file mode 100644 index 00000000000..d80d6656e9c --- /dev/null +++ b/ftp/mirror/files/patch-ac @@ -0,0 +1,50 @@ +--- mirror.pl.orig Mon Jun 8 12:55:27 1998 ++++ mirror.pl Tue Jun 1 16:24:17 2004 +@@ -104,7 +104,7 @@ + # Try to find the default location of various programs via + # the users PATH then using $extra_path + if( ! $on_win ){ +- $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'; + } + if( $extra_path ne '' ){ + $ENV{ 'PATH' } .= $path_sep . $extra_path; +@@ -159,19 +159,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 = "/usr/local/lib/mirror"; + unshift( @INC, $dir ); + + # Debian GNU/Linux stores mirror.defaults in /etc/mirror +@@ -1322,8 +1323,11 @@ + + # Create a get_patt from the contents of the local directory + if( $update_local && $#get_top >= 0 ){ +- $get_patt = '^' . join( '|^', @get_top ); +- $get_patt =~ s/$squished//g; ++ my ($path,$re,@re_patt); ++ #$get_patt = '^' . join( '|^', @get_top ); ++ #$get_patt =~ s/$squished//g; ++ foreach $path ( @get_top ) { push @re_patt, "\^\Q$path\E\$"; } ++ $get_patt= join( '|', @re_patt ); + &msg( "get_patt = $get_patt\n" ) if $debug; + } + diff --git a/ftp/mirror/files/patch-ae b/ftp/mirror/files/patch-ae new file mode 100644 index 00000000000..c289ae2489d --- /dev/null +++ b/ftp/mirror/files/patch-ae @@ -0,0 +1,36 @@ +*** ftp.pl.orig Fri Jun 5 11:10:27 1998 +--- ftp.pl Fri Sep 10 10:40:50 1999 +*************** +*** 150,156 **** + # (Normally set elsewhere - this is just a sensible default.) + # Is expected to take count and code as arguments and prompt + # for the secret key with 'password:' on stdout and then print the password. +! $ftp'keygen_prog = '/usr/local/bin/key'; + + # Uncomment to turn on lots of debugging. + # &debug( 10 ); +--- 150,156 ---- + # (Normally set elsewhere - this is just a sensible default.) + # Is expected to take count and code as arguments and prompt + # for the secret key with 'password:' on stdout and then print the password. +! $ftp'keygen_prog = '/usr/bin/key'; + + # Uncomment to turn on lots of debugging. + # &debug( 10 ); +*************** +*** 486,492 **** + return 0; + } + if( $ret == 1 ) { +! if( $response =~ m/^227 Entering Passive Mode \((\d+),(\d+),(\d+),(\d+),(\d+),(\d+)\)/ ){ + $newhost = sprintf( "%d.%d.%d.%d", $1, $2, $3, $4 ); + $newport = $5 * 256 + $6; + } +--- 486,492 ---- + return 0; + } + if( $ret == 1 ) { +! if( $response =~ m/^227 .* \((\d+),(\d+),(\d+),(\d+),(\d+),(\d+)\)/ ){ + $newhost = sprintf( "%d.%d.%d.%d", $1, $2, $3, $4 ); + $newport = $5 * 256 + $6; + } diff --git a/ftp/mirror/files/patch-lchat.pl b/ftp/mirror/files/patch-lchat.pl new file mode 100644 index 00000000000..2f702de9dcc --- /dev/null +++ b/ftp/mirror/files/patch-lchat.pl @@ -0,0 +1,164 @@ +--- lchat.pl.orig 1998-05-29 12:05:46.000000000 -0700 ++++ lchat.pl 2009-02-20 09:33:47.000000000 -0800 +@@ -66,6 +66,7 @@ + # Perl 5 has a special way of getting them via the 'use Socket' + # above. + $main'pf_inet = &Socket'PF_INET; ++ $main'af_inet = &Socket'AF_INET; + $main'sock_stream = &Socket'SOCK_STREAM; + local($name, $aliases, $proto) = getprotobyname( 'tcp' ); + $main'tcp_proto = $proto; +@@ -74,6 +75,7 @@ + # Perl 4 needs to have the socket.ph file created when perl was + # installed. + $main'pf_inet = &'PF_INET; ++ $main'af_inet = &'AF_INET; + $main'sock_stream = &'SOCK_STREAM; + local($name, $aliases, $proto) = getprotobyname( 'tcp' ); + $main'tcp_proto = $proto; +@@ -85,6 +87,7 @@ + # Use hardwired versions + # but who the heck would change these anyway? (:-) + $main'pf_inet = 2; ++ $main'af_inet = 2; + $main'sock_stream = 1; # Sigh... On Solaris set this to 2 + $main'tcp_proto = 6; + warn "lchat.pl: using hardwired in network constantants"; +@@ -93,7 +96,6 @@ + # Are we using the SOCKS version of perl? + $using_socks = 0; # 0=no (default), 1=yes + +-$sockaddr = 'S n a4 x8'; + if( ! $on_win ){ + chop( $thishost = `hostname` ); + if( $thishost eq '' ){ +@@ -107,6 +109,54 @@ + $thishost = 'localhost'; + } + ++# ++# $packedsocketname = _pack_sin($portnumber, $ipaddress) ++# ++sub _pack_sin ++{ ++ my $packed; ++ ++ if ( $] =~ /^5\.\d+$/ ) { ++ # ++ # FreeBSD has a slightly different (from the rest of the world) ++ # sockaddr_in definition, so rely on Socket module to handle it. ++ # ++ $packed = &Socket'pack_sockaddr_in(@_[0,1]); ++ } else { ++ # ++ # Old-fashioned way to set up sockaddr_in structure. Not ++ # correct for "modern" FreeBSD (>= 5.X ?) ++ # ++ $packed = pack('S n a4 x8', $main'af_inet, 0, $thisaddr); ++ } ++ return $packed; ++} ++ ++# ++# ($port, $ipaddress) = _unpack_sin($packedsocketname) ++# ++sub _unpack_sin ++{ ++ my @PA; ++ ++ if ( $] =~ /^5\.\d+$/ ) { ++ # ++ # FreeBSD has a slightly different (from the rest of the world) ++ # sockaddr_in definition, so rely on Socket module to handle it. ++ # Docs say "Will croak if the structure does not have AF_INET in ++ # the right place." ++ # ++ @PA = &Socket'unpack_sockaddr_in($_[0]); ++ } else { ++ # ++ # Old-fashioned way to parse sockaddr_in structure. Not ++ # correct for "modern" FreeBSD (>= 5.X ?) ++ # ++ (undef, @PA) = unpack('S n a4 x8', $_[0]); ++ } ++ return @PA; ++} ++ + + ## &chat'open_port("server.address",$port_number); + ## opens a named or numbered TCP server +@@ -117,7 +167,7 @@ + + # We may be multi-homed, start with 0, fixup once connexion is made + $thisaddr = "\0\0\0\0" ; +- $thisproc = pack($sockaddr, 2, 0, $thisaddr); ++ $thisproc = &_pack_sin(0, $thisaddr); + + if ($server =~ /^(\d+)+\.(\d+)\.(\d+)\.(\d+)$/) { + $serveraddr = pack('C4', $1, $2, $3, $4); +@@ -128,7 +178,7 @@ + } + $serveraddr = $x[4]; + } +- $serverproc = pack($sockaddr, 2, $port, $serveraddr); ++ $serverproc = &_pack_sin($port, $serveraddr); + unless (socket(S, $main'pf_inet, $main'sock_stream, $main'tcp_proto)) { + ($!) = ($!, close(S)); # close S while saving $! + return undef; +@@ -150,9 +200,9 @@ + # We opened with the local address set to ANY, at this stage we know + # which interface we are using. This is critical if our machine is + # multi-homed, with IP forwarding off, so fix-up. +- local($fam,$lport); +- ($fam,$lport,$thisaddr) = unpack($sockaddr, getsockname(S)); +- $thisproc = pack($sockaddr, 2, 0, $thisaddr); ++ local($lport); ++ ($lport,$thisaddr) = &_unpack_sin(getsockname(S)); ++ $thisproc = &_pack_sin(0, $thisaddr); + # end of post-connect fixup + select((select(S), $| = 1)[0]); + return 1; +@@ -161,13 +211,13 @@ + # Similar to open_port, but does less. Used for PASV code with ftp.pl + # -Erez Zadok. + sub open_newport { ## public +- local($server, $port, $newsock) = @_; ++ local($server, $port, *newsock) = @_; + + local($serveraddr,$serverproc); + + # We may be multi-homed, start with 0, fixup once connexion is made + $thisaddr = "\0\0\0\0" ; +- $thisproc = pack($sockaddr, 2, 0, $thisaddr); ++ $thisproc = &_pack_sin(0, $thisaddr); + + if ($server =~ /^(\d+)+\.(\d+)\.(\d+)\.(\d+)$/) { + $serveraddr = pack('C4', $1, $2, $3, $4); +@@ -178,20 +228,20 @@ + } + $serveraddr = $x[4]; + } +- $serverproc = pack($sockaddr, 2, $port, $serveraddr); ++ $serverproc = &_pack_sin($port, $serveraddr); + +- unless (connect($newsock, $serverproc)) { +- ($!) = ($!, close($newsock)); # close newsock while saving $! ++ unless (connect(newsock, $serverproc)) { ++ ($!) = ($!, close(newsock)); # close newsock while saving $! + return undef; + } + # We opened with the local address set to ANY, at this stage we know + # which interface we are using. This is critical if our machine is + # multi-homed, with IP forwarding off, so fix-up. +- local($fam,$lport); +- ($fam,$lport,$thisaddr) = unpack($sockaddr, getsockname($newsock)); +- $thisproc = pack($sockaddr, 2, 0, $thisaddr); ++ local($lport); ++ ($lport,$thisaddr) = &_unpack_sin(getsockname(newsock)); ++ $thisproc = &_pack_sin(0, $thisaddr); + # end of post-connect fixup +- select((select($newsock), $| = 1)[0]); ++ select((select(newsock), $| = 1)[0]); + return 1; + } + ############################################################################## diff --git a/ftp/mirror/pkg-descr b/ftp/mirror/pkg-descr new file mode 100644 index 00000000000..797bb365090 --- /dev/null +++ b/ftp/mirror/pkg-descr @@ -0,0 +1,7 @@ +Mirror is a package written in Perl that uses the ftp protocol to +duplicate a directory hierarchy between the machine it is run on and a +remote host. It avoids copying files unnecessarily by comparing the +file timestamps and sizes before transferring. Amongst other things +Mirror can optionally compress, gzip, and split files. + +WWW: http://ry.ca/mirror/mirror/ diff --git a/ftp/mirror/scripts/configure b/ftp/mirror/scripts/configure new file mode 100644 index 00000000000..39583464494 --- /dev/null +++ b/ftp/mirror/scripts/configure @@ -0,0 +1,7 @@ +#!/bin/sh +# +# $FreeBSD$ +# + +mv ${WRKSRC}/mirror.pl ${WRKSRC}/mirror.pl.bak +sed <${WRKSRC}/mirror.pl.bak >${WRKSRC}/mirror.pl s+!!PREFIX!!+$PREFIX+g |