From owner-freebsd-bugs@FreeBSD.ORG Sun Sep 1 00:10:00 2013 Return-Path: Delivered-To: freebsd-bugs@smarthost.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id AE492463 for ; Sun, 1 Sep 2013 00:10:00 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 8C6A82B32 for ; Sun, 1 Sep 2013 00:10:00 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.7/8.14.7) with ESMTP id r810A08p065831 for ; Sun, 1 Sep 2013 00:10:00 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.7/8.14.7/Submit) id r810A0Xc065830; Sun, 1 Sep 2013 00:10:00 GMT (envelope-from gnats) Resent-Date: Sun, 1 Sep 2013 00:10:00 GMT Resent-Message-Id: <201309010010.r810A0Xc065830@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Jan Beich Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 050C136D for ; Sun, 1 Sep 2013 00:02:05 +0000 (UTC) (envelope-from nobody@FreeBSD.org) Received: from oldred.freebsd.org (oldred.freebsd.org [8.8.178.121]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id E12612AFA for ; Sun, 1 Sep 2013 00:02:04 +0000 (UTC) Received: from oldred.freebsd.org ([127.0.1.6]) by oldred.freebsd.org (8.14.5/8.14.7) with ESMTP id r81022sT099808 for ; Sun, 1 Sep 2013 00:02:02 GMT (envelope-from nobody@oldred.freebsd.org) Received: (from nobody@localhost) by oldred.freebsd.org (8.14.5/8.14.5/Submit) id r81022gI099805; Sun, 1 Sep 2013 00:02:02 GMT (envelope-from nobody) Message-Id: <201309010002.r81022gI099805@oldred.freebsd.org> Date: Sun, 1 Sep 2013 00:02:02 GMT From: Jan Beich To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-3.1 Subject: bin/181715: [regression] bmake vs. bsd.port.mk: security-check doesn't work after base@r254980 X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 01 Sep 2013 00:10:00 -0000 >Number: 181715 >Category: bin >Synopsis: [regression] bmake vs. bsd.port.mk: security-check doesn't work after base@r254980 >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Sun Sep 01 00:10:00 UTC 2013 >Closed-Date: >Last-Modified: >Originator: Jan Beich >Release: FreeBSD 10.0-CURRENT amd64 >Organization: >Environment: reassign to portmgr if it's a feature >Description: When security-check tries to generate a list of symbols to check for unsafe functions, objdump(1) may sometimes encounter non-ELF files and change exit status to 1. While bmake and fmake both agree to not abort the target if the line starts with `-' (ignore) flag that's not so for what happens to the rest of shell commands. >How-To-Repeat: # no warning $ cd net/socat $ make install .. *** Error code 1 (ignored) # test case $ cat Makefile all: -@true | false; echo foo -@true; set -o | fgrep err $ fmake foo errexit off $ make *** Error code 1 (ignored) errexit on >Fix: workaround --- ignore.diff begins here --- Index: Mk/bsd.port.mk =================================================================== --- Mk/bsd.port.mk (revision 325833) +++ Mk/bsd.port.mk (working copy) @@ -4167,7 +4169,7 @@ security-check: | ${XARGS} -0 -J % ${FIND} % -prune -perm -0002 \! -type l 2> /dev/null > ${WRKDIR}/.PLIST.writable; \ ${TR} '\n' '\0' < ${WRKDIR}/.PLIST.flattened \ | ${XARGS} -0 -J % ${FIND} % -prune ! -type l -type f -print0 2> /dev/null \ - | ${XARGS} -0 -n 1 ${OBJDUMP} -R 2> /dev/null > ${WRKDIR}/.PLIST.objdump; \ + | ${XARGS} -0 -n 1 ${OBJDUMP} -R 2> /dev/null > ${WRKDIR}/.PLIST.objdump || ${TRUE}; \ if \ ! ${AWK} -v audit="$${PORTS_AUDIT}" -f ${PORTSDIR}/Tools/scripts/security-check.awk \ ${WRKDIR}/.PLIST.flattened ${WRKDIR}/.PLIST.objdump ${WRKDIR}/.PLIST.setuid ${WRKDIR}/.PLIST.writable; \ --- ignore.diff ends here --- >Release-Note: >Audit-Trail: >Unformatted: