diff options
-rw-r--r-- | Makefile.am | 9 | ||||
-rw-r--r-- | configure.ac | 5 | ||||
-rw-r--r-- | contrib/sssd.spec.in | 2 | ||||
-rw-r--r-- | src/conf_macros.m4 | 20 | ||||
-rw-r--r-- | src/sysv/systemd/journal.conf.in | 7 |
5 files changed, 41 insertions, 2 deletions
diff --git a/Makefile.am b/Makefile.am index b90fecec7..d990a8c61 100644 --- a/Makefile.am +++ b/Makefile.am @@ -3,6 +3,10 @@ if HAVE_DEVSHM extra_distcheck_flags += --with-test-dir=/dev/shm endif +if HAVE_SYSTEMD_UNIT + extra_distcheck_flags += --with-syslog=journald +endif + DISTCHECK_CONFIGURE_FLAGS = --with-ldb-lib-dir="$$dc_install_base"/lib/ldb \ --enable-all-experimental-features \ $(extra_distcheck_flags) @@ -51,6 +55,7 @@ pipepath = @pipepath@ mcpath = @mcpath@ initdir = @initdir@ systemdunitdir = @systemdunitdir@ +systemdconfdir = @systemdconfdir@/sssd.service.d logpath = @logpath@ pubconfpath = @pubconfpath@ pkgconfigdir = $(libdir)/pkgconfig @@ -2062,9 +2067,12 @@ endif dist_init_SCRIPTS = dist_systemdunit_DATA = +dist_systemdconf_DATA = if HAVE_SYSTEMD_UNIT dist_systemdunit_DATA += \ src/sysv/systemd/sssd.service + dist_systemdconf_DATA += \ + src/sysv/systemd/journal.conf else if HAVE_SUSE dist_init_SCRIPTS += \ @@ -2162,6 +2170,7 @@ endif if HAVE_SYSTEMD_UNIT mkdir -p $(DESTDIR)$(systemdunitdir) + mkdir -p $(DESTDIR)$(systemdconfdir) else mkdir -p $(DESTDIR)$(initdir) endif diff --git a/configure.ac b/configure.ac index 93038204f..82951396a 100644 --- a/configure.ac +++ b/configure.ac @@ -181,6 +181,7 @@ fi WITH_INITSCRIPT if test x$initscript = xsystemd; then WITH_SYSTEMD_UNIT_DIR + WITH_SYSTEMD_CONF_DIR fi PKG_CHECK_MODULES([DBUS],[dbus-1]) @@ -313,8 +314,8 @@ AC_DEFINE_UNQUOTED([ABS_BUILD_DIR], ["$abs_build_dir"], [Absolute path to the bu AC_SUBST([abs_builddir], $abs_build_dir) AC_CONFIG_FILES([Makefile contrib/sssd.spec src/examples/rwtab src/doxy.config - src/sysv/systemd/sssd.service src/sysv/sssd - src/sysv/gentoo/sssd src/sysv/SUSE/sssd + src/sysv/systemd/sssd.service src/sysv/systemd/journal.conf + src/sysv/sssd src/sysv/gentoo/sssd src/sysv/SUSE/sssd po/Makefile.in src/man/Makefile src/providers/ipa/ipa_hbac.pc src/providers/ipa/ipa_hbac.doxy src/lib/idmap/sss_idmap.pc src/lib/idmap/sss_idmap.doxy diff --git a/contrib/sssd.spec.in b/contrib/sssd.spec.in index ec75b53a4..e0830f8f8 100644 --- a/contrib/sssd.spec.in +++ b/contrib/sssd.spec.in @@ -585,6 +585,8 @@ rm -rf $RPM_BUILD_ROOT %attr(750,root,root) %dir %{_var}/log/%{name} %attr(711,root,root) %dir %{_sysconfdir}/sssd %ghost %attr(0600,root,root) %config(noreplace) %{_sysconfdir}/sssd/sssd.conf +%attr(755,root,root) %dir %{_sysconfdir}/systemd/system/sssd.service.d +%config(noreplace) %{_sysconfdir}/systemd/system/sssd.service.d/journal.conf %config(noreplace) %{_sysconfdir}/logrotate.d/sssd %config(noreplace) %{_sysconfdir}/rwtab.d/sssd %dir %{_datadir}/sssd diff --git a/src/conf_macros.m4 b/src/conf_macros.m4 index 4be819d4a..71118593c 100644 --- a/src/conf_macros.m4 +++ b/src/conf_macros.m4 @@ -221,6 +221,26 @@ AC_DEFUN([WITH_SYSTEMD_UNIT_DIR], AC_SUBST(systemdunitdir) ]) +dnl A macro to configure the directory to install the systemd unit file +dnl overrides to +AC_DEFUN([WITH_SYSTEMD_CONF_DIR], + [ AC_ARG_WITH([systemdconfdir], + [ AC_HELP_STRING([--with-systemdconfdir=DIR], + [Directory for systemd service file overrides [Auto]] + ), + ], + ) + if test x"$with_systemdconfdir" != x; then + systemdconfdir=$with_systemdconfdir + else + systemdconfdir=$($PKG_CONFIG --variable=systemdsystemconfdir systemd) + if test x"$systemdconfdir" = x; then + AC_MSG_ERROR([Could not detect systemd config directory]) + fi + fi + AC_SUBST(systemdconfdir) + ]) + AC_DEFUN([WITH_MANPAGES], [ AC_ARG_WITH([manpages], [AC_HELP_STRING([--with-manpages], diff --git a/src/sysv/systemd/journal.conf.in b/src/sysv/systemd/journal.conf.in new file mode 100644 index 000000000..d89325e08 --- /dev/null +++ b/src/sysv/systemd/journal.conf.in @@ -0,0 +1,7 @@ +[Service] +# Uncomment *both* of the following lines to enable debug logging +# to go to journald instead of /var/log/sssd. You will need to +# run 'systemctl daemon-reload' and then restart the SSSD service +# for this to take effect +#ExecStart= +#ExecStart=@sbindir@/sssd -D |