diff options
author | Niels de Vos <ndevos@redhat.com> | 2015-12-23 13:57:14 +0100 |
---|---|---|
committer | Kaleb KEITHLEY <kkeithle@redhat.com> | 2015-12-26 09:31:24 -0800 |
commit | 7ab8a1a3f4510a284b1686302624ec4252c95a6f (patch) | |
tree | 70537e0ec4e3889635baa05a39b60b590802ac57 /glusterfs.spec.in | |
parent | 618f130ed0e653566db34878b36a2db34dcd6723 (diff) |
build: use 'make install' to install the hook scripts
The installation should be the same on all distributions, and doing
manual installation of files in the .spec is very ugly. This change adds
the rules so that 'make install' places the hook scripts in the right
location.
Also, the hook script(s) for NFS-Ganesha should be part of the
glusterfs-ganesha sub-package and got moved there.
BUG: 1174765
Change-Id: Iba25a7a5112c7d40db4c10ff4a5ac7a5fb4f7c4e
Signed-off-by: Niels de Vos <ndevos@redhat.com>
Reviewed-on: http://review.gluster.org/13072
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com>
Diffstat (limited to 'glusterfs.spec.in')
-rw-r--r-- | glusterfs.spec.in | 65 |
1 files changed, 24 insertions, 41 deletions
diff --git a/glusterfs.spec.in b/glusterfs.spec.in index 6b68d0e922a..4dc485220fa 100644 --- a/glusterfs.spec.in +++ b/glusterfs.spec.in @@ -740,21 +740,12 @@ mkdir -p %{buildroot}%{_sharedstatedir}/glusterd/hooks mkdir -p %{buildroot}%{_sharedstatedir}/glusterd/hooks/1 mkdir -p %{buildroot}%{_sharedstatedir}/glusterd/hooks/1/stop mkdir -p %{buildroot}%{_sharedstatedir}/glusterd/hooks/1/stop/post -mkdir -p %{buildroot}%{_sharedstatedir}/glusterd/hooks/1/stop/pre mkdir -p %{buildroot}%{_sharedstatedir}/glusterd/hooks/1/start -mkdir -p %{buildroot}%{_sharedstatedir}/glusterd/hooks/1/start/post mkdir -p %{buildroot}%{_sharedstatedir}/glusterd/hooks/1/start/pre -mkdir -p %{buildroot}%{_sharedstatedir}/glusterd/hooks/1/reset -mkdir -p %{buildroot}%{_sharedstatedir}/glusterd/hooks/1/reset/post -mkdir -p %{buildroot}%{_sharedstatedir}/glusterd/hooks/1/reset/pre mkdir -p %{buildroot}%{_sharedstatedir}/glusterd/hooks/1/remove-brick mkdir -p %{buildroot}%{_sharedstatedir}/glusterd/hooks/1/remove-brick/post mkdir -p %{buildroot}%{_sharedstatedir}/glusterd/hooks/1/remove-brick/pre -mkdir -p %{buildroot}%{_sharedstatedir}/glusterd/hooks/1/add-brick -mkdir -p %{buildroot}%{_sharedstatedir}/glusterd/hooks/1/add-brick/post -mkdir -p %{buildroot}%{_sharedstatedir}/glusterd/hooks/1/add-brick/pre mkdir -p %{buildroot}%{_sharedstatedir}/glusterd/hooks/1/set -mkdir -p %{buildroot}%{_sharedstatedir}/glusterd/hooks/1/set/post mkdir -p %{buildroot}%{_sharedstatedir}/glusterd/hooks/1/set/pre mkdir -p %{buildroot}%{_sharedstatedir}/glusterd/hooks/1/create mkdir -p %{buildroot}%{_sharedstatedir}/glusterd/hooks/1/create/post @@ -775,20 +766,6 @@ mkdir -p %{buildroot}%{_sharedstatedir}/glusterd/nfs/run touch %{buildroot}%{_sharedstatedir}/glusterd/nfs/nfs-server.vol touch %{buildroot}%{_sharedstatedir}/glusterd/nfs/run/nfs.pid -%{__install} -p -m 0744 extras/hook-scripts/start/post/*.sh \ - %{buildroot}%{_sharedstatedir}/glusterd/hooks/1/start/post -%{__install} -p -m 0744 extras/hook-scripts/stop/pre/*.sh \ - %{buildroot}%{_sharedstatedir}/glusterd/hooks/1/stop/pre -%{__install} -p -m 0744 extras/hook-scripts/set/post/*.sh \ - %{buildroot}%{_sharedstatedir}/glusterd/hooks/1/set/post -%{__install} -p -m 0744 extras/hook-scripts/add-brick/post/*.sh \ - %{buildroot}%{_sharedstatedir}/glusterd/hooks/1/add-brick/post -%{__install} -p -m 0744 extras/hook-scripts/add-brick/pre/*.sh \ - %{buildroot}%{_sharedstatedir}/glusterd/hooks/1/add-brick/pre -%{__install} -p -m 0744 extras/hook-scripts/reset/post/*.sh \ - %{buildroot}%{_sharedstatedir}/glusterd/hooks/1/reset/post - - find ./tests ./run-tests.sh -type f | cpio -pd %{buildroot}%{_prefix}/share/glusterfs ## Install bash completion for cli @@ -1080,6 +1057,8 @@ fi %{_sysconfdir}/ganesha/* %attr(0755,-,-) %{_libexecdir}/ganesha/* %attr(0755,-,-) %{_prefix}/lib/ocf/resource.d/heartbeat/* +%{_sharedstatedir}/glusterd/hooks/1/start/post/S31ganesha-start.sh +%{_sharedstatedir}/glusterd/hooks/1/reset/post/S31ganesha-reset.sh %if ( 0%{!?_without_georeplication:1} ) %files geo-replication @@ -1150,16 +1129,14 @@ fi %if ( 0%{_for_fedora_koji_builds} ) %config(noreplace) %{_sysconfdir}/sysconfig/glusterfsd %endif -%config %{_sharedstatedir}/glusterd/hooks/1/add-brick/post/disabled-quota-root-xattr-heal.sh -%config %{_sharedstatedir}/glusterd/hooks/1/add-brick/pre/S28Quota-enable-root-xattr-heal.sh -%config %{_sharedstatedir}/glusterd/hooks/1/set/post/S30samba-set.sh -%config %{_sharedstatedir}/glusterd/hooks/1/set/post/S32gluster_enable_shared_storage.sh -%config %{_sharedstatedir}/glusterd/hooks/1/start/post/S29CTDBsetup.sh -%config %{_sharedstatedir}/glusterd/hooks/1/start/post/S30samba-start.sh -%config %{_sharedstatedir}/glusterd/hooks/1/start/post/S31ganesha-start.sh -%config %{_sharedstatedir}/glusterd/hooks/1/stop/pre/S30samba-stop.sh -%config %{_sharedstatedir}/glusterd/hooks/1/stop/pre/S29CTDB-teardown.sh -%config %{_sharedstatedir}/glusterd/hooks/1/reset/post/S31ganesha-reset.sh +%{_sharedstatedir}/glusterd/hooks/1/add-brick/post/disabled-quota-root-xattr-heal.sh +%{_sharedstatedir}/glusterd/hooks/1/add-brick/pre/S28Quota-enable-root-xattr-heal.sh +%{_sharedstatedir}/glusterd/hooks/1/set/post/S30samba-set.sh +%{_sharedstatedir}/glusterd/hooks/1/set/post/S32gluster_enable_shared_storage.sh +%{_sharedstatedir}/glusterd/hooks/1/start/post/S29CTDBsetup.sh +%{_sharedstatedir}/glusterd/hooks/1/start/post/S30samba-start.sh +%{_sharedstatedir}/glusterd/hooks/1/stop/pre/S30samba-stop.sh +%{_sharedstatedir}/glusterd/hooks/1/stop/pre/S29CTDB-teardown.sh # init files %_init_glusterd %if ( 0%{_for_fedora_koji_builds} ) @@ -1204,30 +1181,32 @@ fi %dir %attr(0755,-,-) %{_sharedstatedir}/glusterd/hooks/1/add-brick %dir %attr(0755,-,-) %{_sharedstatedir}/glusterd/hooks/1/add-brick/post %dir %attr(0755,-,-) %{_sharedstatedir}/glusterd/hooks/1/add-brick/pre +%dir %attr(0755,-,-) %{_sharedstatedir}/glusterd/hooks/1/delete +%dir %attr(0755,-,-) %{_sharedstatedir}/glusterd/hooks/1/delete/post +%dir %attr(0755,-,-) %{_sharedstatedir}/glusterd/hooks/1/reset/post %dir %attr(0755,-,-) %{_sharedstatedir}/glusterd/hooks/1/set %dir %attr(0755,-,-) %{_sharedstatedir}/glusterd/hooks/1/set/post %dir %attr(0755,-,-) %{_sharedstatedir}/glusterd/hooks/1/start %dir %attr(0755,-,-) %{_sharedstatedir}/glusterd/hooks/1/start/post %dir %attr(0755,-,-) %{_sharedstatedir}/glusterd/hooks/1/stop %dir %attr(0755,-,-) %{_sharedstatedir}/glusterd/hooks/1/stop/pre -%dir %attr(0755,-,-) %{_sharedstatedir}/glusterd/hooks/1/delete -%dir %attr(0755,-,-) %{_sharedstatedir}/glusterd/hooks/1/delete/post %ghost %attr(0644,-,-) %config(noreplace) %{_sharedstatedir}/glusterd/glusterd.info %ghost %attr(0600,-,-) %{_sharedstatedir}/glusterd/options # This is really ugly, but I have no idea how to mark these directories in # any other way. They should belong to the glusterfs-server package, but # don't exist after installation. They are generated on the first start... -%ghost %dir %attr(0755,-,-) %{_sharedstatedir}/glusterd/hooks/1/stop/post -%ghost %dir %attr(0755,-,-) %{_sharedstatedir}/glusterd/hooks/1/start/pre -%ghost %dir %attr(0755,-,-) %{_sharedstatedir}/glusterd/hooks/1/remove-brick -%ghost %dir %attr(0755,-,-) %{_sharedstatedir}/glusterd/hooks/1/remove-brick/post -%ghost %dir %attr(0755,-,-) %{_sharedstatedir}/glusterd/hooks/1/remove-brick/pre -%ghost %dir %attr(0755,-,-) %{_sharedstatedir}/glusterd/hooks/1/set/pre %ghost %dir %attr(0755,-,-) %{_sharedstatedir}/glusterd/hooks/1/create %ghost %dir %attr(0755,-,-) %{_sharedstatedir}/glusterd/hooks/1/create/post %ghost %dir %attr(0755,-,-) %{_sharedstatedir}/glusterd/hooks/1/create/pre %ghost %dir %attr(0755,-,-) %{_sharedstatedir}/glusterd/hooks/1/delete/pre +%ghost %dir %attr(0755,-,-) %{_sharedstatedir}/glusterd/hooks/1/remove-brick +%ghost %dir %attr(0755,-,-) %{_sharedstatedir}/glusterd/hooks/1/remove-brick/post +%ghost %dir %attr(0755,-,-) %{_sharedstatedir}/glusterd/hooks/1/remove-brick/pre +%ghost %dir %attr(0755,-,-) %{_sharedstatedir}/glusterd/hooks/1/reset/pre +%ghost %dir %attr(0755,-,-) %{_sharedstatedir}/glusterd/hooks/1/set/pre +%ghost %dir %attr(0755,-,-) %{_sharedstatedir}/glusterd/hooks/1/start/pre +%ghost %dir %attr(0755,-,-) %{_sharedstatedir}/glusterd/hooks/1/stop/post %ghost %dir %attr(0755,-,-) %{_sharedstatedir}/glusterd/glustershd %ghost %dir %attr(0755,-,-) %{_sharedstatedir}/glusterd/vols %ghost %dir %attr(0755,-,-) %{_sharedstatedir}/glusterd/peers @@ -1251,6 +1230,10 @@ fi %changelog +* Tue Dec 22 2015 Niels de Vos <ndevos@redhat.com> +- move hook scripts for nfs-ganesha to the -ganesha sub-package +- use standard 'make' installation for the hook scripts (#1174765) + * Tue Sep 1 2015 Kaleb S. KEITHLEY <kkeithle@redhat.com> - erroneous ghost of ../hooks/1/delete causes install failure (#1258975) |