summaryrefslogtreecommitdiff
path: root/sysutils
diff options
context:
space:
mode:
authordrochner <drochner@pkgsrc.org>2011-11-09 18:38:02 +0000
committerdrochner <drochner@pkgsrc.org>2011-11-09 18:38:02 +0000
commit4a98ee52ee7fabf3f661415981616ef4e95e15e9 (patch)
treea729c026fb095df8a544dfc7522f70dd105bd44b /sysutils
parentbe4f06917739cb2da9554ab01a78730f569f0462 (diff)
downloadpkgsrc-4a98ee52ee7fabf3f661415981616ef4e95e15e9.tar.gz
deal better with error return values of *xattr() functions -- the
"bbackupd" selftest does mostly succeed now on NetBSD-current wuth UFS1 (where xattrs are supported by the OS but not the filesystem)
Diffstat (limited to 'sysutils')
-rw-r--r--sysutils/boxbackup-client/distinfo4
-rw-r--r--sysutils/boxbackup-client/patches/patch-aa24
-rw-r--r--sysutils/boxbackup-client/patches/patch-ab18
3 files changed, 45 insertions, 1 deletions
diff --git a/sysutils/boxbackup-client/distinfo b/sysutils/boxbackup-client/distinfo
index 22b3168d500..edfe30cf396 100644
--- a/sysutils/boxbackup-client/distinfo
+++ b/sysutils/boxbackup-client/distinfo
@@ -1,5 +1,7 @@
-$NetBSD: distinfo,v 1.3 2011/11/07 12:04:34 drochner Exp $
+$NetBSD: distinfo,v 1.4 2011/11/09 18:38:02 drochner Exp $
SHA1 (boxbackup-0.11.1.tgz) = 254253dbfc8cbfc2e5272d1e3589d4d73ccf3597
RMD160 (boxbackup-0.11.1.tgz) = 17553b3ff06d19f353dbadc0166b7dceaa11c271
Size (boxbackup-0.11.1.tgz) = 1863270 bytes
+SHA1 (patch-aa) = d6c76bce9a706ee05a19705c80f367519316667f
+SHA1 (patch-ab) = c94b950a59f4d01b9e4dfb3b74d93b52ff264ed0
diff --git a/sysutils/boxbackup-client/patches/patch-aa b/sysutils/boxbackup-client/patches/patch-aa
new file mode 100644
index 00000000000..da7f572ce16
--- /dev/null
+++ b/sysutils/boxbackup-client/patches/patch-aa
@@ -0,0 +1,24 @@
+$NetBSD: patch-aa,v 1.3 2011/11/09 18:38:02 drochner Exp $
+
+deal with the fact that ENOTSUPP and EOPNOTSUPP is identical on Linux but not in general
+
+--- lib/backupclient/BackupClientFileAttributes.cpp.orig 2011-01-08 21:35:23.000000000 +0000
++++ lib/backupclient/BackupClientFileAttributes.cpp
+@@ -661,7 +661,7 @@ void BackupClientFileAttributes::FillExt
+ }
+ else if(listSize<0)
+ {
+- if(errno == EOPNOTSUPP || errno == EACCES)
++ if(errno == EOPNOTSUPP || errno == EACCES || errno == ENOTSUP)
+ {
+ // fail silently
+ }
+@@ -1016,7 +1016,7 @@ void BackupClientFileAttributes::WriteEx
+ xattrOffset += sizeof(u_int32_t);
+
+ // FIXME: Warn on EOPNOTSUPP
+- if(::lsetxattr(Filename, key, buffer+xattrOffset, valueSize, 0)!=0 && errno!=EOPNOTSUPP)
++ if(::lsetxattr(Filename, key, buffer+xattrOffset, valueSize, 0)!=0 && errno!=EOPNOTSUPP && errno!=ENOTSUP)
+ {
+ BOX_LOG_SYS_ERROR("Failed to set extended attributes "
+ "on file '" << Filename << "'");
diff --git a/sysutils/boxbackup-client/patches/patch-ab b/sysutils/boxbackup-client/patches/patch-ab
new file mode 100644
index 00000000000..c08a6d2352c
--- /dev/null
+++ b/sysutils/boxbackup-client/patches/patch-ab
@@ -0,0 +1,18 @@
+$NetBSD: patch-ab,v 1.3 2011/11/09 18:38:02 drochner Exp $
+
+don't fail if xattrs are not supported by the filesystem
+
+--- test/bbackupd/testbbackupd.cpp.orig 2011-01-08 21:35:24.000000000 +0000
++++ test/bbackupd/testbbackupd.cpp
+@@ -310,9 +310,9 @@ bool attrmatch(const char *f1, const cha
+ if(!readxattr_into_map(f1, xattr1)
+ || !readxattr_into_map(f2, xattr2))
+ {
+- return false;
++ /*return false*/;
+ }
+- if(!(xattr1 == xattr2))
++ else if(!(xattr1 == xattr2))
+ {
+ return false;
+ }