Bug 1267369

Summary: mod_security is missing BuildRequires for pkgconfig
Product: [Fedora] Fedora Reporter: Kurt Seifried <kseifried>
Component: mod_securityAssignee: Othman Madjoudj <athmanem>
Status: CLOSED RAWHIDE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: medium    
Version: 23CC: athmanem, dkopecek, pvrabec
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: 2015-10-02 15:18:45 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Kurt Seifried 2015-09-29 19:43:43 UTC
Description of problem:

mod_security build files use pkgconfig to see is yajl and lua are available:

checking for x86_64-redhat-linux-gnu-pkg-config... no
checking for pkg-config... /usr/bin/pkg-config
checking pkg-config is at least version 0.9.0... yes
checking for liblua config script... /usr/bin/pkg-config
configure: using lua v5.1.4
checking for libyajl config script... /usr/bin/pkg-config
configure: using yajl v2.0.4

if pkgconfig is not present you can't compile mod_security with yajl/lua support.

Simply add "pkgconfig" to BuildRequires in the spec file and this problem is avoided.

Comment 1 Othman Madjoudj 2015-09-29 19:55:50 UTC
pkgconfig is pulled by rpm-build which is part of miminal buildroot (similar to gcc / make /etc).

Afaik the current packaging policy does not recommend (probably denies) adding those to BuildRequires.



DEBUG util.py:377:  ---> Package rpm-build.x86_64 0:4.12.90-7.fc24 will be installed
DEBUG util.py:377:  --> Processing Dependency: pkgconfig >= 1:0.24 for package: rpm-build-4.12.90-7.fc24.x86_64
DEBUG util.py:377:  --> Processing Dependency: elfutils >= 0.128 for package: rpm-build-4.12.90-7.fc24.x86_64

Comment 2 Kurt Seifried 2015-09-30 21:05:56 UTC
(In reply to Athmane Madjoudj from comment #1)
> pkgconfig is pulled by rpm-build which is part of miminal buildroot (similar
> to gcc / make /etc).
> 
> Afaik the current packaging policy does not recommend (probably denies)
> adding those to BuildRequires.
> 
> 
> 
> DEBUG util.py:377:  ---> Package rpm-build.x86_64 0:4.12.90-7.fc24 will be
> installed
> DEBUG util.py:377:  --> Processing Dependency: pkgconfig >= 1:0.24 for
> package: rpm-build-4.12.90-7.fc24.x86_64
> DEBUG util.py:377:  --> Processing Dependency: elfutils >= 0.128 for
> package: rpm-build-4.12.90-7.fc24.x86_64

Ahh, I was building this inside of a docker container which is very minimal (no tar even).

Comment 3 Kurt Seifried 2015-09-30 21:08:44 UTC
One note:

https://fedoraproject.org/wiki/Packaging:Guidelines#BuildRequires_2

BuildRequires based on pkg-config

Fedora packages which use pkg-config to build against a library (e.g. 'foo') on which they depend, SHOULD express their build dependency correctly as pkgconfig(foo). For more information, see Packaging:PkgConfigBuildRequires.

Comment 4 Othman Madjoudj 2015-10-02 15:18:45 UTC
Fixed in rawhide (2.9.0-5), currently building it on copr repo for the other branches (https://copr.fedoraproject.org/coprs/athmane/mod_security/).

Thank you for noticing this issue.

Comment 5 Kurt Seifried 2015-10-08 03:26:12 UTC
(In reply to Athmane Madjoudj from comment #4)
> Fixed in rawhide (2.9.0-5), currently building it on copr repo for the other
> branches (https://copr.fedoraproject.org/coprs/athmane/mod_security/).
> 
> Thank you for noticing this issue.

Awesome thanks! Do you know when this will get into EPEL?

Comment 6 Othman Madjoudj 2015-10-10 17:50:43 UTC
(In reply to Kurt Seifried from comment #5)
> (In reply to Athmane Madjoudj from comment #4)
> > Fixed in rawhide (2.9.0-5), currently building it on copr repo for the other
> > branches (https://copr.fedoraproject.org/coprs/athmane/mod_security/).
> > 
> > Thank you for noticing this issue.
> 
> Awesome thanks! Do you know when this will get into EPEL?

Hi Kurt, do you mean including the pkgconfig fix in EPEL or mod_security-2.9.0-5 ?

Comment 7 Othman Madjoudj 2015-10-10 17:54:21 UTC
Also note that some packages in EL6 does not provides pkgconfig dependenciy:


DEBUG util.py:377:  Getting requirements for mod_security-2.9.0-5.el6.src
DEBUG util.py:377:   --> httpd-devel-2.2.15-47.el6.centos.x86_64
DEBUG util.py:377:   --> libxml2-devel-2.7.6-20.el6.x86_64
DEBUG util.py:377:   --> lua-devel-5.1.4-4.1.el6.x86_64
DEBUG util.py:377:   --> pcre-devel-7.8-7.el6.x86_64
DEBUG util.py:377:   --> libcurl-devel-7.19.7-46.el6.x86_64
DEBUG util.py:377:  Error: No Package found for pkgconfig(yajl)
DEBUG util.py:488:  Child return code was: 1
DEBUG util.py:508:  child environment: None
DEBUG util.py:441:  Executing command: /usr/bin/gzip -9 --force /var/tmp/mockremote-bUljY/build/results/epel-6-x86_64/mod_security-2.9.0-5.el6/root.log with env {'LANG': 'en_US.UTF-8', 'TERM': 'vt100', 'SHELL': '/bin/sh', 'HOSTNAME': 'mock', 'HOME': '/builddir', 'PATH': '/usr/bin:/bin:/usr/sbin:/sbin'} and shell True

Comment 8 Kurt Seifried 2016-02-01 18:54:57 UTC
(In reply to Athmane Madjoudj from comment #6)
> (In reply to Kurt Seifried from comment #5)
> > (In reply to Athmane Madjoudj from comment #4)
> > > Fixed in rawhide (2.9.0-5), currently building it on copr repo for the other
> > > branches (https://copr.fedoraproject.org/coprs/athmane/mod_security/).
> > > 
> > > Thank you for noticing this issue.
> > 
> > Awesome thanks! Do you know when this will get into EPEL?
> 
> Hi Kurt, do you mean including the pkgconfig fix in EPEL or
> mod_security-2.9.0-5 ?

In the mod_security packages in EPEL/Fedora (still missing it seems).

Comment 9 Othman Madjoudj 2016-03-08 23:18:39 UTC
(In reply to Kurt Seifried from comment #8)
> (In reply to Athmane Madjoudj from comment #6)
> > (In reply to Kurt Seifried from comment #5)
> > > (In reply to Athmane Madjoudj from comment #4)
> > > > Fixed in rawhide (2.9.0-5), currently building it on copr repo for the other
> > > > branches (https://copr.fedoraproject.org/coprs/athmane/mod_security/).
> > > > 
> > > > Thank you for noticing this issue.
> > > 
> > > Awesome thanks! Do you know when this will get into EPEL?
> > 
> > Hi Kurt, do you mean including the pkgconfig fix in EPEL or
> > mod_security-2.9.0-5 ?
> 
> In the mod_security packages in EPEL/Fedora (still missing it seems).

Yes, because pkgconfig(yajl) is not provided in EPEL6 and mod_security is not available in EPEL7 (already in base).