summaryrefslogtreecommitdiffstats
path: root/extras
diff options
context:
space:
mode:
authorKaleb S. KEITHLEY <kkeithle@redhat.com>2013-06-17 13:44:10 -0400
committerVijay Bellur <vbellur@redhat.com>2013-06-26 04:36:47 -0700
commitf7b1245ca221fd7d4cee626ae358a2ebc933ffdd (patch)
tree565477a07be9aaf891fbc858f74300d93bc1fdef /extras
parent183546aa2dbfe3371cf155800e2f70057e95e2bc (diff)
build: sync glusterfs.spec.in with Fedora glusterfs.spec
* add glusterfs-api and glusterfs-api-devel sub-packages * add extras/systemd/glusterd.service. Use it (or extras/init.d/glusterd) instead of the Fedora versions. * restores ability to build glusterfs RPMs from the dist tarball with 'rpmbuild {-ts,-tb,-ta} glusterfs-XXX.tar.gz' * other minor cleanups mostly to sync with fedora .spec and to build from the dist tarball. Any differences will be resolved in the fedora .spec in the next release (i.e. beta4 or GA). (still considering whether to add fedora glusterfsd.{init,service} files to glusterfs or remove them from fedora.) BUG: 950083 Change-Id: Ibda3cd57b24ef5c2a27446703e718e5044ec546c Signed-off-by: Kaleb S. KEITHLEY <kkeithle@redhat.com> Reviewed-on: http://review.gluster.org/5230 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Bala FA <barumuga@redhat.com> Reviewed-by: Niels de Vos <ndevos@redhat.com>
Diffstat (limited to 'extras')
-rw-r--r--extras/LinuxRPM/Makefile.am9
-rw-r--r--extras/Makefile.am4
-rw-r--r--extras/init.d/Makefile.am15
-rw-r--r--extras/systemd/Makefile.am11
-rw-r--r--extras/systemd/glusterd.service.in12
5 files changed, 38 insertions, 13 deletions
diff --git a/extras/LinuxRPM/Makefile.am b/extras/LinuxRPM/Makefile.am
index 09d2f9e42..1dafa982b 100644
--- a/extras/LinuxRPM/Makefile.am
+++ b/extras/LinuxRPM/Makefile.am
@@ -1,6 +1,5 @@
-GFS_TAR = ../../glusterfs-*git.tar.gz
-GFS_SPEC = ../../glusterfs.spec
+GFS_TAR = ../../glusterfs-$(VERSION).tar.gz
.PHONY: all
@@ -12,9 +11,9 @@ all:
glusterrpms: prep srcrpm rpms
-rm -rf rpmbuild
-prep::
- if [ ! -e $(GFS_TAR) -a ! -e $(GFS_SPEC) ]; then \
- $(MAKE) -c ../.. dist; \
+prep:
+ if [ ! -e $(GFS_TAR) ]; then \
+ $(MAKE) -C ../.. dist; \
fi
-mkdir -p rpmbuild/SPECS
-mkdir -p rpmbuild/RPMS
diff --git a/extras/Makefile.am b/extras/Makefile.am
index 7b55ef2ee..63ad71016 100644
--- a/extras/Makefile.am
+++ b/extras/Makefile.am
@@ -2,7 +2,7 @@
EditorModedir = $(docdir)
EditorMode_DATA = glusterfs-mode.el glusterfs.vim
-SUBDIRS = init.d benchmarking hook-scripts $(OCF_SUBDIR) LinuxRPM
+SUBDIRS = init.d systemd benchmarking hook-scripts $(OCF_SUBDIR) LinuxRPM
confdir = $(sysconfdir)/glusterfs
conf_DATA = glusterfs-logrotate
@@ -10,5 +10,5 @@ conf_DATA = glusterfs-logrotate
EXTRA_DIST = specgen.scm MacOSX/Portfile glusterfs-mode.el glusterfs.vim \
migrate-unify-to-distribute.sh backend-xattr-sanitize.sh \
backend-cleanup.sh disk_usage_sync.sh quota-remove-xattr.sh \
- quota-metadata-cleanup.sh glusterfs-logrotate clear_xattrs.sh \
+ quota-metadata-cleanup.sh glusterfs-logrotate clear_xattrs.sh \
group-virt.example glusterd-sysconfig
diff --git a/extras/init.d/Makefile.am b/extras/init.d/Makefile.am
index 7c26a0e8e..38898fddd 100644
--- a/extras/init.d/Makefile.am
+++ b/extras/init.d/Makefile.am
@@ -3,17 +3,20 @@ EXTRA_DIST = glusterd-Debian glusterd-Redhat glusterd-SuSE glusterd.plist rhel5-
CLEANFILES =
-initdir = @initdir@
-launchddir = @launchddir@
+INIT_DIR = @initdir@
+SYSTEMD_DIR = @systemddir@
+LAUNCHD_DIR = @launchddir@
$(GF_DISTRIBUTION):
- $(mkdir_p) $(DESTDIR)$(initdir)
- $(INSTALL_PROGRAM) glusterd-$(GF_DISTRIBUTION) $(DESTDIR)$(initdir)/glusterd
+ @if [ ! -d $(SYSTEMD_DIR) ]; then \
+ $(mkdir_p) $(DESTDIR)$(INIT_DIR); \
+ $(INSTALL_PROGRAM) glusterd-$(GF_DISTRIBUTION) $(DESTDIR)$(INIT_DIR)/glusterd; \
+ fi
install-exec-local: $(GF_DISTRIBUTION)
install-data-local:
if GF_DARWIN_HOST_OS
- $(mkdir_p) $(DESTDIR)$(launchddir)
- $(INSTALL_PROGRAM) glusterd.plist $(DESTDIR)$(launchddir)/com.gluster.glusterd.plist
+ $(mkdir_p) $(DESTDIR)$(LAUNCHD_DIR)
+ $(INSTALL_PROGRAM) glusterd.plist $(DESTDIR)$(LAUNCHD_DIR)/com.gluster.glusterd.plist
endif
diff --git a/extras/systemd/Makefile.am b/extras/systemd/Makefile.am
new file mode 100644
index 000000000..3fc656b82
--- /dev/null
+++ b/extras/systemd/Makefile.am
@@ -0,0 +1,11 @@
+
+CLEANFILES =
+
+SYSTEMD_DIR = @systemddir@
+
+install-exec-local:
+ @if [ -d $(SYSTEMD_DIR) ]; then \
+ $(mkdir_p) $(DESTDIR)$(SYSTEMD_DIR); \
+ $(INSTALL_PROGRAM) glusterd.service $(DESTDIR)$(SYSTEMD_DIR)/; \
+ fi
+
diff --git a/extras/systemd/glusterd.service.in b/extras/systemd/glusterd.service.in
new file mode 100644
index 000000000..0b24aea3b
--- /dev/null
+++ b/extras/systemd/glusterd.service.in
@@ -0,0 +1,12 @@
+[Unit]
+Description=GlusterFS an clustered file-system server
+After=network.target rpcbind.service
+
+[Service]
+Type=forking
+PIDFile=/run/glusterd.pid
+LimitNOFILE=65536
+ExecStart=/usr/sbin/glusterd -p /run/glusterd.pid
+
+[Install]
+WantedBy=multi-user.target