FS#35477 - [openldap] - multiple packaging issues

Attached to Project: Arch Linux
Opened by Hugo Bernier (hbernier) - Saturday, 25 May 2013, 18:15 GMT
Last edited by Eric Belanger (Snowman) - Friday, 31 January 2014, 23:51 GMT
Task Type Feature Request
Category Packages: Core
Status Closed
Assigned To No-one
Architecture All
Severity Medium
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 2
Private No

Details

I have found two packaging issues with the openldap package since I started using it on Archlinux Arm:
---
1- Upgrade creates slapd.conf even if cn=config "online config database" is present
Though cn=config style configuration overrides slapd.conf, this could cause a regression in the future. The solution would be to simply check for the presence of the cn=config style configuration and not create the file if it's present.
---
2- No way to specify any startup options. Modifying slapd.service is pointless as it's overwritten on upgrade. This is an issue if you use ldapi:/// for example.

A good starting point for common options for ldap are the centos init script or the fedora slapd.service file:
http://pkgs.fedoraproject.org/cgit/openldap.git/tree/slapd.service
and associated sysconfig file:
http://pkgs.fedoraproject.org/cgit/openldap.git/tree/slapd.sysconfig

Finally, according to the admin guide created by the developers slapd.conf style configuration is deprecated.

Additional info:
* These issues are present in openldap 2.4.35-3

Steps to reproduce:
Re-install openldap via pacman.

This task depends upon

Closed by  Eric Belanger (Snowman)
Friday, 31 January 2014, 23:51 GMT
Reason for closing:  Won't implement
Comment by Hugo Bernier (hbernier) - Monday, 27 May 2013, 08:37 GMT
  • Field changed: Percent Complete (100% → 0%)
These issues are also present on Archlinux.
I just created a black box, a fresh arch linux install and confirmed all above issues.
Comment by Mantas Mikulėnas (grawity) - Friday, 31 May 2013, 14:57 GMT
> 1- Upgrade creates slapd.conf even if cn=config "online config database" is present

You can use pacman's NoExtract for this.

> 2- No way to specify any startup options. Modifying slapd.service is pointless as it's overwritten on upgrade. This is an issue if you use ldapi:/// for example.

The way to override systemd units is to create a file with the same name in /etc – e.g. "/etc/systemd/system/slapd.service". You are not supposed to modify files in /usr/lib anyway.
Comment by Hugo Bernier (hbernier) - Wednesday, 05 June 2013, 14:51 GMT
1 -> You can use pacman's NoExtract for this.

Good point. However, I've been using arch linux for a while and I've never had to use NoExtract - I'm not sure this is the 'keep it simple' solution. Personally I can work with that.

2- The way to override systemd units is to create a file with the same name in /etc – e.g. "/etc/systemd/system/slapd.service". You are not supposed to modify files in /usr/lib anyway.

Good to know, I'll add that to my knowledge base. However wouldn't it be more simple for users to use the pre-established convention to store daemon configuration in /etc/conf.d?
Comment by Eric Belanger (Snowman) - Friday, 31 January 2014, 23:51 GMT
1. This can't be done without an ugly hack in the .install file so use NoExtract
2. As mentionnened by grawity, create a /etc/systemd/system/slapd.service, that's how you configure systemd service.

Loading...