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 1077812 - nqp bundles libtommath
Summary: nqp bundles libtommath
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: nqp
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Gerd Pokorra
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: DuplicSysLibsTracker
TreeView+ depends on / blocked
 
Reported: 2014-03-18 15:48 UTC by Ville Skyttä
Modified: 2014-04-04 08:21 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-04-04 08:21:40 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Ville Skyttä 2014-03-18 15:48:46 UTC
https://fedoraproject.org/wiki/Packaging:No_Bundled_Libraries
https://fedoraproject.org/wiki/Packaging:Treatment_Of_Bundled_Libraries

nqp appears to bundle libtommath which is available as a separate package in Fedora.

$ repoquery --repoid=rawhide-debuginfo -l nqp-debuginfo | grep libtommath

Comment 1 Gerd Pokorra 2014-04-03 12:42:17 UTC
At patched and newer version of NQP is built in rawhide that to not bundle libtommath.

NQP build URL:

https://koji.fedoraproject.org/koji/buildinfo?buildID=508781

A newer version of rakudo-star is built on top of it.

Comment 2 Ville Skyttä 2014-04-03 13:12:35 UTC
Seems to work, but please note from the link in initial comment,

https://fedoraproject.org/wiki/Packaging:Treatment_Of_Bundled_Libraries#Packages_with_Bundled_Libraries

"Bundled libraries (and/or their source code) must be explicitly deleted during %prep."

Comment 3 Gerd Pokorra 2014-04-03 13:29:31 UTC
The patch adds a flag has-libtommath to Configure.pl. So this solution is better then simple deleting files. The patch is also sent to upstream and I hope it will be applied.

I think this ticket could be closed.

Comment 4 Ville Skyttä 2014-04-03 13:36:51 UTC
Yes, I looked into how it's done in git. Deleting the bundled needs to be done *in addition* to your patch so that they won't be accidentally used for example if the patch stops working or if detecting/using system tommath fails.

Deleting sources of bundled libraries is a MUST; the packaging guidelines don't leave it up to the packager whether to do it or not.

Comment 5 Ville Skyttä 2014-04-03 13:37:38 UTC
(In reply to Ville Skyttä from comment #4)
> Deleting the bundled needs

s/the bundled/the bundled library sources/

Comment 6 Gerd Pokorra 2014-04-03 14:18:36 UTC
I have done a deeper look in the configuration. I think the patch that I have written is a good solution. It adds the link option -ltommoth and builds the two objects that are needed.

Deleting files without a patch would only break the build. My patch is simple to maintain and already send to upstream.

URL
https://fedoraproject.org/wiki/Packaging:Treatment_Of_Bundled_Libraries
says:
....
Whenever possible, the patching should be done in a way to conditionalize use of the bundled libraries, so that it can be sent upstream for consideration.
...

Comment 7 Ville Skyttä 2014-04-03 17:25:52 UTC
The part you quote says "should", and creating an upstream patch is indeed part of a good solution.

But the very same document you link to says very explicitly just before the part you quoted: "Bundled libraries (and/or their source code) must be explicitly deleted during %prep. Build scripts may need to be patched to deal with this situation"

Note that this is a "must", not "should", and I don't think that leaves anything open. If removing the sources breaks the build, you'll need to remove them anyway and make/patch the build succeed with them removed.

Comment 8 Gerd Pokorra 2014-04-03 21:35:57 UTC
Okay!

I add a 'rm' command in the %prep section that delete the libtommath source files that are not needed to build NQP.

The build is yust runnig:

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

The result will be se same.

Comment 9 Ville Skyttä 2014-04-04 06:56:49 UTC
http://pkgs.fedoraproject.org/cgit/nqp.git/commit/?id=d2c98b2fa2af076b225c7da709e75f0b3fd7d473

This removes only a subset of the tommath sources, without an explanation why. If some of the files are still needed, I'd say this issue needs more work, or at the very least an explanation in the specfile why all of them cannot be removed.

Comment 10 Gerd Pokorra 2014-04-04 08:14:19 UTC
bn_mp_(get|set)_long.c files are extentions.

I added a comment in the spec file and a comment of the comment.

The commit log is at:

http://pkgs.fedoraproject.org/cgit/nqp.git/commit/?id=ed629e3024adf3daaf250da69c3b0ec30f9a98b1


Because it is only an explanation I do not start the rebuild yet.

Comment 11 Ville Skyttä 2014-04-04 08:21:40 UTC
Looks fine to me.


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