summaryrefslogtreecommitdiffstats
path: root/base/rsync
diff options
context:
space:
mode:
authortnut <tnut at nutyx dot com>2012-01-08 12:15:45 +0100
committertnut <tnut at nutyx dot com>2012-01-08 12:15:45 +0100
commit3f57a7f93b3e7550cbd73036f6a56654e17d1d5c (patch)
tree819b14ab0377fe2054fe59866669d904e9e0b4b5 /base/rsync
parentc9972ec7f32bf9d37388e853fe9bf633e242d05a (diff)
downloadnutyx-extra-3f57a7f93b3e7550cbd73036f6a56654e17d1d5c.tar.gz
nutyx-extra-3f57a7f93b3e7550cbd73036f6a56654e17d1d5c.tar.bz2
nutyx-extra-3f57a7f93b3e7550cbd73036f6a56654e17d1d5c.tar.xz
nutyx-extra-3f57a7f93b3e7550cbd73036f6a56654e17d1d5c.zip
split de git pakxe et NuTyX-extra
Diffstat (limited to 'base/rsync')
-rw-r--r--base/rsync/.footprint.i68613
-rw-r--r--base/rsync/.footprint.x86_6413
-rw-r--r--base/rsync/.md5sum.i6862
-rw-r--r--base/rsync/.md5sum.x86_642
-rwxr-xr-xbase/rsync/Pkgfile30
-rw-r--r--base/rsync/rsync.driver143
6 files changed, 0 insertions, 203 deletions
diff --git a/base/rsync/.footprint.i686 b/base/rsync/.footprint.i686
deleted file mode 100644
index cf9c999ea..000000000
--- a/base/rsync/.footprint.i686
+++ /dev/null
@@ -1,13 +0,0 @@
-drwxr-xr-x root/root etc/
-drwxr-xr-x root/root etc/ports/
-drwxr-xr-x root/root etc/ports/drivers/
--rwxr-xr-x root/root etc/ports/drivers/rsync
-drwxr-xr-x root/root usr/
-drwxr-xr-x root/root usr/bin/
--rwxr-xr-x root/root usr/bin/rsync
-drwxr-xr-x root/root usr/share/
-drwxr-xr-x root/root usr/share/man/
-drwxr-xr-x root/root usr/share/man/man1/
--rw-r--r-- root/root usr/share/man/man1/rsync.1.gz
-drwxr-xr-x root/root usr/share/man/man5/
--rw-r--r-- root/root usr/share/man/man5/rsyncd.conf.5.gz
diff --git a/base/rsync/.footprint.x86_64 b/base/rsync/.footprint.x86_64
deleted file mode 100644
index cf9c999ea..000000000
--- a/base/rsync/.footprint.x86_64
+++ /dev/null
@@ -1,13 +0,0 @@
-drwxr-xr-x root/root etc/
-drwxr-xr-x root/root etc/ports/
-drwxr-xr-x root/root etc/ports/drivers/
--rwxr-xr-x root/root etc/ports/drivers/rsync
-drwxr-xr-x root/root usr/
-drwxr-xr-x root/root usr/bin/
--rwxr-xr-x root/root usr/bin/rsync
-drwxr-xr-x root/root usr/share/
-drwxr-xr-x root/root usr/share/man/
-drwxr-xr-x root/root usr/share/man/man1/
--rw-r--r-- root/root usr/share/man/man1/rsync.1.gz
-drwxr-xr-x root/root usr/share/man/man5/
--rw-r--r-- root/root usr/share/man/man5/rsyncd.conf.5.gz
diff --git a/base/rsync/.md5sum.i686 b/base/rsync/.md5sum.i686
deleted file mode 100644
index 581d9308c..000000000
--- a/base/rsync/.md5sum.i686
+++ /dev/null
@@ -1,2 +0,0 @@
-b53525900817cf1ba7ad3a516ab5bfe9 rsync-3.0.7.tar.gz
-c607264a85b42c902a0ee88cfad61dd6 rsync.driver
diff --git a/base/rsync/.md5sum.x86_64 b/base/rsync/.md5sum.x86_64
deleted file mode 100644
index 581d9308c..000000000
--- a/base/rsync/.md5sum.x86_64
+++ /dev/null
@@ -1,2 +0,0 @@
-b53525900817cf1ba7ad3a516ab5bfe9 rsync-3.0.7.tar.gz
-c607264a85b42c902a0ee88cfad61dd6 rsync.driver
diff --git a/base/rsync/Pkgfile b/base/rsync/Pkgfile
deleted file mode 100755
index 918797059..000000000
--- a/base/rsync/Pkgfile
+++ /dev/null
@@ -1,30 +0,0 @@
-# Description: Protocol de synchronisation de fichiers très efficace
-# URL: http://samba.anu.edu.au/rsync/
-# Maintainer: NuTyX core team
-# Packager: thierryn1 at hispeed dot ch
-# Depends on:
-
-name=rsync
-version=3.0.7
-release=2
-source=( http://rsync.samba.org/ftp/$name/$name-$version.tar.gz\
- rsync.driver)
-
-
-build() {
- cd $name-$version
- ./configure --prefix=/usr \
- --mandir=/usr/share/man \
- --infodir=/usr/share/info
- make
- make DESTDIR=$PKG install
- install -d $PKG/etc/ports/drivers
- case `uname -m` in
- i?86)
- sed -i "s/ARCH/x86_64/g" $SRC/rsync.driver;;
- x86_64)
- sed -i "s/ARCH/i686/g" $SRC/rsync.driver;;
- esac
-
- install -m 755 $SRC/rsync.driver $PKG/etc/ports/drivers/rsync
-}
diff --git a/base/rsync/rsync.driver b/base/rsync/rsync.driver
deleted file mode 100644
index ecd087d65..000000000
--- a/base/rsync/rsync.driver
+++ /dev/null
@@ -1,143 +0,0 @@
-#!/usr/bin/perl
-#
-# /etc/ports/drivers/rsync: rsync(1) driver script for ports(8)
-#
-
-use warnings;
-use strict;
-use File::Basename;
-
-my $host = '';
-my $collection = '';
-my $destination = '';
-my %new_checkouts;
-my %old_checkouts;
-
-sub error
-{
- my $message = shift;
- print "Error: $message ($!)\nUpdating failed\n";
- exit 1;
-}
-
-sub warning
-{
- my $message = shift;
- print "Warning: $message ($!)\n";
-}
-
-if ($#ARGV < 0)
-{
- print "Usage: $0 <file>\n";
- exit 1;
-}
-
-open(FILE, $ARGV[0]) or error("Couldn't open $ARGV[0]");
-while (<FILE>)
-{
- chomp;
- if (/^host=(.*)/) { $host = $1; }
- elsif (/^collection=(.*)/) { $collection = $1; }
- elsif (/^destination=(.*)/) { $destination = $1; }
-}
-close(FILE);
-
-if ($host eq '') { error("Host field not set in $ARGV[0]"); }
-if ($collection eq '') { error("Collection field not set in $ARGV[0]"); }
-if ($destination eq '') { error("Destination field not set in $ARGV[0]"); }
-
-if (-e "$destination/.checkouts")
-{
- # read the old .checkouts file into memory
- open(FILE, "$destination/.checkouts") or error("Couldn't read checkouts from $destination/.checkouts");
- while (<FILE>)
- {
- chomp;
- $old_checkouts{$_} = 1;
- }
- close(FILE);
-}
-
-print "Updating file list from " . $host . "::$collection\n";
-
-# get the remote file list (new .checkouts)
-open(PIPE, 'rsync -crz rsync://' . $host . '/' . $collection . '|') or error("Couldn't open pipe to rsync");
-while (<PIPE>)
-{
- chomp;
-
- next if /^MOTD:/; # ignore MOTD lines
- s/^(.{43})//; # ignore the first 43 characters (mode, date etc...)
- next if /^.$/; # ignore the . directory
-
- $new_checkouts{$_} = 1;
-}
-close(PIPE);
-error("Running rsync failed") unless $? == 0;
-
-print "Updating collection " . basename($destination) . "\n";
-
-# now really run rsync
-open(PIPE, 'rsync -crz --exclude=.footprint.ARCH --exclude=.md5sum.ARCH --log-format "%o %n" rsync://' . $host . "/$collection $destination|") or error("Couldn't open pipe to rsync");
-while (<PIPE>)
-{
- chomp;
-
- if (/^recv (.*)/)
- {
- if ($old_checkouts{$1})
- {
- s/^recv/ Edit/;
- }
- else
- {
- s/^recv/ Checkout/;
- }
- }
-
- print $_ . "\n";
-}
-close(PIPE);
-error("Running rsync failed") unless $? == 0;
-
-# save new checkouts into .checkouts
-open(FILE, ">$destination/.checkouts") or error("Couldn't save checkouts to $destination/.checkouts");
-foreach my $checkout (sort keys %new_checkouts)
-{
- print FILE "$checkout\n";
-}
-close(FILE);
-
-# use chroot as an additional safety measure when removing files
-chroot($destination) or error("Couldn't chroot into $destination");
-chdir('/');
-
-# iterate through old checkouts, remove obsolete files
-foreach my $checkout (sort keys %old_checkouts)
-{
- if (!$new_checkouts{$checkout})
- {
- if (-f $checkout)
- {
- print " Delete $checkout\n";
- unlink($checkout) or warning("Couldn't delete $checkout");
- }
- }
-}
-
-# iterate through old checkouts, remove obsolete directories
-foreach my $checkout (sort keys %old_checkouts)
-{
- if (!$new_checkouts{$checkout})
- {
- if (-d $checkout)
- {
- print " Delete $checkout\n";
- rmdir($checkout) or warning("Couldn't delete $checkout");
- }
- }
-}
-
-print "Finished successfully\n";
-
-# End of file