From 1fb1541133a270b4367e5cb85eb327b5ae34e97a Mon Sep 17 00:00:00 2001 From: "Kaleb S. KEITHLEY" Date: Fri, 13 Oct 2017 08:13:58 -0400 Subject: [PATCH] 3.12.2 GA --- glusterfs.spec | 119 ++++++++++++++++++++++--------------------------- sources | 2 +- 2 files changed, 54 insertions(+), 67 deletions(-) diff --git a/glusterfs.spec b/glusterfs.spec index adc0d94..53c36b3 100644 --- a/glusterfs.spec +++ b/glusterfs.spec @@ -115,40 +115,34 @@ %endif %if ( 0%{?_with_systemd:1} ) -%if ( 0%{_for_fedora_koji_builds} ) -%global _init_enable() /bin/true ; -%else -%global _init_enable() /bin/systemctl enable %1.service ; -%endif -%global _init_disable() /bin/systemctl disable %1.service ; -%global _init_restart() /bin/systemctl try-restart %1.service ; -%global _init_start() /bin/systemctl start %1.service ; -%global _init_stop() /bin/systemctl stop %1.service ; -%global _init_install() install -D -p -m 0644 %1 %{buildroot}%{_unitdir}/%2.service ; +%global service_start() /bin/systemctl --quiet start %1.service || : \ +%{nil} +%global service_stop() /bin/systemctl --quiet stop %1.service || :\ +%{nil} +%global service_install() install -D -p -m 0644 %{_sourcedir}/%1.service %{buildroot}%2 \ +%{nil} # can't seem to make a generic macro that works -%global _init_glusterd %{_unitdir}/glusterd.service -%global _init_glusterfsd %{_unitdir}/glusterfsd.service -%global _init_glustereventsd %{_unitdir}/glustereventsd.service -%global _init_glusterfssharedstorage %{_unitdir}/glusterfssharedstorage.service +%global glusterd_svcfile %{_unitdir}/glusterd.service +%global glusterfsd_svcfile %{_unitdir}/glusterfsd.service +%global glustereventsd_svcfile %{_unitdir}/glustereventsd.service +%global glusterfssharedstorage_svcfile %{_unitdir}/glusterfssharedstorage.service %else -%global _init_enable() /sbin/chkconfig --add %1 ; -%global _init_disable() /sbin/chkconfig --del %1 ; -%global _init_restart() /sbin/service %1 condrestart &>/dev/null ; -%global _init_start() /sbin/service %1 start &>/dev/null ; -%global _init_stop() /sbin/service %1 stop &>/dev/null ; -%global _init_install() install -D -p -m 0755 %1 %{buildroot}%{_sysconfdir}/init.d/%2 ; +%global systemd_post() /sbin/chkconfig --add %1 >/dev/null 2>&1 || : \ +%{nil} +%global systemd_preun() /sbin/chkconfig --del %1 >/dev/null 2>&1 || : \ +%{nil} +%global systemd_postun_with_restart() /sbin/service %1 condrestart >/dev/null 2>&1 || : \ +%{nil} +%global service_start() /sbin/service %1 start >/dev/null 2>&1 || : \ +%{nil} +%global service_stop() /sbin/service %1 stop >/dev/null 2>&1 || : \ +%{nil} +%global service_install() install -D -p -m 0755 %{_sourcedir}/%1.init %{buildroot}%2 \ +%{nil} # can't seem to make a generic macro that works -%global _init_glusterd %{_sysconfdir}/init.d/glusterd -%global _init_glusterfsd %{_sysconfdir}/init.d/glusterfsd -%global _init_glustereventsd %{_sysconfdir}/init.d/glustereventsd -%endif - -%if ( 0%{_for_fedora_koji_builds} ) -%if ( 0%{?_with_systemd:1} ) -%global glusterfsd_service glusterfsd.service -%else -%global glusterfsd_service glusterfsd.init -%endif +%global glusterd_svcfile %{_sysconfdir}/init.d/glusterd +%global glusterfsd_svcfile %{_sysconfdir}/init.d/glusterfsd +%global glustereventsd_svcfile %{_sysconfdir}/init.d/glustereventsd %endif %{!?_pkgdocdir: %global _pkgdocdir %{_docdir}/%{name}-%{version}} @@ -181,8 +175,8 @@ Summary: Distributed File System %if ( 0%{_for_fedora_koji_builds} ) Name: glusterfs -Version: 3.12.1 -Release: 2%{?prereltag:.%{prereltag}}%{?dist} +Version: 3.12.2 +Release: 1%{?prereltag:.%{prereltag}}%{?dist} %else Name: @PACKAGE_NAME@ Version: @PACKAGE_VERSION@ @@ -201,7 +195,6 @@ Source8: glusterfsd.init %else Source0: @PACKAGE_NAME@-@PACKAGE_VERSION@.tar.gz %endif -Patch0: 0001-cli_src_cli-cmd-parser.c.patch BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX) @@ -213,14 +206,6 @@ BuildRequires: python-simplejson BuildRequires: systemd %endif -%if ( 0%{_for_fedora_koji_builds} ) -%if ( 0%{?_with_systemd:1} ) -%global glusterfsd_service %{S:%{SOURCE7}} -%else -%global glusterfsd_service %{S:%{SOURCE8}} -%endif -%endif - Requires: %{name}-libs = %{version}-%{release} %if ( 0%{?_with_systemd:1} ) %{?systemd_requires} @@ -676,7 +661,6 @@ This package provides the glusterfs server daemon. %prep %setup -q -n %{name}-%{version}%{?prereltag} -%patch0 -p1 %build %if ( 0%{?rhel} && 0%{?rhel} < 6 ) @@ -783,7 +767,7 @@ sed -i 's|option working-directory /etc/glusterd|option working-directory %{_sha # Install glusterfsd .service or init.d file %if ( 0%{_for_fedora_koji_builds} ) -%_init_install %{glusterfsd_service} glusterfsd +%service_install glusterfsd %{glusterfsd_svcfile} %endif install -D -p -m 0644 extras/glusterfs-logrotate \ @@ -834,7 +818,7 @@ rm -rf %{buildroot} /sbin/ldconfig %if ( 0%{!?_without_syslog:1} ) %if ( 0%{?fedora} ) || ( 0%{?rhel} && 0%{?rhel} >= 6 ) -%_init_restart rsyslog +%systemd_postun_with_restart rsyslog %endif %endif exit 0 @@ -843,7 +827,7 @@ exit 0 %if ( 0%{!?_without_events:1} ) %post events -%_init_restart glustereventsd +%systemd_post glustereventsd exit 0 %endif @@ -856,7 +840,7 @@ exit 0 %if ( 0%{!?_without_georeplication:1} ) %post geo-replication if [ $1 -ge 1 ]; then - %_init_restart glusterd + %systemd_postun_with_restart glusterd fi exit 0 %endif @@ -867,9 +851,9 @@ exit 0 %post server # Legacy server -%_init_enable glusterd +%systemd_post glusterd %if ( 0%{_for_fedora_koji_builds} ) -%_init_enable glusterfsd +%systemd_post glusterfsd %endif # ".cmd_log_history" is renamed to "cmd_history.log" in GlusterFS-3.7 . # While upgrading glusterfs-server package form GlusterFS version <= 3.6 to @@ -927,7 +911,7 @@ if [ $? -eq 0 ]; then # glusterd _was_ running, we killed it, it exited after *.upgrade=on, # so start it again - %_init_start glusterd + %service_start glusterd else glusterd --xlator-option *.upgrade=on -N @@ -951,9 +935,9 @@ exit 0 %if ( 0%{!?_without_events:1} ) %preun events if [ $1 -eq 0 ]; then - if [ -f %_init_glustereventsd ]; then - %_init_stop glustereventsd - %_init_disable glustereventsd + if [ -f %glustereventsd_svcfile ]; then + %service_stop glustereventsd + %systemd_preun glustereventsd fi fi exit 0 @@ -961,20 +945,20 @@ exit 0 %preun server if [ $1 -eq 0 ]; then - if [ -f %_init_glusterfsd ]; then - %_init_stop glusterfsd + if [ -f %glusterfsd_svcfile ]; then + %service_stop glusterfsd fi - %_init_stop glusterd - if [ -f %_init_glusterfsd ]; then - %_init_disable glusterfsd + %service_stop glusterd + if [ -f %glusterfsd_svcfile ]; then + %systemd_preun glusterfsd fi - %_init_disable glusterd + %systemd_preun glusterd fi if [ $1 -ge 1 ]; then - if [ -f %_init_glusterfsd ]; then - %_init_restart glusterfsd + if [ -f %glusterfsd_svcfile ]; then + %systemd_postun_with_restart glusterfsd fi - %_init_restart glusterd + %systemd_postun_with_restart glusterd fi exit 0 @@ -985,7 +969,7 @@ exit 0 /sbin/ldconfig %if ( 0%{!?_without_syslog:1} ) %if ( 0%{?fedora} ) || ( 0%{?rhel} && 0%{?rhel} >= 6 ) -%_init_restart rsyslog +%systemd_postun_with_restart rsyslog %endif %endif exit 0 @@ -1247,12 +1231,12 @@ exit 0 %endif # init files -%_init_glusterd +%glusterd_svcfile %if ( 0%{_for_fedora_koji_builds} ) -%_init_glusterfsd +%glusterfsd_svcfile %endif %if ( 0%{?_with_systemd:1} ) -%_init_glusterfssharedstorage +%glusterfssharedstorage_svcfile %endif # binaries @@ -1399,6 +1383,9 @@ exit 0 %endif %changelog +* Fri Oct 13 2017 Kaleb S. KEITHLEY - 3.12.2-1 +- 3.12.2 GA + * Thu Sep 28 2017 Kaleb S. KEITHLEY - 3.12.1-2 - 3.12.1 bz 1495858 diff --git a/sources b/sources index 38fe202..bfe6b6d 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (glusterfs-3.12.1.tar.gz) = f142572ae4ad4f416e5d3e699f48d4dbb5674e0ca5c15a096a3b535fb2058a9294e3161f13a5f4e9479f630f331fc067b610dd67493345aaacd0f095c2e25b60 +SHA512 (glusterfs-3.12.2.tar.gz) = 2bcb3e9356964ea8557ea4291cf6b641122c58a3beb59c00de0acb6772b05b22c0610db4f2bde2e506e15233cfa610db415c6622933e04600ddee3cc55b01166