summaryrefslogtreecommitdiffstats
path: root/extras/systemd
diff options
context:
space:
mode:
authorNiels de Vos <ndevos@redhat.com>2016-07-19 12:55:03 +0200
committerKaleb KEITHLEY <kkeithle@redhat.com>2016-08-07 18:05:05 -0700
commit9f22282795e20fd62b22847b92dffd0cde9cca1b (patch)
treee66086f959ced309083333d77a67d2a00baa4415 /extras/systemd
parent7ce77ea61f184d5ddae4bce4ca672fd439089eaf (diff)
build: systemd unit should not be marked executable
systemd complains about the unit for GlusterD when it is executable: Configuration file /usr/lib/systemd/system/glusterd.service is marked executable. Please remove executable permission bits. Proceeding anyway. The Makefile that installs the unit has some scripted commands. These are not needed and standard "*dir" and "*DATA" postfixes for variables can be used instead. The EXTRA_DIST variable is needed for building the 'make dist' tarball on systems where there is no systemd. The unit would be missing from the tarball if it is not explicitly included. BUG: 1354489 Change-Id: I5e72ec201036906b9b2458bc8931ccebf9a8c6b4 Reported-by: Sergej Pupykin <ml@sergej.pp.ru> Signed-off-by: Niels de Vos <ndevos@redhat.com> Reviewed-on: http://review.gluster.org/14892 Smoke: Gluster Build System <jenkins@build.gluster.org> Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> CentOS-regression: Gluster Build System <jenkins@build.gluster.org>
Diffstat (limited to 'extras/systemd')
-rw-r--r--extras/systemd/Makefile.am21
1 files changed, 9 insertions, 12 deletions
diff --git a/extras/systemd/Makefile.am b/extras/systemd/Makefile.am
index 82fa1aac690..5b9b117efaf 100644
--- a/extras/systemd/Makefile.am
+++ b/extras/systemd/Makefile.am
@@ -1,14 +1,11 @@
-CLEANFILES = glustereventsd.service
-EXTRA_DIST = glustereventsd.service.in
+CLEANFILES = glusterd.service glustereventsd.service
+EXTRA_DIST = glusterd.service.in glustereventsd.service.in
-SYSTEMD_DIR = @systemddir@
+if USE_SYSTEMD
+# systemddir is already defined through configure.ac
+systemd_DATA = glusterd.service
-install-exec-local:
- @if [ -d $(SYSTEMD_DIR) ]; then \
- $(mkdir_p) $(DESTDIR)$(SYSTEMD_DIR); \
- $(INSTALL_PROGRAM) glusterd.service $(DESTDIR)$(SYSTEMD_DIR)/; \
- fi
- @if [ @EVENTS_ENABLED@ = 1 ] && [ -d $(SYSTEMD_DIR) ]; then \
- $(mkdir_p) $(DESTDIR)$(SYSTEMD_DIR); \
- $(INSTALL_PROGRAM) glustereventsd.service $(DESTDIR)$(SYSTEMD_DIR)/; \
- fi
+if BUILD_EVENTS
+systemd_DATA += glustereventsd.service
+endif
+endif