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
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.
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."
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.
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.
(In reply to Ville Skyttä from comment #4) > Deleting the bundled needs s/the bundled/the bundled library sources/
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. ...
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.
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.
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.
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.
Looks fine to me.