diff --git a/glusterfs.spec b/glusterfs.spec index 471c082..f204578 100644 --- a/glusterfs.spec +++ b/glusterfs.spec @@ -1,51 +1,58 @@ %global _hardened_build 1 +%if ( 0%{?fedora} && 0%{?fedora} > 27 ) +%undefine _strict_symbol_defs_build +%endif + %global _for_fedora_koji_builds 1 # uncomment and add '%' to use the prereltag for pre-releases -# %%global prereltag rc1 +%global prereltag rc1 ##----------------------------------------------------------------------------- ## All argument definitions should be placed here and keep them sorted ## -# if you wish to compile an rpm with debugging... -# rpmbuild -ta @PACKAGE_NAME@-@PACKAGE_VERSION@.tar.gz --with debug -%{?_with_debug:%global _with_debug --enable-debug} - -# if you wish to compile an rpm to run all processes under valgrind... -# rpmbuild -ta @PACKAGE_NAME@-@PACKAGE_VERSION@.tar.gz --with valgrind -%{?_with_valgrind:%global _with_valgrind --enable-valgrind} +# bd +# 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 you wish to compile an rpm with IPv6 default... -# rpmbuild -ta @PACKAGE_NAME@-@PACKAGE_VERSION@.tar.gz --with ipv6default -%{?_with_ipv6default:%global _with_ipv6default --with-ipv6default} +%if ( 0%{?rhel} && 0%{?rhel} < 6 || 0%{?sles_version} ) +%global _without_bd --disable-bd-xlator +%endif +# cmocka # if you wish to compile an rpm with cmocka unit testing... # rpmbuild -ta @PACKAGE_NAME@-@PACKAGE_VERSION@.tar.gz --with cmocka %{?_with_cmocka:%global _with_cmocka --enable-cmocka} -# if you wish to compile an rpm without rdma support, compile like this... -# rpmbuild -ta @PACKAGE_NAME@-@PACKAGE_VERSION@.tar.gz --without rdma -%{?_without_rdma:%global _without_rdma --disable-ibverbs} - -# No RDMA Support on s390(x) -%ifarch s390 s390x %{arm} -%global _without_rdma --disable-ibverbs -%endif +# debug +# if you wish to compile an rpm with debugging... +# rpmbuild -ta @PACKAGE_NAME@-@PACKAGE_VERSION@.tar.gz --with debug +%{?_with_debug:%global _with_debug --enable-debug} +# epoll # if you wish to compile an rpm without epoll... # rpmbuild -ta @PACKAGE_NAME@-@PACKAGE_VERSION@.tar.gz --without epoll %{?_without_epoll:%global _without_epoll --disable-epoll} +# fusermount # if you wish to compile an rpm without fusermount... # rpmbuild -ta @PACKAGE_NAME@-@PACKAGE_VERSION@.tar.gz --without fusermount %{?_without_fusermount:%global _without_fusermount --disable-fusermount} +# geo-rep # if you wish to compile an rpm without geo-replication support, compile like this... # rpmbuild -ta @PACKAGE_NAME@-@PACKAGE_VERSION@.tar.gz --without georeplication %{?_without_georeplication:%global _without_georeplication --disable-georeplication} +# Disable geo-replication on EL5, as its default Python is too old +%if ( 0%{?rhel} && 0%{?rhel} < 6 ) +%global _without_georeplication --disable-georeplication +%endif + +# gnfs # if you wish to compile an rpm with the legacy gNFS server xlator # rpmbuild -ta @PACKAGE_NAME@-@PACKAGE_VERSION@.tar.gz --with gnfs %{?_with_gnfs:%global _with_gnfs --enable-gnfs} @@ -54,15 +61,48 @@ %global _with_gnfs --enable-gnfs %endif -# Disable geo-replication on EL5, as its default Python is too old -%if ( 0%{?rhel} && 0%{?rhel} < 6 ) -%global _without_georeplication --disable-georeplication +# ipv6default +# if you wish to compile an rpm with IPv6 default... +# rpmbuild -ta @PACKAGE_NAME@-@PACKAGE_VERSION@.tar.gz --with ipv6default +%{?_with_ipv6default:%global _with_ipv6default --with-ipv6default} + +# libtirpc +# if you wish to compile an rpm without TIRPC (i.e. use legacy glibc rpc) +# rpmbuild -ta @PACKAGE_NAME@-@PACKAGE_VERSION@.tar.gz --without libtirpc +%{?_without_libtirpc:%global _without_libtirpc --without-libtirpc} + +# Do not use libtirpc on EL6, it does not have xdr_uint64_t() and xdr_uint32_t +# Do not use libtirpc on EL7, it does not have xdr_sizeof() +%if ( 0%{?rhel} && 0%{?rhel} <= 7 ) +%global _without_libtirpc --without-libtirpc %endif +# ocf # if you wish to compile an rpm without the OCF resource agents... # rpmbuild -ta @PACKAGE_NAME@-@PACKAGE_VERSION@.tar.gz --without ocf %{?_without_ocf:%global _without_ocf --without-ocf} +#rdma +# if you wish to compile an rpm without rdma support, compile like this... +# rpmbuild -ta @PACKAGE_NAME@-@PACKAGE_VERSION@.tar.gz --without rdma +%{?_without_rdma:%global _without_rdma --disable-ibverbs} + +# No RDMA Support on s390(x) +%ifarch s390 s390x %{arm} +%global _without_rdma --disable-ibverbs +%endif + +# server +# if you wish to build rpms without server components, compile like this +# rpmbuild -ta @PACKAGE_NAME@-@PACKAGE_VERSION@.tar.gz --without server +%{?_without_server:%global _without_server --without-server} + +# disable server components forcefully as rhel <= 6 +%if ( 0%{?rhel} && 0%{?rhel} <= 6 ) +%global _without_server --without-server +%endif + +# syslog # if you wish to build rpms without syslog logging, compile like this # rpmbuild -ta @PACKAGE_NAME@-@PACKAGE_VERSION@.tar.gz --without syslog %{?_without_syslog:%global _without_syslog --disable-syslog} @@ -71,40 +111,34 @@ # Fedora deprecated syslog, see # https://fedoraproject.org/wiki/Changes/NoDefaultSyslog # (And what about RHEL7?) -%if ( 0%{?fedora} && 0%{?fedora} >= 20 ) || ( 0%{?rhel} && 0%{?rhel} < 7 ) +%if ( ( 0%{?fedora} && 0%{?fedora} >= 20 ) || ( 0%{?rhel} && 0%{?rhel} < 7 ) ) %global _without_syslog --disable-syslog %endif -# 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 || 0%{?sles_version} ) -%global _without_bd --disable-bd-xlator -%endif - +# tier # Disable data-tiering on EL5, sqlite is too old %if ( 0%{?rhel} && 0%{?rhel} < 6 ) %global _without_tiering --disable-tiering %endif -%if ( 0%{?fedora} && 0%{?fedora} > 27 ) -%global _with_libtirpc --with-libtirpc -%endif +# valgrind +# if you wish to compile an rpm to run all processes under valgrind... +# rpmbuild -ta @PACKAGE_NAME@-@PACKAGE_VERSION@.tar.gz --with valgrind +%{?_with_valgrind:%global _with_valgrind --enable-valgrind} ##----------------------------------------------------------------------------- ## All %%global definitions should be placed here and keep them sorted ## -%if ( 0%{?fedora} ) || ( 0%{?rhel} && 0%{?rhel} > 6 ) +%if ( 0%{?fedora} || ( 0%{?rhel} && 0%{?rhel} > 6 ) ) %global _with_systemd true %endif -%if ( 0%{?fedora} ) || ( 0%{?rhel} && 0%{?rhel} > 6 ) +%if ( 0%{?fedora} || ( 0%{?rhel} && 0%{?rhel} > 6 ) ) %global _with_firewalld --enable-firewalld %endif -%if 0%{?_tmpfilesdir:1} +%if ( 0%{?_tmpfilesdir:1} ) %global _with_tmpfilesdir --with-tmpfilesdir=%{_tmpfilesdir} %else %global _with_tmpfilesdir --without-tmpfilesdir @@ -115,6 +149,14 @@ %global _without_events --disable-events %endif +# without server should also disable some server-only components +%if ( 0%{?_without_server:1} ) +%global _without_events --disable-events +%global _without_georeplication --disable-georeplication +%global _with_gnfs %{nil} +%global _without_tiering --disable-tiering +%endif + # From https://fedoraproject.org/wiki/Packaging:Python#Macros %if ( 0%{?rhel} && 0%{?rhel} < 7 ) %{!?python2_sitelib: %global python2_sitelib %(python -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")} @@ -183,17 +225,17 @@ Summary: Distributed File System %if ( 0%{_for_fedora_koji_builds} ) Name: glusterfs -Version: 3.13.2 -Release: %{?prereltag:0.}2%{?prereltag:.%{prereltag}}%{?dist} +Version: 4.0.0 +Release: %{?prereltag:0.}1%{?prereltag:.%{prereltag}}%{?dist} %else Name: @PACKAGE_NAME@ Version: @PACKAGE_VERSION@ -Release: 0.@PACKAGE_RELEASE@%{?dist}.6 +Release: 0.@PACKAGE_RELEASE@%{?dist}.5 %endif License: GPLv2 or LGPLv3+ URL: http://docs.gluster.org/ %if ( 0%{_for_fedora_koji_builds} ) -Source0: http://bits.gluster.org/pub/gluster/%{name}/src/%{name}-%{version}%{?prereltag}.tar.gz +Source0: http://download.gluster.org/pub/gluster/%{name}/qa-releases/%{version}%{?prereltag}/%{name}-%{version}%{prereltag}.tar.gz Source1: glusterd.sysconfig Source2: glusterfsd.sysconfig Source6: rhel5-load-fuse-modules @@ -202,8 +244,8 @@ Source8: glusterfsd.init %else Source0: @PACKAGE_NAME@-@PACKAGE_VERSION@.tar.gz %endif -Patch0: 0001-libtirpc.patch +BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX) Requires(pre): shadow-utils %if ( 0%{?rhel} && 0%{?rhel} < 6 ) @@ -226,7 +268,7 @@ BuildRequires: python2-devel %if ( 0%{?rhel} && 0%{?rhel} <= 7 ) BuildRequires: python-ctypes %endif -%if ( 0%{?fedora} && 0%{?fedora} > 27 ) || ( 0%{?_with_ipv6default:1} ) +%if ( 0%{?_with_ipv6default:1} || 0%{!?_without_libtirpc:1} ) BuildRequires: libtirpc-devel %endif %if ( 0%{?fedora} && 0%{?fedora} > 27 ) @@ -254,7 +296,7 @@ BuildRequires: lvm2-devel BuildRequires: libattr-devel %endif -%if (0%{?_with_firewalld:1}) +%if ( 0%{?_with_firewalld:1} ) BuildRequires: firewalld %endif @@ -315,6 +357,7 @@ is in user space and easily manageable. This package provides the api include files. +%if ( 0%{!?_without_server:1} ) %package cli Summary: GlusterFS CLI Requires: %{name}-libs = %{version}-%{release} @@ -329,6 +372,7 @@ called Translators from GNU Hurd kernel. Much of the code in GlusterFS is in user space and easily manageable. This package provides the GlusterFS CLI application and its man page +%endif %package client-xlators Summary: GlusterFS client-side translators @@ -370,10 +414,8 @@ Requires: python2 python-prettytable Requires: python2-gluster = %{version}-%{release} %if ( 0%{?rhel} ) Requires: python-requests -Requires: python-jwt %else Requires: python2-requests -Requires: python2-jwt %endif %if ( 0%{?rhel} && 0%{?rhel} < 7 ) Requires: python-argparse @@ -595,6 +637,7 @@ Open Cluster Framework (OCF) compliant cluster resource managers, like Pacemaker. %endif +%if ( 0%{!?_without_server:1} ) %package server Summary: Distributed file-system server Requires: %{name} = %{version}-%{release} @@ -602,9 +645,6 @@ Requires: %{name}-libs = %{version}-%{release} Requires: %{name}-cli = %{version}-%{release} # some daemons (like quota) use a fuse-mount, glusterfsd is part of -fuse Requires: %{name}-fuse = %{version}-%{release} -%if ( 0%{?_with_ipv6default:1} ) -Requires: libtirpc -%endif # self-heal daemon, rebalance, nfs-server etc. are actually clients Requires: %{name}-api = %{version}-%{release} Requires: %{name}-client-xlators = %{version}-%{release} @@ -657,11 +697,11 @@ called Translators from GNU Hurd kernel. Much of the code in GlusterFS is in user space and easily manageable. This package provides the glusterfs server daemon. +%endif %prep %setup -q -n %{name}-%{version}%{?prereltag} -%patch0 -p1 %build %if ( 0%{?rhel} && 0%{?rhel} < 6 ) @@ -685,9 +725,10 @@ sed -i -e 's/--quiet//' configure.ac %{?_without_ocf} \ %{?_without_rdma} \ %{?_without_syslog} \ + %{?_without_server} \ %{?_without_tiering} \ %{?_with_ipv6default} \ - %{?_with_libtirpc} + %{?_without_libtirpc} # fix hardening and remove rpath in shlibs %if ( 0%{?fedora} ) || ( 0%{?rhel} && 0%{?rhel} > 6 ) @@ -713,9 +754,11 @@ install -D -p -m 0644 %{SOURCE1} \ install -D -p -m 0644 %{SOURCE2} \ %{buildroot}%{_sysconfdir}/sysconfig/glusterfsd %else +%if ( 0%{!?_without_server:1} ) install -D -p -m 0644 extras/glusterd-sysconfig \ %{buildroot}%{_sysconfdir}/sysconfig/glusterd %endif +%endif %if ( 0%{_for_fedora_koji_builds} ) %if ( 0%{?rhel} && 0%{?rhel} < 6 ) @@ -762,12 +805,14 @@ rm -f %{buildroot}%{_defaultdocdir}/%{name}/glusterfs-mode.el rm -f %{buildroot}%{_defaultdocdir}/%{name}/glusterfs.vim %endif +%if ( 0%{!?_without_server:1} ) # Create working directory mkdir -p %{buildroot}%{_sharedstatedir}/glusterd # Update configuration file to /var/lib working directory sed -i 's|option working-directory /etc/glusterd|option working-directory %{_sharedstatedir}/glusterd|g' \ %{buildroot}%{_sysconfdir}/glusterfs/glusterd.vol +%endif # Install glusterfsd .service or init.d file %if ( 0%{_for_fedora_koji_builds} ) @@ -785,6 +830,7 @@ install -D -p -m 0644 extras/glusterfs-georep-logrotate \ %{buildroot}%{_sysconfdir}/logrotate.d/glusterfs-georep %endif +%if ( 0%{!?_without_server:1} ) # the rest of the ghosts touch %{buildroot}%{_sharedstatedir}/glusterd/glusterd.info touch %{buildroot}%{_sharedstatedir}/glusterd/options @@ -803,19 +849,26 @@ mkdir -p %{buildroot}%{_sharedstatedir}/glusterd/snaps mkdir -p %{buildroot}%{_sharedstatedir}/glusterd/ss_brick touch %{buildroot}%{_sharedstatedir}/glusterd/nfs/nfs-server.vol touch %{buildroot}%{_sharedstatedir}/glusterd/nfs/run/nfs.pid +%endif %if ( ! 0%{_for_fedora_koji_builds} ) find ./tests ./run-tests.sh -type f | cpio -pd %{buildroot}%{_prefix}/share/glusterfs %endif +%if ( 0%{!?_without_server:1} ) ## Install bash completion for cli install -p -m 0755 -D extras/command-completion/gluster.bash \ %{buildroot}%{_sysconfdir}/bash_completion.d/gluster +%endif + +%clean +rm -rf %{buildroot} ##----------------------------------------------------------------------------- ## All %%post should be placed here and keep them sorted ## %post +/sbin/ldconfig %if ( 0%{!?_without_syslog:1} ) %if ( 0%{?fedora} ) || ( 0%{?rhel} && 0%{?rhel} >= 6 ) %systemd_postun_with_restart rsyslog @@ -823,6 +876,8 @@ install -p -m 0755 -D extras/command-completion/gluster.bash \ %endif exit 0 +%post api -p /sbin/ldconfig + %if ( 0%{!?_without_events:1} ) %post events %systemd_post glustereventsd @@ -843,6 +898,11 @@ fi exit 0 %endif +%post libs +/sbin/ldconfig +exit 0 + +%if ( 0%{!?_without_server:1} ) %post server # Legacy server %systemd_post glusterd @@ -885,6 +945,7 @@ fi # BZ 834847 if [ -e /etc/ld.so.conf.d/glusterfs.conf ]; then rm -f /etc/ld.so.conf.d/glusterfs.conf + /sbin/ldconfig fi %if (0%{?_with_firewalld:1}) @@ -913,6 +974,7 @@ else rm -f %{_rundir}/glusterd.socket fi exit 0 +%endif ##----------------------------------------------------------------------------- ## All %%pre should be placed here and keep them sorted @@ -936,6 +998,7 @@ fi exit 0 %endif +%if ( 0%{!?_without_server:1} ) %preun server if [ $1 -eq 0 ]; then if [ -f %glusterfsd_svcfile ]; then @@ -954,11 +1017,13 @@ if [ $1 -ge 1 ]; then %systemd_postun_with_restart glusterd fi exit 0 +%endif ##----------------------------------------------------------------------------- ## All %%postun should be placed here and keep them sorted ## %postun +/sbin/ldconfig %if ( 0%{!?_without_syslog:1} ) %if ( 0%{?fedora} ) || ( 0%{?rhel} && 0%{?rhel} >= 6 ) %systemd_postun_with_restart rsyslog @@ -966,11 +1031,22 @@ exit 0 %endif exit 0 +%postun api +/sbin/ldconfig +exit 0 + +%postun libs +/sbin/ldconfig +exit 0 + +%if ( 0%{!?_without_server:1} ) %postun server +/sbin/ldconfig %if (0%{?_with_firewalld:1}) %firewalld_reload %endif exit 0 +%endif ##----------------------------------------------------------------------------- ## All %%files should be placed here and keep them sorted by groups @@ -979,16 +1055,20 @@ exit 0 %{!?_licensedir:%global license %%doc} %license COPYING-GPLV2 COPYING-LGPLV3 %doc ChangeLog INSTALL README.md THANKS +%if ( 0%{!?_without_server:1} ) %{_mandir}/man8/*gluster*.8* +%endif %exclude %{_mandir}/man8/gluster.8* %dir %{_localstatedir}/log/glusterfs %if ( 0%{!?_without_rdma:1} ) %exclude %{_libdir}/glusterfs/%{version}%{?prereltag}/rpc-transport/rdma* %endif +%if ( 0%{!?_without_server:1} ) %dir %{_datadir}/glusterfs %dir %{_datadir}/glusterfs/scripts %{_datadir}/glusterfs/scripts/post-upgrade-script-for-quota.sh %{_datadir}/glusterfs/scripts/pre-upgrade-script-for-quota.sh +%endif # xlators that are needed on the client- and on the server-side %dir %{_libdir}/glusterfs %dir %{_libdir}/glusterfs/%{version}%{?prereltag} @@ -1034,7 +1114,7 @@ exit 0 %dir %{_libdir}/glusterfs/%{version}%{?prereltag}/xlator/system %{_libdir}/glusterfs/%{version}%{?prereltag}/xlator/system/posix-acl.so %dir %attr(0775,gluster,gluster) %{_rundir}/gluster -%if 0%{?_tmpfilesdir:1} +%if 0%{?_tmpfilesdir:1} && 0%{!?_without_server:1} %{_tmpfilesdir}/gluster.conf %endif @@ -1052,10 +1132,12 @@ exit 0 %dir %{_includedir}/glusterfs/api %{_includedir}/glusterfs/api/* +%if ( 0%{!?_without_server:1} ) %files cli %{_sbindir}/gluster %{_mandir}/man8/gluster.8* %{_sysconfdir}/bash_completion.d/gluster +%endif %files client-xlators %dir %{_libdir}/glusterfs/%{version}%{?prereltag}/xlator/cluster @@ -1114,7 +1196,7 @@ exit 0 %endif %endif -%if ( 0%{?_with_gnfs:1} ) +%if ( 0%{?_with_gnfs:1} && 0%{!?_without_server:1} ) %files gnfs %dir %{_libdir}/glusterfs/%{version}%{?prereltag}/xlator/nfs %{_libdir}/glusterfs/%{version}%{?prereltag}/xlator/nfs/* @@ -1199,6 +1281,7 @@ exit 0 %{_prefix}/lib/ocf/resource.d/glusterfs %endif +%if ( 0%{!?_without_server:1} ) %files server %doc extras/clear_xattrs.sh # sysconf @@ -1239,6 +1322,7 @@ exit 0 %{_libdir}/glusterfs/%{version}%{?prereltag}/xlator/features/arbiter.so %{_libdir}/glusterfs/%{version}%{?prereltag}/xlator/features/bit-rot.so %{_libdir}/glusterfs/%{version}%{?prereltag}/xlator/features/bitrot-stub.so + %{_libdir}/glusterfs/%{version}%{?prereltag}/xlator/features/sdfs.so %if ( 0%{!?_without_tiering:1} ) %{_libdir}/glusterfs/%{version}%{?prereltag}/xlator/features/changetimerecorder.so %{_libdir}/libgfdb.so.* @@ -1334,6 +1418,8 @@ exit 0 %{_datadir}/glusterfs/scripts/stop-all-gluster-processes.sh %if ( 0%{?_with_systemd:1} ) %{_libexecdir}/glusterfs/mount-shared-storage.sh + %{_datadir}/glusterfs/scripts/control-cpu-load.sh + %{_datadir}/glusterfs/scripts/control-mem.sh %endif # Incrementalapi @@ -1345,6 +1431,7 @@ exit 0 %if ( 0%{?_with_firewalld:1} ) %{_prefix}/lib/firewalld/services/glusterfs.xml %endif +%endif # Events %if ( 0%{!?_without_events:1} ) @@ -1367,11 +1454,11 @@ exit 0 %endif %changelog -* Thu Feb 15 2018 Kaleb S. KEITHLEY - 3.13.2-2 -- shared lib scriptlets, ldconfig +* Tue Feb 27 2018 Kaleb S. KEITHLEY - 4.0.0rc1-1 +- 4.0.0 RC1 -* Wed Feb 07 2018 Fedora Release Engineering - 3.13.2-1.1 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild +* Fri Feb 2 2018 Kaleb S. KEITHLEY - 4.0.0rc0-1 +- 4.0.0 RC0 * Sat Jan 20 2018 Kaleb S. KEITHLEY - 3.13.2-1 - 3.13.2 GA diff --git a/sources b/sources index fd2ca38..d42037c 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (glusterfs-3.13.2.tar.gz) = 5c89390805b8c5cb3b1eed91300e239a3772a076c2ee1c14332688b509cb396e7ef5772d0b45905807515798bcaeef26c806017bdcdbb0efc83048c07b772d81 +SHA512 (glusterfs-4.0.0rc1.tar.gz) = afba232d8d4c7ce3932f64463bd41d902c97dea48bd6b2fc6dd52d2e35d69233adbada2e564f91752e25370d92e4a6de74bc3f6883a9133dfed8545d57ff0a06