--- a/.hgignore Tue Dec 15 01:01:11 2009 +0100
+++ b/.hgignore Tue Dec 15 01:12:33 2009 +0100
@@ -1,1 +1,5 @@
+syntax: glob
ftbackup.conf
+Makefile
+debian/*
+ftbackup.8
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/.hgtags Tue Dec 15 01:12:33 2009 +0100
@@ -0,0 +1,1 @@
+54c5b5ab39cb6406c5e2486501459d49ccef6dc3 v 0.2
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/Makefile Tue Dec 15 01:12:33 2009 +0100
@@ -0,0 +1,30 @@
+DESTDIR =
+prefix = /usr
+sbindir = ${prefix}/sbin
+man8dir = ${prefix}/share/man/man8
+
+SCRIPT = ftbackup
+MAN8PAGE = ftbackup.8
+
+all:
+
+
+install: man all
+ install -d -m 0755 ${DESTDIR}${sbindir}
+ install -m 0755 ${SCRIPT} ${DESTDIR}${sbindir}
+
+ install -d -m 0755 ${DESTDIR}${man8dir}
+ install -m 0644 ${MAN8PAGE} ${DESTDIR}${man8dir}/
+
+
+
+man: ${MAN8PAGE}
+
+clean:
+ rm -f ${MAN8PAGE}
+
+distclean: clean
+ rm -f Makefile
+
+%.8: %
+ pod2man --section 8 $< >$@
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/Makefile.in Tue Dec 15 01:12:33 2009 +0100
@@ -0,0 +1,30 @@
+DESTDIR =
+prefix = @prefix@
+sbindir = ${prefix}/sbin
+man8dir = ${prefix}/share/man/man8
+
+SCRIPT = ftbackup
+MAN8PAGE = ftbackup.8
+
+all:
+
+
+install: man all
+ install -d -m 0755 ${DESTDIR}${sbindir}
+ install -m 0755 ${SCRIPT} ${DESTDIR}${sbindir}
+
+ install -d -m 0755 ${DESTDIR}${man8dir}
+ install -m 0644 ${MAN8PAGE} ${DESTDIR}${man8dir}/
+
+
+
+man: ${MAN8PAGE}
+
+clean:
+ rm -f ${MAN8PAGE}
+
+distclean: clean
+ rm -f Makefile
+
+%.8: %
+ pod2man --section 8 $< >$@
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/configure Tue Dec 15 01:12:33 2009 +0100
@@ -0,0 +1,22 @@
+#! /bin/bash
+
+prefix="/usr/local"
+
+tmp=$(getopt -n $0 -o p -l prefix: -- "$@")
+eval set -- "$tmp"
+
+while true; do
+ case "$1" in
+ --prefix) prefix="$2"; shift 2
+ ;;
+ --) break
+ ;;
+ esac
+done
+
+
+set -e
+umask 0333
+sed -e "s|@prefix@|$prefix|g" <Makefile.in >Makefile.$$
+rm -f Makefile
+mv Makefile.$$ Makefile
--- a/debian/changelog Tue Dec 15 01:01:11 2009 +0100
+++ b/debian/changelog Tue Dec 15 01:12:33 2009 +0100
@@ -1,3 +1,27 @@
+ftbackup (0.2) stable; urgency=low
+
+ * new upstream fixed some bugs
+
+ -- Heiko Schlittermann <hs@schlittermann.de> Sun, 22 Nov 2009 23:45:09 +0100
+
+ftbackup (0.1-4) stable; urgency=low
+
+ * added manpage
+
+ -- Heiko Schlittermann <hs@schlittermann.de> Sun, 22 Nov 2009 22:28:11 +0100
+
+ftbackup (0.1-3) stable; urgency=low
+
+ * added libperl6-slurp-perl
+
+ -- Heiko Schlittermann <hs@schlittermann.de> Sat, 21 Nov 2009 22:10:38 +0100
+
+ftbackup (0.1-2) stable; urgency=low
+
+ * dependency updated
+
+ -- Heiko Schlittermann <hs@schlittermann.de> Sat, 21 Nov 2009 22:07:35 +0100
+
ftbackup (0.1-1) unstable; urgency=low
* Initial release (Closes: #nnnn) <nnnn is the bug number of your ITP>
--- a/debian/control Tue Dec 15 01:01:11 2009 +0100
+++ b/debian/control Tue Dec 15 01:12:33 2009 +0100
@@ -4,10 +4,13 @@
Maintainer: Heiko Schlittermann <hs@schlittermann.de>
Build-Depends: debhelper (>= 7)
Standards-Version: 3.7.3
-Homepage: <insert the upstream URL, if relevant>
+Homepage: https://keller.schlittermann.de/hg/incubator/ftbackup
Package: ftbackup
-Architecture: any
-Depends: ${shlibs:Depends}, ${misc:Depends}
-Description: <insert up to 60 chars description>
- <insert long description, indented with spaces>
+Architecture: all
+Depends: ${shlibs:Depends}, ${misc:Depends}, openssl, perl-modules (>= 5.10.0-19lenny2),
+ libperl6-slurp-perl
+Recommends: ftpipe
+Description: encrypted backup via ftp
+ This is more or less a wrapper around dump(8). It saves the
+ dumped data as encrypted files on a FTP server.
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/debian/files Tue Dec 15 01:12:33 2009 +0100
@@ -0,0 +1,1 @@
+ftbackup_0.2_all.deb unknown extra
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/debian/ftbackup.debhelper.log Tue Dec 15 01:12:33 2009 +0100
@@ -0,0 +1,14 @@
+dh_installdirs
+dh_installchangelogs
+dh_installdocs
+dh_installexamples
+dh_installman
+dh_link
+dh_strip
+dh_compress
+dh_fixperms
+dh_installdeb
+dh_shlibdeps
+dh_gencontrol
+dh_md5sums
+dh_builddeb
--- a/debian/rules Tue Dec 15 01:01:11 2009 +0100
+++ b/debian/rules Tue Dec 15 01:12:33 2009 +0100
@@ -11,14 +11,12 @@
-
-
configure: configure-stamp
configure-stamp:
dh_testdir
# Add here commands to configure the package.
-
- touch configure-stamp
+ ./configure --prefix=/usr
+ touch $@
build: build-stamp
@@ -27,7 +25,7 @@
dh_testdir
# Add here commands to compile the package.
- $(MAKE)
+ chmod +x ftbackup
#docbook-to-man debian/ftbackup.sgml > ftbackup.1
touch $@
@@ -38,7 +36,7 @@
rm -f build-stamp configure-stamp
# Add here commands to clean up after the build process.
- $(MAKE) clean
+ -$(MAKE) distclean
dh_clean
@@ -51,6 +49,8 @@
# Add here commands to install the package into debian/ftbackup.
$(MAKE) DESTDIR=$(CURDIR)/debian/ftbackup install
+ install -d $(CURDIR)/debian/ftbackup/etc/ftbackup
+ install -m 0600 ftbackup.conf.example $(CURDIR)/debian/ftbackup/etc/ftbackup/default
# Build architecture-independent files here.
binary-indep: build install
@@ -78,7 +78,7 @@
dh_link
dh_strip
dh_compress
- dh_fixperms
+ dh_fixperms -X default
# dh_perl
# dh_makeshlibs
dh_installdeb
--- a/ftbackup Tue Dec 15 01:01:11 2009 +0100
+++ b/ftbackup Tue Dec 15 01:12:33 2009 +0100
@@ -68,6 +68,11 @@
### %cf
### @dev
+ my @errors = ();
+ push @errors, "Need FTP_HOST (see config)." if not defined $cf{FTP_HOST};
+ push @errors, "Need KEY (see config)." if not defined $cf{KEY};
+ die join "\n", @errors, "" if @errors;
+
my $ftp = new FTP($cf{FTP_HOST},
Passive => $cf{FTP_PASSIVE},
Debug => @opt_debug ~~ /^ftp$/) or die $@;
@@ -200,11 +205,11 @@
$_ = (grep /device.mapper/, slurp("/proc/devices"))[0]
and $dev_mapper = (split)[0];
- foreach (slurp("/etc/fstab")) {
+ # find all non comment lines
+ foreach (grep !/^\s*#/, slurp("/etc/fstab")) {
my ($dev, $mp, $fstype, $options, $dump, $check)
= split;
next if not $dump;
- next if /^\s*#/;
# $dev does not have to contain the real device
my $rdev = $dev;
@@ -302,6 +307,7 @@
}
sub iso2epoch($) {
+ return 0 if not $_[0];
$_[0] =~ /(?<year>\d+)\D(?<mon>\d+)\D(?<mday>\d+)
(?:\D(?<hour>\d\d)\D(?<min>\d\d)(?:\D(?<sec>\d\d))?)?/x;
my %iso = ((sec => 0, min => 0, hour => 0), %+);
@@ -320,6 +326,13 @@
ftbackup [--level <level>] [options]
+=head1 DESCRIPTION
+
+The B<ftbackup> tools saves the partitions (file systems) marked in
+F</etc/fstb> to an FTP host. It uses dump(8) for generating the backup
+and openssl(1) for encrypting the data stream (and thus the written
+files).
+
=head1 OPTIONS
=over
--- a/ftbackup.conf.example Tue Dec 15 01:01:11 2009 +0100
+++ b/ftbackup.conf.example Tue Dec 15 01:12:33 2009 +0100
@@ -2,10 +2,10 @@
# the commented values are the built in defaults
# The encryption key
-KEY = <your key here>
+# KEY =
# FTP-Server hostname
-FTP_HOST = <your backup server>
+# FTP_HOST =
# FTP-Server base directory
# the following expansion work: