Summary: | [patch] Mk/Scripts/qa.sh: look for libtool libraries | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Product: | Ports & Packages | Reporter: | Tijl Coosemans <tijl> | ||||||||||
Component: | Individual Port(s) | Assignee: | Antoine Brodin <antoine> | ||||||||||
Status: | Closed FIXED | ||||||||||||
Severity: | Affects Only Me | ||||||||||||
Priority: | Normal | ||||||||||||
Version: | Latest | ||||||||||||
Hardware: | Any | ||||||||||||
OS: | Any | ||||||||||||
Attachments: |
|
Description
Tijl Coosemans
![]() ![]() State Changed From-To: open->feedback Awaiting maintainers feedback (via the GNATS Auto Assign Tool) Maintainer of Mk/Scripts, Please note that PR ports/189255 has just been submitted. If it contains a patch for an upgrade, an enhancement or a bug fix you agree on, reply to this email stating that you approve the patch and a committer will take care of it. The full text of the PR can be found at: http://www.freebsd.org/cgi/query-pr.cgi?pr=ports/189255 -- Edwin Groothuis via the GNATS Auto Assign Tool edwin@FreeBSD.org State Changed From-To: feedback->open Assign to maintainer. Responsible Changed From-To: freebsd-ports-bugs->portmgr Assign to maintainer. + find ${STAGEDIR} -type f -name '*.la' | while read f; do + grep -q 'libtool library' "${f}" && + err "you need USES=libtool" && return 1 + done + fi + return 0 return 1 from the pipe won't work here. It will just return 0 on the next line. See the other loops for hints on how to work around that. -- Regards, Bryan Drewery Responsible Changed From-To: portmgr->antoine Take, I will test your updated patch on package22 to see how many qa failures we have. On Fri, 02 May 2014 11:59:23 -0500 Bryan Drewery wrote:
>
> + find ${STAGEDIR} -type f -name '*.la' | while read f; do
> + grep -q 'libtool library' "${f}" &&
> + err "you need USES=libtool" && return 1
> + done
> + fi
> + return 0
>
> return 1 from the pipe won't work here. It will just return 0 on the
> next line.
>
> See the other loops for hints on how to work around that.
I've attached a new patch, but instead of using a here-document I just
removed the "return 0" and added a comment about where the "return 1"
ends up. This has the advantage that the results of find aren't computed
completely like you have with a here-document.
I have put the list of staged ports failing this QA check at http://people.freebsd.org/~antoine/needlibtool.txt They are 1394, too much to make it an error. A few are possible false positives: audio/linux-f10-alsa-lib audio/linux-f10-arts x11-toolkits/linux-f10-gtk2 Also some of them are generated by "qmake/libtool", I don't know if they have to be handled by USES=libtool too? On Sun, 4 May 2014 14:27:37 +0200 Antoine Brodin wrote: > I have put the list of staged ports failing this QA check at > http://people.freebsd.org/~antoine/needlibtool.txt > > They are 1394, too much to make it an error. > > A few are possible false positives: > audio/linux-f10-alsa-lib > audio/linux-f10-arts > x11-toolkits/linux-f10-gtk2 I think these can also set USES=libtool (or USES=libtool:keepla). > Also some of them are generated by "qmake/libtool", I don't know if > they have to be handled by USES=libtool too? Can you give an example? The .la files generated by "qmake/libtool" are from the qt4-* and qt5-* ports. On Sun, 4 May 2014 14:27:37 +0200 Antoine Brodin wrote:
> I have put the list of staged ports failing this QA check at
> http://people.freebsd.org/~antoine/needlibtool.txt
>
> They are 1394, too much to make it an error.
Here's a new patch that makes it a warning. I also made the message a
bit more descriptive.
On Tue, 6 May 2014 09:57:10 +0200 Tijl Coosemans wrote:
> On Sun, 4 May 2014 14:27:37 +0200 Antoine Brodin wrote:
>> I have put the list of staged ports failing this QA check at
>> http://people.freebsd.org/~antoine/needlibtool.txt
>>
>> They are 1394, too much to make it an error.
>
> Here's a new patch that makes it a warning. I also made the message a
> bit more descriptive.
I forgot the bsd.stage.mk part. Here is the complete patch.
Last version of the patch approved, thanks! Author: tijl Date: Tue May 6 11:57:22 2014 New Revision: 353084 URL: http://svnweb.freebsd.org/changeset/ports/353084 QAT: https://qat.redports.org/buildarchive/r353084/ Log: Let stage-qa detect .la libraries and warn that a port needs USES=libtool. PR: ports/189255 Approved by: portmgr (antoine) Modified: head/Mk/Scripts/qa.sh head/Mk/bsd.stage.mk Modified: head/Mk/Scripts/qa.sh ============================================================================== --- head/Mk/Scripts/qa.sh Tue May 6 11:17:29 2014 (r353083) +++ head/Mk/Scripts/qa.sh Tue May 6 11:57:22 2014 (r353084) @@ -172,7 +172,18 @@ suidfiles() { return 0 } -checks="shebang symlinks paths stripped desktopfileutils sharedmimeinfo suidfiles" +libtool() { + if [ -z "${USESLIBTOOL}" ]; then + find ${STAGEDIR} -type f -name '*.la' | while read f; do + grep -q 'libtool library' "${f}" && + warn ".la libraries found, port needs USES=libtool" && + return 0 || true + done + # The return above continues here. + fi +} + +checks="shebang symlinks paths stripped desktopfileutils sharedmimeinfo suidfiles libtool" ret=0 cd ${STAGEDIR} Modified: head/Mk/bsd.stage.mk ============================================================================== --- head/Mk/bsd.stage.mk Tue May 6 11:17:29 2014 (r353083) +++ head/Mk/bsd.stage.mk Tue May 6 11:57:22 2014 (r353084) @@ -17,6 +17,9 @@ QA_ENV+= STAGEDIR=${STAGEDIR} \ .if !empty(USES:Mdesktop-file-utils) QA_ENV+= USESDESKTOPFILEUTILS=yes .endif +.if !empty(USES:Mlibtool*) +QA_ENV+= USESLIBTOOL=yes +.endif .if !empty(USES:Mshared-mime-info) QA_ENV+= USESSHAREDMIMEINFO=yes .endif _______________________________________________ svn-ports-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-ports-all To unsubscribe, send any mail to "svn-ports-all-unsubscribe@freebsd.org" State Changed From-To: open->closed Patch was committed |