Bug 1433992 - Broken CFLAGS provided by the dirsrv pkgconfig file
Summary: Broken CFLAGS provided by the dirsrv pkgconfig file
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: 389-ds-base
Version: 26
Hardware: All
OS: Linux
unspecified
urgent
Target Milestone: ---
Assignee: wibrown@redhat.com
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: 1434967
TreeView+ depends on / blocked
 
Reported: 2017-03-20 13:57 UTC by Lukas Slebodnik
Modified: 2020-09-13 21:57 UTC (History)
5 users (show)

Fixed In Version: 389-ds-base-1.3.6.3-4.f26
Clone Of:
: 1434967 (view as bug list)
Environment:
Last Closed: 2017-05-04 14:51:00 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github 389ds 389-ds-base issues 2236 0 None None None 2020-09-13 21:57:40 UTC

Description Lukas Slebodnik 2017-03-20 13:57:48 UTC
Description of problem:
It is not possible to rebuild freeIPA in koji due to broken
CFLAGS provided by dirsrv(389-ds-base-devel)


Version-Release number of selected component (if applicable):
sh$ rpm -q 389-ds-base-devel
389-ds-base-devel-1.3.6.2-2.fc26

How reproducible:
Deterministic

Steps to Reproduce:
1. dnf install --best -y 'pkgconfig(dirsrv)'
2. pkg-config --cflags dirsrv

Actual results:
//invalid string in CFLAGS
@ldaplib_defs@ -I/dirsrv

Expected results:
//output from fedora25
-DUSE_OPENLDAP -I/usr/include/dirsrv

Additional info:
There are more unexpaded values in pkgconfig file.

sh$ cat /usr/lib64/pkgconfig/dirsrv.pc 
ldaplib=@ldaplib@

Name: dirsrv
Description: 389 Directory Server
Version: 1.3.6.2
Libs: -L${libdir}//dirsrv -lslapd
Cflags: @ldaplib_defs@ -I${includedir}//dirsrv

Comment 1 mreynolds 2017-03-20 14:23:30 UTC
Assigning to William since he added the pkgconfig files.

Comment 2 wibrown@redhat.com 2017-03-21 06:49:25 UTC
Upstream ticket:
https://pagure.io/389-ds-base/issue/49177

Comment 3 mreynolds 2017-03-22 02:07:44 UTC
Does this build address the issues with pkgcfg?

https://koji.fedoraproject.org/koji/taskinfo?taskID=18512577

Comment 4 wibrown@redhat.com 2017-03-22 04:38:05 UTC
It looks like it:

wget https://kojipkgs.fedoraproject.org//work/tasks/2578/18512578/389-ds-base-devel-1.3.6.3-2.fc26.x86_64.rpm
rpm2cpio ./389-ds-base-devel-1.3.6.3-2.fc26.x86_64.rpm| cpio -idv

cat ./usr/lib64/pkgconfig/dirsrv.pc

ldaplib=openldap

Name: dirsrv
Description: 389 Directory Server
Version: 1.3.6.3
Libs: -L${libdir}//dirsrv -lslapd
Cflags: -DUSE_OPENLDAP -I${includedir}//dirsrv

Comment 5 mreynolds 2017-03-22 16:13:57 UTC
(In reply to wibrown from comment #4)
> It looks like it:
> 
> wget
> https://kojipkgs.fedoraproject.org//work/tasks/2578/18512578/389-ds-base-
> devel-1.3.6.3-2.fc26.x86_64.rpm
> rpm2cpio ./389-ds-base-devel-1.3.6.3-2.fc26.x86_64.rpm| cpio -idv
> 
> cat ./usr/lib64/pkgconfig/dirsrv.pc
> 
> ldaplib=openldap
> 
> Name: dirsrv
> Description: 389 Directory Server
> Version: 1.3.6.3
> Libs: -L${libdir}//dirsrv -lslapd
> Cflags: -DUSE_OPENLDAP -I${includedir}//dirsrv

Aren't the %{ var } supposed to be filled in?

Comment 6 Lukas Slebodnik 2017-03-22 16:25:46 UTC
(In reply to mreynolds from comment #5)
> (In reply to wibrown from comment #4)
> > It looks like it:
> > 
> > wget
> > https://kojipkgs.fedoraproject.org//work/tasks/2578/18512578/389-ds-base-
> > devel-1.3.6.3-2.fc26.x86_64.rpm
> > rpm2cpio ./389-ds-base-devel-1.3.6.3-2.fc26.x86_64.rpm| cpio -idv
> > 
> > cat ./usr/lib64/pkgconfig/dirsrv.pc
> > 
> > ldaplib=openldap
> > 
> > Name: dirsrv
> > Description: 389 Directory Server
> > Version: 1.3.6.3
> > Libs: -L${libdir}//dirsrv -lslapd
> > Cflags: -DUSE_OPENLDAP -I${includedir}//dirsrv
> 
> Aren't the %{ var } supposed to be filled in?

No,
because pkgconfig  can expand them.
However they are not defined in dirsrv.pc

e.g.
  prefix=/usr/local
  exec_prefix=${prefix}
  libdir=${exec_prefix}/lib
  includedir=${prefix}/include

  Name: ipa_hbac
  Description: FreeIPA HBAC Evaluator library
  Version: 1.15.3
  Libs: -L${libdir} -lipa_hbac
  Cflags: I${includedir}/ipa_hbac
  URL: https://pagure.io/SSSD/sssd/

So there is missing in dirsrv.pc.in (and probably others as well)
  prefix=@prefix@
  exec_prefix=@exec_prefix@
  libdir=@libdir@
  includedir=@includedir@

My fault; I didn't explain it properly in upstream ticket
https://pagure.io/389-ds-base/issue/49177#comment-432430

Comment 8 mreynolds 2017-03-22 18:44:14 UTC
Fixed in 389-ds-base-1.3.6.3-4

Comment 9 Lukas Slebodnik 2017-03-23 14:44:54 UTC
I think there is a missing bodhi update for koji build
https://koji.fedoraproject.org/koji/buildinfo?buildID=871724

Comment 10 mreynolds 2017-03-23 14:47:38 UTC
Right, I am going to do the fedpkg update shortly...


Note You need to log in before you can comment on or make changes to this bug.