From owner-svn-ports-all@freebsd.org Thu Jul 9 05:47:33 2015 Return-Path: Delivered-To: svn-ports-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 195EF99530F; Thu, 9 Jul 2015 05:47:33 +0000 (UTC) (envelope-from ehaupt@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0981F1295; Thu, 9 Jul 2015 05:47:33 +0000 (UTC) (envelope-from ehaupt@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.14.9/8.14.9) with ESMTP id t695lWB7014853; Thu, 9 Jul 2015 05:47:32 GMT (envelope-from ehaupt@FreeBSD.org) Received: (from ehaupt@localhost) by repo.freebsd.org (8.14.9/8.14.9/Submit) id t695lW8s014852; Thu, 9 Jul 2015 05:47:32 GMT (envelope-from ehaupt@FreeBSD.org) Message-Id: <201507090547.t695lW8s014852@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ehaupt set sender to ehaupt@FreeBSD.org using -f From: Emanuel Haupt Date: Thu, 9 Jul 2015 05:47:32 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r391614 - head/shells/bash X-SVN-Group: ports-head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-ports-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the ports tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 09 Jul 2015 05:47:33 -0000 Author: ehaupt Date: Thu Jul 9 05:47:32 2015 New Revision: 391614 URL: https://svnweb.freebsd.org/changeset/ports/391614 Log: Scripts like https://github.com/henricj/scripts/blob/master/stir.sh often generate a bunch of, cannot make pipe for process substitution: File exists errors. The problem lies with colliding pipe names. The code in sh_mktmpname() in lib/sh/tmpfile.c uses a combination of things like the current time, the PID, and an incrementing counter. Since the child PIDs tend to be sequential (barring kern.randompid=1), there are collisions. Fix this problem without rewriting upstream code by defining USE_MKTEMP=1 to use the mktemp(3) code of bash. FreeBSD's mktemp() is not nearly as bad as the bash default and isn't brain-damaged like some platforms (which is likely why the bash code tries to do it's own thing). In FreeBSD, "mktemp(3)" it uses arc4random to pick one of 62 symbols for each "X". Submitted by: Henric Jungheim Modified: head/shells/bash/Makefile Modified: head/shells/bash/Makefile ============================================================================== --- head/shells/bash/Makefile Thu Jul 9 05:12:51 2015 (r391613) +++ head/shells/bash/Makefile Thu Jul 9 05:47:32 2015 (r391614) @@ -4,7 +4,7 @@ PORTNAME= bash PATCHLEVEL= 39 PORTVERSION= 4.3.${PATCHLEVEL:S/^0//g} -PORTREVISION?= 0 +PORTREVISION?= 1 CATEGORIES= shells MASTER_SITES= GNU/${PORTNAME} DISTNAME= ${PORTNAME}-${PORTVERSION:R} @@ -54,6 +54,8 @@ CONFIGURE_ARGS+= --without-bash-malloc \ --disable-rpath \ --enable-disabled-builtins +CFLAGS+= -DUSE_MKTEMP=1 + .if empty(PKGNAMESUFFIX) CONFLICTS+= bash-static-[0-9]* .else