Accepting request 257154 from Archiving:Backup

Add fsarchiver-attr.patch

OBS-URL: https://build.opensuse.org/request/show/257154
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/fsarchiver?expand=0&rev=17
This commit is contained in:
Stephan Kulow 2014-10-18 07:08:45 +00:00 committed by Git OBS Bridge
commit fa630aae21
3 changed files with 63 additions and 2 deletions

51
fsarchiver-attr.patch Normal file
View File

@ -0,0 +1,51 @@
--- fsarchiver-0.6.19.orig/src/oper_restore.c
+++ fsarchiver-0.6.19/src/oper_restore.c
@@ -19,12 +19,13 @@
# include "config.h"
#endif
+#include <errno.h>
#include <unistd.h>
#include <fcntl.h>
#include <assert.h>
#include <string.h>
#include <stdlib.h>
-#include <attr/xattr.h>
+#include <sys/xattr.h>
#include <sys/time.h>
#include <sys/stat.h>
#include <gcrypt.h>
--- fsarchiver-0.6.19.orig/src/oper_save.c
+++ fsarchiver-0.6.19/src/oper_save.c
@@ -28,7 +28,8 @@
#include <sys/mount.h>
#include <sys/statvfs.h>
#include <sys/stat.h>
-#include <attr/xattr.h>
+#include <errno.h>
+#include <sys/xattr.h>
#include <zlib.h>
#include <assert.h>
#include <gcrypt.h>
@@ -57,6 +58,10 @@
#include "error.h"
#include "queue.h"
+#ifndef ENOATTR
+#define ENOATTR ENODATA
+#endif
+
typedef struct s_savear
{ carchwriter ai;
cregmulti regmulti;
--- fsarchiver-0.6.19.orig/configure.ac
+++ fsarchiver-0.6.19/configure.ac
@@ -88,7 +88,7 @@ PKG_CHECK_MODULES([BLKID], [blkid])
PKG_CHECK_MODULES([UUID], [uuid])
dnl Check for header files installed with a library
-AC_CHECK_HEADER([attr/xattr.h],, [AC_MSG_ERROR([attr/xattr.h not found. you may have to install a package called attr, libattr, libattr-devel])])
+AC_CHECK_HEADER([sys/xattr.h],, [AC_MSG_ERROR([sys/xattr.h not found. you may have to install a package called attr, libattr, libattr-devel])])
dnl Check for standard header files.
AC_CHECK_HEADERS([malloc.h unistd.h pthread.h])

View File

@ -1,3 +1,10 @@
-------------------------------------------------------------------
Sun Oct 12 14:48:05 UTC 2014 - crrodriguez@opensuse.org
- Add fsarchiver-attr.patch: remove dependency on libattr..it was
never linked anyway, things still worked because glibc provides
the same interface.
-------------------------------------------------------------------
Sat Mar 1 22:31:06 UTC 2014 - lazy.kent@opensuse.org

View File

@ -27,9 +27,10 @@ Source0: http://downloads.sourceforge.net/%{name}/%{name}-%{version}.tar.
Source1: HOWTO
# PATCH-FIX-UPSTREAM Remove conflicting uses of reserved identifiers
Patch0: fsarchiver-types.patch
Patch1: fsarchiver-attr.patch
BuildRequires: e2fsprogs-devel
BuildRequires: libattr-devel
BuildRequires: libgcrypt-devel
BuildRequires: libtool
BuildRequires: lzo-devel
BuildRequires: pkg-config
BuildRequires: pkgconfig(bzip2)
@ -50,11 +51,13 @@ the whole archive.
%prep
%setup -q
%patch0 -p1
%patch1 -p1
cp -p %{SOURCE1} .
%build
autoreconf -fiv
%configure
make %{?_smp_mflags}
make %{?_smp_mflags} V=1
%install
%makeinstall