diff options
author | Niels de Vos <ndevos@redhat.com> | 2016-07-19 12:55:03 +0200 |
---|---|---|
committer | Niels de Vos <ndevos@redhat.com> | 2016-08-09 07:59:41 -0700 |
commit | 7ba61c46164114d6cfd606a098b45aaf3eaa8773 (patch) | |
tree | bd4396c01b8cf86721e703b83ab0e5f35ed060d0 | |
parent | df4cab9a3205827f89d5c977e714e87276f4ad63 (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.
Cherry picked from commit 9f22282795e20fd62b22847b92dffd0cde9cca1b:
> 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>
Change-Id: I5e72ec201036906b9b2458bc8931ccebf9a8c6b4
BUG: 1354499
Reported-by: Sergej Pupykin <ml@sergej.pp.ru>
Signed-off-by: Niels de Vos <ndevos@redhat.com>
Reviewed-on: http://review.gluster.org/15115
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>
-rw-r--r-- | configure.ac | 5 | ||||
-rw-r--r-- | extras/systemd/Makefile.am | 16 |
2 files changed, 9 insertions, 12 deletions
diff --git a/configure.ac b/configure.ac index 5caff8a0f4c..9025114030a 100644 --- a/configure.ac +++ b/configure.ac @@ -317,10 +317,11 @@ AC_ARG_WITH(mountutildir, AC_SUBST(mountutildir) AC_ARG_WITH(systemddir, - [ --with-systemddir=DIR systemd service files in DIR @<:@/usr/lib/systemd/system@:>@], + [ --with-systemddir=DIR systemd service files in DIR @<:@PREFIX/lib/systemd/system@:>@], [systemddir=$withval], - [systemddir='/usr/lib/systemd/system']) + [systemddir='${prefix}/lib/systemd/system']) AC_SUBST(systemddir) +AM_CONDITIONAL([USE_SYSTEMD], test [ -d '/usr/lib/systemd/system' ]) AC_ARG_WITH(initdir, [ --with-initdir=DIR init.d scripts in DIR @<:@/etc/init.d@:>@], diff --git a/extras/systemd/Makefile.am b/extras/systemd/Makefile.am index 3fc656b8262..3f0ec89537a 100644 --- a/extras/systemd/Makefile.am +++ b/extras/systemd/Makefile.am @@ -1,11 +1,7 @@ +CLEANFILES = glusterd.service +EXTRA_DIST = glusterd.service.in -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 - +if USE_SYSTEMD +# systemddir is already defined through configure.ac +systemd_DATA = glusterd.service +endif |