diff options
author | Kaleb S. KEITHLEY <kkeithle@redhat.com> | 2013-07-30 14:00:46 -0400 |
---|---|---|
committer | Vijay Bellur <vbellur@redhat.com> | 2013-08-01 03:00:11 -0700 |
commit | 03d9369ae9e69491911adbc4f16570fa1dedaa1e (patch) | |
tree | 793d0e23d303fbc413899df308a99727665a4c0e | |
parent | 1127d5143c27532c07c694a4088dbeae48a1504c (diff) |
build: sync glusterfs.spec.in with Fedora glusterfs.spec
(this is the release-3.4 branch)
* Sync with latest Fedora updates
* add glusterfs-libs RPM for RHEL6.5 oVirt/qemu-kvm, see BZ 916645
BUG: 819130
Change-Id: If5816f9b6a9478f6663c1de4d14a9f8341da9e84
Signed-off-by: Kaleb S. KEITHLEY <kkeithle@redhat.com>
Reviewed-on: http://review.gluster.org/5437
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Niels de Vos <ndevos@redhat.com>
-rw-r--r-- | glusterfs.spec.in | 103 |
1 files changed, 81 insertions, 22 deletions
diff --git a/glusterfs.spec.in b/glusterfs.spec.in index 06aaa2e3daf..feee809032e 100644 --- a/glusterfs.spec.in +++ b/glusterfs.spec.in @@ -31,6 +31,14 @@ # rpmbuild -ta @PACKAGE_NAME@-@PACKAGE_VERSION@.tar.gz --without ocf %{?_without_ocf:%global _without_ocf --without-ocf} +# if you wish to compile an rpm without the BD map support... +# rpmbuild -ta @PACKAGE_NAME@-@PACKAGE_VERSION@.tar.gz --without bd +%{?_without_bd:%global _without_bd --disable-bd-xlator} + +%if ( 0%{?rhel} && 0%{?rhel} < 6 ) +%define _without_bd true +%endif + %if ( 0%{?fedora} && 0%{?fedora} > 16 ) || ( 0%{?rhel} && 0%{?rhel} > 6 ) %global _with_systemd true %endif @@ -51,18 +59,18 @@ License: GPLv2 or LGPLv3+ Group: System Environment/Base URL: http://www.gluster.org/docs/index.php/GlusterFS %if ( 0%{_for_fedora_koji_builds} ) -Source0: http://download.gluster.org/pub/gluster/glusterfs/qa-releases/%{PACKAGE_VERSION}%{?prereltag}/glusterfs-%{version}%{?prereltag}.tar.gz +Source0: http://download.gluster.org/pub/gluster/glusterfs/3.4/%{version}%{?prereltag}/glusterfs-%{version}%{?prereltag}.tar.gz Source1: glusterd.sysconfig Source2: glusterfsd.sysconfig -Source3: umount.glusterfs -Source4: glusterfs-fuse.logrotate -Source5: glusterd.logrotate -Source6: glusterfsd.logrotate -Source7: rhel5-load-fuse-modules +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 @@ -70,6 +78,9 @@ Source0: @PACKAGE_NAME@-@PACKAGE_VERSION@.tar.gz BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX) %if ( 0%{?_with_systemd:1} ) +%if ( 0%{_for_fedora_koji_builds} ) +%global glusterfsd_service %{S:%{SOURCE11}} +%endif BuildRequires: systemd-units Requires(post): systemd-units Requires(preun): systemd-units @@ -78,10 +89,14 @@ Requires(postun): systemd-units %define _init_disable() /bin/systemctl disable %1.service ; %define _init_restart() /bin/systemctl try-restart %1.service ; %define _init_stop() /bin/systemctl stop %1.service ; +%define _init_install() %{__install} -D -p -m 0644 %1 %{buildroot}%{_unitdir}/%2.service ; # can't seem to make a generic macro that works %define _init_glusterd %{_unitdir}/glusterd.service %define _init_glusterfsd %{_unitdir}/glusterfsd.service %else +%if ( 0%{_for_fedora_koji_builds} ) +%global glusterfsd_service %{S:%{SOURCE13}} +%endif Requires(post): /sbin/chkconfig Requires(preun): /sbin/service Requires(preun): /sbin/chkconfig @@ -90,6 +105,7 @@ Requires(postun): /sbin/service %define _init_disable() /sbin/chkconfig --del %1 ; %define _init_restart() /sbin/service %1 condrestart &>/dev/null ; %define _init_stop() /sbin/service %1 stop &>/dev/null ; +%define _init_install() %{__install} -D -p -m 0755 %1 %{buildroot}%{_sysconfdir}/init.d/%2 ; # can't seem to make a generic macro that works %define _init_glusterd %{_sysconfdir}/init.d/glusterd %define _init_glusterfsd %{_sysconfdir}/init.d/glusterfsd @@ -104,8 +120,10 @@ BuildRequires: systemtap-sdt-devel BuildRequires: python-devel BuildRequires: python-ctypes %if ( 0%{?fedora} ) || ( 0%{?rhel} && 0%{?rhel} >= 6 ) +%if ( 0%{!?_without_bd:1} ) BuildRequires: lvm2-devel %endif +%endif Obsoletes: hekafs <= 0.7 Obsoletes: %{name}-libs <= 2.0.0 @@ -143,6 +161,21 @@ This package includes the glusterfs binary, the glusterfsd daemon and the gluster command line, libglusterfs and glusterfs translator modules common to both GlusterFS server and client framework. +%package libs +Summary: GlusterFS common libraries +Group: Applications/File + +%description libs +GlusterFS is a clustered file-system capable of scaling to several +petabytes. It aggregates various storage bricks over Infiniband RDMA +or TCP/IP interconnect into one large parallel network file +system. GlusterFS is one of the most sophisticated file systems in +terms of features and extensibility. It borrows a powerful concept +called Translators from GNU Hurd kernel. Much of the code in GlusterFS +is in user space and easily manageable. + +This package provides the base GlusterFS libraries + %if ( 0%{!?_without_rdma:1} ) %package rdma Summary: GlusterFS rdma support for ib-verbs @@ -208,6 +241,7 @@ Summary: Clustered file-system server License: GPLv3+ Group: System Environment/Daemons Requires: %{name} = %{version}-%{release} +Requires: %{name}-libs = %{version}-%{release} Requires: %{name}-fuse = %{version}-%{release} %if ( 0%{?fedora} ) || ( 0%{?rhel} && 0%{?rhel} >= 6 ) Requires: rpcbind @@ -316,11 +350,14 @@ This package provides the api include files. %if ( 0%{_for_fedora_koji_builds} ) #%patch0 -p0 %patch1 -p0 -F4 +%if ( "%{version}" == "3.3.1" ) +%patch2 -p1 +%endif %endif %build ./autogen.sh -%configure %{?_without_rdma} %{?_without_epoll} %{?_without_fusermount} %{?_without_georeplication} %{?_without_ocf} +%configure %{?_without_rdma} %{?_without_epoll} %{?_without_fusermount} %{?_without_georeplication} %{?_without_ocf} %{?_without_bd} # fix hardening and remove rpath in shlibs %if ( 0%{?fedora} && 0%{?fedora} > 17 ) || ( 0%{?rhel} && 0%{?rhel} > 6 ) @@ -361,7 +398,7 @@ This package provides the api include files. %if ( 0%{_for_fedora_koji_builds} ) %if ( 0%{?rhel} && 0%{?rhel} <= 5 ) -%{__install} -D -p -m 0755 %{SOURCE7} \ +%{__install} -D -p -m 0755 %{SOURCE6} \ %{buildroot}%{_sysconfdir}/sysconfig/modules/glusterfs-fuse.modules %endif %endif @@ -396,19 +433,23 @@ EOM sed -i 's|option working-directory /etc/glusterd|option working-directory %{_sharedstatedir}/glusterd|g' \ %{buildroot}%{_sysconfdir}/glusterfs/glusterd.vol +# Install glusterfsd .service or init.d file +%if ( 0%{?_with_systemd:1} ) +%if ( 0%{_for_fedora_koji_builds} ) +%_init_install %{glusterfsd_service} glusterfsd +%endif +%endif + %if ( 0%{_for_fedora_koji_builds} ) -# Install wrapper umount script -%{__install} -D -p -m 0755 %{SOURCE3} \ - %{buildroot}/sbin/umount.glusterfs # Client logrotate entry -%{__install} -D -p -m 0644 %{SOURCE4} \ +%{__install} -D -p -m 0644 %{SOURCE3} \ %{buildroot}%{_sysconfdir}/logrotate.d/glusterfs-fuse # Server logrotate entry -%{__install} -D -p -m 0644 %{SOURCE5} \ +%{__install} -D -p -m 0644 %{SOURCE4} \ %{buildroot}%{_sysconfdir}/logrotate.d/glusterd # Legacy server logrotate entry -%{__install} -D -p -m 0644 %{SOURCE6} \ +%{__install} -D -p -m 0644 %{SOURCE5} \ %{buildroot}%{_sysconfdir}/logrotate.d/glusterfsd %else %{__install} -D -p -m 0644 extras/glusterfs-logrotate \ @@ -469,11 +510,8 @@ touch %{buildroot}%{_sharedstatedir}/glusterd/nfs/run/nfs.pid %doc ChangeLog COPYING-GPLV2 COPYING-LGPLV3 INSTALL README THANKS %config(noreplace) %{_sysconfdir}/logrotate.d/* %config(noreplace) %{_sysconfdir}/sysconfig/* -%exclude %{_libdir}/libgfapi.* %{_libdir}/glusterfs -%{_libdir}/*.so.* %{_sbindir}/glusterfs* -%{_libexecdir}/glusterfs %{_mandir}/man8/*gluster*.8* %dir %{_localstatedir}/log/glusterfs %dir %{_localstatedir}/run/gluster @@ -481,6 +519,7 @@ touch %{buildroot}%{_sharedstatedir}/glusterd/nfs/run/nfs.pid %if ( 0%{!?_without_rdma:1} ) %exclude %{_libdir}/glusterfs/%{version}%{?prereltag}/rpc-transport/rdma* %endif +# server-side, etc., xlators in other RPMs %exclude %{_libdir}/glusterfs/%{version}%{?prereltag}/xlator/mount/api* %exclude %{_libdir}/glusterfs/%{version}%{?prereltag}/xlator/mount/fuse* %exclude %{_libdir}/glusterfs/%{version}%{?prereltag}/xlator/storage* @@ -488,7 +527,20 @@ touch %{buildroot}%{_sharedstatedir}/glusterd/nfs/run/nfs.pid %exclude %{_libdir}/glusterfs/%{version}%{?prereltag}/xlator/protocol/server* %exclude %{_libdir}/glusterfs/%{version}%{?prereltag}/xlator/mgmt* %exclude %{_libdir}/glusterfs/%{version}%{?prereltag}/xlator/nfs* +# sample xlators not generally used or usable +%exclude %{_libdir}/glusterfs/%{version}%{?prereltag}/xlator/encryption/rot-13* +%exclude %{_libdir}/glusterfs/%{version}%{?prereltag}/xlator/features/mac-compat* +%exclude %{_libdir}/glusterfs/%{version}%{?prereltag}/xlator/testing/performance/symlink-cache* + +%post libs +/sbin/ldconfig +%postun libs +/sbin/ldconfig + +%files libs +%{_libdir}/*.so.* +%exclude %{_libdir}/libgfapi.* %if ( 0%{!?_without_rdma:1} ) %files rdma @@ -518,9 +570,6 @@ fi %endif %{_libdir}/glusterfs/%{version}%{?prereltag}/xlator/mount/fuse* /sbin/mount.glusterfs -%if ( 0%{_for_fedora_koji_builds} ) -/sbin/umount.glusterfs -%endif %if ( 0%{!?_without_fusermount:1} ) %{_bindir}/fusermount-glusterfs %endif @@ -556,6 +605,7 @@ fi %{_libdir}/glusterfs/%{version}%{?prereltag}/xlator/protocol/server* %{_libdir}/glusterfs/%{version}%{?prereltag}/xlator/mgmt* %{_libdir}/glusterfs/%{version}%{?prereltag}/xlator/nfs* +%config(noreplace) %{_sharedstatedir}/glusterd/glusterd.info %ghost %attr(0644,-,-) %{_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 an @@ -593,6 +643,12 @@ fi %ghost %dir %attr(0755,-,-) %{_sharedstatedir}/glusterd/nfs/run %ghost %attr(0600,-,-) %{_sharedstatedir}/glusterd/nfs/run/nfs.pid +%post api +/sbin/ldconfig + +%postun api +/sbin/ldconfig + %files api %exclude %{_libdir}/*.so %{_libdir}/libgfapi.* @@ -682,8 +738,11 @@ if [ $1 -ge 1 ]; then fi %changelog +* Tue Jul 30 2013 Kaleb S. KEITHLEY <kkeithle@redhat.com> +- Sync with Fedora glusterfs.spec, add glusterfs-libs RPM for oVirt/qemu-kvm + * Thu Jun 27 2013 Kaleb S. KEITHLEY <kkeithle@redhat.com> -- fix the hardening fix for shlibs, use %{__sed} macro, shorter ChangeLog +- fix the hardening fix for shlibs, use %%{__sed} macro, shorter ChangeLog * Wed Jun 26 2013 Niels de Vos <ndevos@redhat.com> - move the mount/api xlator to glusterfs-api @@ -925,7 +984,7 @@ fi * Wed Nov 21 2007 Matthias Saou <http://freshrpms.net/> 1.3.7-1 - Major spec file cleanup. -- Add misssing %%clean section. +- Add missing %%clean section. - Fix ldconfig calls (weren't set for the proper sub-package). * Sat Aug 4 2007 Matt Paine <matt@mattsoftware.com> - 1.3.pre7 |