/usr/local -> PREFIX
fix network functions remove scripts/configure
This commit is contained in:
parent
2fcec6e645
commit
8bfe488efc
@ -1,4 +1,4 @@
|
||||
# $OpenBSD: Makefile,v 1.10 2000/03/28 10:00:17 espie Exp $
|
||||
# $OpenBSD: Makefile,v 1.11 2000/05/19 04:56:47 form Exp $
|
||||
|
||||
DISTNAME= mirror-2.9
|
||||
CATEGORIES= net
|
||||
@ -20,23 +20,22 @@ WRKDIST= ${WRKDIR}
|
||||
MAKE_FILE= makefile
|
||||
FAKE= Yes
|
||||
|
||||
DOCDIR= ${PREFIX}/share/doc/mirror
|
||||
DOCS= copyright.html index.html mirror-faq.html mirror.html \
|
||||
mm.html quickstart.html mirror-on-dusk.gif Lake.class
|
||||
|
||||
do-configure:
|
||||
@-rm -f ${WRKSRC}/mirror.man
|
||||
@sed -e 's,@DOCDIR@,${DOCDIR},' <${FILESDIR}/mirror.man >${WRKSRC}/mirror.man
|
||||
@sed -e 's,@DOCDIR@,${DOCDIR},g' < ${FILESDIR}/mirror.man \
|
||||
>${WRKSRC}/mirror.man
|
||||
@sed -e 's,@PREFIX@,${PREFIX},g' < ${WRKSRC}/mirror.pl \
|
||||
> ${WRKSRC}/mirror
|
||||
@sed -e 's,@PREFIX@,${PREFIX},g' < ${WRKSRC}/mm.pl \
|
||||
> ${WRKSRC}/mirrormaster
|
||||
|
||||
pre-install:
|
||||
${INSTALL_DATA_DIR} ${PREFIX}/lib/mirror
|
||||
|
||||
DOCDIR=${PREFIX}/share/doc/mirror
|
||||
DOCS= copyright.html \
|
||||
index.html \
|
||||
mirror-faq.html \
|
||||
mirror.html \
|
||||
mm.html \
|
||||
quickstart.html \
|
||||
mirror-on-dusk.gif \
|
||||
Lake.class
|
||||
|
||||
post-install:
|
||||
@${INSTALL_DATA_DIR} ${DOCDIR}
|
||||
@cd ${WRKSRC} && ${INSTALL_DATA} ${DOCS} ${DOCDIR}
|
||||
|
@ -1,88 +0,0 @@
|
||||
*** makefile.orig Tue Jun 2 01:28:47 1998
|
||||
--- makefile Wed Jun 10 17:14:40 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,90 ----
|
||||
# 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)/mirrormaster
|
||||
! install -c -m $(PLMODE) -g $(GRP) mirror.man $(MANDIR)/mirror.1
|
||||
! install -c -m $(PLMODE) -g $(GRP) mm.man $(MANDIR)/mirrormaster.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
|
||||
***************
|
||||
*** 97,102 ****
|
||||
install -m $(EXMODE) -g $(GRP) rmirror.pl $(BINLDIR)/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
|
||||
--- 98,103 ----
|
||||
install -m $(EXMODE) -g $(GRP) rmirror.pl $(BINLDIR)/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)/mirrormaster
|
||||
install -m $(PLMODE) -g $(GRP) mirror.man $(MANDIR)/mirror.1
|
||||
! install -m $(PLMODE) -g $(GRP) mm.man $(MANDIR)/mirrormaster.1
|
@ -1,80 +0,0 @@
|
||||
*** 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
|
@ -1,61 +0,0 @@
|
||||
*** mirror.pl.orig Sat May 30 02:01:42 1998
|
||||
--- mirror.pl Tue Jun 30 13:43:08 1998
|
||||
***************
|
||||
*** 104,110 ****
|
||||
# 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';
|
||||
}
|
||||
if( $extra_path ne '' ){
|
||||
$ENV{ 'PATH' } .= $path_sep . $extra_path;
|
||||
--- 104,110 ----
|
||||
# Try to find the default location of various programs via
|
||||
# the users PATH then using $extra_path
|
||||
if( ! $on_win ){
|
||||
! $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,177 ****
|
||||
$rm_prog = &find_prog( 'rm' );
|
||||
|
||||
# Generate checksums
|
||||
! $sum_prog = &find_prog( 'sum' );
|
||||
|
||||
# SPECIAL NOTE: This is eval'd, so DONT put double-quotes (") in it.
|
||||
# You can get local variables to appear as in the second example:
|
||||
! $mail_subject = '-s \'mirror update\'';
|
||||
! # $mail_subject = ' -s \'mirror update of $package\'';
|
||||
|
||||
# When scanning the local directory, how often to prod the remote
|
||||
# system to keep the connection alive
|
||||
$prod_interval = 60;
|
||||
|
||||
# Put the directory that mirror is actually in at the start of PERLLIB.
|
||||
! $dir = &real_dir_from_path( $0 );
|
||||
unshift( @INC, $dir );
|
||||
|
||||
# Debian GNU/Linux stores mirror.defaults in /etc/mirror
|
||||
--- 159,178 ----
|
||||
$rm_prog = &find_prog( 'rm' );
|
||||
|
||||
# Generate checksums
|
||||
! $sum_prog = &find_prog( 'md5' );
|
||||
|
||||
# SPECIAL NOTE: This is eval'd, so DONT put double-quotes (") in it.
|
||||
# You can get local variables to appear as in the second example:
|
||||
! # $mail_subject = '-s \'mirror update\'';
|
||||
! $mail_subject = ' -s \'mirror update of $package\'';
|
||||
|
||||
# When scanning the local directory, how often to prod the remote
|
||||
# system to keep the connection alive
|
||||
$prod_interval = 60;
|
||||
|
||||
# Put the directory that mirror is actually in at the start of PERLLIB.
|
||||
! # $dir = &real_dir_from_path( $0 );
|
||||
! $dir = "/usr/local/lib/mirror";
|
||||
unshift( @INC, $dir );
|
||||
|
||||
# Debian GNU/Linux stores mirror.defaults in /etc/mirror
|
@ -1,19 +0,0 @@
|
||||
*** ftp.pl.orig Mon Jun 8 14:11:39 1998
|
||||
--- ftp.pl Mon Jun 8 14:11:42 1998
|
||||
***************
|
||||
*** 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;
|
||||
}
|
@ -1,58 +0,0 @@
|
||||
*** lchat.pl.orig Fri May 29 21:05:46 1998
|
||||
--- lchat.pl Mon Jun 8 14:34:37 1998
|
||||
***************
|
||||
*** 161,167 ****
|
||||
# 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($serveraddr,$serverproc);
|
||||
|
||||
--- 161,167 ----
|
||||
# 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($serveraddr,$serverproc);
|
||||
|
||||
***************
|
||||
*** 180,197 ****
|
||||
}
|
||||
$serverproc = pack($sockaddr, 2, $port, $serveraddr);
|
||||
|
||||
! 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);
|
||||
# end of post-connect fixup
|
||||
! select((select($newsock), $| = 1)[0]);
|
||||
return 1;
|
||||
}
|
||||
##############################################################################
|
||||
--- 180,197 ----
|
||||
}
|
||||
$serverproc = pack($sockaddr, 2, $port, $serveraddr);
|
||||
|
||||
! 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);
|
||||
# end of post-connect fixup
|
||||
! select((select(newsock), $| = 1)[0]);
|
||||
return 1;
|
||||
}
|
||||
##############################################################################
|
65
net/mirror/patches/patch-ftp-pl
Normal file
65
net/mirror/patches/patch-ftp-pl
Normal file
@ -0,0 +1,65 @@
|
||||
# $NetBSD: patch-ae,v 1.6 2000/04/20 03:22:50 kim Exp $
|
||||
# $OpenBSD: patch-ftp-pl,v 1.1 2000/05/19 04:56:48 form Exp $
|
||||
|
||||
--- ftp.pl.orig Fri Jun 5 05:10:27 1998
|
||||
+++ ftp.pl Wed Apr 19 23:14:00 2000
|
||||
@@ -233,7 +233,7 @@
|
||||
}
|
||||
else {
|
||||
print $showfd "proxy connection failed " if $proxy;
|
||||
- print $showfd "Cannot open ftp to $connect_site\n" if $ftp_show;
|
||||
+ print $showfd "Cannot open ftp to $newhost:$newport\n" if $ftp_show;
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
@@ -270,6 +270,14 @@
|
||||
$SIG{ 'PIPE' } = "ftp'ftp__sighandler";
|
||||
}
|
||||
|
||||
+# Setup a signal handler for user interrupts.
|
||||
+sub ftp'set_user_signals
|
||||
+{
|
||||
+ $ftp_logger = @_;
|
||||
+ $SIG{ 'INT' } = "ftp'ftp__sighandler";
|
||||
+}
|
||||
+
|
||||
+
|
||||
# &ftp'set_namemap( function to map outgoing name, function to map incoming )
|
||||
sub ftp'set_namemap
|
||||
{
|
||||
@@ -486,7 +494,7 @@
|
||||
return 0;
|
||||
}
|
||||
if( $ret == 1 ) {
|
||||
- if( $response =~ m/^227 Entering Passive Mode \((\d+),(\d+),(\d+),(\d+),(\d+),(\d+)\)/ ){
|
||||
+ if($response =~ m/^227 .*\((\d+),(\d+),(\d+),(\d+),(\d+),(\d+)\)/){
|
||||
$newhost = sprintf( "%d.%d.%d.%d", $1, $2, $3, $4 );
|
||||
$newport = $5 * 256 + $6;
|
||||
}
|
||||
@@ -581,6 +589,9 @@
|
||||
return 0;
|
||||
}
|
||||
|
||||
+ # shut down our end of the socket
|
||||
+ &close_data_socket;
|
||||
+
|
||||
# read the close
|
||||
#
|
||||
$ret = &expect($timeout,
|
||||
@@ -590,8 +601,6 @@
|
||||
$ret = 0;
|
||||
}
|
||||
|
||||
- # shut down our end of the socket
|
||||
- &close_data_socket;
|
||||
|
||||
if( ! $ret ){
|
||||
return 0;
|
||||
@@ -708,6 +717,7 @@
|
||||
if( ! $service_open ){
|
||||
return 0;
|
||||
}
|
||||
+ chmod 0600, $loc_fname;
|
||||
|
||||
if( $loc_fname eq "" ){
|
||||
$loc_fname = $rem_fname;
|
69
net/mirror/patches/patch-lchat-pl
Normal file
69
net/mirror/patches/patch-lchat-pl
Normal file
@ -0,0 +1,69 @@
|
||||
# $NetBSD: patch-ad,v 1.5 1999/12/28 18:15:43 itojun Exp $
|
||||
# $OpenBSD: patch-lchat-pl,v 1.1 2000/05/19 04:56:48 form Exp $
|
||||
|
||||
--- lchat.pl.orig Wed Jun 7 22:19:22 1995
|
||||
+++ lchat.pl Wed May 12 18:10:54 1999
|
||||
@@ -79,7 +79,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_sockaddr_in(0, $thisaddr);
|
||||
|
||||
if ($server =~ /^(\d+)+\.(\d+)\.(\d+)\.(\d+)$/) {
|
||||
$serveraddr = pack('C4', $1, $2, $3, $4);
|
||||
@@ -90,7 +90,7 @@
|
||||
}
|
||||
$serveraddr = $x[4];
|
||||
}
|
||||
- $serverproc = pack($sockaddr, 2, $port, $serveraddr);
|
||||
+ $serverproc = pack_sockaddr_in($port, $serveraddr);
|
||||
unless (socket(S, $main'pf_inet, $main'sock_stream, $main'tcp_proto)) {
|
||||
($!) = ($!, close(S)); # close S while saving $!
|
||||
return undef;
|
||||
@@ -99,12 +99,12 @@
|
||||
# The SOCKS documentation claims that this bind before the connet
|
||||
# is unnecessary. Not just, that, but when used with SOCKS,
|
||||
# a connect() must not follow a bind(). -Erez Zadok.
|
||||
- unless( $using_socks ){
|
||||
- unless (bind(S, $thisproc)) {
|
||||
- ($!) = ($!, close(S)); # close S while saving $!
|
||||
- return undef;
|
||||
- }
|
||||
- }
|
||||
+# unless( $using_socks ){
|
||||
+# unless (bind(S, $thisproc)) {
|
||||
+# ($!) = ($!, close(S)); # close S while saving $!
|
||||
+# return undef;
|
||||
+# }
|
||||
+# }
|
||||
unless (connect(S, $serverproc)) {
|
||||
($!) = ($!, close(S)); # close S while saving $!
|
||||
return undef;
|
||||
@@ -114,7 +114,7 @@
|
||||
# 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);
|
||||
+ $thisproc = pack_sockaddr_in(0, $thisaddr);
|
||||
# end of post-connect fixup
|
||||
select((select(S), $| = 1)[0]);
|
||||
return 1;
|
||||
@@ -129,7 +129,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_sockaddr_in(0, $thisaddr);
|
||||
|
||||
if ($server =~ /^(\d+)+\.(\d+)\.(\d+)\.(\d+)$/) {
|
||||
$serveraddr = pack('C4', $1, $2, $3, $4);
|
||||
@@ -151,7 +151,7 @@
|
||||
# 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);
|
||||
+ $thisproc = pack_sockaddr_in(0, $thisaddr);
|
||||
# end of post-connect fixup
|
||||
select((select($newsock), $| = 1)[0]);
|
||||
return 1;
|
55
net/mirror/patches/patch-makefile
Normal file
55
net/mirror/patches/patch-makefile
Normal file
@ -0,0 +1,55 @@
|
||||
# $NetBSD: patch-aa,v 1.5 2000/04/19 16:16:52 kim Exp $
|
||||
# $OpenBSD: patch-makefile,v 1.1 2000/05/19 04:56:48 form Exp $
|
||||
|
||||
--- makefile.orig Mon Jun 1 21:28:47 1998
|
||||
+++ makefile Wed Apr 19 19:06:30 2000
|
||||
@@ -41,7 +41,7 @@
|
||||
$(WEBFILES)
|
||||
|
||||
all:
|
||||
- echo try make mirror.tar
|
||||
+# echo try make mirror.tar
|
||||
|
||||
mirror.tar: $(FILES)
|
||||
rev=`./mirror.pl -v | perl -ane 'print "$$F[2]\n";'`; echo $rev; \
|
||||
@@ -65,25 +65,26 @@
|
||||
# mode to install executables
|
||||
EXMODE = 755
|
||||
# group to own all the files
|
||||
-GRP = gnu
|
||||
+GRP = bin
|
||||
# directory to install .pl (perl library) files
|
||||
-PLDIR = /usr/local/perl5/lib/perl5
|
||||
+PLDIR = ${PREFIX}/lib/mirror
|
||||
# directory to install public executables
|
||||
-BINDIR = /usr/local/sbin
|
||||
+BINDIR = ${PREFIX}/bin
|
||||
# directory to install man pages
|
||||
-MANDIR = /usr/local/man/man1
|
||||
+MANDIR = ${PREFIX}/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
|
||||
+ 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 $(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) mirrormaster $(BINDIR)/mirrormaster
|
||||
+ install -c -m $(PLMODE) -g $(GRP) mirror.man $(MANDIR)/mirror.1
|
||||
+ install -c -m $(PLMODE) -g $(GRP) mm.man $(MANDIR)/mirrormaster.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
|
56
net/mirror/patches/patch-mirror-defaults
Normal file
56
net/mirror/patches/patch-mirror-defaults
Normal file
@ -0,0 +1,56 @@
|
||||
# $NetBSD: patch-ab,v 1.6 2000/03/26 22:33:18 kim Exp $
|
||||
# $OpenBSD: patch-mirror-defaults,v 1.1 2000/05/19 04:56:48 form Exp $
|
||||
|
||||
--- mirror.defaults.orig Fri May 29 14:57:46 1998
|
||||
+++ mirror.defaults Sat Mar 25 02:49:44 2000
|
||||
@@ -11,29 +11,29 @@
|
||||
# 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
|
||||
+ # hostname=sunsite.org.uk
|
||||
# Keep all local_dirs relative to here
|
||||
- local_dir=/public/
|
||||
+ # local_dir=/home/ftp/pub/
|
||||
# The local_dir must exist FIRST
|
||||
- #local_dir_check=true
|
||||
- remote_password=wizards@sunsite.org.uk
|
||||
+ # 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
|
||||
+ # By defaults files are owned by root.wheel
|
||||
+ # user=0
|
||||
+ # group=0
|
||||
# # Keep a log file in each updated directory
|
||||
# update_log=.mirror
|
||||
- update_log=
|
||||
+ # 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
|
||||
+ 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,9 +47,9 @@
|
||||
# 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)$
|
||||
+ delete_excl=(^|/)\.(mirror|notar|cache)$
|
||||
# Ignore any local readme and .mirror files
|
||||
- local_ignore=README.doc.ic|(^|/)\.(mirror|notar)$
|
||||
+ local_ignore=(^|/)\.(mirror|notar)$
|
||||
# Automatically delete local copies of files that the
|
||||
# remote site has zapped
|
||||
do_deletes=true
|
79
net/mirror/patches/patch-mirror-pl
Normal file
79
net/mirror/patches/patch-mirror-pl
Normal file
@ -0,0 +1,79 @@
|
||||
# $NetBSD: patch-ac,v 1.4 2000/03/26 22:33:18 kim Exp $
|
||||
# $OpenBSD: patch-mirror-pl,v 1.1 2000/05/19 04:56:48 form Exp $
|
||||
|
||||
--- mirror.pl.orig Mon Jun 8 06:55:27 1998
|
||||
+++ mirror.pl Sat Mar 25 02:55:39 2000
|
||||
@@ -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:@PREFIX@/bin:@PREFIX@/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 = "@PREFIX@/lib/mirror";
|
||||
unshift( @INC, $dir );
|
||||
|
||||
# Debian GNU/Linux stores mirror.defaults in /etc/mirror
|
||||
@@ -1807,7 +1808,7 @@
|
||||
local( $f );
|
||||
$f = $dirtmp;
|
||||
$f =~ s/($shell_metachars)/\\$1/g;
|
||||
- $dirtmp = "$unsquish -d < \"$f\" |";
|
||||
+ $dirtmp = "$unsquish -f -d < \"$f\" |";
|
||||
}
|
||||
if( ! open( DIRTMP, $dirtmp ) ){
|
||||
&msg( "Cannot open $dirtmp\n" );
|
||||
@@ -1845,7 +1846,7 @@
|
||||
$f = $dirtmp;
|
||||
$dirtmp =~ s/\.($sys_compress_suffix|$gzip_suffix|$old_gzip_suffix)$//;
|
||||
$udirtmp =~ s/\.($sys_compress_suffix|$gzip_suffix|$ol_gzip_suffix)$//;
|
||||
- if( &sys( "$unsquish -d < \"$f\" > \"$dirtmp\"" ) != 0 ){
|
||||
+ if( &sys( "$unsquish -f -d < \"$f\" > \"$dirtmp\"" ) != 0 ){
|
||||
&msg( "Cannot uncompress directory listing\n" );
|
||||
return 0;
|
||||
}
|
||||
@@ -2760,7 +2761,7 @@
|
||||
local( $f ) = $src_file;
|
||||
$f =~ s/($shell_metachars)/\\$1/g;
|
||||
$comptemp = "$big_temp/.out$$";
|
||||
- &sys( "$compress_prog < \"$f\" > \"$comptemp\"" );
|
||||
+ &sys( "$compress_prog -f < \"$f\" > \"$comptemp\"" );
|
||||
$src_file = $comptemp;
|
||||
}
|
||||
|
||||
@@ -2840,10 +2841,10 @@
|
||||
# Am I doing compress to gzip conversion?
|
||||
if( $compress_conv_patt && $src_path =~ /$compress_conv_patt/ &&
|
||||
$compress_suffix eq $gzip_suffix ){
|
||||
- $comp = "$sys_compress_prog -d < \"$f\" | $gzip_prog > \"$temp\"";
|
||||
+ $comp = "$sys_compress_prog -f -d < \"$f\" | $gzip_prog > \"$temp\"";
|
||||
}
|
||||
else {
|
||||
- $comp = "$compress_prog < \"$f\" > \"$temp\"";
|
||||
+ $comp = "$compress_prog -f < \"$f\" > \"$temp\"";
|
||||
}
|
||||
&sys( $comp );
|
||||
$temp =~ s/\\($shell_metachars)/$1/g;
|
14
net/mirror/patches/patch-mm-pl
Normal file
14
net/mirror/patches/patch-mm-pl
Normal file
@ -0,0 +1,14 @@
|
||||
# $NetBSD: patch-af,v 1.1 2000/03/26 22:33:18 kim Exp $
|
||||
# $OpenBSD: patch-mm-pl,v 1.1 2000/05/19 04:56:48 form Exp $
|
||||
|
||||
--- mm.pl.orig Fri May 29 15:09:54 1998
|
||||
+++ mm.pl Sat Mar 25 03:09:36 2000
|
||||
@@ -63,7 +63,7 @@
|
||||
# $pkg is the package number fixed up to replace characters likely to give
|
||||
# grief under unix.
|
||||
# This expects the directory logs to already exist.
|
||||
-$mirror = "exec ./mirror \$args -p'\$package' packages/\$site > logs/\$site:\$pkg 2>&1";
|
||||
+$mirror = "exec @PREFIX@/bin/mirror \$args -p'\$package' packages/\$site > logs/\$site:\$pkg 2>&1";
|
||||
|
||||
$status_file = 'mm.status';
|
||||
|
7
net/mirror/scripts/configure
vendored
7
net/mirror/scripts/configure
vendored
@ -1,7 +0,0 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# $Id: configure,v 1.1.1.1 1998/01/04 18:17:06 joey Exp $
|
||||
#
|
||||
|
||||
mv ${WRKSRC}/mirror.pl ${WRKSRC}/mirror.pl.bak
|
||||
sed <${WRKSRC}/mirror.pl.bak >${WRKSRC}/mirror.pl s+!!PREFIX!!+$PREFIX+g
|
Loading…
Reference in New Issue
Block a user