Browse Source

Ticket 49005 - Update lib389 to work in containers correctly.

Bug Description:  lib389 and DS does not correctly detect or operate in a
container environment yet.

Fix Description:  Add the with_systemd flags to the paths defaults.inf so that
lib389 can consume it.

https://fedorahosted.org/389/ticket/49005

Author: wibrown

Review by: mreynolds, nhosoi (Thanks)
William Brown 9 years ago
parent
commit
6a6bbc87e2
3 changed files with 13 additions and 0 deletions
  1. 8 0
      Makefile.am
  2. 3 0
      ldap/admin/src/defaults.inf.in
  3. 2 0
      m4/systemd.m4

+ 8 - 0
Makefile.am

@@ -32,6 +32,12 @@ else
 ASAN_ON = 0
 endif
 
+if with_systemd
+WITH_SYSTEMD = 1
+else
+WITH_SYSTEMD = 0
+endif
+
 # these paths are dependent on the settings of prefix and exec_prefix which may be specified
 # at make time.  So we cannot use AC_DEFINE in the configure.ac because that would set the
 # values prior to their being defined.  Defining them here ensures that they are properly
@@ -1828,6 +1834,7 @@ fixupcmd = sed \
 	-e 's,@defaultgroup\@,$(defaultgroup),g' \
 	-e 's,@with_fhs_opt\@,@with_fhs_opt@,g' \
 	-e 's,@with_selinux\@,@with_selinux@,g' \
+	-e 's,@with_systemd\@,$(WITH_SYSTEMD),g' \
 	-e 's,@with_tmpfiles_d\@,@with_tmpfiles_d@,g' \
 	-e 's,@perlexec\@,@perlexec@,g' \
 	-e 's,@pythonexec\@,@pythonexec@,g' \
@@ -1898,6 +1905,7 @@ fixupcmd = sed \
 	-e 's,@defaultgroup\@,$(defaultgroup),g' \
 	-e 's,@with_fhs_opt\@,@with_fhs_opt@,g' \
 	-e 's,@with_selinux\@,@with_selinux@,g' \
+	-e 's,@with_systemd\@,$(WITH_SYSTEMD),g' \
 	-e 's,@with_tmpfiles_d\@,@with_tmpfiles_d@,g' \
 	-e 's,@perlexec\@,@perlexec@,g' \
 	-e 's,@pythonexec\@,@pythonexec@,g' \

+ 3 - 0
ldap/admin/src/defaults.inf.in

@@ -20,6 +20,8 @@
 product = @capbrand@ Directory Server
 version = @PACKAGE_VERSION@
 asan_enabled = @enable_asan@
+with_systemd = @with_systemd@
+with_selinux = @with_selinux@
 prefix = @prefixdir@
 bin_dir = @bindir@
 sbin_dir = @sbindir@
@@ -31,6 +33,7 @@ initconfig_dir = @initconfigdir@
 config_dir = @instconfigdir@/slapd-{instance_name}
 local_state_dir = @localstatedir@
 run_dir = @localstatedir@/run/dirsrv
+pid_file = @localstatedir@/run/dirsrv/slapd-{instance_name}.pid
 plugin_dir = @serverplugindir@
 
 ; These values can be altered in an installation of ds

+ 2 - 0
m4/systemd.m4

@@ -119,5 +119,7 @@ fi
 # End of with_systemd
 
 AM_CONDITIONAL([SYSTEMD],[test -n "$with_systemd"])
+AM_CONDITIONAL([with_systemd],[test -n "$with_systemd"])
 AM_CONDITIONAL([JOURNALD],[test -n "$with_journald"])
+AM_CONDITIONAL([with_systemd_journald],[test -n "$with_journald"])