summaryrefslogtreecommitdiff
path: root/debian
diff options
context:
space:
mode:
authorIan Campbell <ijc@debian.org>2018-12-16 13:58:02 +0000
committerIan Campbell <ijc@debian.org>2018-12-16 14:05:46 +0000
commita6b6398eb3994ab668269da94b8e17fd561c05d1 (patch)
treec77d78efcf15e3060c293f3579860cffcbd1f230 /debian
parent95a220dc19851b9bc435aa97b48aefc4f3ff46aa (diff)
Pass `-xdev` earlier in `find` command line
(Closes: #916602)
Diffstat (limited to 'debian')
-rw-r--r--debian/changelog2
-rw-r--r--debian/patches/00list1
-rw-r--r--debian/patches/72_xdev_is_non_positional.dpatch57
3 files changed, 60 insertions, 0 deletions
diff --git a/debian/changelog b/debian/changelog
index 9b37dcd..fb38595 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -4,6 +4,8 @@ flexbackup (1.2.1-6.4) UNRELEASED; urgency=medium
* Pass `--no-recursion` earlier in the comand-line when calling out to `tar`
since the argument now only applies to arguments which follow it. Thanks to
Florian Schmidt for diagnosing and providing a patch. (Closes: #872057)
+ * Pass `-xdev` earlier in the command line when calling out to `find`. This
+ stops `find` from issuing a warning. (Closes: #916602).
-- Ian Campbell <ijc@debian.org> Sun, 16 Dec 2018 13:52:26 +0000
diff --git a/debian/patches/00list b/debian/patches/00list
index df8899b..8116c59 100644
--- a/debian/patches/00list
+++ b/debian/patches/00list
@@ -10,3 +10,4 @@
60_use_afio_default_nocompression
70_no_defined_on_hash
71_duplicate_files_in_tar.dpatch
+72_xdev_is_non_positional.dpatch
diff --git a/debian/patches/72_xdev_is_non_positional.dpatch b/debian/patches/72_xdev_is_non_positional.dpatch
new file mode 100644
index 0000000..db4b283
--- /dev/null
+++ b/debian/patches/72_xdev_is_non_positional.dpatch
@@ -0,0 +1,57 @@
+#!/bin/sh /usr/share/dpatch/dpatch-run
+## 72_xdev_is_non_positional.dpatch by Ian Campbell <ijc@debian.org>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Bug #916602 patch by Ian Campbell <ijc@debian.org>
+## DP:
+## DP: find issues a warning when `traverse_fs = "false"` is combined with
+## DP: pruning:
+## DP: find: warning: you have specified the -xdev option after a non-option argument -regex, but options are not positional (-xdev affects tests specified before it as well as those specified after it). Please specify options before other arguments.
+## DP:
+## DP: Resolve this by moving the use of `-xdev` before the `-regex` calls
+## DP: produced by pruning. However it is not possible move the `-fstype` used
+## DP: for the `traverse_fs = "local"` case (or, presumably, "all" although I
+## DP: did not test this) since this changes the semantics and therefore the set
+## DP: of files backed up in my testing.
+
+@DPATCH@
+--- a/flexbackup
++++ b/flexbackup
+@@ -2890,11 +2890,11 @@ sub optioncheck {
+ # Traverse mountpoints?
+ &checkvar(\$cfg::traverse_fs,'traverse_fs','false local all','false');
+ if ($cfg::traverse_fs eq "local") {
+- $::mountpoint_flag = "! -fstype nfs ! -fstype smbfs ! -fstype bind ! -fstype proc ! -fstype devpts ! -fstype devfs ! -fstype tmpfs";
++ $::late_mountpoint_flag = "! -fstype nfs ! -fstype smbfs ! -fstype bind ! -fstype proc ! -fstype devpts ! -fstype devfs ! -fstype tmpfs";
+ } elsif ($cfg::traverse_fs eq "all") {
+- $::mountpoint_flag = "! -fstype proc ! -fstype devpts ! -fstype devfs ! -fstype tmpfs";
++ $::late_mountpoint_flag = "! -fstype proc ! -fstype devpts ! -fstype devfs ! -fstype tmpfs";
+ } else {
+- $::mountpoint_flag = "-xdev";
++ $::early_mountpoint_flag = "-xdev";
+ }
+
+ # Block size
+@@ -4842,7 +4842,11 @@ sub file_list_cmd {
+ $prunekey = $dir;
+ }
+
++ if (defined($::early_mountpoint_flag)) {
++ $cmd .= "$::early_mountpoint_flag ";
++ }
++
+ if ($::prune{$prunekey}) {
+ # FreeBSD needs -E (above) and no backslashes around the (|) chars
+ if ($::uname =~ /FreeBSD/) {
+ $cmd .= '-regex "\./(';
+@@ -4861,7 +4865,9 @@ sub file_list_cmd {
+ $cmd .= "-depth ";
+ }
+
+- $cmd .= "$::mountpoint_flag ";
++ if (defined($::late_mountpoint_flag)) {
++ $cmd .= "$::late_mountpoint_flag ";
++ }
+ $cmd .= "! -type s ";
+
+ if (defined($otherarg)) {