I'm working on packaging the fmt library [1] and it provides both linked and header only use. My initial thought was to not package the header only files, but it has been requested. I was planning on putting the header only files in *-static to match the spirit of the guidelines [2]. Is that the best way to handle this? Also, can I include the *.h files in both *-devel and *-static or will that conflict cause problems? Thanks, Dave
[1]: https://bugzilla.redhat.com/show_bug.cgi?id=1350143 [2]: https://fedoraproject.org/wiki/Packaging:Guidelines?rd=Packaging/Guidelines#...
On 08/10/2016 08:43 PM, Dave Johansen wrote:
I'm working on packaging the fmt library [1] and it provides both linked and header only use. My initial thought was to not package the header only files, but it has been requested. I was planning on putting the header only files in *-static to match the spirit of the guidelines [2]. Is that the best way to handle this? Also, can I include the *.h files in both *-devel and *-static or will that conflict cause problems? Thanks, Dave
What the guidelines state is:
Don't ship a -static package. Put everything in -devel and provide fmt-static there.
Packages that use fmt in a header-only manner should require fmt-static.
On Thu, Aug 11, 2016 at 11:37 AM, Orion Poplawski orion@cora.nwra.com wrote:
On 08/10/2016 08:43 PM, Dave Johansen wrote:
I'm working on packaging the fmt library [1] and it provides both linked
and
header only use. My initial thought was to not package the header only
files,
but it has been requested. I was planning on putting the header only files in *-static to match the spirit of the guidelines [2]. Is that the best way to handle this? Also, can I include the *.h files in both *-devel and *-static or will
that
conflict cause problems? Thanks, Dave
Packaging/Guidelines#Packaging_Header_Only_Libraries
What the guidelines state is:
Don't ship a -static package. Put everything in -devel and provide fmt-static there.
Packages that use fmt in a header-only manner should require fmt-static.
The guideline addresses header-only libraries and fmt is technically not a header-only library. It has a feature that allows it to be used as a header-only library, but I would like to discourage it's use by making it required that it be explicit. If I package it all in fmt-devel then there's no automated check or other way to enforce that people don't install fmt-devel and then use it as a header-only library. Having that functionality be in fmt-static makes the use explicit and prevents intentional/unintentional static linking.
On 08/11/2016 12:20 PM, Dave Johansen wrote:
On Thu, Aug 11, 2016 at 11:37 AM, Orion Poplawski <orion@cora.nwra.com mailto:orion@cora.nwra.com> wrote:
On 08/10/2016 08:43 PM, Dave Johansen wrote: > I'm working on packaging the fmt library [1] and it provides both linked and > header only use. My initial thought was to not package the header only files, > but it has been requested. > I was planning on putting the header only files in *-static to match the > spirit of the guidelines [2]. Is that the best way to handle this? > Also, can I include the *.h files in both *-devel and *-static or will that > conflict cause problems? > Thanks, > Dave > > [1]: https://bugzilla.redhat.com/show_bug.cgi?id=1350143 <https://bugzilla.redhat.com/show_bug.cgi?id=1350143> > [2]: > https://fedoraproject.org/wiki/Packaging:Guidelines?rd=Packaging/Guidelines#Packaging_Header_Only_Libraries <https://fedoraproject.org/wiki/Packaging:Guidelines?rd=Packaging/Guidelines#Packaging_Header_Only_Libraries> > What the guidelines state is: Don't ship a -static package. Put everything in -devel and provide fmt-static there. Packages that use fmt in a header-only manner should require fmt-static.
The guideline addresses header-only libraries and fmt is technically not a header-only library. It has a feature that allows it to be used as a header-only library, but I would like to discourage it's use by making it required that it be explicit. If I package it all in fmt-devel then there's no automated check or other way to enforce that people don't install fmt-devel and then use it as a header-only library. Having that functionality be in fmt-static makes the use explicit and prevents intentional/unintentional static linking.
But that's how it already is with header only libraries. I suppose that could be revisited if necessary. But the headers have to be in -devel anyway. You could just ship the .cc file in -static, and have -static require -devel (as is usual), then users would have to BR -static to use it in header only mode.
packaging@lists.fedoraproject.org