Reduce the unnecessary SELinux stuff(included upstream), enable openssl (libcrypto) support for HASHsum utilities

This commit is contained in:
Ondřej Vašík 2013-12-16 09:42:12 +01:00
parent a1f9baa6b8
commit 3a87513acc
2 changed files with 6 additions and 43 deletions

View File

@ -1,20 +1,3 @@
diff -urNp coreutils-8.21-orig/configure.ac coreutils-8.21/configure.ac
--- coreutils-8.21-orig/configure.ac 2013-01-31 01:46:24.000000000 +0100
+++ coreutils-8.21/configure.ac 2013-02-15 14:31:58.937482694 +0100
@@ -204,6 +204,13 @@ if test "$gl_gcc_warnings" = yes; then
AC_SUBST([GNULIB_TEST_WARN_CFLAGS])
fi
+dnl Give the chance to enable SELINUX
+AC_ARG_ENABLE(selinux, dnl
+[ --enable-selinux Enable use of the SELINUX libraries],
+[AC_DEFINE(WITH_SELINUX, 1, [Define if you want to use SELINUX])
+LIB_SELINUX="-lselinux"
+AC_SUBST(LIB_SELINUX)])
+
AC_FUNC_FORK
optional_bin_progs=
diff -urNp coreutils-8.21-orig/init.cfg coreutils-8.21/init.cfg
--- coreutils-8.21-orig/init.cfg 2013-01-31 01:46:24.000000000 +0100
+++ coreutils-8.21/init.cfg 2013-02-15 14:31:58.957469955 +0100
@ -82,11 +65,12 @@ diff -urNp coreutils-8.21-orig/src/cp.c coreutils-8.21/src/cp.c
long_opts, NULL))
!= -1)
{
@@ -981,6 +987,16 @@ main (int argc, char **argv)
@@ -981,6 +987,17 @@ main (int argc, char **argv)
copy_contents = true;
break;
+ case 'c':
+ fprintf (stderr, "%s: warning: option '-c' is deprecated, please use '--preserve=context' instead", argv[0]);
+ if ( x.set_security_context ) {
+ (void) fprintf(stderr, "%s: cannot force target context and preserve it\n", argv[0]);
+ exit( 1 );
@ -132,11 +116,12 @@ diff -urNp coreutils-8.21-orig/src/install.c coreutils-8.21/src/install.c
NULL)) != -1)
{
switch (optc)
@@ -853,6 +854,7 @@ main (int argc, char **argv)
@@ -853,6 +854,8 @@ main (int argc, char **argv)
no_target_directory = true;
break;
+ case 'P':
+ fprintf (stderr, "%s: warning: option '-P' is deprecated, please use '--preserve-context' instead", argv[0]);
case PRESERVE_CONTEXT_OPTION:
if (! selinux_enabled)
{
@ -503,29 +488,6 @@ diff -urNp coreutils-8.21-orig/src/ls.c coreutils-8.21/src/ls.c
fputs (HELP_OPTION_DESCRIPTION, stdout);
fputs (VERSION_OPTION_DESCRIPTION, stdout);
emit_size_note ();
diff -urNp coreutils-8.21-orig/src/mkdir.c coreutils-8.21/src/mkdir.c
--- coreutils-8.21-orig/src/mkdir.c 2013-01-31 01:46:24.000000000 +0100
+++ coreutils-8.21/src/mkdir.c 2013-02-15 14:31:58.954469576 +0100
@@ -38,6 +38,7 @@
static struct option const longopts[] =
{
{GETOPT_SELINUX_CONTEXT_OPTION_DECL},
+ {"context", required_argument, NULL, 'Z'},
{"mode", required_argument, NULL, 'm'},
{"parents", no_argument, NULL, 'p'},
{"verbose", no_argument, NULL, 'v'},
diff -urNp coreutils-8.21-orig/src/mknod.c coreutils-8.21/src/mknod.c
--- coreutils-8.21-orig/src/mknod.c 2013-01-31 01:46:24.000000000 +0100
+++ coreutils-8.21/src/mknod.c 2013-02-15 14:31:58.955470548 +0100
@@ -35,7 +35,7 @@
static struct option const longopts[] =
{
- {GETOPT_SELINUX_CONTEXT_OPTION_DECL},
+ {GETOPT_SELINUX_CONTEXT_OPTION_DECL},
{"mode", required_argument, NULL, 'm'},
{GETOPT_HELP_OPTION_DECL},
{GETOPT_VERSION_OPTION_DECL},
diff -urNp coreutils-8.21-orig/tests/misc/selinux.sh coreutils-8.21/tests/misc/selinux.sh
--- coreutils-8.21-orig/tests/misc/selinux.sh 2013-01-31 01:46:24.000000000 +0100
+++ coreutils-8.21/tests/misc/selinux.sh 2013-02-15 14:31:58.957469955 +0100

View File

@ -89,6 +89,7 @@ BuildRequires: autoconf
BuildRequires: automake
BuildRequires: libcap-devel
BuildRequires: libattr-devel
BuildRequires: openssl-devel
BuildRequires: gmp-devel
BuildRequires: attr
BuildRequires: strace
@ -166,7 +167,7 @@ aclocal -I m4
autoconf --force
automake --copy --add-missing
%configure --enable-largefile \
%{?!noselinux:--enable-selinux} \
--with-openssl \
--enable-install-program=hostname,arch \
--with-tty-group \
DEFAULT_POSIX2_VERSION=200112 alternative=199209 || :