rpms/tar/devel tar-1.19-xattrs.patch,1.11,1.12 tar.spec,1.93,1.94

Ondrej Vasik ovasik at fedoraproject.org
Mon Feb 1 14:48:58 UTC 2010


Author: ovasik

Update of /cvs/pkgs/rpms/tar/devel
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv18337

Modified Files:
	tar-1.19-xattrs.patch tar.spec 
Log Message:
allow build without SELinux support(#556679

tar-1.19-xattrs.patch:
 configure.ac    |   23 ++
 doc/tar.texi    |   75 ++++++++
 src/Makefile.am |    7 
 src/common.h    |   18 ++
 src/create.c    |   32 +++
 src/extract.c   |   74 ++++++++
 src/list.c      |    7 
 src/tar.c       |   80 ++++++++-
 src/tar.h       |   20 ++
 src/xattrs.c    |  491 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 src/xattrs.h    |   14 +
 src/xheader.c   |  224 ++++++++++++++++++++++---
 12 files changed, 1033 insertions(+), 32 deletions(-)

Index: tar-1.19-xattrs.patch
===================================================================
RCS file: /cvs/pkgs/rpms/tar/devel/tar-1.19-xattrs.patch,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -p -r1.11 -r1.12
--- tar-1.19-xattrs.patch	27 Nov 2009 14:09:57 -0000	1.11
+++ tar-1.19-xattrs.patch	1 Feb 2010 14:48:57 -0000	1.12
@@ -6,11 +6,11 @@ diff -urNp tar-1.22-orig/configure.ac ta
    sys/inet.h sys/io/trioctl.h \
    sys/mtio.h sys/time.h sys/tprintf.h sys/tape.h \
 -  unistd.h locale.h)
-+  unistd.h locale.h selinux/selinux.h attr/xattr.h sys/acl.h)
++  unistd.h locale.h attr/xattr.h sys/acl.h)
  
  AC_CHECK_HEADERS([sys/buf.h], [], [],
  [#if HAVE_SYS_PARAM_H
-@@ -88,6 +88,13 @@ gl_INIT
+@@ -88,6 +88,12 @@ gl_INIT
  tar_PAXUTILS
  
  AC_CHECK_FUNCS(fsync getdtablesize lstat mkfifo readlink symlink setlocale utimes)
@@ -18,21 +18,40 @@ diff -urNp tar-1.22-orig/configure.ac ta
 +               setxattr  fsetxattr  lsetxattr \
 +               listxattr flistxattr llistxattr,
 +               AC_DEFINE(HAVE_XATTRS,,[Define if we have a working extended attributes]),)
-+AC_CHECK_LIB(selinux, getfilecon)
 +AC_CHECK_LIB(acl, acl_get_fd)
 +
  AC_CHECK_DECLS([getgrgid],,, [#include <grp.h>])
  AC_CHECK_DECLS([getpwuid],,, [#include <pwd.h>])
  AC_CHECK_DECLS([time],,, [#include <time.h>])
-@@ -203,6 +210,8 @@ AC_DEFINE_UNQUOTED(DEFAULT_QUOTING_STYLE
+@@ -203,6 +209,7 @@ AC_DEFINE_UNQUOTED(DEFAULT_QUOTING_STYLE
  # Iconv
  AM_ICONV
  AC_CHECK_HEADERS(iconv.h)
-+AC_CHECK_HEADERS(selinux/selinux.h)
 +AC_CHECK_HEADERS(attr/xattr.h)
  AC_CHECK_TYPE(iconv_t,:,
                AC_DEFINE(iconv_t, int,
                          [Conversion descriptor type]),
+@@ -212,6 +219,20 @@ AC_CHECK_TYPE(iconv_t,:,
+ #endif
+ ])
+ 
++AC_ARG_WITH(selinux,
++	[AC_HELP_STRING([--with-selinux], [use SELinux support @<:@default=no@:>@])],
++	[with_selinux=$withval], [with_selinux=no])
++if test "$with_selinux" = "yes"; then
++	AC_CHECK_LIB(selinux, getfilecon,
++		[LIBSELINUX="-lselinux"
++		AC_SUBST(LIBSELINUX)
++		AC_CHECK_HEADERS(selinux/selinux.h, [],
++			[AC_MSG_ERROR([selinux/selinux.h is missing])])
++		AC_DEFINE(WITH_SELINUX, 1, [Build tar with SELinux support])
++		],
++		[AC_MSG_ERROR([libselinux not found])])
++fi
++
+ # Gettext.
+ AM_GNU_GETTEXT([external], [need-formatstring-macros])
+ AM_GNU_GETTEXT_VERSION([0.16])
 diff -urNp tar-1.22-orig/doc/tar.texi tar-1.22/doc/tar.texi
 --- tar-1.22-orig/doc/tar.texi	2009-03-05 08:04:13.000000000 +0100
 +++ tar-1.22/doc/tar.texi	2009-11-23 14:48:00.000000000 +0100


Index: tar.spec
===================================================================
RCS file: /cvs/pkgs/rpms/tar/devel/tar.spec,v
retrieving revision 1.93
retrieving revision 1.94
diff -u -p -r1.93 -r1.94
--- tar.spec	5 Jan 2010 19:33:32 -0000	1.93
+++ tar.spec	1 Feb 2010 14:48:58 -0000	1.94
@@ -1,8 +1,11 @@
+%if %{?WITH_SELINUX:0}%{!?WITH_SELINUX:1}
+%define WITH_SELINUX 1
+%endif
 Summary: A GNU file archiving program
 Name: tar
 Epoch: 2
 Version: 1.22
-Release: 12%{?dist}
+Release: 13%{?dist}
 License: GPLv3+
 Group: Applications/Archiving
 URL: http://www.gnu.org/software/tar/
@@ -36,7 +39,10 @@ Patch9: tar-1.22-nsfraction.patch
 #descriptor failures with POSIX2008 glibc
 Patch10: tar-1.22-utimens.patch
 Requires: info
-BuildRequires: autoconf automake gzip texinfo gettext libacl-devel libselinux-devel gawk rsh
+BuildRequires: autoconf automake gzip texinfo gettext libacl-devel gawk rsh
+%if %{WITH_SELINUX}
+BuildRequires: libselinux-devel
+%endif
 Buildroot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 Requires(post): /sbin/install-info
 Requires(preun): /sbin/install-info
@@ -68,7 +74,10 @@ the rmt package.
 
 %build
 autoreconf
-%configure --bindir=/bin --libexecdir=/sbin
+%configure --bindir=/bin --libexecdir=/sbin \
+%if %{WITH_SELINUX}
+  --with-selinux
+%endif
 make
 
 %install
@@ -122,6 +131,9 @@ fi
 %{_infodir}/tar.info*
 
 %changelog
+* Mon Feb 01 2010 Ondrej Vasik <ovasik at redhat.com> 2:1.22-13
+- allow build without SELinux support(#556679)
+
 * Tue Jan 05 2010 Ondrej Vasik <ovasik at redhat.com> 2:1.22-12
 - do not fail with POSIX 2008 glibc futimens() (#552320)
 - temporarily disable fix for #531441, causing stack smashing



More information about the scm-commits mailing list