Bug 1006860 - Review Request: libnatpmp - Library of The NAT Port Mapping Protocol (NAT-PMP)
Summary: Review Request: libnatpmp - Library of The NAT Port Mapping Protocol (NAT-PMP)
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: Package Review
Version: rawhide
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Sandro Mani
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-09-11 12:05 UTC by Christopher Meng
Modified: 2014-02-22 01:46 UTC (History)
2 users (show)

Fixed In Version: libnatpmp-20131126-2.el6
Clone Of:
Environment:
Last Closed: 2014-02-22 00:47:20 UTC
Type: ---
Embargoed:
manisandro: fedora-review+
gwync: fedora-cvs+


Attachments (Terms of Use)
Makefile patch (551 bytes, patch)
2014-01-03 21:43 UTC, Sandro Mani
no flags Details | Diff

Description Christopher Meng 2013-09-11 12:05:58 UTC
Spec URL: http://cicku.me/libnatpmp.spec
SRPM URL: http://cicku.me/libnatpmp-20130911-1.fc21.src.rpm 
Description: libnatpmp is an attempt to make a portable and fully compliant implementation 
of the protocol for the client side. It is based on non blocking sockets and 
all calls of the API are asynchronous. It is therefore very easy to integrate 
the NAT-PMP code to any event driven code.
Fedora Account System Username: cicku

Comment 1 Ralf Corsepius 2013-09-12 17:07:43 UTC
Package fails to build in mock:
...
/usr/bin/ld: natpmp.o: relocation R_X86_64_32S against `.rodata' can not be used when making a shared object; recompile with -fPIC
natpmp.o: could not read symbols: Bad value
collect2: error: ld returned 1 exit status
make: *** [libnatpmp.so] Error 1
...

The cause seems obvious:

By invoking 'make CFLAGS="%{optflags}", you are overriding the CFLAGS within the Makefile, causing the package to loose the CFLAGS given in the Makefile.

Depending on what you intend, you either could opt to
- propagate %optflags into the Makefile, e.g. something similar to
  sed -i "s|CFLAGS =.*$|CFLAGS = %{optflags}|" Makefile
or
- explicitly append all desired CFLAGS contained in the Makefile to the CFLAGS in the make call e.g. something similar to
  make CFLAGS="%{optflags} -fPIC -DENABLE_STRNATPMPERR"
or <something else>

Comment 2 Christopher Meng 2013-11-05 04:57:59 UTC
Temporarily notready in a week.

Comment 3 Christopher Meng 2014-01-03 11:53:04 UTC
(In reply to Ralf Corsepius from comment #1)
> Package fails to build in mock:

Even if I don't insert flags it can build well, not sure about the problem.

Spec URL: http://cicku.me/libnatpmp.spec
SRPM URL: http://cicku.me/libnatpmp-20131126-1.fc21.src.rpm

This is a dep package of mldonkey.

Comment 4 Sandro Mani 2014-01-03 21:43:17 UTC
Created attachment 845100 [details]
Makefile patch

As Ralf pointed out, you need to stop the environment CFLAGS overriding the Makefile CFLAGS. A possible patch is attached.

Comment 5 Christopher Meng 2014-01-07 10:17:00 UTC
You patch works, but current way in my spec also works, which one do you prefer?

http://koji.fedoraproject.org/koji/taskinfo?taskID=6368458

Comment 6 Sandro Mani 2014-01-07 10:30:43 UTC
The spec file in your SRPM file is not the same as the spec file you linked (the one in the SRPM file misses the -fPIC in the CFLAGS). That's why it didn't work for me. Still, IMO keeping the -fPIC and -DENABLE_STRNATPMPERR in the makefile is cleaner, since the flags are project specific.

Comment 7 Christopher Meng 2014-02-13 08:08:56 UTC
OK.

I wil propose a patch to upstream, but use this hack for a while.

If no problems here, please approve. Thanks again.

Comment 8 Christopher Meng 2014-02-13 08:25:02 UTC
Koji: http://koji.fedoraproject.org/koji/taskinfo?taskID=6524731

Comment 9 Ralf Corsepius 2014-02-13 08:31:57 UTC
(In reply to Christopher Meng from comment #7)
> OK.
> 
> I wil propose a patch to upstream, but use this hack for a while.
> 
> If no problems here, please approve. Thanks again.
You did you change anything on your package? You once againd did increment the NEVR, so their is nothing to approve.

Comment 10 Christopher Meng 2014-02-13 08:57:57 UTC
(In reply to Ralf Corsepius from comment #9)
> > If no problems here, please approve. Thanks again.
> You did you change anything on your package? You once againd did increment
> the NEVR, so their is nothing to approve.

Actually nothing because they are the same with the one in the previous link.

You pointed the fault in Sep, then I fixed it immediately in spite of leaving it here for 2 months and in Nov I checked again my remaining bugs, because at that time new version was released, so I included my fix in the new version SRPM, therefore no need to bump.

Sandro still deemed that this had problem just because the spec is not coherent with the SRPM.

Spec URL: http://cicku.me/libnatpmp.spec
SRPM URL: http://cicku.me/libnatpmp-20131126-1.fc21.src.rpm

Reserved for Ralf: 

SRPM URL: http://cicku.me/libnatpmp-20131126-2.fc21.src.rpm

Comment 11 Sandro Mani 2014-02-13 10:29:37 UTC
Issues:

- ldconfig is not called in %post and %postun if required.
  Note: /sbin/ldconfig not called in libnatpmp
  See: http://fedoraproject.org/wiki/Packaging/Guidelines#Shared_Libraries

- Packages do not install properly.

Error: Package: libnatpmp-20131126-1.fc21.x86_64 (/libnatpmp-20131126-1.fc21.x86_64)
           Requires: libnatpmp.so.1()(64bit)
Error: Package: libnatpmp-devel-20131126-1.fc21.x86_64 (/libnatpmp-devel-20131126-1.fc21.x86_64)
           Requires: libnatpmp.so.1()(64bit)

Note also the requires and provides:

Requires
--------
libnatpmp-devel (rpmlib, GLIBC filtered):
    libnatpmp(x86-64)
    libnatpmp.so.1()(64bit)

libnatpmp (rpmlib, GLIBC filtered):
    libc.so.6()(64bit)
    libnatpmp.so.1()(64bit)
    rtld(GNU_HASH)

Provides
--------
libnatpmp-devel:
    libnatpmp-devel
    libnatpmp-devel(x86-64)

libnatpmp:
    libnatpmp
    libnatpmp(x86-64)


This is actually strange, I do not see why rpm does not pick up that libnatpmp contains ibnatpmp.so.1

Comment 12 Christopher Meng 2014-02-13 10:44:09 UTC
RPM doesn't pick it up because no ldconfig executed, I will fix and post tomorrow.

Thanks.

Comment 13 Sandro Mani 2014-02-13 10:45:10 UTC
I thought so as well, but rebuilding with ldconfig didn't help...

Comment 14 Sandro Mani 2014-02-13 10:48:25 UTC
This is suspect as well:
libnatpmp.x86_64: W: unstripped-binary-or-object /usr/lib64/libnatpmp.so.1

Comment 15 Christopher Meng 2014-02-13 10:55:00 UTC
(In reply to Sandro Mani from comment #14)
> This is suspect as well:
> libnatpmp.x86_64: W: unstripped-binary-or-object /usr/lib64/libnatpmp.so.1

Got it. 

Fix tomorrow.

Comment 16 Sandro Mani 2014-02-13 10:56:30 UTC
Just found out that the issue is that libnatpmp.so.1 has permissions 0644, but auto-provides / auto-depends requires 0755 to work.

Comment 17 Christopher Meng 2014-02-14 06:47:25 UTC
Spec URL: http://cicku.me/libnatpmp.spec
SRPM URL: http://cicku.me/libnatpmp-20131126-2.fc21.src.rpm

Comment 18 Sandro Mani 2014-02-14 09:51:31 UTC
All ok, approved!

Comment 19 Christopher Meng 2014-02-14 11:02:56 UTC
Thank you! 

New Package SCM Request
=======================
Package Name: libnatpnp
Short Description: Library of the NAT port mapping protocol (NAT-PMP)
Owners: cicku
Branches: f19 f20 el6 epel7

Comment 20 Gwyn Ciesla 2014-02-14 13:31:03 UTC
Requested package name libnatpnp doesn't match bug summary
libnatpmp, please correct.

Comment 21 Christopher Meng 2014-02-14 14:04:36 UTC
New Package SCM Request
=======================
Package Name: libnatpmp
Short Description: Library of the NAT port mapping protocol (NAT-PMP) 
Owners: cicku 
Branches: f19 f20 el6 epel7

Comment 22 Gwyn Ciesla 2014-02-14 14:42:32 UTC
Git done (by process-git-requests).

Comment 23 Fedora Update System 2014-02-15 03:55:13 UTC
libnatpmp-20131126-2.fc20 has been submitted as an update for Fedora 20.
https://admin.fedoraproject.org/updates/libnatpmp-20131126-2.fc20

Comment 24 Fedora Update System 2014-02-15 03:55:24 UTC
libnatpmp-20131126-2.fc19 has been submitted as an update for Fedora 19.
https://admin.fedoraproject.org/updates/libnatpmp-20131126-2.fc19

Comment 25 Fedora Update System 2014-02-15 03:55:31 UTC
libnatpmp-20131126-2.el6 has been submitted as an update for Fedora EPEL 6.
https://admin.fedoraproject.org/updates/libnatpmp-20131126-2.el6

Comment 26 Fedora Update System 2014-02-15 20:01:49 UTC
libnatpmp-20131126-2.fc19 has been pushed to the Fedora 19 testing repository.

Comment 27 Fedora Update System 2014-02-22 00:47:20 UTC
libnatpmp-20131126-2.fc19 has been pushed to the Fedora 19 stable repository.

Comment 28 Fedora Update System 2014-02-22 00:50:33 UTC
libnatpmp-20131126-2.fc20 has been pushed to the Fedora 20 stable repository.

Comment 29 Fedora Update System 2014-02-22 01:46:31 UTC
libnatpmp-20131126-2.el6 has been pushed to the Fedora EPEL 6 stable repository.


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