ports/188496: security/nmap strip fails when stripping non-binaries in bin/

Dewayne dewayne at heuristicsystems.com.au
Sat Apr 12 07:50:01 UTC 2014


>Number:         188496
>Category:       ports
>Synopsis:       security/nmap strip fails when stripping non-binaries in bin/
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sat Apr 12 07:50:00 UTC 2014
>Closed-Date:
>Last-Modified:
>Originator:     Dewayne
>Release:        9.2Stable
>Organization:
>Environment:
FreeBSD b1.hs 9.2-STABLE FreeBSD 9.2-STABLE #0: Thu Apr 10 04:09:20 EST 2014     root@:/usr/obj/hqdev-amd64-padlock-smp-vga                          i386

>Description:
When building multiple ports simultaineously, the Makefile's strip command fails due to other non-binary files present in usr/local/bin/.
Replacing 
${STRIP_CMD} ${STAGEDIR}${PREFIX}/bin/*
with the long winded
${FIND} ${STAGEDIR}${PREFIX}/bin/* -type f | ${XARGS} ${FILE} | \
+               ${EGREP} -v 'ASCII text|Unicode text' | ${CUT} -d: -f1 | ${XARGS} ${STRIP_CMD}
reduces the ambiguity.

I'd speculate that the cause is either portmaster or a command to clear the staging usr/local/bin may be disabled.

>How-To-Repeat:
Occurs when building multiple ports. When there are other files in $STAGING/usr/local/bin that are "text" the build stops, as one would expect.

>Fix:
Index: /usr/ports/security/nmap/Makefile
===================================================================
--- /usr/ports/security/nmap/Makefile   (revision 351038)
+++ /usr/ports/security/nmap/Makefile   (working copy)
@@ -83,7 +83,8 @@
 post-install:
        @${MKDIR} ${STAGEDIR}${DOCSDIR}
        ${INSTALL_DATA} ${PORTDOCS:S|^|${WRKSRC}/|} ${STAGEDIR}${DOCSDIR}
-       ${STRIP_CMD} ${STAGEDIR}${PREFIX}/bin/*
+       ${FIND} ${STAGEDIR}${PREFIX}/bin/* -type f | ${XARGS} ${FILE} | \
+               ${EGREP} -v 'ASCII text|Unicode text' | ${CUT} -d: -f1 | ${XARGS} ${STRIP_CMD}

 # gcc from ports is in use
 .if defined(NDCC)


>Release-Note:
>Audit-Trail:
>Unformatted:


More information about the freebsd-ports-bugs mailing list