Bug 556040 - binutils : does not adhere to Static Library Packaging Guidelines
Summary: binutils : does not adhere to Static Library Packaging Guidelines
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: binutils
Version: rawhide
Hardware: All
OS: Linux
low
low
Target Milestone: ---
Assignee: Nick Clifton
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On: 576300
Blocks:
TreeView+ depends on / blocked
 
Reported: 2010-01-16 14:45 UTC by Michael Schwendt
Modified: 2010-06-30 16:00 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2010-06-30 16:00:59 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Michael Schwendt 2010-01-16 14:45:26 UTC
The package is in need of an update because it does not adhere to
the guidelines for packaging static libraries:

  http://fedoraproject.org/wiki/Packaging:Guidelines#Packaging_Static_Libraries

The -devel package contains both the shared and the static build of
a library. That makes it possible to link statically with the -devel
package as a build requirement instead of having to build-require a
special-purpose -static subpackage.

Correct would be to either disable/delete the static libraries at
build-time, or to %exclude them in the %files section, or to split off
a -static subpackage (if there is a compelling reason as why the static
libs should be made available).

Please consult the guidelines for the details.

[...]

binutils-devel
    /usr/lib/libbfd.so  <=>  /usr/lib/libbfd.a
    /usr/lib/libopcodes.so  <=>  /usr/lib/libopcodes.a

Comment 1 Nick Clifton 2010-02-09 14:30:54 UTC
The binutils API is considered to be too unstable for dynamic use.  Hence most packages that use the BFD or OPCODES libraries will require the static libraries.

Comment 2 Michael Schwendt 2010-02-09 14:39:52 UTC
Please follow the guidelines.

Comment 3 Jakub Jelinek 2010-02-09 15:34:31 UTC
They don't make any sense for binutils.

Comment 4 Milos Jakubicek 2010-02-09 16:09:28 UTC
Jakub,

could you please provide any explanation to why the static libraries couldn't be split into a -static subpackage to conform, like any other package, to the current guidelines?

Thanks

Comment 5 Jakub Jelinek 2010-02-09 16:56:37 UTC
Because the -devel subpackage, which would provide libbfd.so/libopcodes.so would necessarily need to Requires: binutils-static, as libbfd.so/libopcodes.so are linker scripts that include libbfd.a resp. libopcodes.a together with libraries they need.
So, while it is technically possible to split it, it wouldn't just cause bloat and wouldn't do any good.

Comment 6 Michael Schwendt 2010-02-09 17:14:33 UTC
Nebulous. Are you trying to say that libbfd.so/libopcodes.so are ld scripts and can only be used to link statically? If so, they belong into a binutils-static package despite their .so file extension.

Or else this would be static linking in disguise, which would violate the guidelines and the goal of being able to track builds that explicitly want to link statically.

Comment 7 Michael Schwendt 2010-02-10 13:06:19 UTC
Still reproducible. Reopened by: fedora-report-static-batch.py

binutils-devel
    /usr/lib/libbfd.so  <=>  /usr/lib/libbfd.a
    /usr/lib/libopcodes.so  <=>  /usr/lib/libopcodes.a

Comment 8 Nick Clifton 2010-02-12 14:02:57 UTC
Hi Michael,

  Would you care to try out the binutils-2_20_51_0_2-15-fc13 rpm in rawhide ?  I have split off the static libraries into a separate binutils-static package as per the Packing Guidelines, although I am not sure how many other packages this is going to break.

Cheers
  Nick

Comment 9 Michael Schwendt 2010-02-12 23:30:26 UTC
Well, if you would like me to test something instead of relying on a tool to close/reopen this ticket, how about a reply to comment 6?

$ rpmls -p binutils-devel-2.20.51.0.2-15.fc13.i686.rpm|grep so
-rw-r--r--  /usr/lib/libbfd.so
-rw-r--r--  /usr/lib/libopcodes.so

These are customised for linking statically, so why not move them into the -static package as well?

[...]

The list of src.rpm packages, which directly "BuildRequires: binutils-devel", is this:

$ repoquery --disablerepo='*' --enablerepo='rawhide-source' --srpm --whatrequires binutils-devel --qf '%{name}'|sort|uniq
alleyoop
avarice
CodeAnalyst-gui
eclipse-oprofile
gcl
kdesdk
kernel
ksplice
latrace
libdwarf
lush
mutrace
oprofile
pfmon
sblim-wbemcli
stapitrace
sysprof

The list of packages, which refer to -lbfd or -lopcodes somewhere in their build.log, is this:

avarice
CodeAnalyst-gui
eclipse-oprofile
gcl
ksplice
lush
mutrace
oprofile
stapitrace

They certainly need to add "BuildRequires: binutils-static" in accordance with the guidelines.

As whether the remaining packages really need to BR binutils-devel, e.g. for just the headers, or whether perhaps their build.log is too quiet, remains to be examined.

Comment 10 Michael Schwendt 2010-02-13 18:28:56 UTC
Closed by: fedora-report-static-batch.py

Comment 11 Michael Schwendt 2010-06-03 19:05:08 UTC
Still reproducible. Reopened by: fedora-report-static-batch.py

Build: binutils-2.20.51.0.7-3.fc14.src.rpm

binutils-static
    /usr/lib/libbfd.so  <=>  /usr/lib/libbfd.a
    /usr/lib/libopcodes.so  <=>  /usr/lib/libopcodes.a

Comment 12 Michael Schwendt 2010-06-14 11:30:13 UTC
Reopened by: fedora-report-static-batch.py

Build: binutils-2.20.51.0.7-4.fc14.src.rpm

binutils-static
    /usr/lib/libbfd.so  <=>  /usr/lib/libbfd.a
    /usr/lib/libopcodes.so  <=>  /usr/lib/libopcodes.a

Comment 13 Jakub Jelinek 2010-06-14 11:37:14 UTC
It is not a bug, fix your script.

Comment 14 Michael Schwendt 2010-06-15 08:08:45 UTC
Reopened by: fedora-report-static-batch.py

Build: binutils-2.20.51.0.7-4.fc14.src.rpm

binutils-static
    (!) PROVIDES binutils-devel
    /usr/lib/libbfd.so  <=>  /usr/lib/libbfd.a
    /usr/lib/libopcodes.so  <=>  /usr/lib/libopcodes.a

Comment 15 Michael Schwendt 2010-06-30 16:00:59 UTC
Closed by: fedora-report-static-batch.py


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