[Fedora-packaging] Includedir question

Michael Schwendt mschwendt at gmail.com
Sun Jun 16 10:28:25 UTC 2013


On Sun, 16 Jun 2013 17:35:44 +0800, Christopher Meng wrote:

> Hi,
> 
> I'm packaging serf into Fedora.
> 
> Here is the review request:
> 
> https://bugzilla.redhat.com/show_bug.cgi?id=973904
> 
> However, the reviewer said that this package should follow how was
> packaged in oter distros.

That's somewhat unusual.

While we've got naming guidelines, which sometimes make it plausible to
use package names that are used by other dists already, spending time on
examining other dists' packages on where they store header files is
beyond the scope of packaging for Fedora.

So, where does upstream install those headers?

You use the default location so far, since you don't modify the configure
script's --includedir parameter: http://cicku.me/libserf.spec

> Debian and OpenSUSE install headers to /usr/include/serf-1/*.h, but I
> just packaged them to  /usr/include/*.h
> 
> Now I decide to install them to a new folder, should I keep updated
> with Debian or OpenSUSE, and install them to /usr/include/serf-1/, or
> to /usr/include/serf/?

This depends on where dependencies expect these headers to be found.
Do they evaluate the serf-1.pc pkgconfig --cflags to retrieve a custom
search path for headers? Do external sources include the headers via
standard search path, i.e.

  #include <serf.h>

or

  #include <serf-1/serf.h>

? Do they use a hardcoded /usr/include/serf-1 search path? What is the
full story here?


> %{_libdir}/pkgconfig/%{oname}*.pc

Hint: it can be very helpful to use _less_ wildcards for important files
like this one. If the filename changes, the automated RPM pkgconfig deps
would change and break dependencies without warning you. Better spell out
the full name of this file, because that would make the build fail and
serve as an early-warning-system. (a similar thing may apply to other 
important file types, e.g. libs)

> BuildRequires:  glibc-devel

It's part of the minimum build environment and doesn't need to be specified
in the spec file.

> %package        devel
> Requires:       %{name}%{?_isa} = %{version}-%{release}
> Requires:       apr-util-devel
> Requires:       apr-devel
> Requires:       krb5-devel
> Requires:       libgssapi-devel
> Requires:       openssl-devel
> Requires:       zlib-devel

Here you should append %{?_isa} just like for the base package Requires.
But are all these really required?

$ grep \#include serf*
serf_bucket_types.h:#include <apr_mmap.h>
serf_bucket_types.h:#include <apr_hash.h>
serf_bucket_types.h:#include "serf.h"
serf_bucket_util.h:#include "serf.h"
serf.h:#include <apr.h>
serf.h:#include <apr_errno.h>
serf.h:#include <apr_allocator.h>
serf.h:#include <apr_pools.h>
serf.h:#include <apr_network_io.h>
serf.h:#include <apr_time.h>
serf.h:#include <apr_poll.h>
serf.h:#include <apr_uri.h>
serf.h:#include "serf_bucket_types.h"

-- 
Michael Schwendt
Fedora release 19 (Schrödinger’s Cat) - Linux 3.9.5-301.fc19.x86_64
loadavg: 0.32 0.32 0.26


More information about the packaging mailing list