e3c68b
From 27d69d8927a946562aef08a6edfee38b9998f96d Mon Sep 17 00:00:00 2001
e3c68b
From: Anoop C S <anoopcs@redhat.com>
e3c68b
Date: Wed, 12 Jun 2019 15:41:27 +0530
e3c68b
Subject: [PATCH 325/335] extras/hooks: Install and package newly added post
e3c68b
 add-brick hook script
e3c68b
e3c68b
Previously a new SELinux hook script was added as a post add-brick
e3c68b
operation to label new brick paths. But the change failed to install
e3c68b
and package new script. Therefore making necessary changes to Makefile
e3c68b
and spec file to get it installed and packaged.
e3c68b
e3c68b
Backport of https://review.gluster.org/c/glusterfs/+/22856
e3c68b
e3c68b
Change-Id: I67b8f4982c2783c34a4bc749fb4387c19a038225
e3c68b
BUG: 1686800
e3c68b
Signed-off-by: Anoop C S <anoopcs@redhat.com>
e3c68b
Reviewed-on: https://code.engineering.redhat.com/gerrit/185856
e3c68b
Tested-by: RHGS Build Bot <nigelb@redhat.com>
e3c68b
Reviewed-by: Sunil Kumar Heggodu Gopala Acharya <sheggodu@redhat.com>
e3c68b
---
e3c68b
 extras/hook-scripts/add-brick/post/Makefile.am | 4 ++--
e3c68b
 glusterfs.spec.in                              | 1 +
e3c68b
 2 files changed, 3 insertions(+), 2 deletions(-)
e3c68b
e3c68b
diff --git a/extras/hook-scripts/add-brick/post/Makefile.am b/extras/hook-scripts/add-brick/post/Makefile.am
e3c68b
index bfc0c1c..9b236df 100644
e3c68b
--- a/extras/hook-scripts/add-brick/post/Makefile.am
e3c68b
+++ b/extras/hook-scripts/add-brick/post/Makefile.am
e3c68b
@@ -1,6 +1,6 @@
e3c68b
-EXTRA_DIST = disabled-quota-root-xattr-heal.sh S13create-subdir-mounts.sh
e3c68b
+EXTRA_DIST = disabled-quota-root-xattr-heal.sh S10selinux-label-brick.sh S13create-subdir-mounts.sh
e3c68b
 
e3c68b
 hookdir = $(GLUSTERD_WORKDIR)/hooks/1/add-brick/post/
e3c68b
 if WITH_SERVER
e3c68b
-hook_SCRIPTS = disabled-quota-root-xattr-heal.sh S13create-subdir-mounts.sh
e3c68b
+hook_SCRIPTS = disabled-quota-root-xattr-heal.sh S10selinux-label-brick.sh S13create-subdir-mounts.sh
e3c68b
 endif
e3c68b
diff --git a/glusterfs.spec.in b/glusterfs.spec.in
e3c68b
index eeadb65..91180db 100644
e3c68b
--- a/glusterfs.spec.in
e3c68b
+++ b/glusterfs.spec.in
e3c68b
@@ -1447,6 +1447,7 @@ exit 0
e3c68b
        %dir %attr(0755,-,-) %{_sharedstatedir}/glusterd/hooks/1/add-brick
e3c68b
        %dir %attr(0755,-,-) %{_sharedstatedir}/glusterd/hooks/1/add-brick/post
e3c68b
             %attr(0755,-,-) %{_sharedstatedir}/glusterd/hooks/1/add-brick/post/disabled-quota-root-xattr-heal.sh
e3c68b
+            %attr(0755,-,-) %{_sharedstatedir}/glusterd/hooks/1/add-brick/post/S10selinux-label-brick.sh
e3c68b
             %attr(0755,-,-) %{_sharedstatedir}/glusterd/hooks/1/add-brick/post/S13create-subdir-mounts.sh
e3c68b
        %dir %attr(0755,-,-) %{_sharedstatedir}/glusterd/hooks/1/add-brick/pre
e3c68b
             %attr(0755,-,-) %{_sharedstatedir}/glusterd/hooks/1/add-brick/pre/S28Quota-enable-root-xattr-heal.sh
e3c68b
-- 
e3c68b
1.8.3.1
e3c68b