debian/0000755000000000000000000000000011753233222007166 5ustar debian/dirvish.cron.d0000644000000000000000000000017011741546246011753 0ustar # /etc/cron.d/dirvish: crontab fragment for dirvish # run every night 4 22 * * * root /etc/dirvish/dirvish-cronjob debian/default.conf.root0000644000000000000000000000025411741546246012456 0ustar client: thishost tree: / xdev: 1 index: gzip log: gzip image-default: %Y%m%d exclude: /var/cache/apt/archives/*.deb /var/cache/man/** /tmp/** /var/tmp/** *.bak debian/README.Debian0000644000000000000000000000220011741546246011233 0ustar dirvish for Debian ------------------ - For (hopefully) helpful instructions how to set up dirvish on your Debian system, see the HOWTO.Debian file. - Biggest difference with the upstream version of dirvish is that the Debian package installs a default cron script, which runs at 22:04 (feel free to adjust this time, in /etc/cron.d/dirvish). There used to be more differences, but upstream was kind enough to accept many of my patches :-) + If your system is not running 24/7, you may want to change the cron.d entry into a cron.daily script, so that dirvish will be run by anacron when necessary. - Upstream installs all the utils into the bin directory. I feel that most of the utils are for the administrator only, hence I've moved them into /usr/sbin . This is in accordance of the fact that the manpages are in section 8... An exception is dirvish-locate, which can be useful for users, so that is in /usr/bin . - The upstream INSTALL file is available as HOWTO.upstream, as it covers more than just installation; configuration is also covered. -- Paul Slootman , Wed, 25 Feb 2004 09:38:17 +0100 debian/patches/0000755000000000000000000000000011742334241010616 5ustar debian/patches/01-imsort-reserved-warning.patch0000644000000000000000000000103411742334223016650 0ustar From: Paul Slootman Subject: Fix for future reserved word warning diff -urN dirvish-1.2.1/dirvish-expire.pl dirvish-1.2.1.debian/dirvish-expire.pl --- dirvish-1.2.1/dirvish-expire.pl 2005-02-19 01:52:31.000000000 +0100 +++ dirvish-1.2.1.debian/dirvish-expire.pl 2006-07-07 11:46:46.000000000 +0200 @@ -140,7 +140,7 @@ qw(VAULT:BRANCH IMAGE CREATED EXPIRED); } -for $expire (sort(imsort @expires)) +for $expire (sort {imsort()} @expires) { my ($created, $expired); ($created = $$expire{created}) =~ s/:\d\d$//; debian/patches/03-dirvish-locate.patch0000644000000000000000000001326311742334223015001 0ustar From: Ondřej Surý Subject: Get patch level of loadconfig.pl in case exit codes are needed. --- dirvish-1.2.1~/dirvish-locate.pl 2004-02-25 03:42:14.000000000 +0100 +++ dirvish-1.2.1/dirvish-locate.pl 2006-07-07 11:14:12.000000000 +0200 @@ -1,3 +1,8 @@ +#!/usr/bin/perl + +$CONFDIR = "/etc/dirvish"; + + # $Id: dirvish-locate.pl,v 12.0 2004/02/25 02:42:14 jw Exp $ $Name: Dirvish-1_2 $ $VERSION = ('$Name: Dirvish-1_2 $' =~ /Dirvish/i) @@ -234,3 +239,244 @@ || $$b{created} cmp $$a{created}; } +# Get patch level of loadconfig.pl in case exit codes +# are needed. +# $Id: loadconfig.pl,v 12.0 2004/02/25 02:42:15 jw Exp $ + + +######################################################################### +# # +# Copyright 2002 and $Date: 2004/02/25 02:42:15 $ +# Pegasystems Technologies and J.W. Schultz # +# # +# Licensed under the Open Software License version 2.0 # +# # +######################################################################### + +sub seppuku # Exit with code and message. +{ + my ($status, $message) = @_; + + chomp $message; + if ($message) + { + $seppuku_prefix and print STDERR $seppuku_prefix, ': '; + print STDERR $message, "\n"; + } + exit $status; +} + +sub slurplist +{ + my ($key, $filename, $Options) = @_; + my $f; + my $array; + + $filename =~ m(^/) and $f = $filename; + if (!$f && ref($$Options{vault}) ne 'CODE') + { + $f = join('/', $$Options{Bank}, $$Options{vault}, + 'dirvish', $filename); + -f $f or $f = undef; + } + $f or $f = "$CONFDIR/$filename"; + open(PATFILE, "<$f") or seppuku 229, "cannot open $filename for $key list"; + $array = $$Options{$key}; + while() + { + chomp; + length or next; + push @{$array}, $_; + } + close PATFILE; +} + +# loadconfig -- load configuration file +# SYNOPSYS +# loadconfig($opts, $filename, \%data) +# +# DESCRIPTION +# load and parse a configuration file into the data +# hash. If the filename does not contain / it will be +# looked for in the vault if defined. If the filename +# does not exist but filename.conf does that will +# be read. +# +# OPTIONS +# Options are case sensitive, upper case has the +# opposite effect of lower case. If conflicting +# options are given only the last will have effect. +# +# f Ignore fields in config file that are +# capitalized. +# +# o Config file is optional, return undef if missing. +# +# R Do not allow recoursion. +# +# g Only load from global directory. +# +# +# +# LIMITATIONS +# Only way to tell whether an option should be a list +# or scalar is by the formatting in the config file. +# +# Options reqiring special handling have to have that +# hardcoded in the function. +# + +sub loadconfig +{ + my ($mode, $configfile, $Options) = @_; + my $confile = undef; + my ($key, $val); + my $CONFIG; + ref($Options) or $Options = {}; + my %modes; + my ($conf, $bank, $k); + + $modes{r} = 1; + for $_ (split(//, $mode)) + { + if (/[A-Z]/) + { + $_ =~ tr/A-Z/a-z/; + $modes{$_} = 0; + } else { + $modes{$_} = 1; + } + } + + + $CONFIG = 'CFILE' . scalar(@{$$Options{Configfiles}}); + + $configfile =~ s/^.*\@//; + + if($configfile =~ m[/]) + { + $confile = $configfile; + } + elsif($configfile ne '-') + { + if(!$modes{g} && $$Options{vault} && $$Options{vault} ne 'CODE') + { + if(!$$Options{Bank}) + { + my $bank; + for $bank (@{$$Options{bank}}) + { + if (-d "$bank/$$Options{vault}") + { + $$Options{Bank} = $bank; + last; + } + } + } + if ($$Options{Bank}) + { + $confile = join('/', $$Options{Bank}, + $$Options{vault}, 'dirvish', + $configfile); + -f $confile || -f "$confile.conf" + or $confile = undef; + } + } + $confile ||= "$CONFDIR/$configfile"; + } + + if($configfile eq '-') + { + open($CONFIG, $configfile) or seppuku 221, "cannot open STDIN"; + } else { + ! -f $confile && -f "$confile.conf" and $confile .= '.conf'; + + if (! -f "$confile") + { + $modes{o} and return undef; + seppuku 222, "cannot open config file: $configfile"; + } + + grep(/^$confile$/, @{$$Options{Configfiles}}) + and seppuku 224, "ERROR: config file looping on $confile"; + + open($CONFIG, $confile) + or seppuku 225, "cannot open config file: $configfile"; + } + push(@{$$Options{Configfiles}}, $confile); + + while(<$CONFIG>) + { + chomp; + s/\s*#.*$//; + s/\s+$//; + /\S/ or next; + + if(/^\s/ && $key) + { + s/^\s*//; + push @{$$Options{$key}}, $_; + } + elsif(/^SET\s+/) + { + s/^SET\s+//; + for $k (split(/\s+/)) + { + $$Options{$k} = 1; + } + } + elsif(/^UNSET\s+/) + { + s/^UNSET\s+//; + for $k (split(/\s+/)) + { + $$Options{$k} = undef; + } + } + elsif(/^RESET\s+/) + { + ($key = $_) =~ s/^RESET\s+//; + $$Options{$key} = [ ]; + } + elsif(/^[A-Z]/ && $modes{f}) + { + $key = undef; + } + elsif(/^\S+:/) + { + ($key, $val) = split(/:\s*/, $_, 2); + length($val) or next; + $k = $key; $key = undef; + + if ($k eq 'config') + { + $modes{r} and loadconfig($mode . 'O', $val, $Options); + next; + } + if ($k eq 'client') + { + if ($modes{r} && ref ($$Options{$k}) eq 'CODE') + { + loadconfig($mode . 'og', "$CONFDIR/$val", $Options); + } + $$Options{$k} = $val; + next; + } + if ($k eq 'file-exclude') + { + $modes{r} or next; + + slurplist('exclude', $val, $Options); + next; + } + if (ref ($$Options{$k}) eq 'ARRAY') + { + push @{$$Options{$k}}, $_; + } else { + $$Options{$k} = $val; + } + } + } + close $CONFIG; + return $Options; +} debian/patches/02-rsync-options.patch0000644000000000000000000000101711742334223014704 0ustar From: Ondřej Surý Subject: Fix typo in docs about rsync-options which was deprecated diff -urN dirvish-1.2.1/dirvish.conf.5 dirvish-1.2.1.debian/dirvish.conf.5 --- dirvish-1.2.1/dirvish.conf.5 2006-05-10 19:17:58.000000000 +0200 +++ dirvish-1.2.1.debian/dirvish.conf.5 2006-07-07 11:46:46.000000000 +0200 @@ -537,7 +537,7 @@ .B dirvish supplied mechanism for setting it. -.multiple rsync\-options +.multiple rsync\-option .TP .Br sparse: (B) Try to handle sparse files efficiently so they take up debian/patches/04-dirvish-runall-usrsbin.patch0000644000000000000000000000073211742334241016510 0ustar From: Paul Slootman Subject: Debian installs dirvish into /usr/sbin, so look for it there by default. --- dirvish-1.2.1~/dirvish-runall.pl 2005-02-19 01:52:31.000000000 +0100 +++ dirvish-1.2.1/dirvish-runall.pl 2006-07-27 17:58:47.767699558 +0200 @@ -92,7 +92,7 @@ { seppuku 251, "ERROR: no global configuration file"; } -$$Config{Dirvish} ||= 'dirvish'; +$$Config{Dirvish} ||= '/usr/sbin/dirvish'; $$Options{'no-run'} and $$Options{quiet} = 0; debian/patches/series0000644000000000000000000000016011742334216012032 0ustar 01-imsort-reserved-warning.patch 02-rsync-options.patch 03-dirvish-locate.patch 04-dirvish-runall-usrsbin.patch debian/compat0000644000000000000000000000000211742334255010372 0ustar 9 debian/HOWTO.Debian0000644000000000000000000001632111741546246011207 0ustar dirvish for Debian ------------------ Here's a simple step-by-step example of how to use dirvish to make a backup of your root partition on a second disk which is mounted as /backup : - Firstly, note that the example files listed below can be found in /usr/share/doc/dirvish/examples/ as master.conf and default.conf.root . Don't forget to modify the client line! (see below) - In /etc/dirvish/master.conf put the following: bank: /backup exclude: lost+found/ core *~ .nfs* Runall: root 22:00 expire-default: +15 days expire-rule: # MIN HR DOM MON DOW STRFTIME_FMT * * * * 1 +3 months * * 1-7 * 1 +1 year * * 1-7 1,4,7,10 1 * 10-20 * * * +4 days # * * * * 2-7 +15 days Lines beginning with "#" are comments. The "bank" (the safety deposit kind) defines where the data to be stored; in this example it's at /backup . The exclude stanza is a default list of filenames that are not to be backupped. The Runall stanza tells which "vaults" (area of storage inside the bank) to backup during the daily run. Note that each vault contains at least one branch; for simple usage you can basically ignore branches and then the "default" branch will be used for a vault. The time next to the vault name defines the timestamp of the backup; it is forced to be in the past. This means that if the time stated is 22:00, and the backup is made at 01:00, then the backup will have the date of the previous day, which keeps the names of the backups consistent, even if the backup was delayed for some reason. Also, people expect backups to contain the state of things at the _end_ of the date shown, so setting the time to the end of the day will keep the date as expected, even if for some reason the backup is made after 00:00. In short: make sure that the time listed is earlier than when the backup will be made, preferably before midnight, and everything will be OK. The expire-default line defines the default age after which backups will expire, i.e. be removed by dirvish-expire. The expire-rule stanza is for refining how long before a backup expires; e.g. the first line has "1" for DOW (day of week), i.e. Monday. Hence backups made on a Monday will stay around for 3 months. The second line says that backups made in the first week of the month (DOM = day of month) won't expire until after one year. An empty time spec is the same as "never". - After having defined the global configuration above, a configuration for each branch needs to be defined. Remember that each vault contains at least one branch, and in our simple example this is simply the "default" branch. The configuration file for the default branch is $BANK/$VAULT/dirvish/default.conf, where $BANK is the definition of the bank from the global config, and $VAULT is the name of the vault ("root" in our example). So, in /backup/root/dirvish/default.conf put the following: client: thishost tree: / xdev: 1 index: gzip image-default: %Y%m%d exclude: /var/cache/apt/archives/*.deb /var/cache/man/** /tmp/** /var/tmp/** *.bak The client line defines which system the data is to come from. If this is to be a local backup i.e. the backup is made on the same system, put the output from the hostname command here. dirvish will then know that the network is not to be used. The tree line defines which directory tree is to be backed up for this vault definition. The xdev line tells dirvish to stay on the same filesystem as the one where the tree starts, i.e. to only backup that one filesystem. This is a must when the backup is made to a filesystem mounted on the same tree! Otherwise e.g. /backup would also be backupped, which won't work of course. If the backup is on the same filesystem, exclude patterns will have to be used. Also ensure that /proc isn't looked at by dirvish, as access to "files" there can crash your system! Other "special" filesystems such as devfs, sysfs and NFS mounts must also be excluded (all of which the xdev option conveniently does for you; i.e. it's best to always backup per filesystem). The image-default line defines the default name of each image; the setting above uses the year, month, and day of month. The exclude stanza defines what files to exclude from this vault's backup, in addition to those excludes specified in the master.conf file. See the manpage for rsync (the "EXCLUDE PATTERNS" section) for more information. It's important to remember that exlude patterns starting with a / begin are anchored to the top of the gievn tree, not the root of the client. The index: line specifies that an index file of the image is to be created and stored and compressed with gzip. - The definition is now complete. To initialize the first image, run the following command: dirvish --vault root --init This will now create an initial backup image for root. - From now on, the daily run of dirvish-runall will backup those vaults that are defined in the global config in the Runall stanza. - The daily run of dirvish-expire will examine the summary file (in the image subdirectories inside the vault) to determine which images to remove. The time of expiry is actually determined when the image is created. For this, the expire rules in the global config and in the vault-specific (actually branch-specific, remember?) config if rules exist in that config, which overrule the global config, are used. Note that dirvish-expire will never remove the last good image in a branch. The best time to run dirvish-expire is just before dirvish-runall, so that the expired images will be deleted just before the new one is created, thus making space available for the new image. This is what the Debian dirvish-cronjob script does (see next point). In no circumstances should dirvish-expire and dirvish-runall run simultaneously (as both of these can heavily impact system performance, and running together may lead to problems); running either of these together with updatedb (for the "locate" command) should also be avoided. Speaking of updatedb: it's probably best to exclude the dirvish banks from the updatedb scan! Using a separate filesystem for the bank, and only mounting that when necessary, precludes the need to update /etc/updatedb.conf . - The Debian installation includes a cron configuration that runs dirvish-expire and dirvish-runall every night at 23:04. You can modify the cron entry itself in /etc/cron.d/dirvish and the script that is run is /etc/dirvish/dirvish-cronjob which can also be modified if necessary (e.g. to mount and umount /backup). - If running dirvish over the network is intended, you may want to investigate setting up ssh so that rsync will run over ssh without passwords or passphrases being asked. This is basically an ssh FAQ... search for authorized_keys and/or ssh-agent. - For more information, see the HOWTO file and FAQ.html in /usr/share/doc/dirvish/ , and the dirvish and dirvish.conf manpages. Also take a look at the dirvish homepage: http://www.pegasys.ws/dirvish/ -- Paul Slootman , Tue, 22 Apr 2003 14:09:50 +0200 updated Wed, 25 Feb 2004 09:31:28 +0100 debian/control0000644000000000000000000000133711742334651010603 0ustar Source: dirvish Section: admin Priority: optional Maintainer: Paul Slootman Build-Depends: debhelper (>= 9) Standards-Version: 3.9.3 Homepage: http://freecode.com/projects/dirvish Package: dirvish Architecture: all Depends: ${misc:Depends}, rsync (>= 2.5.6-0.1), perl-modules, libtime-modules-perl, libtime-period-perl, ${perl:Depends} Recommends: ssh (>= 3.4p1) Description: Filesystem based backup system using rsync A utility to maintain multiple backups on online storage, each backup is available as a sort of snapshot directory, where common files are shared between the different backup generations. It uses rsync to do the actual copying. . Backups can be made locally or over the network (using ssh). debian/dirs0000644000000000000000000000020011741546246010054 0ustar etc/dirvish etc/cron.d usr/bin usr/sbin usr/share/man/man1 usr/share/man/man5 usr/share/man/man8 usr/share/doc/dirvish/examples debian/changelog0000644000000000000000000001111211753233177011045 0ustar dirvish (1.2.1-1.2) unstable; urgency=low * Non-maintainer upload. * Remove deprecated dpatch and upgrade to packaging format "3.0 quilt". * Update to Standards-Version to 3.9.3 and debhelper to 9. * Add build-arch and build-indep targets; use dh_prep in rules file. * Fix no-homepage-field (Lintian). -- Jari Aalto Fri, 11 May 2012 18:54:39 +0300 dirvish (1.2.1-1.1) unstable; urgency=low * Non-maintainer upload. * Use coreutils’ echo in debian/rules to allow the use of the -e option (Closes: #459174). -- Michael Schutte Sat, 08 Mar 2008 19:10:13 +0100 dirvish (1.2.1-1) unstable; urgency=low * Acknowledge NMU fixes. closes:#241084,#289026,#298833,#344203 * Really fix the Perl warning about future reserved word, so that even though the warning is not given, dirvish-expire actually still does something :-) Note that the original reporter for #274943 ("does not delete backups") was using 1.2-1 which did not suffer from the "fix" done in the NMU, so tagging "unreproducible, moreinfo" was indeed appropriate. closes:#378903 * Let dirvish-runall look for dirvish in /usr/sbin by default again, lost in the previous NMU. closes:#380096 -- Paul Slootman Thu, 27 Jul 2006 18:10:34 +0200 dirvish (1.2.1-0.1) unstable; urgency=low * Non-maintainer upload. * New upstream version (Closes: #344203) * Use dpatch for patches: + 02_rsync-options.dpatch: Fix typo s/rsync-options/rync-option/ (Closes: #298833) + 01_imsort-reserved-warning.dpatch: Fix Perl warning about future reserved word (Closes: #289026) + 03_perl-locate.dpatch: Move perl-locate patch from diff.gz * Modify default.conf.root to exclude only files in /var/tmp, /tmp and /var/cache/man; include directories itself (Closes: #241084) * Updated policy to 3.7.2.1 * Moved copyright from COPYRIGHT.gz to debian/copyright -- Ondřej Surý Fri, 7 Jul 2006 11:15:57 +0200 dirvish (1.2-1) unstable; urgency=low * New upstream version * Upstream license changed from GPL to OSL * If you use pre-client or post-client and are running the 1.1.2 release be aware that these commands will now be run on the client as intended. closes:#216555 * Fixed the example default.conf in the HOWTO.Debian and doc/dirvish/examples/default.conf.root to correct the xdev parameter and to clarify the exclude patterns. closes:#223023 * Added a note to REAME.Debian that the example cron.d entry is much use if the system isn't running 24/7; a cron.daily entry with anacron is better in that situation. closes:#216066 -- Paul Slootman Wed, 25 Feb 2004 09:17:47 +0100 dirvish (1.1.2-1) unstable; urgency=low * New upstream version, which fixes the case that certain error conditions wouldn't be reported when running from cron. See /usr/share/doc/dirvish/ANNOUNCE-1.1.2 for details. -- Paul Slootman Thu, 17 Jul 2003 11:24:33 +0200 dirvish (1.1-2) unstable; urgency=low * Fixed dirvish-locate manpage. * Fixed minor typo in dirvish-locate script. -- Paul Slootman Mon, 19 May 2003 10:47:08 +0200 dirvish (1.1-1) unstable; urgency=low * New upstream version -- Paul Slootman Sun, 18 May 2003 12:34:27 +0200 dirvish (1.0.1rc1-3) unstable; urgency=low * First Debian release of dirvish. closes:#191072 * In dirvish-cronjob, show the mount output only if the mount seems to have failed. -- Paul Slootman Fri, 2 May 2003 10:53:15 +0200 dirvish (1.0.1rc1-2) unstable; urgency=low * Added --quiet to dirvish-expire and dirvish-runall invocations in cronjob. -- Paul Slootman Mon, 28 Apr 2003 10:40:28 +0200 dirvish (1.0.1rc1-1) unstable; urgency=low * New upstream version (upstream version number is 1.1rc1, changed here to prevent problems when 1.1 is released; I don't want any epochs). -- Paul Slootman Tue, 22 Apr 2003 13:23:19 +0200 dirvish (20030321-1) unstable; urgency=low * New upstream version, containing some changes that were prompted by my testing of my initial Debian package. -- Paul Slootman Tue, 25 Mar 2003 10:03:12 +0100 dirvish (20030316-1) unstable; urgency=low * Initial version. * Fixed location of dirvish to /usr/sbin/dirvish in dirvish-runall . * Simple step-by-step example of using dirvish included in README.Debian . * Included sample crontab en cronjob script. -- Paul Slootman Tue, 18 Mar 2003 10:58:42 +0100 debian/rules0000755000000000000000000000370511742334451010257 0ustar #!/usr/bin/make -f # Uncomment this to turn on verbose mode. #export DH_VERBOSE=1 CFLAGS = -Wall -g ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS))) CFLAGS += -O0 else CFLAGS += -O2 endif ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS))) INSTALL_PROGRAM += -s endif configure: configure-stamp configure-stamp: dh_testdir touch configure-stamp build-arch: build build-indep: build build: build-stamp build-stamp: configure-stamp dh_testdir touch build-stamp clean: dh_testdir dh_testroot rm -f build-stamp configure-stamp rm -rf debian/tmp rm -f dirvish dirvish-expire dirvish-runall dirvish-locate dh_clean install: build dh_testdir dh_testroot dh_prep dh_installdirs /bin/echo -e "\n`pwd`/debian/dirvish\n`pwd`/debian/dirvish/usr/sbin\n`pwd`/debian/dirvish/usr/share/man\n/etc/dirvish\ny\ny\nn" | sh ./install.sh @echo '' # I consider dirvish-locate more a user tool than an administrator's tool mv debian/dirvish/usr/sbin/dirvish-locate debian/dirvish/usr/bin/. mv debian/dirvish/usr/share/man/man8/dirvish-locate.8 debian/dirvish/usr/share/man/man1/dirvish-locate.1 perl -i -pe 's/^\.TH DIRVISH-LOCATE 8/.TH DIRVISH-LOCATE 1/' debian/dirvish/usr/share/man/man1/dirvish-locate.1 # Build architecture-dependent files here. binary-arch: build install # Build architecture-independent files here. binary-indep: build install # We have nothing to do by default. dh_testdir dh_testroot dh_installchangelogs CHANGELOG dh_installdocs install -m 0644 INSTALL debian/dirvish/usr/share/doc/dirvish/HOWTO.upstream install -m 0644 debian/HOWTO.Debian debian/dirvish/usr/share/doc/dirvish/ dh_installexamples debian/master.conf debian/default.conf.root install -m 0755 debian/dirvish-cronjob debian/dirvish/etc/dirvish dh_installcron dh_installman dh_link dh_compress dh_fixperms dh_perl dh_installdeb dh_gencontrol dh_md5sums dh_builddeb binary: binary-indep binary-arch .PHONY: build clean binary-indep binary-arch binary install configure debian/docs0000644000000000000000000000004011741546246010045 0ustar FAQ.html RELEASE.html TODO.html debian/copyright0000644000000000000000000002577311742334253011143 0ustar This package was debianized by Paul Slootman on Mon, 17 Mar 2003 10:58:42 +0100. It was downloaded from http://www.dirvish.com/ Upstream Authors: J.W. Schultz of Pegasystems Technologies Keith Lofstrom Copyright Holder: J.W. Schultz License: Open Software License v. 2.0 This Open Software License (the "License") applies to any original work of authorship (the "Original Work") whose owner (the "Licensor") has placed the following notice immediately following the copyright notice for the Original Work: Licensed under the Open Software License version 2.0 1) Grant of Copyright License. Licensor hereby grants You a world-wide, royalty-free, non-exclusive, perpetual, sublicenseable license to do the following: a) to reproduce the Original Work in copies; b) to prepare derivative works ("Derivative Works") based upon the Original Work; c) to distribute copies of the Original Work and Derivative Works to the public, with the proviso that copies of Original Work or Derivative Works that You distribute shall be licensed under the Open Software License; d) to perform the Original Work publicly; and e) to display the Original Work publicly. 2) Grant of Patent License. Licensor hereby grants You a world-wide, royalty-free, non-exclusive, perpetual, sublicenseable license, under patent claims owned or controlled by the Licensor that are embodied in the Original Work as furnished by the Licensor, to make, use, sell and offer for sale the Original Work and Derivative Works. 3) Grant of Source Code License. The term "Source Code" means the preferred form of the Original Work for making modifications to it and all available documentation describing how to modify the Original Work. Licensor hereby agrees to provide a machine-readable copy of the Source Code of the Original Work along with each copy of the Original Work that Licensor distributes. Licensor reserves the right to satisfy this obligation by placing a machine-readable copy of the Source Code in an information repository reasonably calculated to permit inexpensive and convenient access by You for as long as Licensor continues to distribute the Original Work, and by publishing the address of that information repository in a notice immediately following the copyright notice that applies to the Original Work. 4) Exclusions From License Grant. Neither the names of Licensor, nor the names of any contributors to the Original Work, nor any of their trademarks or service marks, may be used to endorse or promote products derived from this Original Work without express prior written permission of the Licensor. Nothing in this License shall be deemed to grant any rights to trademarks, copyrights, patents, trade secrets or any other intellectual property of Licensor except as expressly stated herein. No patent license is granted to make, use, sell or offer to sell embodiments of any patent claims other than the licensed claims defined in Section 2. No right is granted to the trademarks of Licensor even if such marks are included in the Original Work. Nothing in this License shall be interpreted to prohibit Licensor from licensing under different terms from this License any Original Work that Licensor otherwise would have a right to license. 5) External Deployment. The term "External Deployment" means the use or distribution of the Original Work or Derivative Works in any way such that the Original Work or Derivative Works may be used by anyone other than You, whether the Original Work or Derivative Works are distributed to those persons or made available as an application intended for use over a computer network. As an express condition for the grants of license hereunder, You agree that any External Deployment by You of a Derivative Work shall be deemed a distribution and shall be licensed to all under the terms of this License, as prescribed in section 1(c) herein. 6) Attribution Rights. You must retain, in the Source Code of any Derivative Works that You create, all copyright, patent or trademark notices from the Source Code of the Original Work, as well as any notices of licensing and any descriptive text identified therein as an "Attribution Notice." You must cause the Source Code for any Derivative Works that You create to carry a prominent Attribution Notice reasonably calculated to inform recipients that You have modified the Original Work. 7) Warranty of Provenance and Disclaimer of Warranty. Licensor warrants that the copyright in and to the Original Work and the patent rights granted herein by Licensor are owned by the Licensor or are sublicensed to You under the terms of this License with the permission of the contributor(s) of those copyrights and patent rights. Except as expressly stated in the immediately proceeding sentence, the Original Work is provided under this License on an "AS IS" BASIS and WITHOUT WARRANTY, either express or implied, including, without limitation, the warranties of NON-INFRINGEMENT, MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY OF THE ORIGINAL WORK IS WITH YOU. This DISCLAIMER OF WARRANTY constitutes an essential part of this License. No license to Original Work is granted hereunder except under this disclaimer. 8) Limitation of Liability. Under no circumstances and under no legal theory, whether in tort (including negligence), contract, or otherwise, shall the Licensor be liable to any person for any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or the use of the Original Work including, without limitation, damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses. This limitation of liability shall not apply to liability for death or personal injury resulting from Licensor's negligence to the extent applicable law prohibits such limitation. Some jurisdictions do not allow the exclusion or limitation of incidental or consequential damages, so this exclusion and limitation may not apply to You. 9) Acceptance and Termination. If You distribute copies of the Original Work or a Derivative Work, You must make a reasonable effort under the circumstances to obtain the express assent of recipients to the terms of this License. Nothing else but this License (or another written agreement between Licensor and You) grants You permission to create Derivative Works based upon the Original Work or to exercise any of the rights granted in Section 1 herein, and any attempt to do so except under the terms of this License (or another written agreement between Licensor and You) is expressly prohibited by U.S. copyright law, the equivalent laws of other countries, and by international treaty. Therefore, by exercising any of the rights granted to You in Section 1 herein, You indicate Your acceptance of this License and all of its terms and conditions. This License shall terminate immediately and you may no longer exercise any of the rights granted to You by this License upon Your failure to honor the proviso in Section 1(c) herein. 10) Termination for Patent Action. This License shall terminate automatically and You may no longer exercise any of the rights granted to You by this License as of the date You commence an action, including a cross-claim or counterclaim, for patent infringement (i) against Licensor with respect to a patent applicable to software or (ii) against any entity with respect to a patent applicable to the Original Work (but excluding combinations of the Original Work with other software or hardware). 11) Jurisdiction, Venue and Governing Law. Any action or suit relating to this License may be brought only in the courts of a jurisdiction wherein the Licensor resides or in which Licensor conducts its primary business, and under the laws of that jurisdiction excluding its conflict-of-law provisions. The application of the United Nations Convention on Contracts for the International Sale of Goods is expressly excluded. Any use of the Original Work outside the scope of this License or after its termination shall be subject to the requirements and penalties of the U.S. Copyright Act, 17 U.S.C. 101 et seq., the equivalent laws of other countries, and international treaty. This section shall survive the termination of this License. 12) Attorneys Fees. In any action to enforce the terms of this License or seeking damages relating thereto, the prevailing party shall be entitled to recover its costs and expenses, including, without limitation, reasonable attorneys' fees and costs incurred in connection with such action, including any appeal of such action. This section shall survive the termination of this License. 13) Miscellaneous. This License represents the complete agreement concerning the subject matter hereof. If any provision of this License is held to be unenforceable, such provision shall be reformed only to the extent necessary to make it enforceable. 14) Definition of "You" in This License. "You" throughout this License, whether in upper or lower case, means an individual or a legal entity exercising rights under, and complying with all of the terms of, this License. For legal entities, "You" includes any entity that controls, is controlled by, or is under common control with you. For purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. 15) Right to Use. You may use the Original Work in all ways not otherwise restricted or conditioned by this License or by law, and Licensor promises not to interfere with or be responsible for such uses by You. This license is Copyright (C) 2003 Lawrence E. Rosen. All rights reserved. Permission is hereby granted to copy and distribute this license without modification. This license may not be modified without the express written permission of its copyright owner. debian/source/0000755000000000000000000000000011742334260010470 5ustar debian/source/format0000644000000000000000000000001411742334260011676 0ustar 3.0 (quilt) debian/master.conf0000644000000000000000000000061211741546246011341 0ustar ## Example dirvish master configuration file: bank: /backup exclude: lost+found/ core *~ .nfs* Runall: root 22:00 expire-default: +15 days expire-rule: # MIN HR DOM MON DOW STRFTIME_FMT * * * * 1 +3 months # * * 1-7 * 1 +1 year # * * 1-7 1,4,7,10 1 * 10-20 * * * +4 days # * * * * 2-7 +15 days debian/dirvish-cronjob0000644000000000000000000000157611741546246012236 0ustar #! /bin/sh # # daily cron job for the dirvish package # if [ ! -x /usr/sbin/dirvish-expire ]; then exit 0; fi if [ ! -s /etc/dirvish/master.conf ]; then exit 0; fi mount_check() { mntout=`tempfile -p mount` mount $1 >$mntout 2>&1 if [ ! -d $1/lost+found ]; then # only works for "real" filesystems :-) # (Yes, I know about reiserfs.) echo "'mount $1' failed?! Stopping." echo "mount output:" cat $mntout rm -f $mntout exit 2 fi if stat $1 | grep 'Inode: 2[^0-9]' >/dev/null; then # ditto rm -f $mntout return 0 # ok fi echo "$1 isn't inode 2 ?! Mount must have failed; stopping." echo '' stat $1 echo "mount output:" cat $mntout rm -f $mntout umount $1 exit 2 } ## Example of how to mount and umount a backup partition... # mount_check /backup /usr/sbin/dirvish-expire --quiet && /usr/sbin/dirvish-runall --quiet rc=$? # umount /backup || rc=$? exit $rc