From 76c0e75a2594308e2c5ec4f24c1e7c72ab4f2db5 Mon Sep 17 00:00:00 2001 From: Matus Honek Date: Jul 17 2019 13:02:32 +0000 Subject: Issue 50425 - Add jemalloc LD_PRELOAD to systemd drop-in file The previous fix (7466be3) for jemalloc inclusion stopped installing template-initconfig rendering ds-setup.pl unusable. This fix moves the template-initconfig into -legacy-tools to make it available only when necessary. Relates: https://pagure.io/389-ds-base/issue/50425 Reviewed by: Viktor, Ludwig, Thierry, Mark (thanks!) --- diff --git a/Makefile.am b/Makefile.am index 6c948a3..2ea1344 100644 --- a/Makefile.am +++ b/Makefile.am @@ -654,10 +654,8 @@ endif #------------------------ config_DATA = $(srcdir)/lib/ldaputil/certmap.conf \ $(srcdir)/ldap/schema/slapd-collations.conf \ + ldap/admin/src/template-initconfig \ ldap/servers/snmp/ldap-agent.conf -if !SYSTEMD -config_DATA += ldap/admin/src/template-initconfig -endif # the schema files in this list are either not # standard schema, not tested, or not compatible @@ -987,14 +985,12 @@ dist_man_MANS = man/man1/dbscan.1 \ man/man5/slapd-collations.conf.5 \ man/man8/suffix2instance.8 \ man/man8/syntax-validate.pl.8 \ + man/man5/template-initconfig.5 \ man/man8/upgradednformat.8 \ man/man8/upgradedb.8 \ man/man8/usn-tombstone-cleanup.pl.8 \ man/man8/vlvindex.8 \ man/man8/verify-db.pl.8 -if !SYSTEMD -dist_man_MANS += man/man5/template-initconfig.5 -endif #------------------------ # updates @@ -2298,14 +2294,20 @@ fixupcmd = sed \ if [ ! -d $(dir $@) ] ; then mkdir -p $(dir $@) ; fi $(fixupcmd) $^ > $@ -if !SYSTEMD %/$(PACKAGE_NAME): %/base-initconfig.in if [ ! -d $(dir $@) ] ; then mkdir -p $(dir $@) ; fi +if SYSTEMD + $(fixupcmd) $^ | sed -e 's/@preamble@/# This file is in systemd EnvironmentFile format - see man systemd.exec/' > $@ +else $(fixupcmd) $^ | sed -n -e 's/@preamble@//' -e '/^#/{p;d;}' -e '/^$$/{p;d;}' -e 's/^\([^=]*\)\(=.*\)$$/\1\2 ; export \1/ ; p' > $@ $(fixupcmd) $(srcdir)/ldap/admin/src/initconfig.in >> $@ +endif %/template-initconfig: %/template-initconfig.in if [ ! -d $(dir $@) ] ; then mkdir -p $(dir $@) ; fi +if SYSTEMD + $(fixupcmd) $^ | sed -e 's/@preamble@/# This file is in systemd EnvironmentFile format - see man systemd.exec/' > $@ +else $(fixupcmd) $^ | sed -n -e 's/@preamble@//' -e '/^#/{p;d;}' -e '/^$$/{p;d;}' -e 's/^\([^=]*\)\(=.*\)$$/\1\2 ; export \1/ ; p' > $@ endif diff --git a/rpm/389-ds-base.spec.in b/rpm/389-ds-base.spec.in index 16406d7..6edd1eb 100644 --- a/rpm/389-ds-base.spec.in +++ b/rpm/389-ds-base.spec.in @@ -741,6 +741,8 @@ exit 0 %{_libexecdir}/%{pkgname}/ds_selinux_enabled %{_libexecdir}/%{pkgname}/ds_selinux_port_query %if %{use_perl} +%config(noreplace)%{_sysconfdir}/%{pkgname}/config/template-initconfig +%{_mandir}/man5/template-initconfig.5.gz %{_datadir}/%{pkgname}/properties/*.res %{_datadir}/%{pkgname}/script-templates %{_datadir}/%{pkgname}/updates