--- flexbackup-1.2.1.orig/debian/changelog +++ flexbackup-1.2.1/debian/changelog @@ -0,0 +1,95 @@ +flexbackup (1.2.1-6.3) unstable; urgency=medium + + * Non-maintainer upload. + * Stop using defined on hashes (closes: #816164). + + -- Ian Campbell Sun, 28 Feb 2016 10:14:56 +0000 + +flexbackup (1.2.1-6.2) unstable; urgency=medium + + * Non-maintainer upload. + * Fix placement of afio alternative (closes: #691860). + + -- Michael Gilbert Fri, 02 Nov 2012 17:46:44 +0000 + +flexbackup (1.2.1-6.1) unstable; urgency=medium + + * Non-maintainer upload. + * Move non-free afio package to the last of the alternative recommendations + (closes: #691860). + + -- Michael Gilbert Tue, 30 Oct 2012 20:45:03 +0000 + +flexbackup (1.2.1-6) unstable; urgency=low + + * Acknowledge NMU. Thanks, Marco Rodrigues and Lucas Nussbaum! + * Move to Standards Version 3.7.3 + * Add DM-Upload-Allowed to debian/control + * Implement lzma compression (John Dong ) + * afio nocompress file types: append to the afio default instead of + replacing it. (Closes: #264847) + + -- Kurt B. Kaiser Sat, 23 Feb 2008 14:15:04 -0500 + +flexbackup (1.2.1-5.1) unstable; urgency=low + + * Non-maintainer upload. + * debian/rules: + Fix bashism (Closes: #459067). [KBK: also, don't ignore clean failure] + * debian/control: + Add Homepage field. + + -- Marco Rodrigues Fri, 25 Jan 2008 09:36:23 +0000 + +flexbackup (1.2.1-5) unstable; urgency=low + + * Use dpatch to track changes to upstream. + * Update compat to 5. + * Move lha (non-free) to Suggests: + * 'mt' can come from cpio or mt-st packages. + * Add upstream CREDITS. + * Fix hyphens in .../man5/flexbackup.conf.5. + * flexbackup.conf now supports backup operations without requiring + 'buffer', which is not necessary for backup to disk. + * test_bufferprog: don't rely on 'tempfile' which may not be present + on some remote systems. Create and delete the /tmp subdirectory on + remote systems during this test. + * flexbackup log and working directories now writable by backup group. + (Permissions similar to the amanda backup utility, needed override.) + * Remove unused targets and commands in debian/rules + * New Maintainer (Closes: #384184). + + -- Kurt B. Kaiser Sun, 10 Sep 2006 09:14:54 -0700 + +flexbackup (1.2.1-3) unstable; urgency=high + + * QA upload. + * Fixed "CVE-2005-4802: default config insecure temporary file creation". + Patch by Alec Berryman . Closes: #334350. + * Fixed "sub backup_dump does not use %path hash for dump". Patch by + Artem Chuprina . Closes: #293884. + * Fixed "flexbackup unable to complete a backup". Patch by + Jose Luis Fernandez Barros . Closes: #273750. + * Fixed man page errors. Closes: #250615, #312259. + * Fixed the following lintian messages: + W: out-of-date-standards-version 3.6.1 (current is 3.7.2) + E: build-depends-indep-should-be-build-depends debhelper + W: old-fsf-address-in-copyright-file + E: depends-on-essential-package-without-using-version recommends: tar + + -- Anibal Monsalve Salazar Sun, 10 Sep 2006 11:23:47 +1000 + +flexbackup (1.2.1-2) unstable; urgency=low + + * Add suitable versions of rsync to the Recommends line, since flexbackup + can use `rsync --include-from=-` as a storage type. (Closes: #238510) + * Revamp sample cron script to do incremental backup levels. + + -- Brian Bassett Fri, 2 Apr 2004 15:52:52 -0800 + +flexbackup (1.2.1-1) unstable; urgency=low + + * Initial Release. + + -- Brian Bassett Fri, 16 Jan 2004 16:31:29 -0800 + --- flexbackup-1.2.1.orig/debian/compat +++ flexbackup-1.2.1/debian/compat @@ -0,0 +1 @@ +5 --- flexbackup-1.2.1.orig/debian/control +++ flexbackup-1.2.1/debian/control @@ -0,0 +1,27 @@ +Source: flexbackup +Section: admin +Priority: optional +Maintainer: Kurt B. Kaiser +DM-Upload-Allowed: yes +Build-Depends: debhelper (>= 5.0.0), dpatch +Standards-Version: 3.7.3 +Homepage: http://www.edwinh.org/flexbackup/ + +Package: flexbackup +Architecture: all +Depends: ${perl:Depends}, cpio | mt-st +Recommends: dump | star | pax | zip | sharutils | binutils | lzma (>= 4.43-2) | rsync | afio, buffer +Suggests: ssh, lha +Description: Flexible backup tool for small to medium sized installations + Flexbackup is a flexible backup tool that works well for small to medium + sized tasks for which solutions like amanda are overkill. + . + It features: + * Easy configuration + * Uses afio, dump, GNU tar, cpio, star, pax, lha, or zip archivers + * Full and numbered levels of incremental backup (similar to "dump") + * Compression and buffering options for all backup types + * Handles remote filesystems with ssh/rsh; no special services required + * Writes to tapes, on-disk archive files, or on-disk directory trees + * Keeps a table of contents so you know what archives are on each tape + * Extensive logging options --- flexbackup-1.2.1.orig/debian/copyright +++ flexbackup-1.2.1/debian/copyright @@ -0,0 +1,28 @@ +This package was debianized by Brian Bassett on +Fri, 16 Jan 2004 16:31:29 -0800. + +It was downloaded from http://flexbackup.sourceforge.net/ + +Upstream Author: Edwin Huffstutler + +Copyright: + + Copyright 1999, 2003 Edwin Huffstutler + + flexbackup is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2, or (at your option) + any later version. + + flexbackup is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with flexbackup; see the file COPYING. If not, write to + the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, + Boston, MA 02110-1301, USA. + +On Debian systems, the complete text of the GNU General Public License, +version 2, can be in /usr/share/common-licenses/GPL-2. --- flexbackup-1.2.1.orig/debian/dirs +++ flexbackup-1.2.1/debian/dirs @@ -0,0 +1,8 @@ +usr/bin +usr/share/lintian/overrides +usr/share/man/man1 +usr/share/man/man5 +etc +var/log/flexbackup +var/lib/flexbackup + --- flexbackup-1.2.1.orig/debian/docs +++ flexbackup-1.2.1/debian/docs @@ -0,0 +1,4 @@ +CREDITS +README +TODO +faq.html --- flexbackup-1.2.1.orig/debian/examples +++ flexbackup-1.2.1/debian/examples @@ -0,0 +1 @@ +debian/sample-cron --- flexbackup-1.2.1.orig/debian/flexbackup.lintian +++ flexbackup-1.2.1/debian/flexbackup.lintian @@ -0,0 +1,2 @@ +flexbackup: non-standard-dir-perm var/log/flexbackup/ 0770 != 0755 +flexbackup: non-standard-dir-perm var/lib/flexbackup/ 0770 != 0755 --- flexbackup-1.2.1.orig/debian/patches/00list +++ flexbackup-1.2.1/debian/patches/00list @@ -0,0 +1,11 @@ +01_tempfile +02_buffer_test +10_Makefile_destdir +20_flexbackup.conf.5_hyphens +22_flexbackup.1 +30_basic_debian_tape +40_dump_path +42_afio_cpio_incompatible_ok +50_lzma_support +60_use_afio_default_nocompression +70_no_defined_on_hash --- flexbackup-1.2.1.orig/debian/patches/01_tempfile.dpatch +++ flexbackup-1.2.1/debian/patches/01_tempfile.dpatch @@ -0,0 +1,84 @@ +#! /bin/sh /usr/share/dpatch/dpatch-run +## 01_tempfile.dpatch by +## +## All lines beginning with `## DP:' are a description of the patch. +## DP: 1.2.1-3: Fix RC bug: insecure use of temporary files. +## DP: http://bugs.gentoo.org/show_bug.cgi?id=116510 +## DP: original patch from Martin Schulze, further developed at Gentoo +## DP: to handle creation of remote /tmp subdirectory. +## DP: CVE-2005-4802 + +@DPATCH@ +diff -urNad flexbackup-1.2.1~/flexbackup flexbackup-1.2.1/flexbackup +--- flexbackup-1.2.1~/flexbackup 2003-10-10 07:12:09.000000000 -0700 ++++ flexbackup-1.2.1/flexbackup 2006-08-31 16:09:16.000000000 -0700 +@@ -269,6 +269,7 @@ + untie(%::index); + } + ++system ('rm', '-rf', $cfg::tmpdir); + exit(0); + + ###################################################################### +@@ -811,6 +812,11 @@ + ($remove, @cmds) = &backup_filelist($label, $localdir, $title, $level, $remote); + } + ++ if(defined($remote)) { ++ # create our temporary directory as first remote command ++ unshift(@cmds, &maybe_remote_cmd("$::path{mkdir} -p $cfg::tmpdir", $remote)); ++ } ++ + # Nuke any tmp files used in the above routines + if ($remove ne '') { + push(@cmds, &maybe_remote_cmd("$::path{rm} -f $remove", $remote)); +@@ -827,6 +833,11 @@ + push(@cmds, &maybe_remote_cmd("$::path{rm} -f $pkglist", $remote)); + } + } ++ ++ if(defined($remote)) { ++ # remove temporary directory as our last remote command ++ push(@cmds, &maybe_remote_cmd("$::path{rm} -rf $cfg::tmpdir", $remote)); ++ } + + # Strip multiple spaces + foreach my $cmd (@cmds) { +@@ -2750,8 +2761,9 @@ + $::path{'find'} = &checkinpath('find'); + $::path{'dd'} = &checkinpath('dd'); + $::path{'printf'} = &checkinpath('printf'); ++ $::path{'mkdir'} = &checkinpath('mkdir'); + +- push(@::remoteprogs,($::path{'touch'},$::path{'rm'},$::path{'find'},$::path{'printf'})); ++ push(@::remoteprogs,($::path{'touch'},$::path{'rm'},$::path{'find'},$::path{'printf'},$::path{'mkdir'})); + + # Check device (or dir) + $::ftape = 0; +@@ -3442,6 +3454,15 @@ + push(@::errors,"\$tmpdir $cfg::tmpdir is not writable"); + } + ++ $cfg::hostname = `hostname`; ++ chomp($cfg::hostname); ++ ++ # Use a subdirectory of the user-specified directory as our tmpdir ++ # Also note that we make it closer to globally unique as we sometimes ++ # use this variable for remote systems, so PID isn't enough ++ $cfg::tmpdir = $cfg::tmpdir .'/flexbackup.'.$$.'.'.$cfg::hostname; ++ mkdir ($cfg::tmpdir) || die "Can't create temporary directory, $!"; ++ + # Levels + if (defined($::opt{'level'}) and + (defined($::opt{'incremental'}) or +@@ -5236,8 +5257,8 @@ + # Create a script which tests the buffer program + open(SCR,"> $tmp_script") || die; + print SCR "#!/bin/sh\n"; +- print SCR "tmp_data=/tmp/bufftest\$\$.txt\n"; +- print SCR "tmp_err=/tmp/bufftest\$\$.err\n"; ++ print SCR "tmp_data=\`tempfile\`\n"; ++ print SCR "tmp_err=\`tempfile\`\n"; + print SCR "echo testme > \$tmp_data\n"; + print SCR "$buffer_cmd > /dev/null 2> \$tmp_err < \$tmp_data\n"; + print SCR "res=\$?\n"; --- flexbackup-1.2.1.orig/debian/patches/02_buffer_test.dpatch +++ flexbackup-1.2.1/debian/patches/02_buffer_test.dpatch @@ -0,0 +1,44 @@ +#! /bin/sh /usr/share/dpatch/dpatch-run +## 02_buffer_test.dpatch by <"Kurt B. Kaiser" > +## +## All lines beginning with `## DP:' are a description of the patch. +## DP: Safe tmpfiles in test_bufferprog which don't use 'tempfile'; this +## DP: allows remote backups on systems which don't support 'tempfile'. +## DP: Create/remove the remote temporary directory in test_bufferprog. +## DP: Also displays the test script in debug mode. +## DP: To be applied after 01_tempfile.dpatch + +@DPATCH@ + +--- flexbackup-1.2.1/flexbackup 2006-09-05 22:46:54.000000000 -0700 ++++ flexbackup.mod 2006-09-06 21:55:44.000000000 -0700 +@@ -5257,8 +5257,8 @@ + # Create a script which tests the buffer program + open(SCR,"> $tmp_script") || die; + print SCR "#!/bin/sh\n"; +- print SCR "tmp_data=\`tempfile\`\n"; +- print SCR "tmp_err=\`tempfile\`\n"; ++ print SCR "tmp_data=$cfg::tmpdir/buftest.$host.$$.txt\n"; ++ print SCR "tmp_err=$cfg::tmpdir/buftest.$host.$$.err\n"; + print SCR "echo testme > \$tmp_data\n"; + print SCR "$buffer_cmd > /dev/null 2> \$tmp_err < \$tmp_data\n"; + print SCR "res=\$?\n"; +@@ -5276,7 +5276,8 @@ + $pipecmd = "sh $tmp_script "; + } else { + print $::msg "| Checking '$cfg::buffer' on host $host... "; +- $pipecmd = "cat $tmp_script | ($::remoteshell $host 'cat > $tmp_script; sh $tmp_script; rm -f $tmp_script')"; ++ $pipecmd = "cat $tmp_script | ($::remoteshell $host 'mkdir -p $cfg::tmpdir; ++ cat - > $tmp_script; sh $tmp_script; rm -rf $cfg::tmpdir')"; + } + + if (!defined($::debug)) { +@@ -5308,6 +5309,8 @@ + close (PIPE); + + } else { ++ print $::msg "\n(debug) 'buffer' test script:\n($tmp_script)\n\n" ++ . `cat $tmp_script`; + print $::msg "\n(debug) $pipecmd\n"; + } + --- flexbackup-1.2.1.orig/debian/patches/10_Makefile_destdir.dpatch +++ flexbackup-1.2.1/debian/patches/10_Makefile_destdir.dpatch @@ -0,0 +1,26 @@ +#! /bin/sh /usr/share/dpatch/dpatch-run +## 10_Makefile_destdir.dpatch by <"Kurt B. Kaiser" > +## +## All lines beginning with `## DP:' are a description of the patch. +## DP: add DESTDIR to paths + +@DPATCH@ +diff -urNad flexbackup~/Makefile flexbackup/Makefile +--- flexbackup~/Makefile 2003-07-29 10:00:07.000000000 -0700 ++++ flexbackup/Makefile 2006-09-05 13:52:42.000000000 -0700 +@@ -7,12 +7,12 @@ + PREFIX=/usr + + # Where the script binary should go +-BINPATH = $(PREFIX)/bin ++BINPATH = $(DESTDIR)$(PREFIX)/bin + # Where the manpage should go +-MANPATH = $(PREFIX)/share/man ++MANPATH = $(DESTDIR)$(PREFIX)/share/man + + # Where flexbackup.conf should be stored +-CONFFILE = /etc/flexbackup.conf ++CONFFILE = $(DESTDIR)/etc/flexbackup.conf + + # Where perl lives + PERLPATH = /usr/bin/perl --- flexbackup-1.2.1.orig/debian/patches/20_flexbackup.conf.5_hyphens.dpatch +++ flexbackup-1.2.1/debian/patches/20_flexbackup.conf.5_hyphens.dpatch @@ -0,0 +1,28 @@ +#! /bin/sh /usr/share/dpatch/dpatch-run +## 20_flexbackup.conf_hyphens.5.dpatch by <"Kurt B. Kaiser" > +## +## All lines beginning with `## DP:' are a description of the patch. +## DP: Minus signs need to be escaped. + +@DPATCH@ +diff -urNad flexbackup~/flexbackup.conf.5 flexbackup/flexbackup.conf.5 +--- flexbackup~/flexbackup.conf.5 2003-10-04 08:52:00.000000000 -0700 ++++ flexbackup/flexbackup.conf.5 2006-09-05 15:24:19.000000000 -0700 +@@ -131,7 +131,7 @@ + .TP + \fB$atime_preserve\fR = \fI'true|false'\fR; + Set to true to try and preserve file access times during backup, if the +-selected archive program can do so. Note that if this is true, -cnewer checks ++selected archive program can do so. Note that if this is true, \-cnewer checks + (file permission/status changes only, not content) are turned off when deciding + which files to archive on the local system. + .TP +@@ -212,7 +212,7 @@ + .br + \fB$path{\fI'dump'\fR}\fR = \fI'sudo dump'\fR; + .br +-\fB$path{\fI'afio'\fR}\fR = \fI'sudo -u nonrootuser afio'\fR; ++\fB$path{\fI'afio'\fR}\fR = \fI'sudo \-u nonrootuser afio'\fR; + .RE + .RE + .TP --- flexbackup-1.2.1.orig/debian/patches/22_flexbackup.1.dpatch +++ flexbackup-1.2.1/debian/patches/22_flexbackup.1.dpatch @@ -0,0 +1,53 @@ +#! /bin/sh /usr/share/dpatch/dpatch-run +## 22_flexbackup.1.dpatch by <"Kurt B. Kaiser" > +## +## All lines beginning with `## DP:' are a description of the patch. + +## DP: Fix #312259 Wrong option for onefile extract in manpage +## DP: Fix #250615 man page errors +## DP: Correct a couple of typos. + +@DPATCH@ +diff -urNad flexbackup~/flexbackup.1 flexbackup/flexbackup.1 +--- flexbackup~/flexbackup.1 2003-10-04 08:52:00.000000000 -0700 ++++ flexbackup/flexbackup.1 2006-09-10 11:29:30.000000000 -0700 +@@ -25,11 +25,10 @@ + (previous backup level + 1). + .TP + \fBflexbackup\fR [...] \fI-pkgdelta\fR <\fIrpm\fR | \fIfreebsd\fR> +-prune backup to files not part of a package or changed from distributed version. ++Prune backup to files not part of a package or changed from distributed version. + .TP + \fBflexbackup\fR [...] \fI-wday\fR <\fI0-7\fR> +-Prune backup to files not part of a package or changed from distributed version. +-backup only if the week day matches the input number. Sunday is 0 or 7. ++Backup only if the week day matches the input number. Sunday is 0 or 7. + .TP + \fBflexbackup\fR [...] \fI-pipe\fR + Write backup data to stdout rather than file/device. +@@ -48,7 +47,7 @@ + Extract (restore) the files listed in text file \(dqfilelist\(dq into your + current working directory. + .TP +-\fBflexbackup\fR \fI-extract\fR \fI-flist\fR <\fIfilename\fR> ++\fBflexbackup\fR \fI-extract\fR \fI-onefile\fR <\fIfilename\fR> + Extract (restore) the single file named \(dqfilename\(dq into your current + working directory. + .TP +@@ -81,13 +80,13 @@ + \fBflexbackup\fR \fI-rmindex\fR \fIall\fR + Force delete all database index info. + .TP +-\fBflexbackup\fR \fI-toc\fR <\fIkey\fR> ++\fBflexbackup\fR \fI-rmindex\fR <\fIkey\fR> + Force delete specified database tape/dir index key named \(dqkey\(dq. + .TP +-\fBflexbackup\fR \fI-toc\fR <\fIkey\fR:\fIfile\fR> ++\fBflexbackup\fR \fI-rmindex\fR <\fIkey\fR:\fIfile\fR> + Force delete specified database tape/dir index key named \(dqkey\(dq, + file number \(dqfile\(dq. +-.SH "MISCELLENEOUS OPTIONS" ++.SH "MISCELLANEOUS OPTIONS" + .TP + \fBflexbackup\fR \fI-newtape\fR + Erase and create new index key (but don't do any backups). --- flexbackup-1.2.1.orig/debian/patches/30_basic_debian_tape.dpatch +++ flexbackup-1.2.1/debian/patches/30_basic_debian_tape.dpatch @@ -0,0 +1,43 @@ +#! /bin/sh /usr/share/dpatch/dpatch-run +## 30_basic_debian_tape.dpatch by <"Kurt B. Kaiser" > +## +## All lines beginning with `## DP:' are a description of the patch. +## DP: Modify config to support basic Debian tape operations using tar. +## DP: Note that streaming can be greatly improved by using 'buffer'. +## DP: However, many will use disk backup these days instead of tape +## DP: and 'buffer' isn't required. + +@DPATCH@ +diff -urNad flexbackup~/flexbackup.conf flexbackup/flexbackup.conf +--- flexbackup~/flexbackup.conf 2003-09-21 15:59:58.000000000 -0700 ++++ flexbackup/flexbackup.conf 2006-09-09 15:27:35.000000000 -0700 +@@ -8,7 +8,7 @@ + # Archive type? afio, dump, tar, cpio, star, pax, zip, lha, ar, shar + # 'copy' or 'rsync' are extra options if running in archive-to-disk mode. + # 'filelist' dumps a list of files in your cwd - for debugging setup/exclusion +-$type = 'afio'; ++$type = 'tar'; + + # Configure backup "sets". + # Not needed if you use "-dir " to backup one tree at a time. +@@ -36,8 +36,9 @@ + $compress = 'gzip'; # one of false/gzip/bzip2/lzop/zip/compress/hardware + $compr_level = '4'; # compression level (1-9) (for gzip/bzip2/lzop/zip) + +-# Buffering program - to help streaming +-$buffer = 'buffer'; # one of false/buffer/mbuffer ++# Buffering program - to help streaming. The use of buffer or mbuffer ++# when writing to tape is recommended to avoid excessive drive wear. ++$buffer = 'false'; # one of false/buffer/mbuffer + $buffer_megs = '10'; # buffer memory size (in megabytes) + $buffer_fill_pct = '75'; # start writing when buffer this percent full + $buffer_pause_usec = '100'; # pause after write (tape devices only) +@@ -52,7 +53,7 @@ + # If a directory, will archive to files in that directory rather than a device + # If "host:/dev/tapedevice", will use remote tape drive via rsh/ssh + # +-$device = '/dev/tape'; ++$device = '/dev/nst0'; + + # Block size (in kilobytes!) to use for archive programs and dd. Default is + # 10 for most things. Some tape drives need 32 or 64. Set to '0' to --- flexbackup-1.2.1.orig/debian/patches/40_dump_path.dpatch +++ flexbackup-1.2.1/debian/patches/40_dump_path.dpatch @@ -0,0 +1,24 @@ +#! /bin/sh /usr/share/dpatch/dpatch-run +## 40_dump_path.dpatch by <"Kurt B. Kaiser" > +## +## All lines beginning with `## DP:' are a description of the patch. +## DP: Debian Bug #293884 +## DP: flexbackup: sub backup_dump does not use %path hash for dump +## DP: +## DP: sub backup_dump does not use %path hash for dump, so if +## DP: backup user does not have /sbin in his $PATH (it is so for +## DP: Debian 'backup' system user), flexbackup cannot use dump. + +@DPATCH@ +diff -urNad flexbackup~/flexbackup flexbackup/flexbackup +--- flexbackup~/flexbackup 2006-09-07 20:19:38.000000000 -0700 ++++ flexbackup/flexbackup 2006-09-07 20:21:06.000000000 -0700 +@@ -1068,7 +1068,7 @@ + } + + $cmd = ''; +- $cmd .= "dump -$level "; ++ $cmd .= "$::path{dump} -$level "; + $cmd .= "$::dump_blk_flag "; + if ($cfg::dump_use_dumpdates eq "true") { + $cmd .= "-u "; --- flexbackup-1.2.1.orig/debian/patches/42_afio_cpio_incompatible_ok.dpatch +++ flexbackup-1.2.1/debian/patches/42_afio_cpio_incompatible_ok.dpatch @@ -0,0 +1,21 @@ +#! /bin/sh /usr/share/dpatch/dpatch-run +## 42_afio_cpio_incompatible_ok.dpatch by <"Kurt B. Kaiser" > +## +## All lines beginning with `## DP:' are a description of the patch. +## DP: Debian Bug #273750: flexbackup unable to complete a backup ! +## DP: afio is not configured to be cpio compatible; should not exit here +## DP: on a warning. + +@DPATCH@ +diff -urNad flexbackup~/flexbackup flexbackup/flexbackup +--- flexbackup~/flexbackup 2006-09-08 20:17:32.000000000 -0700 ++++ flexbackup/flexbackup 2006-09-08 20:18:28.000000000 -0700 +@@ -1151,7 +1151,7 @@ + $cmd .= "$::path{afio} -o "; + $cmd .= "$no_compress "; + $cmd .= "-z "; +- $cmd .= "-1 m "; ++ $cmd .= "-1 mc "; + $cmd .= "$::afio_z_flag "; + $cmd .= "$::afio_verb_flag "; + $cmd .= "$::afio_sparse_flag "; --- flexbackup-1.2.1.orig/debian/patches/50_lzma_support.dpatch +++ flexbackup-1.2.1/debian/patches/50_lzma_support.dpatch @@ -0,0 +1,113 @@ +#! /bin/sh /usr/share/dpatch/dpatch-run +## 50_lzma_support.dpatch by John Dong +## +## All lines beginning with `## DP:' are a description of the patch. +## DP: Add lzma compression + +@DPATCH@ +--- flexbackup-1.2.1.orig/flexbackup ++++ flexbackup-1.2.1/flexbackup +@@ -687,6 +687,8 @@ + $filename .= ".zip"; + } elsif ($cfg::compress eq "compress") { + $filename .= ".Z"; ++ } elsif ($cfg::compress eq "lzma") { ++ $filename .= ".lzma"; + } + } elsif ($cfg::type eq "afio") { + # tag these a little different, the archive file itself isn't a +@@ -701,6 +703,8 @@ + $filename .= "-zip"; + } elsif ($cfg::compress eq "compress") { + $filename .= "-Z"; ++ } elsif ($cfg::compress eq "lzma") { ++ $filename .= "-lzma"; + } + } + +@@ -2700,7 +2704,7 @@ + # First check if things are defined in the config file + # Checks exist, true/false, or one of options + &checkvar(\$cfg::type,'type','dump afio cpio tar star pax zip ar shar lha copy rsync filelist','tar'); +- &checkvar(\$cfg::compress,'compress','gzip bzip2 lzop compress zip false hardware','gzip'); ++ &checkvar(\$cfg::compress,'compress','gzip bzip2 lzop compress zip false hardware lzma','gzip'); + &checkvar(\$cfg::compr_level,'compr_level','exist','4'); + &checkvar(\$cfg::verbose,'verbose','bool','true'); + &checkvar(\$cfg::sparse,'sparse','bool','true'); +@@ -3001,6 +3005,16 @@ + $::z = " | $::path{zip} -$cfg::compr_level - -"; + $::unz = "$::path{funzip} | "; + } ++ } elsif ($cfg::compress eq "lzma") { ++ $::path{'lzma'} = &checkinpath($cfg::compress); ++ push(@::remoteprogs, $::path{$cfg::compress}); ++ if ($cfg::compr_level !~ m/^[123456789]$/) { ++ push(@::errors,"\$compr_level must be set to 1-9"); ++ } else { ++ $::z = " | $::path{$cfg::compress} -$cfg::compr_level "; ++ } ++ $::unz = "$::path{$cfg::compress} -d | "; ++ + } else { + $::z = ""; + $::unz = ""; +@@ -3252,6 +3266,10 @@ + $::afio_z_flag = "-P $::path{$cfg::compress} -Q -c -Z"; + $::afio_unz_flag = "-P $::path{$cfg::compress} -Q -d -Q -c -Z"; + ++ } elsif ($cfg::compress eq "lzma") { ++ $::afio_z_flag = "-P $::path{$cfg::compress} -Q -$cfg::compr_level -Z"; ++ $::afio_unz_flag = "-P $::path{$cfg::compress} -Q -d -Z"; ++ + } + $::unz = ""; # Reset & just use this for reading the archive file. + +@@ -3415,7 +3433,7 @@ + $::path{'lha'} = &checkinpath('lha'); + push(@::remoteprogs, $::path{'lha'}); + +- if ($cfg::compress =~ /^(gzip|bzip2|lzop|compress|zip)$/) { ++ if ($cfg::compress =~ /^(gzip|bzip2|lzop|compress|zip|lzma)$/) { + warn("Using type \"lha\" with compress=$cfg::compress makes no sense"); + warn("Setting compression to false"); + $::unz = ""; +@@ -3781,7 +3799,7 @@ + + # Try and guess file types and commpression scheme + # might as well since we are reading from a file in this case +- if ($file =~ m/\.(dump|cpio|tar|star|pax|a|shar|filelist)\.(gz|bz2|lzo|Z|zip)$/) { ++ if ($file =~ m/\.(dump|cpio|tar|star|pax|a|shar|filelist)\.(gz|bz2|lzo|Z|zip|lzma)$/) { + $cfg::type = $1; + $cfg::compress = $2; + $cfg::type =~ s/^a$/ar/; +@@ -3789,16 +3807,18 @@ + $cfg::compress =~ s/bz2/bzip2/; + $cfg::compress =~ s/lzo/lzop/; + $cfg::compress =~ s/Z/compress/; ++ $cfg::compress =~ s/lzma/lzma/; + &log("| Auto-set to type=$cfg::type compress=$cfg::compress"); + &optioncheck(); # redo to set a few variables over + +- } elsif ($file =~ m/\.afio-(gz|bz2|lzo|Z|zip)$/) { ++ } elsif ($file =~ m/\.afio-(gz|bz2|lzo|Z|zip|lzma)$/) { + $cfg::type = "afio"; + $cfg::compress = $1; + $cfg::compress =~ s/gz/gzip/; + $cfg::compress =~ s/bz2/bzip2/; + $cfg::compress =~ s/lzo/lzop/; + $cfg::compress =~ s/Z/compress/; ++ $cfg::compress =~ s/lzma/lzma/; + &log("| Auto-set to type=$cfg::type compress=$cfg::compress"); + &optioncheck(); # redo to set a few variables over + +--- flexbackup-1.2.1.orig/flexbackup.conf.5 ++++ flexbackup-1.2.1/flexbackup.conf.5 +@@ -42,7 +42,7 @@ + each backup. Key is a filesystem/directory or \(dqhost:directory\(dq spec as + outlined above regular expressions allowed (not shell-type wildcards!). + .TP +-\fB$compress\fR = \fI'false|gzip|bzip2|lzop|zip|compress|hardware'\fR; ++\fB$compress\fR = \fI'false|gzip|bzip2|lzop|zip|compress|hardware|lzma'\fR; + .TQ + \fB$compr_level\fR = \fI'4'\fR; + Configure compression. Choose a type of compression to use and configure the --- flexbackup-1.2.1.orig/debian/patches/60_use_afio_default_nocompression.dpatch +++ flexbackup-1.2.1/debian/patches/60_use_afio_default_nocompression.dpatch @@ -0,0 +1,75 @@ +#!/bin/sh /usr/share/dpatch/dpatch-run +## 60_use_afio_default_nocompression.dpatch by Kurt B. Kaiser +## +## All lines beginning with `## DP:' are a description of the patch. +## DP: Bug #264847 patch by Jose Luis Fernandez Barros +## DP: plus man page and flexbackup.conf changes by KBK. +## DP: +## DP: Add to the list of file types afio won't compress, instead of +## DP: replacing that list. + +@DPATCH@ +diff -urNad flexbackup-svn~/flexbackup flexbackup-svn/flexbackup +--- flexbackup-svn~/flexbackup 2008-02-23 13:54:28.000000000 -0500 ++++ flexbackup-svn/flexbackup 2008-02-23 13:58:43.000000000 -0500 +@@ -1132,7 +1132,7 @@ + if (($cfg::compress !~ /^(false|hardware)$/) and ($cfg::afio_nocompress_types ne "")) { + $cmd = "$::path{printf} \"$cfg::afio_nocompress_types\" > $tmpnocompress"; + push(@cmds, &maybe_remote_cmd($cmd, $remote)); +- $no_compress = "-E $tmpnocompress"; ++ $no_compress = "-E +$tmpnocompress"; + $remove .= " $tmpnocompress"; + } + +@@ -3250,7 +3250,7 @@ + &checkvar(\$cfg::afio_echo_block,'afio_echo_block','bool','false'); + &checkvar(\$cfg::afio_compress_cache_size,'afio_compress_cache_size','exist','2'); + &checkvar(\$cfg::afio_compress_threshold,'afio_compress_threshold','exist','3'); +- &checkvar(\$cfg::afio_nocompress_types,'afio_nocompress_types','exist','mp3 MP3 Z z gz gif zip ZIP lha jpeg jpg JPG taz tgz deb rpm bz2 lzo'); ++ &checkvar(\$cfg::afio_nocompress_types,'afio_nocompress_types','exist','.lzo'); + + $::path{'afio'} = &checkinpath('afio'); + push(@::remoteprogs, $::path{'afio'}); +diff -urNad flexbackup-svn~/flexbackup.conf flexbackup-svn/flexbackup.conf +--- flexbackup-svn~/flexbackup.conf 2008-02-23 13:54:28.000000000 -0500 ++++ flexbackup-svn/flexbackup.conf 2008-02-23 14:05:33.000000000 -0500 +@@ -128,8 +128,9 @@ + # ---------------------------------------------------------------------- + # Parameters for 'afio' only + +-# File extensions that should not be compressed (seperate with spaces) +-$afio_nocompress_types = 'mp3 MP3 Z z gz gif zip ZIP lha jpeg jpg JPG taz tgz deb rpm bz2 lzo'; ++# Additional (besides the afio defaults) file extensions that should not ++# be compressed (separate with spaces) ++$afio_nocompress_types = '.lzo'; + + # True to show block numbers + $afio_echo_block = 'false'; +diff -urNad flexbackup-svn~/flexbackup.conf.5 flexbackup-svn/flexbackup.conf.5 +--- flexbackup-svn~/flexbackup.conf.5 2008-02-23 13:54:28.000000000 -0500 ++++ flexbackup-svn/flexbackup.conf.5 2008-02-23 14:08:10.000000000 -0500 +@@ -226,15 +226,15 @@ + \fB$afio_compress_threshold\fR = \fI'3'\fR; + .TQ + \fB$afio_compress_cache_size\fR = \fI'2'\fR; +-These settings apply to the \fB'afio'\fR backup types only. Files with +-extensions specified in \fB$afio_nocompress_types\fR will not be compressed. +-Define whether or not echo block numbers in \fB$afio_echo_block\fR. Configure +-the minimum file size (in kilobytes) required for compression in +-\fB$afio_compress_threshold\fR. \fB$afio_compress_cache_size\fR setting is +-used to specify the maximum amount of memory (megabytes) to use for temporary +-storage of compression results. If a compressed file is bigger than this, +-compression will have to run twice on the file. See the \fBafio\fR(1) manpage +-for more information. ++These settings apply to the \fB'afio'\fR backup types only. In addition to the ++afio defaults, files with extensions specified in \fB$afio_nocompress_types\fR ++will not be compressed. Define whether or not echo block numbers in ++\fB$afio_echo_block\fR. Configure the minimum file size (in kilobytes) required ++for compression in \fB$afio_compress_threshold\fR. ++\fB$afio_compress_cache_size\fR setting is used to specify the maximum amount ++of memory (megabytes) to use for temporary storage of compression results. If a ++compressed file is bigger than this, compression will have to run twice on the ++file. See the \fBafio\fR(1) manpage for more information. + .TP + \fB$tar_echo_record_num\fR = \fI'true|false'\fR; + These settings apply to the \fB'tar'\fR backup types only. Define whether --- flexbackup-1.2.1.orig/debian/patches/70_no_defined_on_hash.dpatch +++ flexbackup-1.2.1/debian/patches/70_no_defined_on_hash.dpatch @@ -0,0 +1,48 @@ +#!/bin/sh /usr/share/dpatch/dpatch-run +## 70_no_defined_on_hash.dpatch by Ian Campbell +## +## All lines beginning with `## DP:' are a description of the patch. +## DP: Bug #816164 patch by Ian Campbell +## DP: +## DP: defined(%hash) and defined(@array) have been deprecated for a while and +## DP: are now fatal errors: +## DP: +## DP: Can't use 'defined(%hash)' (Maybe you should just omit the defined()?) at /usr/bin/flexbackup line 1053. +## DP: Can't use 'defined(@array)' (Maybe you should just omit the defined()?) at /usr/bin/flexbackup line 2688. +## DP: +## DP: See http://perldoc.perl.org/perldelta.html#defined%28%40array%29-and-defined%28%25hash%29-are-now-fatal-errors +## DP: +## DP: http://perldoc.perl.org/functions/defined.html recommends just checking +## DP: for length (i.e. removing the defined()). Do so. + +@DPATCH@ +diff -urNad flexbackup-svn~/flexbackup flexbackup-svn/flexbackup +--- flexbackup-svn~/flexbackup 2016-02-28 08:54:08.338589461 +0000 ++++ flexbackup-svn/flexbackup 2016-02-28 08:56:08.934584524 +0000 +@@ -1050,7 +1050,7 @@ + } else { + $prunekey = $dir; + } +- if (defined(%{$::prune{$prunekey}})) { ++ if ($::prune{$prunekey}) { + &log("| NOTE: \$prune is ignored for type=dump"); + } + +@@ -2685,7 +2685,7 @@ + } + + # Flag old config file +- if (defined(@cfg::filesystems) or defined($cfg::mt_var_blksize)) { ++ if (@cfg::filesystems or defined($cfg::mt_var_blksize)) { + # so strict shuts up + my $junk = @cfg::filesystems; + $junk = $cfg::mt_var_blksize; +@@ -4883,7 +4883,7 @@ + $prunekey = $dir; + } + +- if (defined(%{$::prune{$prunekey}})) { ++ if ($::prune{$prunekey}) { + # FreeBSD needs -E (above) and no backslashes around the (|) chars + if ($::uname =~ /FreeBSD/) { + $cmd .= '-regex "\./('; --- flexbackup-1.2.1.orig/debian/rules +++ flexbackup-1.2.1/debian/rules @@ -0,0 +1,76 @@ +#!/usr/bin/make -f +# -*- makefile -*- +# Sample debian/rules that uses debhelper. +# GNU copyright 1997 to 1999 by Joey Hess. + +# Uncomment this to turn on verbose mode. +#export DH_VERBOSE=1 + +build: build-stamp +build-stamp: patch-stamp + dh_testdir + + # Add here commands to compile the package. + $(MAKE) + + touch build-stamp + +clean: clean-patched unpatch +clean-patched: + dh_testdir + dh_testroot + rm -f build-stamp configure-stamp + + # Add here commands to clean up after the build process. + [ ! -f Makefile ] || $(MAKE) clean + + dh_clean + +patch: patch-stamp +patch-stamp: + dpatch apply-all + touch patch-stamp + +unpatch: + dpatch deapply-all + rm -rf patch-stamp debian/patched + +install: build + dh_testdir + dh_testroot + dh_clean -k + dh_installdirs + + # Add here commands to install the package into debian/flexbackup. + $(MAKE) install DESTDIR=$(CURDIR)/debian/flexbackup/ + + +# Build architecture-dependent files here. +binary-arch: build install +# We have nothing to do by default. + +# Build architecture-independent files here. +binary-indep: build install + dh_testdir + dh_testroot + dh_installchangelogs CHANGES + dh_installdocs + dh_installexamples + dh_installman + dh_compress + dh_fixperms + chown -R root:backup debian/flexbackup/var/lib/flexbackup/ + chown -R root:backup debian/flexbackup/var/log/flexbackup/ + chmod -R u=rwX,g=rwX,o-rwx debian/flexbackup/var/lib/flexbackup/ + chmod -R u=rwX,g=rwX,o-rwx debian/flexbackup/var/log/flexbackup/ + install -o root -g root -m 0644 debian/flexbackup.lintian \ + debian/flexbackup/usr/share/lintian/overrides/flexbackup + dh_perl + dh_installdeb + dh_gencontrol + dh_md5sums + dh_builddeb + +binary: binary-indep binary-arch + +.PHONY: build clean binary-indep binary-arch binary install patch unpatch --- flexbackup-1.2.1.orig/debian/sample-cron +++ flexbackup-1.2.1/debian/sample-cron @@ -0,0 +1,24 @@ +#!/bin/sh + +# +# Sample cron script for incrementing backup levels, designed for +# placement into /etc/cron.daily +# +# Author: Brian Bassett +# + +# Constants for days of the week +SUN=0 +MON=1 +TUE=2 +WED=3 +THU=4 +FRI=5 +SAT=6 + +# This is the day of the week that the Level 0 backup is made. +LVL0DAY=$TUE + +# Backup! +/usr/bin/flexbackup -set all -level $(expr \( $(date +%w) - $LVL0DAY \) % 7) +