On 09.08.21 14:43, Michael Ströder wrote:
On 8/9/21 3:28 PM, Jan Engelhardt wrote:
On Monday 2021-08-09 14:43, Michael Ströder wrote:
If users are still running back-hdb or even the ancient back-bdb they won't be able upgrade because in your build these deprecated back-ends are disabled. They won't even be able to slapcat their databases.
Personally I think those users should have migrated their DBs to back-mdb years ago. But what's the position of the openSUSE project on this?
I could propose something like
%pretrans if grep -Pq 'database\s+hdb' /etc/openldap/slapd.conf 2>/dev/null; then echo "slapd.conf: You should convert from hdb to mdb first before starting the upgrade." exit 1 fi
Detail: The regex pattern should also cover back-bdb.
Slightly harder: The installation could use back-config and user root does not have LDAP search privileges on cn=config (or whatever the config is).
So the %pretrans task would also have to find out which file directory is used to store back-config's LDIF files and search therein.
Is this scenario common enough that we have to cover it in the upgrade? I would expect that OpenLDAP users are fairly advanced users, and users using back-config even more so. They should have a robust update procedure in place with maybe a staging setup, a rollback mechanism, etc. It seems to me that being helpful in the most common case with something like the pretrans script Jan suggested is sufficient? After all, this is an upgrade only Tumbleweed users get directly, everybody else only when they do an explicit distro update. Philipp