#337 Guidelines needed for header only libraries
Closed: Fixed None Opened 10 years ago by orion.

There seem to be a growing number of (C++ esp.) https://bugzilla.redhat.com/show_bug.cgi?id=993324header only/include file libraries coming into Fedora. Since these are effectively "static libraries" - code is only imported at compile time, it strikes me that they need to be treated like static libraries. I'm not sure it makes sense to have a -static provide and have dependent packages use that as with static libraries or have a new -header or similar sub-package type. Thoughts?

Another typical issue seems to be making the -devel sub-package noarch but keeping the main package arch specific in order for tests to get run on all arches. Could be helpful to have a guideline on this.


Off the top of my head, these packages are also affected:

This has also come up before on the packaging list. I think the following threads are relevant.

Extending the Static Library Packaging Guidelines to cover inline/template code:
https://lists.fedoraproject.org/pipermail/packaging/2012-April/008370.html
RFD: C/C++ template packages:
https://lists.fedoraproject.org/pipermail/packaging/2012-October/008714.html
No -devel package:
* https://lists.fedoraproject.org/pipermail/packaging/2012-December/008796.html

I agree. And some are Frankenpackages - part template, part library, case in point: Armadillo.

These really should be somehow equated to static libraries in the build process, and trigger a rebuild of all dependent packages whenever they're bumped.

Discussed at today's fpc meeting. FPC likes the direction of adding these types of packages to the static libraries guidelines. On the two questions, the subset of FPC present said that they favour reusing the current, -static subpackage naming standard for this and would prefer to allow but not recommend making the -devel sub-package noarch.

orionp said that he would try to create a Guideline Draft for FPC to vote on in the future.

Replying to [comment:4 orion]:

How does this seem? https://fedoraproject.org/wiki/OrionPoplawski/HeaderLibrariesDraft
The 1st paragraph is fine with me, but I find the 2nd to be slightly confusing.

It's at my intention to express header-only packages MUST be built arch'ed (BuildArch != noarch) in any case, independently of whether the resulting run-time rpms are noarch or not.
Whether they can be noarch or not, is subject to normal noarch rules.

It's at my intention to express header-only packages MUST be built arch'ed
(!BuildArch != noarch) in any case

What if the package does not have a test suite? Then building it arch is just a waste of time.

info header only libraries draft passes with a modification to require such packages to be arch'd (+1:6, 0:0, -1:0)

Added to https://fedoraproject.org/wiki/Packaging:Guidelines#Packaging_Header_Only_Libraries

Announcement text:

"""

A new guideline for header-only libraries (for instance, C++ templates) was added. These guidelines treat header-only libraries similarly to static libraries.

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

"""

Login to comment on this ticket.

Metadata