Bug 818910 - ipmiutil : does not adhere to Static Library Packaging Guidelines
Summary: ipmiutil : does not adhere to Static Library Packaging Guidelines
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: ipmiutil
Version: rawhide
Hardware: All
OS: Linux
low
low
Target Milestone: ---
Assignee: Andy Cress
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-05-04 10:44 UTC by Michael Schwendt
Modified: 2014-12-25 07:11 UTC (History)
2 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2014-12-25 07:11:13 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
ipmiutil.spec with changes (13.77 KB, text/plain)
2012-05-04 15:08 UTC, Andy Cress
no flags Details
ipmiutil.spec with rpmlint fixes (13.22 KB, text/plain)
2012-05-04 16:48 UTC, Andy Cress
no flags Details
ipmiutil.spec with style changes from comment #8 (13.30 KB, text/plain)
2012-05-25 16:51 UTC, Andy Cress
no flags Details

Description Michael Schwendt 2012-05-04 10:44:52 UTC
https://fedoraproject.org/wiki/Packaging:Guidelines#Packaging_Static_Libraries_2

Build: ipmiutil-2.8.3-1.fc18.src.rpm

ipmiutil-devel
    contains only static libraries,
    but no virtual -static package is provided

Comment 1 Michael Schwendt 2012-05-04 10:50:57 UTC
While at it, could you also revisit the -devel package header location? /usr/share instead of /usr/include is highly questionable, not only because the sample doesn't adjust the search path for headers either:

$ rpmls -p ipmiutil-devel-2.8.3-1.fc18.x86_64.rpm 
-rw-r--r--  /usr/lib64/libipmiutil.a
-rw-r--r--  /usr/share/ipmiutil/Makefile
-rw-r--r--  /usr/share/ipmiutil/ipmi_sample.c
-rw-r--r--  /usr/share/ipmiutil/ipmicmd.h

Comment 2 Andy Cress 2012-05-04 15:07:31 UTC
OK, proposed changes made to ipmiutil.spec (attached).
This will go into the upstream and a patch to fc18 will be added, if this is ok.

Comment 3 Andy Cress 2012-05-04 15:08:26 UTC
Created attachment 582143 [details]
ipmiutil.spec with changes

Comment 4 Michael Schwendt 2012-05-04 15:41:37 UTC
Hmmm, that spec file wouldn't pass the review process. Has the packaging changed so much since its initial version?

This bug report has been opened automatically by a script. I didn't mean to re-review your package, but there are several issues with it now that I've had a look at the spec file. Please run rpmlint on the src.rpm and the built rpms. It finds a couple of bugs as a start. Try to review your package based on this page:

  https://fedoraproject.org/wiki/Packaging:ReviewGuidelines


> %post devel
> /sbin/ldconfig

There doesn't make sense, because there are no shared libs within the package(s), and even if there were, typically one doesn't run ldconfig in the -devel package but in the base library package.

Comment 5 Andy Cress 2012-05-04 16:48:00 UTC
Yes, it has undergone some changes, particularly around systemd support.
Attached is an updated ipmiutil.spec which looks rpmlint clean.

Comment 6 Andy Cress 2012-05-04 16:48:49 UTC
Created attachment 582159 [details]
ipmiutil.spec with rpmlint fixes

Comment 7 Andy Cress 2012-05-14 15:23:41 UTC
Does this attachment 582159 [details] look ok?

Comment 8 Michael Schwendt 2012-05-24 12:12:20 UTC
Yeah, it would fix the static lib package bug. :)

With regard to other albeit unrelated issues:


> BuildRequires: openssl-devel gcc gcc-c++ libtool

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

Not a MUST item, though. However, omitting "gcc gcc-c++" in BuildRequires make it easier to build packages in an altered build environment with replaced compilers.


> %define systemd_fls %{_datadir}/%{name}
> %define init_dir  %{_initrddir}

https://fedoraproject.org/wiki/Packaging:Guidelines#.25global_preferred_over_.25define


> %package devel
> [...]
> Requires: ipmiutil

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

Since it's a -static-only -devel package, I guess it does not need the base package to be usable when compiling something. It just shares a directory with the base package to store the example source in. You could include the directory entry in both packages and drop the explicit dependency (if directory ownership is the only reason for it) and add a comment to the spec file:

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


> make

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

Comment 9 Andy Cress 2012-05-25 16:49:45 UTC
Implemented the other changes, but I differ on the 'BuildRequires: gcc gcc++'.
I have seen more occurrences of VM auto-build systems that don't auto-install gcc and I have built cleanly without any issues in several custom compiler build environments.

Comment 10 Andy Cress 2012-05-25 16:51:34 UTC
Created attachment 586901 [details]
ipmiutil.spec with style changes from comment #8

Comment 11 Andy Cress 2012-05-25 16:52:58 UTC
I'll submit the new files to Fedora rawhide soon as a fix for this bug.

Comment 12 Fedora Update System 2012-06-12 17:56:34 UTC
ipmiutil-2.8.4-1.fc16 has been submitted as an update for Fedora 16.
https://admin.fedoraproject.org/updates/ipmiutil-2.8.4-1.fc16

Comment 13 Fedora Update System 2012-06-15 00:21:34 UTC
Package ipmiutil-2.8.4-1.fc16:
* should fix your issue,
* was pushed to the Fedora 16 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing ipmiutil-2.8.4-1.fc16'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2012-9366/ipmiutil-2.8.4-1.fc16
then log in and leave karma (feedback).

Comment 14 Fedora Update System 2012-06-26 00:34:18 UTC
ipmiutil-2.8.4-1.fc16 has been pushed to the Fedora 16 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 15 Fedora Update System 2012-08-21 16:16:13 UTC
ipmiutil-2.8.5-2.fc18 has been submitted as an update for Fedora 18.
https://admin.fedoraproject.org/updates/ipmiutil-2.8.5-2.fc18

Comment 16 Fedora Update System 2012-09-17 21:57:32 UTC
ipmiutil-2.8.5-2.fc18 has been pushed to the Fedora 18 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 17 Michael Schwendt 2014-10-16 16:25:20 UTC
Reopened by: fedora-report-static-batch.py

Build: ipmiutil-2.9.4-1.fc22.src.rpm

ipmiutil-devel
    /usr/lib/libipmiutil.so  <=>  /usr/lib/libipmiutil.a

Comment 18 Andy Cress 2014-10-16 17:57:51 UTC
OK, what is the non-compliance with this?  It doesn't say.

Comment 19 Michael Schwendt 2014-10-16 19:13:47 UTC
[yep, I need to update the hardcoded texts in the script]

It's this:

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

1. Static libraries and shared libraries. In this case, the static libraries must be placed in a *-static subpackage. Separating the static libraries from the other development files in *-devel allow us to track this usage by checking which packages BuildRequire the *-static package. The intent is that whenever possible, packages will move away from using these static libraries, to the shared libraries.

Comment 20 Michael Schwendt 2014-10-16 19:45:21 UTC
Oh, ipmiutil is mispackaged, btw. It includes the shared runtime library in the -devel subpackage:

  http://koji.fedoraproject.org/koji/rpminfo?rpmID=5550122
  http://pkgs.fedoraproject.org/cgit/ipmiutil.git/commit/?id=f912a15915f8fda5257dc5d372793dde17312754

Comment 21 Andy Cress 2014-10-23 13:59:06 UTC
Yes, I have added the shared library to the devel package, so now that this is no longer a static-only package, I need to move the static library into a '-static' package.

Comment 22 Andy Cress 2014-11-07 22:49:50 UTC
The upstream ipmiutil-2.9.5 now includes a compliant spec file separating out the static lib into a -static package.
I'll apply that to the fedora rawhide shortly.  

BTW, I had a request to apply the ipmiutil package to epel7, but I don't seem to have access to do that.  How do I get access to epel7?

Comment 24 Michael Schwendt 2014-12-25 07:11:13 UTC
Closed by: fedora-report-static-batch.py
http://mschwendt.fedorapeople.org/staticbugstat.html


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