diff options
Diffstat (limited to 'extras')
-rw-r--r-- | extras/LinuxRPM/Makefile.am | 32 | ||||
-rw-r--r-- | extras/Makefile.am | 4 | ||||
-rw-r--r-- | extras/init.d/Makefile.am | 15 | ||||
-rw-r--r-- | extras/systemd/Makefile.am | 11 | ||||
-rw-r--r-- | extras/systemd/glusterd.service.in | 12 |
5 files changed, 38 insertions, 36 deletions
diff --git a/extras/LinuxRPM/Makefile.am b/extras/LinuxRPM/Makefile.am index 3c867fe275e..cc020be94f7 100644 --- a/extras/LinuxRPM/Makefile.am +++ b/extras/LinuxRPM/Makefile.am @@ -1,7 +1,5 @@ -GFS_TAR = ../../glusterfs-*git.tar.gz -UFO_TAR = ../../gluster-swift-ufo-*git.tar.gz -GFS_SPEC = ../../glusterfs.spec +GFS_TAR = ../../glusterfs-${VERSION}.tar.gz .PHONY: all @@ -13,12 +11,9 @@ all: glusterrpms: prep srcrpm rpms -rm -rf rpmbuild -glusterrpmswithoutufo: prep srcrpm rpmswithoutufo - -rm -rf rpmbuild - -prep:: - if [ ! -e $(GFS_TAR) -a ! -e $(UFO_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 @@ -38,21 +33,6 @@ prep:: cp ../../*.tar.gz ./rpmbuild/SOURCES cp ../../glusterfs.spec ./rpmbuild/SPECS -GRIZZLY_TAR = swift-1.8.0.tar.gz -GRIZZLY_URL = https://launchpad.net/swift/grizzly/1.8.0/+download/$(GRIZZLY_TAR) - -prep:: - @if [ -d /d/cache -a -f /d/cache/$(GRIZZLY_TAR) -a -d ./rpmbuild/SOURCES ]; then \ - echo "copying swift source tarball from local cache..." ; \ - cp /d/cache/$(GRIZZLY_TAR) ./rpmbuild/SOURCES/ ; \ - elif [ -x /usr/bin/curl -a -d ./rpmbuild/SOURCES ]; then \ - echo "fetching swift from launchpad.net..." ; \ - cd ./rpmbuild/SOURCES && /usr/bin/curl -sOL $(GRIZZLY_URL) ; \ - else \ - echo "swift source not fetched, you don't have curl installed!" ; \ - exit 1 ; \ - fi - srcrpm: rpmbuild --define '_topdir $(shell pwd)/rpmbuild' -bs rpmbuild/SPECS/glusterfs.spec mv rpmbuild/SRPMS/* . @@ -61,10 +41,6 @@ rpms: rpmbuild --define '_topdir $(shell pwd)/rpmbuild' -bb rpmbuild/SPECS/glusterfs.spec mv rpmbuild/RPMS/*/* . -rpmswithoutufo: - rpmbuild --define '_topdir $(shell pwd)/rpmbuild' -bb rpmbuild/SPECS/glusterfs.spec --without ufo - mv rpmbuild/RPMS/*/* . - # EPEL-5 does not like new versions of rpmbuild and requires some # _source_* defines diff --git a/extras/Makefile.am b/extras/Makefile.am index 7b55ef2ee7e..63ad7101655 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 7c26a0e8e2b..38898fddd2e 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 00000000000..3fc656b8262 --- /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 00000000000..0b24aea3bec --- /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 |