#50501 Issue 50425 - Add jemalloc LD_PRELOAD to systemd drop-in file
Closed 3 years ago by spichugi. Opened 4 years ago by mreynolds.
mreynolds/389-ds-base ticket50425  into  master

file modified
+11 -11
@@ -654,8 +654,10 @@ 

  #------------------------

  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
@@ -882,10 +884,12 @@ 

  	wrappers/$(systemdgroupname) \

  	wrappers/$(PACKAGE_NAME)-snmp.service

  

- systemdsystemunitdropin_DATA = wrappers/$(PACKAGE_NAME)@.service.d/custom.conf

Given this hunk we don't set TimeoutStart/Stop for XSan build any more, since those are in custom.conf only. If that's not an issue for now then we can leave this as is and I'll fix that in the fix for #50442 SUSE issues.

  if with_sanitizer

- systemdsystemunitdropin_DATA += wrappers/$(PACKAGE_NAME)@.service.d/xsan.conf

+ systemdsystemunitdropin_DATA = wrappers/$(PACKAGE_NAME)@.service.d/xsan.conf

+ else

+ systemdsystemunitdropin_DATA = wrappers/$(PACKAGE_NAME)@.service.d/custom.conf

  endif

+ 

  else

  if INITDDIR

  init_SCRIPTS = wrappers/$(PACKAGE_NAME) \
@@ -983,12 +987,14 @@ 

          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
@@ -2292,20 +2298,14 @@ 

  	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

  

file modified
-2
@@ -601,7 +601,6 @@ 

  %dir %{_sysconfdir}/systemd/system/%{groupname}.wants

  %config(noreplace)%{_sysconfdir}/%{pkgname}/config/slapd-collations.conf

  %config(noreplace)%{_sysconfdir}/%{pkgname}/config/certmap.conf

- %config(noreplace)%{_sysconfdir}/%{pkgname}/config/template-initconfig

  %{_datadir}/%{pkgname}

  %exclude %{_datadir}/%{pkgname}/script-templates

  %exclude %{_datadir}/%{pkgname}/updates
@@ -655,7 +654,6 @@ 

  %{_mandir}/man8/vlvindex.8.gz

  %{_mandir}/man5/99user.ldif.5.gz

  %{_mandir}/man5/certmap.conf.5.gz

- %{_mandir}/man5/template-initconfig.5.gz

  %{_mandir}/man5/slapd-collations.conf.5.gz

  %{_mandir}/man5/dirsrv.5.gz

  %{_mandir}/man5/dirsrv.systemd.5.gz

@@ -49,4 +49,5 @@ 

  #ProtectHome=yes

  #PrivateTmp=yes

  

- 

+ # Preload jemalloc

+ Environment=LD_PRELOAD=@libdir@/@package_name@/lib/libjemalloc.so.2

Description: Add the jemalloc back to the systemd dropin file which
was accidentally removed from a previous change regarding
systemd

Relates: https://pagure.io/389-ds-base/issue/50425

Instead, we should probably use the original initconfig's @libdir@/@package_name@/lib/libjemalloc.so.2 here.

Given this hunk we don't set TimeoutStart/Stop for XSan build any more, since those are in custom.conf only. If that's not an issue for now then we can leave this as is and I'll fix that in the fix for #50442 SUSE issues.

Aside from the two comments above, LGTM!

rebased onto 7466be3

4 years ago

Pull-Request has been merged by mreynolds

4 years ago

389-ds-base is moving from Pagure to Github. This means that new issues and pull requests
will be accepted only in 389-ds-base's github repository.

This pull request has been cloned to Github as issue and is available here:
- https://github.com/389ds/389-ds-base/issues/3557

If you want to continue to work on the PR, please navigate to the github issue,
download the patch from the attachments and file a new pull request.

Thank you for understanding. We apologize for all inconvenience.

Pull-Request has been closed by spichugi

3 years ago