#169 allow 389 to use db5
Closed: wontfix None Opened 9 years ago by rmeggins.

Newer version of Fedora and other OSes are using db5. We need to allow 389 to use db5.

batch move to milestone future

Fix description:
1. DB suffix ".db4" is changed to ".db" if the server is linked
with db5 (libdb); it remains ".db4" if linked with db4.
2. Fixed DB_VERSION macro to pick up the correct APIs for db5.
3. DB upgrade flag DBVERSION_UPGRADE_4_5 is introduced and set
once it is found the db4 to db5 upgrade is necessary.
Upgrade from db4 to 5 requires cleaning up the region files
(__db.##) then update transaction log files. The database
files are compatible.
4. Added a code to db.m4 to check /usr/include/libdb/db.h.
If /usr/include/db4/db.h does not exists AND libdb does,
the db5 (libdb) header file is used.
Note: package db4-devel and libdb-devel cannot coexist.

Steps to verify:
0. Install 389-ds-base linked with db4.
# cat /var/lib/dirsrv/slapd-ID/db/DBVERSION
# ls /var/lib/dirsrv/slapd-ID/db/userRoot/id2entry.db
1. Remove db4-utils (rpm -e --nodeps db4-utils), then
install libdb-utils (yum install libdb-utils).
Install 389-ds-base linked with db5 on top of it.
2. Upgrade the instance with "setup-ds.pl -u"
3. Check the db dir again.
# cat /var/lib/dirsrv/slapd-ID/db/DBVERSION
# ls /var/lib/dirsrv/slapd-ID/db/userRoot/id2entry.db

4. Run basic tests against the upgraded server.

looks good - do we still need any of that database stuff in cl5_api.c since we moved the changelog into the main database?

Reviewed by Rich (Thank you!!!)

Pushed to master.

$ git merge trac169
Updating bc78101..5911c0f
Makefile.in | 7 +-
aclocal.m4 | 40 +-
config.h.in | 6 +
configure |18954 +++++++++++-----------------
ldap/servers/plugins/replication/cl5_api.c | 6 +-
ldap/servers/slapd/back-ldbm/back-ldbm.h | 12 +-
ldap/servers/slapd/back-ldbm/dbhelp.c | 6 -
ldap/servers/slapd/back-ldbm/dblayer.c | 46 +-
ldap/servers/slapd/back-ldbm/perfctrs.c | 2 +-
ldap/servers/slapd/back-ldbm/start.c | 3 +-
ldap/servers/slapd/back-ldbm/upgrade.c | 56 +-
ltmain.sh | 3968 ++++--
m4/db.m4 | 6 +
13 files changed, 10215 insertions(+), 12897 deletions(-)

$ git push
Counting objects: 43, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (22/22), done.
Writing objects: 100% (22/22), 66.28 KiB, done.
Total 22 (delta 20), reused 0 (delta 0)
To ssh://git.fedorahosted.org/git/389/ds.git
bc78101..5911c0f master -> master

originally targeted for 1.2.11.rc1, but actually in the 1.2.11.a1 release

Added initial screened field value.

Metadata Update from @nhosoi:
- Issue assigned to nhosoi
- Issue set to the milestone: 1.2.11.a1

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 issue has been cloned to Github and is available here:
- https://github.com/389ds/389-ds-base/issues/169

If you want to receive further updates on the issue, please navigate to the github issue
and click on subscribe button.

Thank you for understanding. We apologize for all inconvenience.

Metadata Update from @spichugi:
- Issue close_status updated to: wontfix (was: Fixed)

9 months ago

Login to comment on this ticket.