Note: This is a public test instance of Red Hat Bugzilla. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback at bugzilla.redhat.com.
Bug 176617 - Review Request: libupnp
Summary: Review Request: libupnp
Keywords:
Status: CLOSED NEXTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: Package Review
Version: rawhide
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Tom "spot" Callaway
QA Contact: David Lawrence
URL:
Whiteboard:
Depends On:
Blocks: FE-ACCEPT 176618
TreeView+ depends on / blocked
 
Reported: 2005-12-27 17:41 UTC by Eric Tanguy
Modified: 2014-07-25 10:26 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2006-01-20 08:52:48 UTC
Type: ---
Embargoed:
i: fedora-review+


Attachments (Terms of Use)
Updated spec addressing optflags, strip, lib64 (deleted)
2006-01-08 12:05 UTC, Paul Howarth
no flags Details

Description Eric Tanguy 2005-12-27 17:41:40 UTC
Spec Name or Url: http://perso.wanadoo.fr/eric.tanguy/libupnp.spec
SRPM Name or Url: http://perso.wanadoo.fr/eric.tanguy/libupnp-1.2.1a-1.src.rpm
Description: The Universal Plug and Play (UPnP) SDK for Linux provides support for building UPnP-compliant control points, devices, and bridges on Linux.

Comment 1 Eric Tanguy 2006-01-05 18:33:57 UTC
$ rpmlint rpmbuild/SRPMS/libupnp-1.2.1a-1.src.rpm
$ rpmlint rpmbuild/RPMS/i386/libupnp-devel-1.2.1a-1.i386.rpm
$ rpmlint rpmbuild/RPMS/i386/libupnp-1.2.1a-1.i386.rpm
E: libupnp invalid-soname /usr/lib/libupnp.so.1.2.1 libupnp.so
E: libupnp invalid-soname /usr/lib/libixml.so libixml.so
E: libupnp invalid-soname /usr/lib/libthreadutil.so libthreadutil.so

So no problem except with these errors about invalid-soname and i need help
about it.

Comment 2 Michael Schwendt 2006-01-06 12:14:47 UTC
The invalid-soname error means that the library's run-time name (aka
the shared object's run-time name) encoded within the library binary is
incomplete or doesn't match the versions in the file name. See e.g.

 $ readelf -d libupnp.so.1.2.1 | grep SONAME
 0x0000000e (SONAME)                     Library soname: [libupnp.so]

This is immature library versioning. For libixml.so and libthreadutil.so,
the authors don't encode any version in the library at all. For libupnp,
which has versions in its file name, the soname ought to be "libupnp.so.1".
Even if the library API is not planned to change in the near future, the
authors ought to use version 1. If the API is not considered stable yet,
they ought not use versions 1.2.1 in the library file name when they don't
adjust the soname accordingly. They pretend that multiple files with different
names can coexist, while in fact the run-time name of the library is
non-versioned.

[...]

A few other problems with the package:

* doesn't build with default RPM opt flags
* must not strip the libraries, since that disables the debuginfo package
* due to the soname problem, ldconfig creates an unowned link libupnp.so
  to the versioned library - this makes the version completely useless!
* -devel subpackage is missing /usr/include/upnp directory
* -devel subpackage ought to require full version-release of main package
  to stay in sync with the main package always (think about patches applied
  in updates, notes in %changelog, fixed run-time/link-time problems, e.g.)
* much better Summary: Universal Plug and Play (UPnP) SDK
* prefer 'install -p' to preserve timestamps

Comment 3 Eric Tanguy 2006-01-06 18:33:54 UTC
Thanks
First of all, i'm quite new in packaging and in linux so i apologize for my
future questions.
About the soname problems with libupnp, libixml and libthreadutil, what can i do
against that ??

* doesn't build with default RPM opt flags : what do you mean by this ? It
compiles fine here.

* must not strip the libraries, since that disables the debuginfo package : What
do you mean and how to solve it ?

* -devel subpackage ought to require full version-release of main package
  to stay in sync with the main package always (think about patches applied
  in updates, notes in %changelog, fixed run-time/link-time problems, e.g.)
OK

* much better Summary: Universal Plug and Play (UPnP) SDK
OK

* prefer 'install -p' to preserve timestamps
OK I think

Spec Name or Url: http://perso.wanadoo.fr/eric.tanguy/libupnp.spec
SRPM Name or Url: http://perso.wanadoo.fr/eric.tanguy/libupnp-1.2.1a-2.src.rpm

Comment 4 Eric Tanguy 2006-01-06 18:36:34 UTC
I forgot : 
* due to the soname problem, ldconfig creates an unowned link libupnp.so
  to the versioned library - this makes the version completely useless! : How to
solve this ?

* -devel subpackage is missing /usr/include/upnp directory : i have this
directory in devel package. What is the problem ?



Comment 5 Michael Schwendt 2006-01-07 00:15:30 UTC
> About the soname problems with libupnp, libixml and libthreadutil,
> what can i do against that ??

Not much unless you convince the upstream authors to introduce a
library version. There exist other libraries with the same soname
problem.

> doesn't build with default RPM opt flags : what do you mean by this ?
> It compiles fine here.

I see compiler flags like this during build:

gcc -Wall -I./ -I../inc -I../../pil/inc -fPIC -c -Wall -Os -DNDEBUG -I. -I../inc
 -Iinc -c ixml.c -o obj/ixml.o

It doesn't use Fedora's default compiler flags during compilation.
These are defined within the rpmbuild configuration, see e.g. output of,

  rpm --eval '%optflags'

and are exported automatically in the %build section of an RPM package
spec file when using the %configure macro. Where you don't use the
%configure macro, you can work with the %optflags macro or with the
${RPM_OPT_FLAGS} variable in a spec file and pass a modified CFLAGS
environment variable to "make" (or other variables for other programming
languages). It may be necessary to patch the source code Makefiles in
order to drop hardcoded compiler/linker flags and make them accept
external optflags instead.

> must not strip the libraries, since that disables the debuginfo
> package : What do you mean and how to solve it ?

After compiling/linking the libraries, the Makefiles must not run
"strip" on them. If they do, rpmbuild's internal means of extracting
debug information for a "-debuginfo" sub-package are disabled.

> ldconfig creates an unowned link libupnp.so to the versioned
> library - this makes the version completely useless! : How to
> solve this ?

First of all, you would need to specify %{_libdir}/libupnp.so in
your %files section and create the link in your %install section,
so RPM knows that the link belongs into your package.  That would
fix one part if the problem. The other part is the soname
versioning problem as explained before.

> -devel subpackage is missing /usr/include/upnp directory : i have
> this directory in devel package. What is the problem ?

You don't include the _directory_ in the devel package. You only include
the files inside the directory. Query "rpm -qlv libupnp-devel". Take
your pick. Either patch as following would work and would also include
the directory (the latter one includes the directory and its contents
recursively):

--- libupnp.spec.orig   2006-01-05 19:12:15.000000000 +0100
+++ libupnp.spec        2006-01-07 01:12:01.000000000 +0100
@@ -71,6 +71,7 @@
 
 %files devel
 %defattr(-,root,root,-)
+%dir %{_includedir}/upnp
 %{_includedir}/upnp/*
 
 %clean


--- libupnp.spec.orig   2006-01-05 19:12:15.000000000 +0100
+++ libupnp.spec        2006-01-07 01:13:04.000000000 +0100
@@ -71,7 +71,7 @@
 
 %files devel
 %defattr(-,root,root,-)
-%{_includedir}/upnp/*
+%{_includedir}/upnp/
 
 %clean
 rm -rf %{buildroot}


Comment 6 Eric Tanguy 2006-01-07 19:13:12 UTC
Thanks i make changes about /usr/include/upnp directory directory in devel package.
For the RPM opt flags, i try to force it using : make CFLAGS=%optflags
%{?_smp_mflags} but it fails.
So i think i need to patch the makefile (also for the strip problem) and i don't
know how to do that. I never make a program i only try to package some.
Maybe someone can help for this ?

Comment 7 Paul Howarth 2006-01-08 12:05:52 UTC
Created attachment 122925 [details]
Updated spec addressing optflags, strip, lib64

Attached update to spec file should take care of setting optflags, preventing
stripping, and being able to build on 64-bit hosts.

It builds OK but I haven't tested it.

Comment 8 Eric Tanguy 2006-01-08 13:12:42 UTC
Thanks
It builds and works fine!
New version : 
Spec Name or Url: http://perso.wanadoo.fr/eric.tanguy/libupnp.spec
SRPM Name or Url: http://perso.wanadoo.fr/eric.tanguy/libupnp-1.2.1a-3.src.rpm

Comment 9 Eric Tanguy 2006-01-08 15:53:29 UTC
Why libupnp.so is in devel package and in libupnp package ?

$ rpm -qil libupnp-devel
Name        : libupnp-devel                Relocations: (not relocatable)
Version     : 1.2.1a                            Vendor: (none)
Release     : 3                             Build Date: dim 08 jan 2006 13:41:59 CET
Install Date: dim 08 jan 2006 13:49:58 CET      Build Host: bureau.maison
Group       : Development/Libraries         Source RPM:
libupnp-1.2.1a-3.src.rpmSize        : 268973                           License: BSD
Signature   : (none)
URL         : http://upnp.sourceforge.net/
Summary     : Include files needed for development with libupnp
Description :
The libupnp-devel package contains the files necessary for development with
the UPnP SDK libraries.
/usr/include/upnp
/usr/include/upnp/FreeList.h
/usr/include/upnp/LinkedList.h
/usr/include/upnp/ThreadPool.h
/usr/include/upnp/TimerThread.h
/usr/include/upnp/config.h
/usr/include/upnp/iasnprintf.h
/usr/include/upnp/ithread.h
/usr/include/upnp/ixml.h
/usr/include/upnp/upnp.h
/usr/include/upnp/upnptools.h
/usr/lib/libupnp.so

$ rpm -qil libupnp
Name        : libupnp                      Relocations: (not relocatable)
Version     : 1.2.1a                            Vendor: (none)
Release     : 3                             Build Date: dim 08 jan 2006 13:41:59 CET
Install Date: dim 08 jan 2006 13:49:57 CET      Build Host: bureau.maison
Group       : System Environment/Libraries   Source RPM: libupnp-1.2.1a-3.src.rpm
Size        : 221334                           License: BSD
Signature   : (none)
URL         : http://upnp.sourceforge.net/
Summary     : Universal Plug and Play (UPnP) SDK
Description :
The Universal Plug and Play (UPnP) SDK for Linux provides
support for building UPnP-compliant control points, devices,
and bridges on Linux.
/usr/lib/libixml.so
/usr/lib/libthreadutil.so
/usr/lib/libupnp.so.1.2.1
/usr/share/doc/libupnp-1.2.1a
/usr/share/doc/libupnp-1.2.1a/LICENSE
/usr/share/doc/libupnp-1.2.1a/README




Comment 10 Paul Howarth 2006-01-08 16:04:55 UTC
(In reply to comment #9)
> Why libupnp.so is in devel package and in libupnp package ?

This is normal (versioned library in main library, unversioned in -devel
subpackage), e.g.

$ rpm -ql libusb-devel | grep so
/usr/lib/libusb.so
/usr/lib/libusbpp.so
$ rpm -ql libusb | grep so
/usr/lib/libusb-0.1.so.4
/usr/lib/libusb-0.1.so.4.4.2
/usr/lib/libusbpp-0.1.so.4
/usr/lib/libusbpp-0.1.so.4.4.2

It's also a MUST according to the package review guidelines
(http://fedoraproject.org/wiki/PackageReviewGuidelines):

MUST: If a package contains library files with a suffix (e.g. libfoo.so.1.1),
then library files that end in .so (without suffix) must go in a -devel package.


Comment 11 Eric Tanguy 2006-01-08 18:09:31 UTC
Ok thanks for the explanation?
Someone can do a formal review now ?

Comment 12 Michael Schwendt 2006-01-08 22:05:42 UTC
Re: comment 10 [Paul Howarth] - not true. It is a packaging bug in
this case. libupnp.so.1.2.1 is _not_ versioned. See comments 1-5.
libupnp.so must go into the main package, since ldconfig would create
it nevertheless (and then it would be "unowned").

Comment 13 Eric Tanguy 2006-01-09 17:32:56 UTC
New version : 
Spec Name or Url: http://perso.wanadoo.fr/eric.tanguy/libupnp.spec
SRPM Name or Url: http://perso.wanadoo.fr/eric.tanguy/libupnp-1.2.1a-4.src.rpm

Comment 14 Eric Tanguy 2006-01-10 18:44:40 UTC
More comments about this package ?
Domeone could do a formal review now ?
Thanks

Comment 15 Eric Tanguy 2006-01-14 22:15:13 UTC
May someone take a look at this package, please? This dependency is blocking
ushare (176618).

Comment 16 Tom "spot" Callaway 2006-01-19 22:45:19 UTC
Good:

- rpmlint checks return:

E: libupnp invalid-soname /usr/lib/libupnp.so.1.2.1 libupnp.so
E: libupnp invalid-soname /usr/lib/libthreadutil.so libthreadutil.so
E: libupnp invalid-soname /usr/lib/libixml.so libixml.so
W: libupnp devel-file-in-non-devel-package /usr/lib/libupnp.so

The invalid soname issue is a symptom of bad code, but this isn't fatal. Safe to
ignore all rpmlint errors and the warning.

- package meets naming guidelines
- package meets packaging guidelines
- license (BSD) OK, text in %doc, matches source
- spec file legible, in am. english
- source matches upstream
- package compiles on devel (x86)
- no missing BR
- no unnecessary BR
- no locales
- not relocatable
- creates no directories
- no duplicate files
- permissions ok
- %clean ok
- macro use consistent
- code, not content
- no need for -docs
- nothing in %doc affects runtime
- no need for .desktop file
- devel package ok
- no .la files
- post/postun ldconfig ok
- devel requires base package n-v-r 

APPROVED.

Comment 17 Eric Tanguy 2006-01-20 08:52:48 UTC
Build fine on buildsys for devel
FC3 and FC4 tree asked

Comment 18 Christopher Meng 2014-07-25 10:18:24 UTC
Package Change Request
======================
Package Name: lipupnp
New Branches: epel7
Owners: cicku

Comment 19 Christopher Meng 2014-07-25 10:26:41 UTC
Ooops, already done.


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