17b94a
From 421743b7cfa6a249544f6abb4cca5a612bd20ea1 Mon Sep 17 00:00:00 2001
17b94a
From: Atin Mukherjee <amukherj@redhat.com>
17b94a
Date: Tue, 11 Dec 2018 16:21:43 +0530
17b94a
Subject: [PATCH 23/52] hooks: remove selinux hooks
17b94a
17b94a
Label: DOWNSTREAM ONLY
17b94a
17b94a
Change-Id: I810466a0ca99ab21f5a8eac8cdffbb18333d10ad
17b94a
Signed-off-by: Atin Mukherjee <amukherj@redhat.com>
17b94a
Reviewed-on: https://code.engineering.redhat.com/gerrit/135800
17b94a
Tested-by: RHGS Build Bot <nigelb@redhat.com>
17b94a
Reviewed-by: Jiffin Thottan <jthottan@redhat.com>
17b94a
Reviewed-by: Milind Changire <mchangir@redhat.com>
17b94a
---
17b94a
 configure.ac                                | 20 --------------------
17b94a
 extras/hook-scripts/Makefile.am             |  2 +-
17b94a
 extras/hook-scripts/create/Makefile.am      |  1 -
17b94a
 extras/hook-scripts/create/post/Makefile.am |  8 --------
17b94a
 extras/hook-scripts/delete/Makefile.am      |  1 -
17b94a
 extras/hook-scripts/delete/pre/Makefile.am  |  8 --------
17b94a
 glusterfs.spec.in                           |  2 --
17b94a
 7 files changed, 1 insertion(+), 41 deletions(-)
17b94a
 delete mode 100644 extras/hook-scripts/create/Makefile.am
17b94a
 delete mode 100644 extras/hook-scripts/create/post/Makefile.am
17b94a
 delete mode 100644 extras/hook-scripts/delete/Makefile.am
17b94a
 delete mode 100644 extras/hook-scripts/delete/pre/Makefile.am
17b94a
17b94a
diff --git a/configure.ac b/configure.ac
17b94a
index 2f341de..0d06f5a 100644
17b94a
--- a/configure.ac
17b94a
+++ b/configure.ac
17b94a
@@ -214,10 +214,6 @@ AC_CONFIG_FILES([Makefile
17b94a
                 extras/hook-scripts/add-brick/Makefile
17b94a
                 extras/hook-scripts/add-brick/pre/Makefile
17b94a
                 extras/hook-scripts/add-brick/post/Makefile
17b94a
-                extras/hook-scripts/create/Makefile
17b94a
-                extras/hook-scripts/create/post/Makefile
17b94a
-                extras/hook-scripts/delete/Makefile
17b94a
-                extras/hook-scripts/delete/pre/Makefile
17b94a
                 extras/hook-scripts/start/Makefile
17b94a
                 extras/hook-scripts/start/post/Makefile
17b94a
                 extras/hook-scripts/set/Makefile
17b94a
@@ -909,21 +905,6 @@ fi
17b94a
 AM_CONDITIONAL([BUILD_CLOUDSYNC], [test "x$BUILD_CLOUDSYNC" = "xyes"])
17b94a
 dnl end cloudsync section
17b94a
 
17b94a
-dnl SELinux feature enablement
17b94a
-case $host_os in
17b94a
-  linux*)
17b94a
-    AC_ARG_ENABLE([selinux],
17b94a
-                  AC_HELP_STRING([--disable-selinux],
17b94a
-                                 [Disable SELinux features]),
17b94a
-                  [USE_SELINUX="${enableval}"], [USE_SELINUX="yes"])
17b94a
-    ;;
17b94a
-  *)
17b94a
-    USE_SELINUX=no
17b94a
-    ;;
17b94a
-esac
17b94a
-AM_CONDITIONAL(USE_SELINUX, test "x${USE_SELINUX}" = "xyes")
17b94a
-dnl end of SELinux feature enablement
17b94a
-
17b94a
 AC_CHECK_HEADERS([execinfo.h], [have_backtrace=yes])
17b94a
 if test "x${have_backtrace}" = "xyes"; then
17b94a
    AC_DEFINE(HAVE_BACKTRACE, 1, [define if found backtrace])
17b94a
@@ -1599,7 +1580,6 @@ echo "XML output           : $BUILD_XML_OUTPUT"
17b94a
 echo "Unit Tests           : $BUILD_UNITTEST"
17b94a
 echo "Track priv ports     : $TRACK_PRIVPORTS"
17b94a
 echo "POSIX ACLs           : $BUILD_POSIX_ACLS"
17b94a
-echo "SELinux features     : $USE_SELINUX"
17b94a
 echo "firewalld-config     : $BUILD_FIREWALLD"
17b94a
 echo "Events               : $BUILD_EVENTS"
17b94a
 echo "EC dynamic support   : $EC_DYNAMIC_SUPPORT"
17b94a
diff --git a/extras/hook-scripts/Makefile.am b/extras/hook-scripts/Makefile.am
17b94a
index 26059d7..771b37e 100644
17b94a
--- a/extras/hook-scripts/Makefile.am
17b94a
+++ b/extras/hook-scripts/Makefile.am
17b94a
@@ -1,5 +1,5 @@
17b94a
 EXTRA_DIST = S40ufo-stop.py S56glusterd-geo-rep-create-post.sh
17b94a
-SUBDIRS = add-brick create delete set start stop reset
17b94a
+SUBDIRS = add-brick set start stop reset
17b94a
 
17b94a
 scriptsdir = $(GLUSTERD_WORKDIR)/hooks/1/gsync-create/post/
17b94a
 if USE_GEOREP
17b94a
diff --git a/extras/hook-scripts/create/Makefile.am b/extras/hook-scripts/create/Makefile.am
17b94a
deleted file mode 100644
17b94a
index b083a91..0000000
17b94a
--- a/extras/hook-scripts/create/Makefile.am
17b94a
+++ /dev/null
17b94a
@@ -1 +0,0 @@
17b94a
-SUBDIRS = post
17b94a
diff --git a/extras/hook-scripts/create/post/Makefile.am b/extras/hook-scripts/create/post/Makefile.am
17b94a
deleted file mode 100644
17b94a
index fd1892e..0000000
17b94a
--- a/extras/hook-scripts/create/post/Makefile.am
17b94a
+++ /dev/null
17b94a
@@ -1,8 +0,0 @@
17b94a
-EXTRA_DIST = S10selinux-label-brick.sh
17b94a
-
17b94a
-scriptsdir = $(GLUSTERD_WORKDIR)/hooks/1/create/post/
17b94a
-if WITH_SERVER
17b94a
-if USE_SELINUX
17b94a
-scripts_SCRIPTS = S10selinux-label-brick.sh
17b94a
-endif
17b94a
-endif
17b94a
diff --git a/extras/hook-scripts/delete/Makefile.am b/extras/hook-scripts/delete/Makefile.am
17b94a
deleted file mode 100644
17b94a
index c98a05d..0000000
17b94a
--- a/extras/hook-scripts/delete/Makefile.am
17b94a
+++ /dev/null
17b94a
@@ -1 +0,0 @@
17b94a
-SUBDIRS = pre
17b94a
diff --git a/extras/hook-scripts/delete/pre/Makefile.am b/extras/hook-scripts/delete/pre/Makefile.am
17b94a
deleted file mode 100644
17b94a
index 4fbfbe7..0000000
17b94a
--- a/extras/hook-scripts/delete/pre/Makefile.am
17b94a
+++ /dev/null
17b94a
@@ -1,8 +0,0 @@
17b94a
-EXTRA_DIST = S10selinux-del-fcontext.sh
17b94a
-
17b94a
-scriptsdir = $(GLUSTERD_WORKDIR)/hooks/1/delete/pre/
17b94a
-if WITH_SERVER
17b94a
-if USE_SELINUX
17b94a
-scripts_SCRIPTS = S10selinux-del-fcontext.sh
17b94a
-endif
17b94a
-endif
17b94a
diff --git a/glusterfs.spec.in b/glusterfs.spec.in
17b94a
index ec06176..db50b8e 100644
17b94a
--- a/glusterfs.spec.in
17b94a
+++ b/glusterfs.spec.in
17b94a
@@ -1413,7 +1413,6 @@ exit 0
17b94a
             %attr(0755,-,-) %{_sharedstatedir}/glusterd/hooks/1/add-brick/pre/S28Quota-enable-root-xattr-heal.sh
17b94a
        %dir %attr(0755,-,-) %{_sharedstatedir}/glusterd/hooks/1/create
17b94a
        %dir %attr(0755,-,-) %{_sharedstatedir}/glusterd/hooks/1/create/post
17b94a
-            %attr(0755,-,-) %{_sharedstatedir}/glusterd/hooks/1/create/post/S10selinux-label-brick.sh
17b94a
 %ghost %dir %attr(0755,-,-) %{_sharedstatedir}/glusterd/hooks/1/create/pre
17b94a
 %ghost %dir %attr(0755,-,-) %{_sharedstatedir}/glusterd/hooks/1/copy-file
17b94a
 %ghost %dir %attr(0755,-,-) %{_sharedstatedir}/glusterd/hooks/1/copy-file/post
17b94a
@@ -1422,7 +1421,6 @@ exit 0
17b94a
        %dir %attr(0755,-,-) %{_sharedstatedir}/glusterd/hooks/1/delete/post
17b94a
                             %{_sharedstatedir}/glusterd/hooks/1/delete/post/S57glusterfind-delete-post
17b94a
        %dir %attr(0755,-,-) %{_sharedstatedir}/glusterd/hooks/1/delete/pre
17b94a
-            %attr(0755,-,-) %{_sharedstatedir}/glusterd/hooks/1/delete/pre/S10selinux-del-fcontext.sh
17b94a
 %ghost %dir %attr(0755,-,-) %{_sharedstatedir}/glusterd/hooks/1/remove-brick
17b94a
 %ghost %dir %attr(0755,-,-) %{_sharedstatedir}/glusterd/hooks/1/remove-brick/post
17b94a
 %ghost %dir %attr(0755,-,-) %{_sharedstatedir}/glusterd/hooks/1/remove-brick/pre
17b94a
-- 
17b94a
1.8.3.1
17b94a