summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNiels de Vos <ndevos@redhat.com>2018-01-31 16:38:34 +0100
committerShyamsundarR <srangana@redhat.com>2018-02-21 13:08:14 -0500
commit4c0c5ecb6ba3f16aa56987916a7682eaed211a37 (patch)
treeca84a3954008a2172ceda7a7b79eef40a9d414d7
parent9b2995426ea206df9a4d8f14bbdb8e8baf73d91b (diff)
build: add --without-server option
With Gluster 4.0 we will not provide the server components for EL6 and older. At one point Gluster 4.x will get GlusterD2, which requires Golang tools in the distribution. EL6 does not contain these at the moment. With this change, it is possible to `./configure --without-server` which prevents building glusterd and the xlators for the bricks. Building RPMs can pass `--without server` and the glusterfs-server sub-package will not be created. Change-Id: I97f5ccf9f2c76e60d9af83915fc59fae57ad6d25 BUG: 1547635 Signed-off-by: Niels de Vos <ndevos@redhat.com>
-rw-r--r--cli/src/Makefile.am2
-rw-r--r--configure.ac22
-rw-r--r--doc/Makefile.am5
-rw-r--r--events/src/Makefile.am2
-rw-r--r--extras/Makefile.am26
-rw-r--r--extras/firewalld/Makefile.am2
-rw-r--r--extras/hook-scripts/add-brick/post/Makefile.am2
-rw-r--r--extras/hook-scripts/add-brick/pre/Makefile.am2
-rw-r--r--extras/hook-scripts/create/post/Makefile.am2
-rw-r--r--extras/hook-scripts/delete/pre/Makefile.am2
-rw-r--r--extras/hook-scripts/set/post/Makefile.am2
-rw-r--r--extras/hook-scripts/start/post/Makefile.am2
-rw-r--r--extras/hook-scripts/stop/pre/Makefile.am2
-rw-r--r--extras/init.d/Makefile.am3
-rw-r--r--extras/snap_scheduler/Makefile.am2
-rw-r--r--extras/systemd/Makefile.am2
-rw-r--r--glusterfs.spec.in54
-rw-r--r--glusterfsd/src/Makefile.am9
-rw-r--r--heal/src/Makefile.am2
-rw-r--r--tools/gfind_missing_files/Makefile.am6
-rw-r--r--tools/glusterfind/Makefile.am6
-rw-r--r--tools/glusterfind/src/Makefile.am2
-rw-r--r--tools/setgfid2path/src/Makefile.am2
-rw-r--r--xlators/features/arbiter/src/Makefile.am3
-rw-r--r--xlators/features/bit-rot/src/bitd/Makefile.am2
-rw-r--r--xlators/features/bit-rot/src/stub/Makefile.am2
-rw-r--r--xlators/features/index/src/Makefile.am2
-rw-r--r--xlators/features/leases/src/Makefile.am2
-rw-r--r--xlators/features/locks/src/Makefile.am4
-rw-r--r--xlators/features/marker/src/Makefile.am2
-rw-r--r--xlators/features/quota/src/Makefile.am2
-rw-r--r--xlators/features/sdfs/src/Makefile.am2
-rw-r--r--xlators/features/selinux/src/Makefile.am3
-rw-r--r--xlators/features/snapview-server/src/Makefile.am2
-rw-r--r--xlators/features/trash/src/Makefile.am2
-rw-r--r--xlators/features/upcall/src/Makefile.am2
-rw-r--r--xlators/mgmt/glusterd/src/Makefile.am5
-rw-r--r--xlators/nfs/server/src/Makefile.am3
-rw-r--r--xlators/performance/decompounder/src/Makefile.am2
-rw-r--r--xlators/protocol/server/src/Makefile.am3
-rw-r--r--xlators/storage/posix/src/Makefile.am3
41 files changed, 186 insertions, 21 deletions
diff --git a/cli/src/Makefile.am b/cli/src/Makefile.am
index 5ef9389..c6323e5 100644
--- a/cli/src/Makefile.am
+++ b/cli/src/Makefile.am
@@ -1,4 +1,6 @@
+if WITH_SERVER
sbin_PROGRAMS = gluster
+endif
gluster_SOURCES = cli.c registry.c input.c cli-cmd.c cli-rl.c cli-cmd-global.c \
cli-cmd-volume.c cli-cmd-peer.c cli-rpc-ops.c cli-cmd-parser.c\
diff --git a/configure.ac b/configure.ac
index 0173f8e..1d78ddc 100644
--- a/configure.ac
+++ b/configure.ac
@@ -402,6 +402,13 @@ AC_ARG_WITH([ocf],
)
AC_SUBST(OCF_SUBDIR)
+AC_ARG_WITH([server],
+ [AS_HELP_STRING([--without-server], [do not build server components])],
+ [with_server='no'],
+ [with_server='yes'],
+ )
+AM_CONDITIONAL([WITH_SERVER], [test x$with_server = xyes])
+
# LEX needs a check
AC_PROG_LEX
if test "x${LEX}" != "xflex" -a "x${FLEX}" != "xlex"; then
@@ -615,7 +622,7 @@ fi
AC_ARG_ENABLE([bd-xlator],
AC_HELP_STRING([--enable-bd-xlator], [Build BD xlator]))
-if test "x$enable_bd_xlator" != "xno"; then
+if test "x${with_server}" = "xyes" -a "x$enable_bd_xlator" != "xno"; then
AC_CHECK_LIB([lvm2app],
[lvm_init,lvm_lv_from_name],
[HAVE_BD_LIB="yes"],
@@ -777,7 +784,7 @@ case $host_os in
;;
esac
SYNCDAEMON_COMPILE=0
-if test "x$enable_georeplication" != "xno"; then
+if test "x${with_server}" = "xyes" -a "x$enable_georeplication" != "xno"; then
SYNCDAEMON_SUBDIR=geo-replication
SYNCDAEMON_COMPILE=1
@@ -803,7 +810,7 @@ AC_SUBST(SYNCDAEMON_SUBDIR)
# end SYNCDAEMON section
# only install scripts from extras/geo-rep when enabled
-if test "x$enable_georeplication" != "xno"; then
+if test "x${with_server}" = "xyes" -a "x$enable_georeplication" != "xno"; then
GEOREP_EXTRAS_SUBDIR=geo-rep
fi
AC_SUBST(GEOREP_EXTRAS_SUBDIR)
@@ -863,7 +870,7 @@ AC_ARG_ENABLE([firewalld],
[enable installation configuration for firewalld]),
[BUILD_FIREWALLD="${enableval}"], [BUILD_FIREWALLD="no"])
-if test "x${BUILD_FIREWALLD}" = "xyes"; then
+if test "x${with_server}" = "xyes" -a "x${BUILD_FIREWALLD}" = "xyes"; then
if !(test -d /usr/lib/firewalld/services 1>/dev/null 2>&1) ; then
BUILD_FIREWALLD="no (firewalld not installed)"
fi
@@ -896,8 +903,8 @@ esac
AC_SUBST(SQLITE_CFLAGS)
AC_SUBST(SQLITE_LIBS)
-AM_CONDITIONAL(BUILD_GFDB, test "x${BUILD_GFDB}" = "xyes")
-AM_CONDITIONAL(USE_GFDB, test "x${BUILD_GFDB}" = "xyes")
+AM_CONDITIONAL(BUILD_GFDB, test "x${with_server}" = "xyes" -a "x${BUILD_GFDB}" = "xyes")
+AM_CONDITIONAL(USE_GFDB, test "x${with_server}" = "xyes" -a "x${BUILD_GFDB}" = "xyes")
# xml-output
AC_ARG_ENABLE([xml-output],
@@ -1403,7 +1410,7 @@ BUILD_GNFS="no"
AC_ARG_ENABLE([gnfs],
AC_HELP_STRING([--enable-gnfs],
[Enable legacy gnfs server xlator.]))
-if test "x$enable_gnfs" = "xyes"; then
+if test "x${with_server}" = "xyes" -a "x$enable_gnfs" = "xyes"; then
BUILD_GNFS="yes"
fi
AM_CONDITIONAL([BUILD_GNFS], [test x$BUILD_GNFS = xyes])
@@ -1643,6 +1650,7 @@ echo "Events : $BUILD_EVENTS"
echo "EC dynamic support : $EC_DYNAMIC_SUPPORT"
echo "Use memory pools : $USE_MEMPOOL"
echo "Nanosecond m/atimes : $BUILD_NANOSECOND_TIMESTAMPS"
+echo "Server components : $with_server"
echo "Legacy gNFS server : $BUILD_GNFS"
echo "IPV6 default : $with_ipv6_default"
echo "Use TIRPC : $with_libtirpc"
diff --git a/doc/Makefile.am b/doc/Makefile.am
index 1103b60..7c04d74 100644
--- a/doc/Makefile.am
+++ b/doc/Makefile.am
@@ -1,6 +1,9 @@
EXTRA_DIST = glusterfs.8 mount.glusterfs.8 gluster.8 \
glusterd.8 glusterfsd.8
-man8_MANS = glusterfs.8 mount.glusterfs.8 gluster.8 glusterd.8 glusterfsd.8
+man8_MANS = glusterfs.8 mount.glusterfs.8
+if WITH_SERVER
+man8_MANS += gluster.8 glusterd.8 glusterfsd.8
+endif
CLEANFILES =
diff --git a/events/src/Makefile.am b/events/src/Makefile.am
index 4308ccd..4e83a46 100644
--- a/events/src/Makefile.am
+++ b/events/src/Makefile.am
@@ -6,8 +6,10 @@ BUILT_SOURCES = eventtypes.py
CLEANFILES = eventtypes.py
eventsdir = $(GLUSTERFS_LIBEXECDIR)/events
+if BUILD_EVENTS
events_PYTHON = __init__.py gf_event.py eventsapiconf.py eventtypes.py \
utils.py
+endif
# this does not work, see the Makefile.am in the root for a workaround
#nodist_events_PYTHON = eventtypes.py
diff --git a/extras/Makefile.am b/extras/Makefile.am
index b220e15..e827dde 100644
--- a/extras/Makefile.am
+++ b/extras/Makefile.am
@@ -1,8 +1,11 @@
addonexecdir = $(GLUSTERFS_LIBEXECDIR)
-addonexec_SCRIPTS = peer_add_secret_pub
+addonexec_SCRIPTS =
+if WITH_SERVER
+addonexec_SCRIPTS += peer_add_secret_pub
if USE_SYSTEMD
addonexec_SCRIPTS += mount-shared-storage.sh
endif
+endif
EditorModedir = $(docdir)
EditorMode_DATA = glusterfs-mode.el glusterfs.vim
@@ -11,27 +14,39 @@ SUBDIRS = init.d systemd benchmarking hook-scripts $(OCF_SUBDIR) LinuxRPM \
$(GEOREP_EXTRAS_SUBDIR) snap_scheduler firewalld cliutils
confdir = $(sysconfdir)/glusterfs
+if WITH_SERVER
conf_DATA = glusterfs-logrotate gluster-rsyslog-7.2.conf gluster-rsyslog-5.8.conf \
logger.conf.example glusterfs-georep-logrotate group-virt.example group-metadata-cache group-gluster-block group-nl-cache
+endif
voldir = $(sysconfdir)/glusterfs
+if WITH_SERVER
vol_DATA = glusterd.vol
+endif
+
scriptsdir = $(datadir)/glusterfs/scripts
-scripts_SCRIPTS = post-upgrade-script-for-quota.sh \
+scripts_SCRIPTS =
+if WITH_SERVER
+scripts_SCRIPTS += post-upgrade-script-for-quota.sh \
pre-upgrade-script-for-quota.sh stop-all-gluster-processes.sh
if USE_SYSTEMD
scripts_SCRIPTS += control-cpu-load.sh
scripts_SCRIPTS += control-mem.sh
endif
+endif
-EXTRA_DIST = $(conf_DATA) specgen.scm glusterfs-mode.el glusterfs.vim \
- migrate-unify-to-distribute.sh backend-xattr-sanitize.sh backend-cleanup.sh \
- disk_usage_sync.sh clear_xattrs.sh glusterd-sysconfig glusterd.vol \
+EXTRA_DIST = glusterfs-logrotate gluster-rsyslog-7.2.conf gluster-rsyslog-5.8.conf \
+ logger.conf.example glusterfs-georep-logrotate group-virt.example \
+ group-metadata-cache group-gluster-block group-nl-cache specgen.scm \
+ glusterfs-mode.el glusterfs.vim migrate-unify-to-distribute.sh \
+ backend-xattr-sanitize.sh backend-cleanup.sh disk_usage_sync.sh \
+ clear_xattrs.sh glusterd-sysconfig glusterd.vol \
post-upgrade-script-for-quota.sh pre-upgrade-script-for-quota.sh \
command-completion/gluster.bash command-completion/Makefile \
command-completion/README stop-all-gluster-processes.sh clang-checker.sh \
mount-shared-storage.sh control-cpu-load.sh control-mem.sh
+if WITH_SERVER
install-data-local:
if [ -n "$(tmpfilesdir)" ]; then \
$(mkdir_p) $(DESTDIR)$(tmpfilesdir); \
@@ -47,3 +62,4 @@ install-data-local:
$(DESTDIR)$(GLUSTERD_WORKDIR)/groups/gluster-block
$(INSTALL_DATA) $(top_srcdir)/extras/group-nl-cache \
$(DESTDIR)$(GLUSTERD_WORKDIR)/groups/nl-cache
+endif
diff --git a/extras/firewalld/Makefile.am b/extras/firewalld/Makefile.am
index a5c11b0..530881f 100644
--- a/extras/firewalld/Makefile.am
+++ b/extras/firewalld/Makefile.am
@@ -1,6 +1,8 @@
EXTRA_DIST = glusterfs.xml
if USE_FIREWALLD
+if WITH_SERVER
staticdir = /usr/lib/firewalld/services/
static_DATA = glusterfs.xml
endif
+endif
diff --git a/extras/hook-scripts/add-brick/post/Makefile.am b/extras/hook-scripts/add-brick/post/Makefile.am
index 5ca5a66..c1fcf50 100644
--- a/extras/hook-scripts/add-brick/post/Makefile.am
+++ b/extras/hook-scripts/add-brick/post/Makefile.am
@@ -1,4 +1,6 @@
EXTRA_DIST = disabled-quota-root-xattr-heal.sh
hookdir = $(GLUSTERD_WORKDIR)/hooks/1/add-brick/post/
+if WITH_SERVER
hook_SCRIPTS = disabled-quota-root-xattr-heal.sh
+endif
diff --git a/extras/hook-scripts/add-brick/pre/Makefile.am b/extras/hook-scripts/add-brick/pre/Makefile.am
index 6329ad1..3288581 100644
--- a/extras/hook-scripts/add-brick/pre/Makefile.am
+++ b/extras/hook-scripts/add-brick/pre/Makefile.am
@@ -1,4 +1,6 @@
EXTRA_DIST = S28Quota-enable-root-xattr-heal.sh
hookdir = $(GLUSTERD_WORKDIR)/hooks/1/add-brick/pre/
+if WITH_SERVER
hook_SCRIPTS = S28Quota-enable-root-xattr-heal.sh
+endif
diff --git a/extras/hook-scripts/create/post/Makefile.am b/extras/hook-scripts/create/post/Makefile.am
index adbce78..fd1892e 100644
--- a/extras/hook-scripts/create/post/Makefile.am
+++ b/extras/hook-scripts/create/post/Makefile.am
@@ -1,6 +1,8 @@
EXTRA_DIST = S10selinux-label-brick.sh
scriptsdir = $(GLUSTERD_WORKDIR)/hooks/1/create/post/
+if WITH_SERVER
if USE_SELINUX
scripts_SCRIPTS = S10selinux-label-brick.sh
endif
+endif
diff --git a/extras/hook-scripts/delete/pre/Makefile.am b/extras/hook-scripts/delete/pre/Makefile.am
index bf0eabe..4fbfbe7 100644
--- a/extras/hook-scripts/delete/pre/Makefile.am
+++ b/extras/hook-scripts/delete/pre/Makefile.am
@@ -1,6 +1,8 @@
EXTRA_DIST = S10selinux-del-fcontext.sh
scriptsdir = $(GLUSTERD_WORKDIR)/hooks/1/delete/pre/
+if WITH_SERVER
if USE_SELINUX
scripts_SCRIPTS = S10selinux-del-fcontext.sh
endif
+endif
diff --git a/extras/hook-scripts/set/post/Makefile.am b/extras/hook-scripts/set/post/Makefile.am
index cea579c..506a25a 100644
--- a/extras/hook-scripts/set/post/Makefile.am
+++ b/extras/hook-scripts/set/post/Makefile.am
@@ -1,4 +1,6 @@
EXTRA_DIST = S30samba-set.sh S32gluster_enable_shared_storage.sh
hookdir = $(GLUSTERD_WORKDIR)/hooks/1/set/post/
+if WITH_SERVER
hook_SCRIPTS = $(EXTRA_DIST)
+endif
diff --git a/extras/hook-scripts/start/post/Makefile.am b/extras/hook-scripts/start/post/Makefile.am
index 384a582..e32546d 100644
--- a/extras/hook-scripts/start/post/Makefile.am
+++ b/extras/hook-scripts/start/post/Makefile.am
@@ -1,4 +1,6 @@
EXTRA_DIST = S29CTDBsetup.sh S30samba-start.sh
hookdir = $(GLUSTERD_WORKDIR)/hooks/1/start/post/
+if WITH_SERVER
hook_SCRIPTS = $(EXTRA_DIST)
+endif
diff --git a/extras/hook-scripts/stop/pre/Makefile.am b/extras/hook-scripts/stop/pre/Makefile.am
index bf63e73..9e8d156 100644
--- a/extras/hook-scripts/stop/pre/Makefile.am
+++ b/extras/hook-scripts/stop/pre/Makefile.am
@@ -1,4 +1,6 @@
EXTRA_DIST = S29CTDB-teardown.sh S30samba-stop.sh
hookdir = $(GLUSTERD_WORKDIR)/hooks/1/stop/pre/
+if WITH_SERVER
hook_SCRIPTS = $(EXTRA_DIST)
+endif
diff --git a/extras/init.d/Makefile.am b/extras/init.d/Makefile.am
index a9ac3b4..25f9145 100644
--- a/extras/init.d/Makefile.am
+++ b/extras/init.d/Makefile.am
@@ -10,11 +10,12 @@ SYSTEMD_DIR = @systemddir@
LAUNCHD_DIR = @launchddir@
$(GF_DISTRIBUTION):
+if WITH_SERVER
@if [ ! -d $(SYSTEMD_DIR) ]; then \
$(mkdir_p) $(DESTDIR)$(INIT_DIR); \
$(INSTALL_PROGRAM) glusterd-$(GF_DISTRIBUTION) $(DESTDIR)$(INIT_DIR)/glusterd; \
fi
-
+endif
if BUILD_EVENTS
@if [ ! -d $(SYSTEMD_DIR) ]; then \
$(mkdir_p) $(DESTDIR)$(INIT_DIR); \
diff --git a/extras/snap_scheduler/Makefile.am b/extras/snap_scheduler/Makefile.am
index ffc1579..782f139 100644
--- a/extras/snap_scheduler/Makefile.am
+++ b/extras/snap_scheduler/Makefile.am
@@ -1,6 +1,8 @@
snap_schedulerdir = $(sbindir)/
+if WITH_SERVER
snap_scheduler_SCRIPTS = gcron.py snap_scheduler.py conf.py
+endif
EXTRA_DIST = gcron.py snap_scheduler.py conf.py
diff --git a/extras/systemd/Makefile.am b/extras/systemd/Makefile.am
index 3988b40..d4a3d0b 100644
--- a/extras/systemd/Makefile.am
+++ b/extras/systemd/Makefile.am
@@ -1,6 +1,7 @@
CLEANFILES = glusterd.service glustereventsd.service glusterfssharedstorage.service
EXTRA_DIST = glusterd.service.in glustereventsd.service.in glusterfssharedstorage.service.in
+if WITH_SERVER
if USE_SYSTEMD
# systemddir is already defined through configure.ac
systemd_DATA = glusterd.service glusterfssharedstorage.service
@@ -9,3 +10,4 @@ if BUILD_EVENTS
systemd_DATA += glustereventsd.service
endif
endif
+endif
diff --git a/glusterfs.spec.in b/glusterfs.spec.in
index b6aa44b..d5395d2 100644
--- a/glusterfs.spec.in
+++ b/glusterfs.spec.in
@@ -85,6 +85,16 @@
%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
@@ -132,6 +142,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} <= 6 )
%{!?python2_sitelib: %global python2_sitelib %(python2 -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")}
@@ -332,6 +350,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
Group: Applications/File
@@ -347,6 +366,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 devel
Summary: Development Libraries
@@ -580,6 +600,7 @@ Open Cluster Framework (OCF) compliant cluster resource managers,
like Pacemaker.
%endif
+%if ( 0%{!?_without_server:1} )
%package server
Summary: Clustered file-system server
Group: System Environment/Daemons
@@ -639,6 +660,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 server daemon.
+%endif
%package client-xlators
Summary: GlusterFS client-side translators
@@ -707,6 +729,7 @@ export CFLAGS
%{?_without_georeplication} \
%{?_without_ocf} \
%{?_without_rdma} \
+ %{?_without_server} \
%{?_without_syslog} \
%{?_without_tiering} \
%{?_with_ipv6default} \
@@ -736,9 +759,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} <= 5 )
@@ -785,12 +810,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} )
@@ -808,6 +835,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
@@ -826,12 +854,15 @@ 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
find ./tests ./run-tests.sh -type f | cpio -pd %{buildroot}%{_prefix}/share/glusterfs
## Install bash completion for cli
+%if ( 0%{!?_without_server:1} )
install -p -m 0744 -D extras/command-completion/gluster.bash \
%{buildroot}%{_sysconfdir}/bash_completion.d/gluster
+%endif
%clean
rm -rf %{buildroot}
@@ -873,6 +904,7 @@ exit 0
%post libs
/sbin/ldconfig
+%if ( 0%{!?_without_server:1} )
%post server
# Legacy server
%systemd_post glusterd
@@ -944,6 +976,7 @@ else
rm -f %{_rundir}/glusterd.socket
fi
exit 0
+%endif
##-----------------------------------------------------------------------------
## All %%pre should be placed here and keep them sorted
@@ -967,6 +1000,7 @@ fi
exit 0
%endif
+%if ( 0%{!?_without_server:1} )
%preun server
if [ $1 -eq 0 ]; then
if [ -f %glusterfsd_svcfile ]; then
@@ -985,6 +1019,7 @@ if [ $1 -ge 1 ]; then
%systemd_postun_with_restart glusterd
fi
exit 0
+%endif
##-----------------------------------------------------------------------------
## All %%postun should be placed here and keep them sorted
@@ -1003,12 +1038,14 @@ exit 0
%postun libs
/sbin/ldconfig
+%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 grouped
@@ -1016,15 +1053,19 @@ exit 0
%files
%doc ChangeLog COPYING-GPLV2 COPYING-LGPLV3 INSTALL README.md THANKS
%{_mandir}/man8/*gluster*.8*
+%if ( 0%{!?_without_server:1} )
%exclude %{_mandir}/man8/gluster.8*
+%endif
%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}
@@ -1069,8 +1110,9 @@ exit 0
%{_libdir}/glusterfs/%{version}%{?prereltag}/xlator/performance/nl-cache.so
%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
@@ -1089,10 +1131,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 devel
%dir %{_includedir}/glusterfs
@@ -1154,7 +1198,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
%dir %{_libdir}/glusterfs/%{version}%{?prereltag}/xlator/nfs
@@ -1235,6 +1279,7 @@ exit 0
%{_prefix}/lib/ocf/resource.d/glusterfs
%endif
+%if ( 0%{!?_without_server:1} )
%files server
%doc extras/clear_xattrs.sh
# sysconf
@@ -1385,6 +1430,8 @@ exit 0
%if ( 0%{?_with_firewalld:1} )
%{_prefix}/lib/firewalld/services/glusterfs.xml
%endif
+# end of server files
+%endif
# Events
%if ( 0%{!?_without_events:1} )
@@ -1406,6 +1453,9 @@ exit 0
%endif
%changelog
+* Thu Feb 21 2018 Niels de Vos <ndevos@redhat.com>
+- Add '--without server' option to facilitate el6 builds (#1547635)
+
* Thu Jan 18 2018 Kaleb S. KEITHLEY <kkeithle@redhat.com>
- Fedora 28 glibc has removed rpc headers and rpcgen, use libtirpc
diff --git a/glusterfsd/src/Makefile.am b/glusterfsd/src/Makefile.am
index 0196204..eb92e66 100644
--- a/glusterfsd/src/Makefile.am
+++ b/glusterfsd/src/Makefile.am
@@ -1,4 +1,7 @@
-sbin_PROGRAMS = glusterfsd gf_attach
+sbin_PROGRAMS = glusterfsd
+if WITH_SERVER
+sbin_PROGRAMS += glusterfsd gf_attach
+endif
glusterfsd_SOURCES = glusterfsd.c glusterfsd-mgmt.c
glusterfsd_LDADD = $(top_builddir)/libglusterfs/src/libglusterfs.la \
@@ -41,6 +44,8 @@ install-data-local:
$(INSTALL) -d -m 755 $(DESTDIR)$(localstatedir)/log/glusterfs
$(INSTALL) -d -m 755 $(DESTDIR)$(sbindir)
rm -f $(DESTDIR)$(sbindir)/glusterfs
- rm -f $(DESTDIR)$(sbindir)/glusterd
ln -s glusterfsd $(DESTDIR)$(sbindir)/glusterfs
+if WITH_SERVER
+ rm -f $(DESTDIR)$(sbindir)/glusterd
ln -s glusterfsd $(DESTDIR)$(sbindir)/glusterd
+endif
diff --git a/heal/src/Makefile.am b/heal/src/Makefile.am
index 830f9d9..be672e8 100644
--- a/heal/src/Makefile.am
+++ b/heal/src/Makefile.am
@@ -1,4 +1,6 @@
+if WITH_SERVER
sbin_PROGRAMS = glfsheal
+endif
glfsheal_SOURCES = glfs-heal.c
diff --git a/tools/gfind_missing_files/Makefile.am b/tools/gfind_missing_files/Makefile.am
index f77f789..181fe70 100644
--- a/tools/gfind_missing_files/Makefile.am
+++ b/tools/gfind_missing_files/Makefile.am
@@ -1,12 +1,16 @@
gfindmissingfilesdir = $(GLUSTERFS_LIBEXECDIR)/gfind_missing_files
+if WITH_SERVER
gfindmissingfiles_SCRIPTS = gfind_missing_files.sh gfid_to_path.sh \
gfid_to_path.py
+endif
EXTRA_DIST = gfind_missing_files.sh gfid_to_path.sh \
gfid_to_path.py
+if WITH_SERVER
gfindmissingfiles_PROGRAMS = gcrawler
+endif
gcrawler_SOURCES = gcrawler.c
gcrawler_LDADD = $(top_builddir)/libglusterfs/src/libglusterfs.la
@@ -16,11 +20,13 @@ AM_CPPFLAGS = $(GF_CPPFLAGS) -I$(top_srcdir)/libglusterfs/src
AM_CFLAGS = -Wall $(GF_CFLAGS)
+if WITH_SERVER
uninstall-local:
rm -f $(DESTDIR)$(sbindir)/gfind_missing_files
install-data-local:
rm -f $(DESTDIR)$(sbindir)/gfind_missing_files
ln -s $(GLUSTERFS_LIBEXECDIR)/gfind_missing_files/gfind_missing_files.sh $(DESTDIR)$(sbindir)/gfind_missing_files
+endif
CLEANFILES =
diff --git a/tools/glusterfind/Makefile.am b/tools/glusterfind/Makefile.am
index 92fa614..f17dbdb 100644
--- a/tools/glusterfind/Makefile.am
+++ b/tools/glusterfind/Makefile.am
@@ -1,11 +1,14 @@
SUBDIRS = src
-EXTRA_DIST = S57glusterfind-delete-post.py
+EXTRA_DIST = S57glusterfind-delete-post.py glusterfind
+if WITH_SERVER
bin_SCRIPTS = glusterfind
+endif
CLEANFILES = $(bin_SCRIPTS)
+if WITH_SERVER
deletehookscriptsdir = $(GLUSTERFS_LIBEXECDIR)/glusterfind/
deletehookscripts_SCRIPTS = S57glusterfind-delete-post.py
@@ -18,3 +21,4 @@ install-data-local:
rm -f $(DESTDIR)$(GLUSTERD_WORKDIR)/hooks/1/delete/post/S57glusterfind-delete-post
ln -s $(GLUSTERFS_LIBEXECDIR)/glusterfind/S57glusterfind-delete-post.py \
$(DESTDIR)$(GLUSTERD_WORKDIR)/hooks/1/delete/post/S57glusterfind-delete-post
+endif
diff --git a/tools/glusterfind/src/Makefile.am b/tools/glusterfind/src/Makefile.am
index e4469c1..c180f05 100644
--- a/tools/glusterfind/src/Makefile.am
+++ b/tools/glusterfind/src/Makefile.am
@@ -1,5 +1,6 @@
glusterfinddir = $(GLUSTERFS_LIBEXECDIR)/glusterfind
+if WITH_SERVER
glusterfind_PYTHON = conf.py utils.py __init__.py \
main.py libgfchangelog.py changelogdata.py
@@ -7,6 +8,7 @@ glusterfind_SCRIPTS = changelog.py nodeagent.py \
brickfind.py
glusterfind_DATA = tool.conf
+endif
EXTRA_DIST = changelog.py nodeagent.py brickfind.py \
tool.conf changelogdata.py
diff --git a/tools/setgfid2path/src/Makefile.am b/tools/setgfid2path/src/Makefile.am
index 45520ca..7316d11 100644
--- a/tools/setgfid2path/src/Makefile.am
+++ b/tools/setgfid2path/src/Makefile.am
@@ -1,6 +1,8 @@
gluster_setgfid2pathdir = $(sbindir)
+if WITH_SERVER
gluster_setgfid2path_PROGRAMS = gluster-setgfid2path
+endif
gluster_setgfid2path_SOURCES = main.c
diff --git a/xlators/features/arbiter/src/Makefile.am b/xlators/features/arbiter/src/Makefile.am
index c9f42ae..badc42f 100644
--- a/xlators/features/arbiter/src/Makefile.am
+++ b/xlators/features/arbiter/src/Makefile.am
@@ -1,4 +1,7 @@
+if WITH_SERVER
xlator_LTLIBRARIES = arbiter.la
+endif
+
xlatordir = $(libdir)/glusterfs/$(PACKAGE_VERSION)/xlator/features
arbiter_la_LDFLAGS = -module $(GF_XLATOR_DEFAULT_LDFLAGS)
diff --git a/xlators/features/bit-rot/src/bitd/Makefile.am b/xlators/features/bit-rot/src/bitd/Makefile.am
index 2df6f68..6db800e 100644
--- a/xlators/features/bit-rot/src/bitd/Makefile.am
+++ b/xlators/features/bit-rot/src/bitd/Makefile.am
@@ -1,4 +1,6 @@
+if WITH_SERVER
xlator_LTLIBRARIES = bit-rot.la
+endif
xlatordir = $(libdir)/glusterfs/$(PACKAGE_VERSION)/xlator/features
bit_rot_la_LDFLAGS = -module $(GF_XLATOR_DEFAULT_LDFLAGS)
diff --git a/xlators/features/bit-rot/src/stub/Makefile.am b/xlators/features/bit-rot/src/stub/Makefile.am
index e2c8319..f13de71 100644
--- a/xlators/features/bit-rot/src/stub/Makefile.am
+++ b/xlators/features/bit-rot/src/stub/Makefile.am
@@ -1,4 +1,6 @@
+if WITH_SERVER
xlator_LTLIBRARIES = bitrot-stub.la
+endif
xlatordir = $(libdir)/glusterfs/$(PACKAGE_VERSION)/xlator/features
bitrot_stub_la_LDFLAGS = -module $(GF_XLATOR_DEFAULT_LDFLAGS)
diff --git a/xlators/features/index/src/Makefile.am b/xlators/features/index/src/Makefile.am
index 6372672..c71c238 100644
--- a/xlators/features/index/src/Makefile.am
+++ b/xlators/features/index/src/Makefile.am
@@ -1,4 +1,6 @@
+if WITH_SERVER
xlator_LTLIBRARIES = index.la
+endif
xlatordir = $(libdir)/glusterfs/$(PACKAGE_VERSION)/xlator/features
index_la_LDFLAGS = -module $(GF_XLATOR_DEFAULT_LDFLAGS)
diff --git a/xlators/features/leases/src/Makefile.am b/xlators/features/leases/src/Makefile.am
index a7eea66..a1aef10 100644
--- a/xlators/features/leases/src/Makefile.am
+++ b/xlators/features/leases/src/Makefile.am
@@ -1,4 +1,6 @@
+if WITH_SERVER
xlator_LTLIBRARIES = leases.la
+endif
xlatordir = $(libdir)/glusterfs/$(PACKAGE_VERSION)/xlator/features
leases_la_LDFLAGS = -module $(GF_XLATOR_DEFAULT_LDFLAGS)
diff --git a/xlators/features/locks/src/Makefile.am b/xlators/features/locks/src/Makefile.am
index 2884ec8..0b174c1 100644
--- a/xlators/features/locks/src/Makefile.am
+++ b/xlators/features/locks/src/Makefile.am
@@ -1,4 +1,6 @@
+if WITH_SERVER
xlator_LTLIBRARIES = locks.la
+endif
xlatordir = $(libdir)/glusterfs/$(PACKAGE_VERSION)/xlator/features
locks_la_LDFLAGS = -module $(GF_XLATOR_DEFAULT_LDFLAGS)
@@ -18,8 +20,10 @@ AM_CFLAGS = -Wall -fno-strict-aliasing $(GF_CFLAGS)
CLEANFILES =
+if WITH_SERVER
uninstall-local:
rm -f $(DESTDIR)$(xlatordir)/posix-locks.so
install-data-hook:
ln -sf locks.so $(DESTDIR)$(xlatordir)/posix-locks.so
+endif
diff --git a/xlators/features/marker/src/Makefile.am b/xlators/features/marker/src/Makefile.am
index 7871448..58056b3 100644
--- a/xlators/features/marker/src/Makefile.am
+++ b/xlators/features/marker/src/Makefile.am
@@ -1,4 +1,6 @@
+if WITH_SERVER
xlator_LTLIBRARIES = marker.la
+endif
xlatordir = $(libdir)/glusterfs/$(PACKAGE_VERSION)/xlator/features
marker_la_LDFLAGS = -module $(GF_XLATOR_DEFAULT_LDFLAGS)
diff --git a/xlators/features/quota/src/Makefile.am b/xlators/features/quota/src/Makefile.am
index 0a9541d..ec20e3e 100644
--- a/xlators/features/quota/src/Makefile.am
+++ b/xlators/features/quota/src/Makefile.am
@@ -1,4 +1,6 @@
+if WITH_SERVER
xlator_LTLIBRARIES = quota.la quotad.la
+endif
xlatordir = $(libdir)/glusterfs/$(PACKAGE_VERSION)/xlator/features
quota_la_LDFLAGS = -module $(GF_XLATOR_DEFAULT_LDFLAGS)
diff --git a/xlators/features/sdfs/src/Makefile.am b/xlators/features/sdfs/src/Makefile.am
index ec9ed80..6118d46 100644
--- a/xlators/features/sdfs/src/Makefile.am
+++ b/xlators/features/sdfs/src/Makefile.am
@@ -1,4 +1,6 @@
+if WITH_SERVER
xlator_LTLIBRARIES = sdfs.la
+endif
xlatordir = $(libdir)/glusterfs/$(PACKAGE_VERSION)/xlator/features
sdfs_la_LDFLAGS = -module $(GF_XLATOR_DEFAULT_LDFLAGS)
diff --git a/xlators/features/selinux/src/Makefile.am b/xlators/features/selinux/src/Makefile.am
index 34105d2..4f1e5e1 100644
--- a/xlators/features/selinux/src/Makefile.am
+++ b/xlators/features/selinux/src/Makefile.am
@@ -1,5 +1,6 @@
+if WITH_SERVER
xlator_LTLIBRARIES = selinux.la
-
+endif
xlatordir = $(libdir)/glusterfs/$(PACKAGE_VERSION)/xlator/features
selinux_la_LDFLAGS = -module $(GF_XLATOR_DEFAULT_LDFLAGS)
diff --git a/xlators/features/snapview-server/src/Makefile.am b/xlators/features/snapview-server/src/Makefile.am
index d9deb5a..2d39759 100644
--- a/xlators/features/snapview-server/src/Makefile.am
+++ b/xlators/features/snapview-server/src/Makefile.am
@@ -1,4 +1,6 @@
+if WITH_SERVER
xlator_LTLIBRARIES = snapview-server.la
+endif
xlatordir = $(libdir)/glusterfs/$(PACKAGE_VERSION)/xlator/features
snapview_server_la_LDFLAGS = -module $(GF_XLATOR_DEFAULT_LDFLAGS)
diff --git a/xlators/features/trash/src/Makefile.am b/xlators/features/trash/src/Makefile.am
index ba3be5a..8557e71 100644
--- a/xlators/features/trash/src/Makefile.am
+++ b/xlators/features/trash/src/Makefile.am
@@ -1,4 +1,6 @@
+if WITH_SERVER
xlator_LTLIBRARIES = trash.la
+endif
xlatordir = $(libdir)/glusterfs/$(PACKAGE_VERSION)/xlator/features
trash_la_LDFLAGS = -module $(GF_XLATOR_DEFAULT_LDFLAGS)
diff --git a/xlators/features/upcall/src/Makefile.am b/xlators/features/upcall/src/Makefile.am
index 46a76bd..72b7f55 100644
--- a/xlators/features/upcall/src/Makefile.am
+++ b/xlators/features/upcall/src/Makefile.am
@@ -1,4 +1,6 @@
+if WITH_SERVER
xlator_LTLIBRARIES = upcall.la
+endif
xlatordir = $(libdir)/glusterfs/$(PACKAGE_VERSION)/xlator/features
upcall_la_LDFLAGS = -module $(GF_XLATOR_DEFAULT_LDFLAGS)
diff --git a/xlators/mgmt/glusterd/src/Makefile.am b/xlators/mgmt/glusterd/src/Makefile.am
index 637c77b..7f8f235 100644
--- a/xlators/mgmt/glusterd/src/Makefile.am
+++ b/xlators/mgmt/glusterd/src/Makefile.am
@@ -1,4 +1,7 @@
+if WITH_SERVER
xlator_LTLIBRARIES = glusterd.la
+endif
+
xlatordir = $(libdir)/glusterfs/$(PACKAGE_VERSION)/xlator/mgmt
glusterd_la_CPPFLAGS = $(AM_CPPFLAGS) \
-DFILTERDIR=\"$(libdir)/glusterfs/$(PACKAGE_VERSION)/filter\" \
@@ -62,9 +65,11 @@ AM_LDFLAGS = -L$(xlatordir) $(URCU_LIBS) $(URCU_CDS_LIBS)
CLEANFILES =
install-data-hook:
+if WITH_SERVER
if GF_INSTALL_GLUSTERD_WORKDIR
$(mkdir_p) $(DESTDIR)$(GLUSTERD_WORKDIR)
(stat $(DESTDIR)$(sysconfdir)/glusterd && \
mv $(DESTDIR)$(sysconfdir)/glusterd $(DESTDIR)$(GLUSTERD_WORKDIR)) || true;
(ln -sf $(DESTDIR)$(GLUSTERD_WORKDIR) $(sysconfdir)/glusterd) || true;
endif
+endif
diff --git a/xlators/nfs/server/src/Makefile.am b/xlators/nfs/server/src/Makefile.am
index bc6f8e9..5d1136d 100644
--- a/xlators/nfs/server/src/Makefile.am
+++ b/xlators/nfs/server/src/Makefile.am
@@ -1,4 +1,7 @@
+if WITH_SERVER
xlator_LTLIBRARIES = server.la
+endif
+
xlatordir = $(libdir)/glusterfs/$(PACKAGE_VERSION)/xlator/nfs
nfsrpclibdir = $(top_srcdir)/rpc/rpc-lib/src
server_la_LDFLAGS = -module -avoid-version -export-symbols \
diff --git a/xlators/performance/decompounder/src/Makefile.am b/xlators/performance/decompounder/src/Makefile.am
index 149f2c0..7823774 100644
--- a/xlators/performance/decompounder/src/Makefile.am
+++ b/xlators/performance/decompounder/src/Makefile.am
@@ -1,4 +1,6 @@
+if WITH_SERVER
xlator_LTLIBRARIES = decompounder.la
+endif
xlatordir = $(libdir)/glusterfs/$(PACKAGE_VERSION)/xlator/performance
decompounder_la_LDFLAGS = -module $(GF_XLATOR_DEFAULT_LDFLAGS)
diff --git a/xlators/protocol/server/src/Makefile.am b/xlators/protocol/server/src/Makefile.am
index 9c273ca..bcce615 100644
--- a/xlators/protocol/server/src/Makefile.am
+++ b/xlators/protocol/server/src/Makefile.am
@@ -1,4 +1,7 @@
+if WITH_SERVER
xlator_LTLIBRARIES = server.la
+endif
+
xlatordir = $(libdir)/glusterfs/$(PACKAGE_VERSION)/xlator/protocol
server_la_LDFLAGS = -module $(GF_XLATOR_DEFAULT_LDFLAGS)
diff --git a/xlators/storage/posix/src/Makefile.am b/xlators/storage/posix/src/Makefile.am
index 17ea980..59d4623 100644
--- a/xlators/storage/posix/src/Makefile.am
+++ b/xlators/storage/posix/src/Makefile.am
@@ -1,5 +1,6 @@
-
+if WITH_SERVER
xlator_LTLIBRARIES = posix.la
+endif
xlatordir = $(libdir)/glusterfs/$(PACKAGE_VERSION)/xlator/storage
posix_la_LDFLAGS = -module $(GF_XLATOR_DEFAULT_LDFLAGS)