12a457
From 70290698394a64419b9f2cd65eda1f0ce212cd50 Mon Sep 17 00:00:00 2001
12a457
From: Kaleb S KEITHLEY <kkeithle@redhat.com>
12a457
Date: Fri, 29 Apr 2016 17:20:08 -0400
12a457
Subject: [PATCH 129/139] packaging: additional dirs and files in /var/lib/glusterd/
12a457
12a457
Add the missing /var/lib/glusterd files and dirs found by
12a457
downstream testing. Use a loop to create hook dirs instead
12a457
of open-coding. Merge the %ghost and non-ghost dirs in
12a457
-server %files section for easier maintenance.
12a457
12a457
Eliminate a benign warning for enabling non-existent
12a457
glusterfsd.{init,service} which is only relevant to Fedora
12a457
koji builds
12a457
12a457
Backport of mainline
12a457
>> Change-Id: I5802175d729e0168eea879a2a61626b0b73d77c8
12a457
>> BUG: 1326410
12a457
>> http://review.gluster.org/13981
12a457
release-3.7:
12a457
> Change-Id: Ica0f54e63ec01056263a27bbcd4a10e469f67e42
12a457
> BUG: 1326413
12a457
> Reviewed-on: http://review.gluster.org/13982
12a457
12a457
Change-Id: Ia1b358220dcb250e1210f970a48e48b0611624a7
12a457
BUG: 1324820
12a457
Signed-off-by: Kaleb S KEITHLEY <kkeithle@redhat.com>
12a457
Reviewed-on: https://code.engineering.redhat.com/gerrit/73374
12a457
Reviewed-by: Milind Changire <mchangir@redhat.com>
12a457
Tested-by: Milind Changire <mchangir@redhat.com>
12a457
---
12a457
 glusterfs.spec.in |  152 ++++++++++++++++++++++++++++++----------------------
12a457
 1 files changed, 88 insertions(+), 64 deletions(-)
12a457
12a457
diff --git a/glusterfs.spec.in b/glusterfs.spec.in
12a457
index 9455cb0..f5bd905 100644
12a457
--- a/glusterfs.spec.in
12a457
+++ b/glusterfs.spec.in
12a457
@@ -177,7 +177,7 @@
12a457
 
12a457
 
12a457
 ##-----------------------------------------------------------------------------
12a457
-## All package definitions should be placed here and keep them sorted
12a457
+## All package definitions should be placed here in alphabetical order
12a457
 ##
12a457
 Summary:          Distributed File System
12a457
 %if ( 0%{_for_fedora_koji_builds} )
12a457
@@ -776,7 +776,7 @@ install -D -p -m 0644 extras/glusterfs-georep-logrotate \
12a457
 
12a457
 touch %{buildroot}%{_sharedstatedir}/glusterd/glusterd.info
12a457
 touch %{buildroot}%{_sharedstatedir}/glusterd/options
12a457
-subdirs=("add-brick" "create" "copy-file" "delete" "gsync-create" "remove-brick" "reset" "set" "start" "stop")
12a457
+subdirs=(add-brick create copy-file delete gsync-create remove-brick reset set start stop)
12a457
 for dir in ${subdirs[@]}
12a457
 do
12a457
 mkdir -p %{buildroot}%{_sharedstatedir}/glusterd/hooks/1/"$dir"/{pre,post}
12a457
@@ -785,6 +785,11 @@ mkdir -p %{buildroot}%{_sharedstatedir}/glusterd/glustershd
12a457
 mkdir -p %{buildroot}%{_sharedstatedir}/glusterd/peers
12a457
 mkdir -p %{buildroot}%{_sharedstatedir}/glusterd/vols
12a457
 mkdir -p %{buildroot}%{_sharedstatedir}/glusterd/nfs/run
12a457
+mkdir -p %{buildroot}%{_sharedstatedir}/glusterd/bitd
12a457
+mkdir -p %{buildroot}%{_sharedstatedir}/glusterd/quotad
12a457
+mkdir -p %{buildroot}%{_sharedstatedir}/glusterd/scrub
12a457
+mkdir -p %{buildroot}%{_sharedstatedir}/glusterd/snaps
12a457
+mkdir -p %{buildroot}%{_sharedstatedir}/glusterd/ss_brick
12a457
 touch %{buildroot}%{_sharedstatedir}/glusterd/nfs/nfs-server.vol
12a457
 touch %{buildroot}%{_sharedstatedir}/glusterd/nfs/run/nfs.pid
12a457
 
12a457
@@ -794,6 +799,7 @@ find ./tests ./run-tests.sh -type f | cpio -pd %{buildroot}%{_prefix}/share/glus
12a457
 install -p -m 0744 -D extras/command-completion/gluster.bash \
12a457
     %{buildroot}%{_sysconfdir}/bash_completion.d/gluster
12a457
 
12a457
+mkdir -p %{buildroot}%{_sharedstatedir}/glusterd/glusterfind/.keys
12a457
 
12a457
 %clean
12a457
 rm -rf %{buildroot}
12a457
@@ -1027,9 +1033,6 @@ exit 0
12a457
 %exclude %{_libdir}/glusterfs/%{version}%{?prereltag}/xlator/nfs*
12a457
 %exclude %{_libdir}/glusterfs/%{version}%{?prereltag}/xlator/protocol/server*
12a457
 %exclude %{_libdir}/glusterfs/%{version}%{?prereltag}/xlator/storage*
12a457
-%if ( 0%{!?_without_tiering:1} )
12a457
-%exclude %{_libdir}/libgfdb.so.*
12a457
-%endif
12a457
 %exclude %{_sbindir}/gcron.py
12a457
 %exclude %{_sbindir}/glfsheal
12a457
 %exclude %{_sbindir}/glusterd
12a457
@@ -1114,12 +1117,6 @@ exit 0
12a457
 %exclude %{_includedir}/glusterfs/y.tab.h
12a457
 %exclude %{_includedir}/glusterfs/api
12a457
 %exclude %{_libdir}/libgfapi.so
12a457
-%if ( ! 0%{?_build_server} )
12a457
-%exclude %{_libdir}/libgfchangelog.so
12a457
-%endif
12a457
-%if ( 0%{!?_without_tiering:1} && ! 0%{?_build_server})
12a457
-%exclude %{_libdir}/libgfdb.so
12a457
-%endif
12a457
 %{_libdir}/*.so
12a457
 # Glupy Translator examples
12a457
 %{_libdir}/glusterfs/%{version}%{?prereltag}/xlator/features/glupy/debug-trace.*
12a457
@@ -1129,12 +1126,14 @@ exit 0
12a457
 %{_libdir}/pkgconfig/libgfchangelog.pc
12a457
 %else
12a457
 %exclude %{_libdir}/pkgconfig/libgfchangelog.pc
12a457
+%exclude %{_libdir}/libgfchangelog.so
12a457
 %endif
12a457
-%if ( 0%{!?_without_tiering:1} && 0%{?_build_server})
12a457
+%if ( 0%{!?_without_tiering:1} || 0%{?_build_server})
12a457
 %{_libdir}/pkgconfig/libgfdb.pc
12a457
 %else
12a457
 %if ( 0%{?rhel} && 0%{?rhel} >= 6 )
12a457
 %exclude %{_libdir}/pkgconfig/libgfdb.pc
12a457
+%exclude %{_libdir}/libgfdb.so
12a457
 %endif
12a457
 %endif
12a457
 
12a457
@@ -1185,8 +1184,8 @@ exit 0
12a457
 %if ( 0%{?_build_server} )
12a457
 %files ganesha
12a457
 %{_sysconfdir}/ganesha/*
12a457
-%attr(0755,-,-) %{_libexecdir}/ganesha/*
12a457
-%attr(0755,-,-) %{_prefix}/lib/ocf/resource.d/heartbeat/*
12a457
+%{_libexecdir}/ganesha/*
12a457
+%{_prefix}/lib/ocf/resource.d/heartbeat/*
12a457
 %{_sharedstatedir}/glusterd/hooks/1/start/post/S31ganesha-start.sh
12a457
 %{_sharedstatedir}/glusterd/hooks/1/reset/post/S31ganesha-reset.sh
12a457
 %endif
12a457
@@ -1195,23 +1194,29 @@ exit 0
12a457
 %if ( 0%{!?_without_georeplication:1} )
12a457
 %files geo-replication
12a457
 %config(noreplace) %{_sysconfdir}/logrotate.d/glusterfs-georep
12a457
+
12a457
+%{_sbindir}/gfind_missing_files
12a457
 %{_libexecdir}/glusterfs/gsyncd
12a457
 %{_libexecdir}/glusterfs/python/syncdaemon/*
12a457
 %{_libexecdir}/glusterfs/gverify.sh
12a457
 %{_libexecdir}/glusterfs/set_geo_rep_pem_keys.sh
12a457
 %{_libexecdir}/glusterfs/peer_gsec_create
12a457
 %{_libexecdir}/glusterfs/peer_mountbroker
12a457
-%dir %attr(0755,-,-) %{_sharedstatedir}/glusterd/geo-replication
12a457
-%{_sharedstatedir}/glusterd/hooks/1/gsync-create/post/S56glusterd-geo-rep-create-post.sh
12a457
+%{_libexecdir}/glusterfs/gfind_missing_files
12a457
+
12a457
+       %dir %attr(0755,-,-) %{_sharedstatedir}/glusterd/geo-replication
12a457
+%ghost      %attr(0644,-,-) %{_sharedstatedir}/glusterd/geo-replication/gsyncd_template.conf
12a457
+       %dir %attr(0755,-,-) %{_sharedstatedir}/glusterd/hooks/1/gsync-create
12a457
+       %dir %attr(0755,-,-) %{_sharedstatedir}/glusterd/hooks/1/gsync-create/post
12a457
+            %attr(0755,-,-) %{_sharedstatedir}/glusterd/hooks/1/gsync-create/post/S56glusterd-geo-rep-create-post.sh
12a457
+%ghost %dir %attr(0755,-,-) %{_sharedstatedir}/glusterd/hooks/1/gsync-create/pre
12a457
+
12a457
 %{_datadir}/glusterfs/scripts/get-gfid.sh
12a457
 %{_datadir}/glusterfs/scripts/slave-upgrade.sh
12a457
 %{_datadir}/glusterfs/scripts/gsync-upgrade.sh
12a457
 %{_datadir}/glusterfs/scripts/generate-gfid-file.sh
12a457
 %{_datadir}/glusterfs/scripts/gsync-sync-gfid
12a457
 %{_datadir}/glusterfs/scripts/schedule_georep.py*
12a457
-%ghost %attr(0644,-,-) %{_sharedstatedir}/glusterd/geo-replication/gsyncd_template.conf
12a457
-%{_libexecdir}/glusterfs/gfind_missing_files
12a457
-%{_sbindir}/gfind_missing_files
12a457
 %endif
12a457
 %endif
12a457
 
12a457
@@ -1252,36 +1257,17 @@ exit 0
12a457
 
12a457
 %if ( 0%{?_build_server} )
12a457
 %files server
12a457
-%exclude %{_sharedstatedir}/glusterd/hooks/1/gsync-create/post/S56glusterd-geo-rep-create-post.sh
12a457
 %doc extras/clear_xattrs.sh
12a457
-%config(noreplace) %{_sysconfdir}/sysconfig/glusterd
12a457
+# sysconf
12a457
 %config(noreplace) %{_sysconfdir}/glusterfs
12a457
-%dir %{_localstatedir}/run/gluster
12a457
-%if 0%{?_tmpfilesdir:1}
12a457
-%{_tmpfilesdir}/gluster.conf
12a457
-%endif
12a457
-%dir %{_sharedstatedir}/glusterd
12a457
-# Commented 1 line below to remove multiple references
12a457
-# to hook scripts etc.
12a457
-# %{_sharedstatedir}/glusterd/*
12a457
-%config(noreplace) %{_sharedstatedir}/glusterd/groups/virt
12a457
-# Legacy configs
12a457
-%if ( 0%{_for_fedora_koji_builds} )
12a457
-%config(noreplace) %{_sysconfdir}/sysconfig/glusterfsd
12a457
-%endif
12a457
-%{_sharedstatedir}/glusterd/hooks/1/add-brick/post/disabled-quota-root-xattr-heal.sh
12a457
-%{_sharedstatedir}/glusterd/hooks/1/add-brick/pre/S28Quota-enable-root-xattr-heal.sh
12a457
-%{_sharedstatedir}/glusterd/hooks/1/set/post/S30samba-set.sh
12a457
-%{_sharedstatedir}/glusterd/hooks/1/set/post/S32gluster_enable_shared_storage.sh
12a457
-%{_sharedstatedir}/glusterd/hooks/1/start/post/S29CTDBsetup.sh
12a457
-%{_sharedstatedir}/glusterd/hooks/1/start/post/S30samba-start.sh
12a457
-%{_sharedstatedir}/glusterd/hooks/1/stop/pre/S30samba-stop.sh
12a457
-%{_sharedstatedir}/glusterd/hooks/1/stop/pre/S29CTDB-teardown.sh
12a457
+%config(noreplace) %{_sysconfdir}/sysconfig/glusterd
12a457
+
12a457
 # init files
12a457
 %_init_glusterd
12a457
 %if ( 0%{_for_fedora_koji_builds} )
12a457
 %_init_glusterfsd
12a457
 %endif
12a457
+
12a457
 # binaries
12a457
 %{_sbindir}/glusterd
12a457
 %{_sbindir}/glfsheal
12a457
@@ -1315,26 +1301,62 @@ exit 0
12a457
 %{_sbindir}/snap_scheduler.py
12a457
 %{_sbindir}/gcron.py
12a457
 
12a457
-#hookscripts
12a457
-%dir %attr(0755,-,-) %{_sharedstatedir}/glusterd/hooks
12a457
-%dir %attr(0755,-,-) %{_sharedstatedir}/glusterd/hooks/1
12a457
-%dir %attr(0755,-,-) %{_sharedstatedir}/glusterd/hooks/1/add-brick
12a457
-%dir %attr(0755,-,-) %{_sharedstatedir}/glusterd/hooks/1/add-brick/post
12a457
-%dir %attr(0755,-,-) %{_sharedstatedir}/glusterd/hooks/1/add-brick/pre
12a457
-%dir %attr(0755,-,-) %{_sharedstatedir}/glusterd/hooks/1/delete
12a457
-%dir %attr(0755,-,-) %{_sharedstatedir}/glusterd/hooks/1/delete/post
12a457
-%dir %attr(0755,-,-) %{_sharedstatedir}/glusterd/hooks/1/reset/post
12a457
-%dir %attr(0755,-,-) %{_sharedstatedir}/glusterd/hooks/1/set
12a457
-%dir %attr(0755,-,-) %{_sharedstatedir}/glusterd/hooks/1/set/post
12a457
-%dir %attr(0755,-,-) %{_sharedstatedir}/glusterd/hooks/1/start
12a457
-%dir %attr(0755,-,-) %{_sharedstatedir}/glusterd/hooks/1/start/post
12a457
-%dir %attr(0755,-,-) %{_sharedstatedir}/glusterd/hooks/1/stop
12a457
-%dir %attr(0755,-,-) %{_sharedstatedir}/glusterd/hooks/1/stop/pre
12a457
-
12a457
-%ghost %attr(0644,-,-) %config(noreplace) %{_sharedstatedir}/glusterd/glusterd.info
12a457
-%ghost %attr(0600,-,-) %{_sharedstatedir}/glusterd/options
12a457
-%ghost %attr(0600,-,-) %{_sharedstatedir}/glusterd/nfs/nfs-server.vol
12a457
-%ghost %attr(0600,-,-) %{_sharedstatedir}/glusterd/nfs/run/nfs.pid
12a457
+# /var/lib/glusterd, e.g. hookscripts, etc.
12a457
+%ghost      %attr(0644,-,-) %config(noreplace) %{_sharedstatedir}/glusterd/glusterd.info
12a457
+       %dir %attr(0755,-,-) %{_sharedstatedir}/glusterd
12a457
+%ghost %dir %attr(0755,-,-) %{_sharedstatedir}/glusterd/bitd
12a457
+       %dir %attr(0755,-,-) %{_sharedstatedir}/glusterd/groups
12a457
+            %attr(0644,-,-) %{_sharedstatedir}/glusterd/groups/virt
12a457
+       %dir %attr(0755,-,-) %{_sharedstatedir}/glusterd/glusterfind
12a457
+       %dir %attr(0755,-,-) %{_sharedstatedir}/glusterd/glusterfind/.keys
12a457
+%ghost %dir %attr(0755,-,-) %{_sharedstatedir}/glusterd/glustershd
12a457
+       %dir %attr(0755,-,-) %{_sharedstatedir}/glusterd/hooks/1/add-brick
12a457
+       %dir %attr(0755,-,-) %{_sharedstatedir}/glusterd/hooks/1/add-brick/post
12a457
+            %attr(0755,-,-) %{_sharedstatedir}/glusterd/hooks/1/add-brick/post/disabled-quota-root-xattr-heal.sh
12a457
+            %attr(0755,-,-) %{_sharedstatedir}/glusterd/hooks/1/add-brick/pre/S28Quota-enable-root-xattr-heal.sh
12a457
+       %dir %attr(0755,-,-) %{_sharedstatedir}/glusterd/hooks/1/add-brick/pre
12a457
+%ghost %dir %attr(0755,-,-) %{_sharedstatedir}/glusterd/hooks/1/create
12a457
+%ghost %dir %attr(0755,-,-) %{_sharedstatedir}/glusterd/hooks/1/create/post
12a457
+%ghost %dir %attr(0755,-,-) %{_sharedstatedir}/glusterd/hooks/1/create/pre
12a457
+%ghost %dir %attr(0755,-,-) %{_sharedstatedir}/glusterd/hooks/1/copy-file
12a457
+%ghost %dir %attr(0755,-,-) %{_sharedstatedir}/glusterd/hooks/1/copy-file/post
12a457
+%ghost %dir %attr(0755,-,-) %{_sharedstatedir}/glusterd/hooks/1/copy-file/pre
12a457
+       %dir %attr(0755,-,-) %{_sharedstatedir}/glusterd/hooks/1/delete
12a457
+       %dir %attr(0755,-,-) %{_sharedstatedir}/glusterd/hooks/1/delete/post
12a457
+            %attr(0755,-,-) %{_sharedstatedir}/glusterd/hooks/1/delete/post/S57glusterfind-delete-post.py
12a457
+%ghost %dir %attr(0755,-,-) %{_sharedstatedir}/glusterd/hooks/1/delete/pre
12a457
+%ghost %dir %attr(0755,-,-) %{_sharedstatedir}/glusterd/hooks/1/remove-brick
12a457
+%ghost %dir %attr(0755,-,-) %{_sharedstatedir}/glusterd/hooks/1/remove-brick/post
12a457
+%ghost %dir %attr(0755,-,-) %{_sharedstatedir}/glusterd/hooks/1/remove-brick/pre
12a457
+       %dir %attr(0755,-,-) %{_sharedstatedir}/glusterd/hooks/1/reset
12a457
+       %dir %attr(0755,-,-) %{_sharedstatedir}/glusterd/hooks/1/reset/post
12a457
+%ghost %dir %attr(0755,-,-) %{_sharedstatedir}/glusterd/hooks/1/reset/pre
12a457
+       %dir %attr(0755,-,-) %{_sharedstatedir}/glusterd/hooks/1/set
12a457
+       %dir %attr(0755,-,-) %{_sharedstatedir}/glusterd/hooks/1/set/post
12a457
+            %attr(0755,-,-) %{_sharedstatedir}/glusterd/hooks/1/set/post/S30samba-set.sh
12a457
+            %attr(0755,-,-) %{_sharedstatedir}/glusterd/hooks/1/set/post/S32gluster_enable_shared_storage.sh
12a457
+%ghost %dir %attr(0755,-,-) %{_sharedstatedir}/glusterd/hooks/1/set/pre
12a457
+       %dir %attr(0755,-,-) %{_sharedstatedir}/glusterd/hooks/1/start
12a457
+       %dir %attr(0755,-,-) %{_sharedstatedir}/glusterd/hooks/1/start/post
12a457
+            %attr(0755,-,-) %{_sharedstatedir}/glusterd/hooks/1/start/post/S29CTDBsetup.sh
12a457
+            %attr(0755,-,-) %{_sharedstatedir}/glusterd/hooks/1/start/post/S30samba-start.sh
12a457
+%ghost %dir %attr(0755,-,-) %{_sharedstatedir}/glusterd/hooks/1/start/pre
12a457
+       %dir %attr(0755,-,-) %{_sharedstatedir}/glusterd/hooks/1/stop
12a457
+%ghost %dir %attr(0755,-,-) %{_sharedstatedir}/glusterd/hooks/1/stop/post
12a457
+       %dir %attr(0755,-,-) %{_sharedstatedir}/glusterd/hooks/1/stop/pre
12a457
+            %attr(0755,-,-) %{_sharedstatedir}/glusterd/hooks/1/stop/pre/S30samba-stop.sh
12a457
+            %attr(0755,-,-) %{_sharedstatedir}/glusterd/hooks/1/stop/pre/S29CTDB-teardown.sh
12a457
+%ghost %dir %attr(0755,-,-) %{_sharedstatedir}/glusterd/nfs
12a457
+%ghost      %attr(0600,-,-) %{_sharedstatedir}/glusterd/nfs/nfs-server.vol
12a457
+%ghost %dir %attr(0755,-,-) %{_sharedstatedir}/glusterd/nfs/run
12a457
+%ghost      %attr(0600,-,-) %{_sharedstatedir}/glusterd/nfs/run/nfs.pid
12a457
+%ghost      %attr(0600,-,-) %{_sharedstatedir}/glusterd/options
12a457
+%ghost %dir %attr(0755,-,-) %{_sharedstatedir}/glusterd/peers
12a457
+%ghost %dir %attr(0755,-,-) %{_sharedstatedir}/glusterd/quotad
12a457
+%ghost %dir %attr(0755,-,-) %{_sharedstatedir}/glusterd/scrub
12a457
+%ghost %dir %attr(0755,-,-) %{_sharedstatedir}/glusterd/snap
12a457
+%ghost %dir %attr(0755,-,-) %{_sharedstatedir}/glusterd/ss_bricks
12a457
+%ghost %dir %attr(0755,-,-) %{_sharedstatedir}/glusterd/vols
12a457
 
12a457
 # Extra utility script
12a457
 %{_datadir}/glusterfs/scripts/stop-all-gluster-processes.sh
12a457
@@ -1343,7 +1365,6 @@ exit 0
12a457
 %{_libexecdir}/glusterfs/glusterfind
12a457
 %{_bindir}/glusterfind
12a457
 %{_libexecdir}/glusterfs/peer_add_secret_pub
12a457
-%{_sharedstatedir}/glusterd/hooks/1/delete/post/S57glusterfind-delete-post.py
12a457
 
12a457
 %if ( 0%{?_with_firewalld:1} )
12a457
 /usr/lib/firewalld/services/glusterfs.xml
12a457
@@ -1942,8 +1963,11 @@ end
12a457
 
12a457
 
12a457
 %changelog
12a457
+* Thu May 5 2016 Kaleb S. KEITHLEY <kkeithle@redhat.com>
12a457
+- missing %files (#1324820)
12a457
+
12a457
 * Fri Apr 29 2016 Kaleb S. KEITHLEY <kkeithle@redhat.com>
12a457
-- %%pre, %%post etc. scriptlet cleanup again, (#1331844)
12a457
+- %%pre, %%post etc. scriptlet cleanup again, (#1328194)
12a457
 
12a457
 * Tue Apr 12 2016 Kaleb S. KEITHLEY <kkeithle@redhat.com>
12a457
 - pacemaker dependencies on RHEL6 (#1292034)
12a457
-- 
12a457
1.7.1
12a457