Merge remote-tracking branch 'origin/master' into el5

glusterfs-3.4.0-3, sync with gluster glusterfs.spec.in and esp.
glusterd.service w/o Wants=glusterfsd.service
This commit is contained in:
Kaleb S. KEITHLEY 2013-07-25 00:21:34 -04:00
commit da09a37542

View File

@ -39,6 +39,10 @@
ExcludeArch: ppc
%endif
%if ( 0%{?fedora} && 0%{?fedora} > 16 ) || ( 0%{?rhel} && 0%{?rhel} > 6 )
%global _with_systemd true
%endif
%if ( 0%{?fedora} ) || ( 0%{?rhel} && 0%{?rhel} >= 6 )
%global SWIFTVER 1.8.0
%if ( 0%{_for_fedora_koji_builds} )
@ -51,48 +55,40 @@ ExcludeArch: ppc
%endif
%endif
%if ( 0%{?fedora} && 0%{?fedora} > 16 ) || ( 0%{?rhel} && 0%{?rhel} > 6 )
%global _with_systemd true
%endif
Summary: Cluster File System
%if ( 0%{_for_fedora_koji_builds} )
Name: glusterfs
Version: 3.4.0
Release: 2%{?prereltag:.%{prereltag}}%{?dist}
Release: 3%{?prereltag:.%{prereltag}}%{?dist}
Vendor: Fedora Project
%else
Name: @PACKAGE_NAME@
Version: @PACKAGE_VERSION@
Release: 1%{?dist}
Vendor: glusterfs.org
%endif
License: GPLv2 or LGPLv3+
Group: System Environment/Base
%if ( 0%{_for_fedora_koji_builds} )
Vendor: Red Hat
%endif
URL: http://www.gluster.org//docs/index.php/GlusterFS
%if ( 0%{_for_fedora_koji_builds} )
Source0: http://download.gluster.org/pub/gluster/glusterfs/3.4/%{version}%{?prereltag}/glusterfs-%{version}%{?prereltag}.tar.gz
%else
Source0: @PACKAGE_NAME@-@PACKAGE_VERSION@.tar.gz
%endif
Source1: glusterd.sysconfig
Source2: glusterfsd.sysconfig
Source3: glusterfs-fuse.logrotate
Source4: glusterd.logrotate
Source5: glusterfsd.logrotate
Source6: rhel5-load-fuse-modules
Source11: glusterfsd.service
Source13: glusterfsd.init
Patch0: %{name}-3.2.5.configure.ac.patch
Patch1: %{name}-3.3.0.libglusterfs.Makefile.patch
Patch2: %{name}-3.3.1.rpc.rpcxprt.rdma.name.c.patch
%else
Source0: @PACKAGE_NAME@-@PACKAGE_VERSION@.tar.gz
%endif
BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)
Source10: glusterd.service
Source11: glusterfsd.service
Source12: glusterd.init
Source13: glusterfsd.init
%if ( ! ( 0%{?rhel} && 0%{?rhel} < 6 ) )
# we don't build swift/ufo on rhel5
# not including the sources is ugly, but we state our intentions clearly
@ -158,8 +154,9 @@ Patch23: glusterfs-3.4.0.swift.egginfo-grizzly.patch
Patch24: 0002-Add-fixes-for-building-the-doc-package.patch.180
%if ( 0%{?_with_systemd:1} )
%global glusterd_service %{S:%{SOURCE10}}
%if ( 0%{_for_fedora_koji_builds} )
%global glusterfsd_service %{S:%{SOURCE11}}
%endif
BuildRequires: systemd-units
Requires(post): systemd-units
Requires(preun): systemd-units
@ -178,7 +175,6 @@ Requires(postun): systemd-units
%define _init_gluster_swift_proxy %{_unitdir}/gluster-swift-proxy.service
%else
%if ( 0%{_for_fedora_koji_builds} )
%global glusterd_service %{S:%{SOURCE12}}
%global glusterfsd_service %{S:%{SOURCE13}}
%endif
Requires(post): /sbin/chkconfig
@ -221,8 +217,6 @@ Provides: %{name}-core = %{version}-%{release}
# We do not want to generate useless provides and requires for xlator .so files
# Filter all generated:
# - .so requires that do not start with 'lib'
# - all provides from xlators and private libraries not in the ldconfig path
#
# TODO: RHEL5 does not have a convenient solution
%if ( 0%{?rhel} == 6 )
@ -311,7 +305,7 @@ This package provides support to FUSE based clients.
%package server
Summary: Clustered file-system server
License: GPLv3+
License: GPLv2 or GPLv3+
Group: System Environment/Daemons
Requires: %{name} = %{version}-%{release}
Requires: %{name}-fuse = %{version}-%{release}
@ -334,7 +328,7 @@ This package provides the glusterfs server daemon.
%package api
Summary: Clustered file-system api library
License: GPLv3+
License: GPLv2 or GPLv3+
Group: System Environment/Daemons
Requires: %{name} = %{version}-%{release}
@ -687,15 +681,13 @@ cd ..
%{__install} -D -p -m 0644 extras/glusterd-sysconfig \
%{buildroot}%{_sysconfdir}/sysconfig/glusterd
%endif
# We'll use our init.d
%if ( 0%{?_with_systemd:1} )
%{__rm} -f %{buildroot}%{_sysconfdir}/init.d/glusterd
%endif
%if ( 0%{_for_fedora_koji_builds} )
%if ( 0%{?rhel} && 0%{?rhel} <= 5 )
%{__install} -D -p -m 0755 %{SOURCE6} \
%{buildroot}%{_sysconfdir}/sysconfig/modules/glusterfs-fuse.modules
%endif
%endif
%{__mkdir_p} %{buildroot}%{_localstatedir}/log/glusterd
%{__mkdir_p} %{buildroot}%{_localstatedir}/log/glusterfs
@ -727,9 +719,8 @@ EOM
sed -i 's|option working-directory /etc/glusterd|option working-directory %{_sharedstatedir}/glusterd|g' \
%{buildroot}%{_sysconfdir}/glusterfs/glusterd.vol
# Install systemd .service files. `make install` will install the init files
# Install glusterfsd .service or init.d file
%if ( 0%{?_with_systemd:1} ) || ( 0%{_for_fedora_koji_builds} )
%_init_install %{glusterd_service} glusterd
%_init_install %{glusterfsd_service} glusterfsd
%endif
@ -885,6 +876,7 @@ cp ufo/bin/gluster-swift-gen-builders %{buildroot}%{_bindir}/
%endif
# Remove tests
%{__rm} -rf %{buildroot}/%{python_sitelib}/test
%clean
%{__rm} -rf %{buildroot}
@ -951,9 +943,11 @@ fi
%if ( ! 0%{?_without_fusermount:1} )
%{_bindir}/fusermount-glusterfs
%endif
%if ( 0%{_for_fedora_koji_builds} )
%if ( 0%{?rhel} && 0%{?rhel} <= 5 )
%{_sysconfdir}/sysconfig/modules/glusterfs-fuse.modules
%endif
%endif
%files server
%defattr(-,root,root,-)
@ -1447,6 +1441,13 @@ fi
%endif
%changelog
* Thu Jul 25 2013 Kaleb S. KEITHLEY <kkeithle[at]redhat.com> - 3.4.0-3
- sync changes from upstream glusterfs.spec.in, and esp. glusterd.service
from gluster w/o Wants=glusterfsd.service
* Thu Jul 18 2013 Kaleb S. KEITHLEY <kkeithle[at]redhat.com>
- sync changes from upstream glusterfs.spec.in, ready for next build
* Tue Jul 16 2013 Kaleb S. KEITHLEY <kkeithle[at]redhat.com> - 3.4.0-2
- tag /var/lib/glusterd/glusterd.info as %config