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