Bug 252249
Summary: | Need pkgconfig file for -devel package | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Product: | [Retired] 389 | Reporter: | Rich Megginson <rmeggins> | ||||||||
Component: | Server - Plugins | Assignee: | Nathan Kinder <nkinder> | ||||||||
Status: | CLOSED CURRENTRELEASE | QA Contact: | Chandrasekar Kannan <ckannan> | ||||||||
Severity: | low | Docs Contact: | |||||||||
Priority: | high | ||||||||||
Version: | 1.1.0beta | CC: | amsharma, benl, jgalipea, ssorce | ||||||||
Target Milestone: | --- | ||||||||||
Target Release: | --- | ||||||||||
Hardware: | All | ||||||||||
OS: | Linux | ||||||||||
Whiteboard: | |||||||||||
Fixed In Version: | Doc Type: | Bug Fix | |||||||||
Doc Text: | Story Points: | --- | |||||||||
Clone Of: | Environment: | ||||||||||
Last Closed: | 2014-06-16 16:24:26 UTC | Type: | --- | ||||||||
Regression: | --- | Mount Type: | --- | ||||||||
Documentation: | --- | CRM: | |||||||||
Verified Versions: | Category: | --- | |||||||||
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||||||
Cloudforms Team: | --- | Target Upstream Version: | |||||||||
Embargoed: | |||||||||||
Bug Depends On: | |||||||||||
Bug Blocks: | 639035, 656390 | ||||||||||
Attachments: |
|
Description
Rich Megginson
2007-08-14 21:41:48 UTC
We should also add the sample code to the -devel package *** Bug 659776 has been marked as a duplicate of this bug. *** Created attachment 474667 [details]
Patch
ipa needs the ability to determine if slapi uses mozldap or openldap and, if so, what compiler switches to add (e.g. -DUSE_OPENLDAP=1) (In reply to comment #9) > ipa needs the ability to determine if slapi uses mozldap or openldap and, if > so, what compiler switches to add (e.g. -DUSE_OPENLDAP=1) Would it be OK to just add "-DUSE_OPENLDAP=1" to cflags if the openldap client libraries are used? (In reply to comment #10) > (In reply to comment #9) > > ipa needs the ability to determine if slapi uses mozldap or openldap and, if > > so, what compiler switches to add (e.g. -DUSE_OPENLDAP=1) > > Would it be OK to just add "-DUSE_OPENLDAP=1" to cflags if the openldap client > libraries are used? I think so - Simo? (In reply to comment #11) > (In reply to comment #10) > > (In reply to comment #9) > > > ipa needs the ability to determine if slapi uses mozldap or openldap and, if > > > so, what compiler switches to add (e.g. -DUSE_OPENLDAP=1) > > > > Would it be OK to just add "-DUSE_OPENLDAP=1" to cflags if the openldap client > > libraries are used? > > I think so - Simo? It would probably be better to return the right include path in cflags and the right libraries in lflags, this way plugin writers do not even need to do their own checks for these libs. They will just pick the pkgflags values. One problem with simply returning the compiler include flags and linker flags is that the mozldap and openldap APIs are not 100% compatible. I think it is better to expose a custom variable via our pkgconfig file to define which ldap library we are using. This way a plug-in that needs to know which ldap client library was used by the server can get that information and use whatever define they want internally. I'm thinking something like this: # pkg-config --variable=ldaplib dirsrv openldap OR # pkg-config --variable=ldaplib dirsrv mozldap If you need to know which sdk to use outside of C code, you would need something like that. But I don't think it is needed. As long as plugin writers know that they can use #if defined(USE_OPENLDAP) ... use openldap specific api ... #else ... use mozldap specific api ... #endif and as long as pkg-config --cflags dirsrv returns "... -DUSE_OPENLDAP=1 ..." I think that will suffice. Created attachment 475007 [details]
Revised Patch
This patch is a revised version of the previous patch. This adds "-DUSE_OPENLDAP" to cflags in addition to adding a variable named "ldaplib" to the pkg-config file that will be set to either "mozldap" or "openldap" depending on which library is used by dirsrv.
Comment on attachment 475007 [details]
Revised Patch
This line is incorrect:
+Cflags: @ldaplib_defs@ -I@serverincdir@/slapi-plugin.h
Should just be the path, not the path and filename.
(In reply to comment #16) > Comment on attachment 475007 [details] > Revised Patch > > This line is incorrect: > +Cflags: @ldaplib_defs@ -I@serverincdir@/slapi-plugin.h > > Should just be the path, not the path and filename. Good catch. New patch coming. Created attachment 475025 [details]
Revised Patch
This fixes the include flag to not contain the header filename. Thanks to Rich for catching this issue!
Pushed patch to master. Thanks to Rich for his review! Counting objects: 12, done. Delta compression using up to 2 threads. Compressing objects: 100% (7/7), done. Writing objects: 100% (7/7), 2.31 KiB, done. Total 7 (delta 5), reused 0 (delta 0) To ssh://git.fedorahosted.org/git/389/ds.git 9f1160c..c9839b3 master -> master Hi Rich/Nathan, Request you to please add the verification steps. Thanks, Amita (In reply to comment #20) > Hi Rich/Nathan, > > Request you to please add the verification steps. > > Thanks, > Amita Install the 389-ds-base-devel pacakge, then attempt to run the following command: pkg-config --libs dirsrv If this returns something similar to the following, you can consider it verified: -L/usr/lib64/dirsrv -lslapd Installed: 389-ds-base-devel.x86_64 0:1.2.8.2-1.el6 Dependency Installed: 389-ds-base-libs.x86_64 0:1.2.8.2-1.el6 cyrus-sasl-devel.x86_64 0:2.1.23-8.el6 nspr-devel.x86_64 0:4.8.7-1.el6 nss-devel.x86_64 0:3.12.9-9.el6 nss-softokn-devel.x86_64 0:3.12.9-3.el6 nss-softokn-freebl-devel.x86_64 0:3.12.9-3.el6 nss-util-devel.x86_64 0:3.12.9-1.el6 openldap-devel.x86_64 0:2.4.23-15.el6 pkgconfig.x86_64 1:0.23-9.1.el6 svrcore.x86_64 0:4.0.4-5.1.el6 svrcore-devel.x86_64 0:4.0.4-5.1.el6 Complete! [root@rhel6 yum.repos.d]# pkg-config --libs dirsrv -L/usr/lib64/dirsrv -lslapd [root@rhel6 yum.repos.d]# [root@rhel6 yum.repos.d]# cat /etc/redhat-release Red Hat Enterprise Linux Server release 6.1 (Santiago) should be marked CLOSED |