- allow also build with SELinux support
This commit is contained in:
parent
c038029706
commit
88bee905ac
@ -1,7 +1,8 @@
|
|||||||
diff -urNp tar-1.22-orig/configure.ac tar-1.22/configure.ac
|
diff --git a/configure.ac b/configure.ac
|
||||||
--- tar-1.22-orig/configure.ac 2009-03-05 08:01:58.000000000 +0100
|
index 762f8e4..c442489 100644
|
||||||
+++ tar-1.22/configure.ac 2009-11-23 14:48:00.000000000 +0100
|
--- a/configure.ac
|
||||||
@@ -40,7 +40,7 @@ AC_CHECK_HEADERS_ONCE(fcntl.h linux/fd.h
|
+++ b/configure.ac
|
||||||
|
@@ -40,7 +40,7 @@ AC_CHECK_HEADERS_ONCE(fcntl.h linux/fd.h memory.h net/errno.h \
|
||||||
sys/param.h sys/device.h sys/filio.h sys/gentape.h \
|
sys/param.h sys/device.h sys/filio.h sys/gentape.h \
|
||||||
sys/inet.h sys/io/trioctl.h \
|
sys/inet.h sys/io/trioctl.h \
|
||||||
sys/mtio.h sys/time.h sys/tprintf.h sys/tape.h \
|
sys/mtio.h sys/time.h sys/tprintf.h sys/tape.h \
|
||||||
@ -31,22 +32,19 @@ diff -urNp tar-1.22-orig/configure.ac tar-1.22/configure.ac
|
|||||||
AC_CHECK_TYPE(iconv_t,:,
|
AC_CHECK_TYPE(iconv_t,:,
|
||||||
AC_DEFINE(iconv_t, int,
|
AC_DEFINE(iconv_t, int,
|
||||||
[Conversion descriptor type]),
|
[Conversion descriptor type]),
|
||||||
@@ -212,6 +219,20 @@ AC_CHECK_TYPE(iconv_t,:,
|
@@ -212,6 +219,17 @@ AC_CHECK_TYPE(iconv_t,:,
|
||||||
#endif
|
#endif
|
||||||
])
|
])
|
||||||
|
|
||||||
+AC_ARG_WITH(selinux,
|
+AC_ARG_ENABLE(selinux,
|
||||||
+ [AC_HELP_STRING([--with-selinux], [use SELinux support @<:@default=no@:>@])],
|
+ AC_HELP_STRING([--enable-selinux],
|
||||||
+ [with_selinux=$withval], [with_selinux=no])
|
+ [enable SELinux support (disabled by default)]),
|
||||||
+if test "$with_selinux" = "yes"; then
|
+ [selinux_enabled=$enableval],
|
||||||
+ AC_CHECK_LIB(selinux, getfilecon,
|
+ [selinux_enabled=no])
|
||||||
+ [LIBSELINUX="-lselinux"
|
+
|
||||||
+ AC_SUBST(LIBSELINUX)
|
+if test "x$selinux_enabled" = xyes; then
|
||||||
+ AC_CHECK_HEADERS(selinux/selinux.h, [],
|
+ AC_CHECK_LIB(selinux, getfilecon)
|
||||||
+ [AC_MSG_ERROR([selinux/selinux.h is missing])])
|
+ AC_CHECK_HEADERS(selinux/selinux.h)
|
||||||
+ AC_DEFINE(WITH_SELINUX, 1, [Build tar with SELinux support])
|
|
||||||
+ ],
|
|
||||||
+ [AC_MSG_ERROR([libselinux not found])])
|
|
||||||
+fi
|
+fi
|
||||||
+
|
+
|
||||||
# Gettext.
|
# Gettext.
|
||||||
|
10
tar.spec
10
tar.spec
@ -5,7 +5,7 @@ Summary: A GNU file archiving program
|
|||||||
Name: tar
|
Name: tar
|
||||||
Epoch: 2
|
Epoch: 2
|
||||||
Version: 1.22
|
Version: 1.22
|
||||||
Release: 13%{?dist}
|
Release: 14%{?dist}
|
||||||
License: GPLv3+
|
License: GPLv3+
|
||||||
Group: Applications/Archiving
|
Group: Applications/Archiving
|
||||||
URL: http://www.gnu.org/software/tar/
|
URL: http://www.gnu.org/software/tar/
|
||||||
@ -72,11 +72,12 @@ the rmt package.
|
|||||||
#%patch9 -p1 -b .nsfraction #causing stack smashing, do not apply
|
#%patch9 -p1 -b .nsfraction #causing stack smashing, do not apply
|
||||||
%patch10 -p1 -b .utimens
|
%patch10 -p1 -b .utimens
|
||||||
|
|
||||||
%build
|
|
||||||
autoreconf
|
autoreconf
|
||||||
|
|
||||||
|
%build
|
||||||
%configure --bindir=/bin --libexecdir=/sbin \
|
%configure --bindir=/bin --libexecdir=/sbin \
|
||||||
%if %{WITH_SELINUX}
|
%if %{WITH_SELINUX}
|
||||||
--with-selinux
|
--enable-selinux
|
||||||
%endif
|
%endif
|
||||||
make
|
make
|
||||||
|
|
||||||
@ -131,6 +132,9 @@ fi
|
|||||||
%{_infodir}/tar.info*
|
%{_infodir}/tar.info*
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Wed Feb 03 2010 Kamil Dudka <kdudka@redhat.com> 2:1.22-14
|
||||||
|
- allow also build with SELinux support
|
||||||
|
|
||||||
* Mon Feb 01 2010 Ondrej Vasik <ovasik@redhat.com> 2:1.22-13
|
* Mon Feb 01 2010 Ondrej Vasik <ovasik@redhat.com> 2:1.22-13
|
||||||
- allow build without SELinux support(#556679)
|
- allow build without SELinux support(#556679)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user