From owner-freebsd-ports-bugs@FreeBSD.ORG Sun Jan 8 05:20:06 2012 Return-Path: Delivered-To: freebsd-ports-bugs@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7B6B31065675 for ; Sun, 8 Jan 2012 05:20:06 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 580738FC13 for ; Sun, 8 Jan 2012 05:20:06 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.5/8.14.5) with ESMTP id q085K6Kb026162 for ; Sun, 8 Jan 2012 05:20:06 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.5/8.14.5/Submit) id q085K6JV026161; Sun, 8 Jan 2012 05:20:06 GMT (envelope-from gnats) Resent-Date: Sun, 8 Jan 2012 05:20:06 GMT Resent-Message-Id: <201201080520.q085K6JV026161@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-ports-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Garrett Cooper Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 35603106564A for ; Sun, 8 Jan 2012 05:19:24 +0000 (UTC) (envelope-from nobody@FreeBSD.org) Received: from red.freebsd.org (red.freebsd.org [IPv6:2001:4f8:fff6::22]) by mx1.freebsd.org (Postfix) with ESMTP id 0A3798FC0A for ; Sun, 8 Jan 2012 05:19:24 +0000 (UTC) Received: from red.freebsd.org (localhost [127.0.0.1]) by red.freebsd.org (8.14.4/8.14.4) with ESMTP id q085JNp9027804 for ; Sun, 8 Jan 2012 05:19:23 GMT (envelope-from nobody@red.freebsd.org) Received: (from nobody@localhost) by red.freebsd.org (8.14.4/8.14.4/Submit) id q085JNN4027803; Sun, 8 Jan 2012 05:19:23 GMT (envelope-from nobody) Message-Id: <201201080519.q085JNN4027803@red.freebsd.org> Date: Sun, 8 Jan 2012 05:19:23 GMT From: Garrett Cooper To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-3.1 Cc: Subject: ports/163908: [patch] filesystem based race condition in multimedia/xvid X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 08 Jan 2012 05:20:06 -0000 >Number: 163908 >Category: ports >Synopsis: [patch] filesystem based race condition in multimedia/xvid >Confidential: no >Severity: serious >Priority: medium >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Sun Jan 08 05:20:05 UTC 2012 >Closed-Date: >Last-Modified: >Originator: Garrett Cooper >Release: 9.0-RELEASE >Organization: n/a >Environment: FreeBSD bayonetta.local 9.0-STABLE FreeBSD 9.0-STABLE #1 r229323M: Mon Jan 2 14:32:54 PST 2012 gcooper@bayonetta.local:/usr/obj/store/freebsd/stable/9/sys/BAYONETTA amd64 >Description: Compilation failures occur regularly on build.ixsystems.com (but I've also seen it occur on streetfighter.ixsystems.com) because a directory was created via install -d, but it already exists and thus install fails. The best solution to this problem would be to create rules that mkdir // install the directories, s.t. gmake could resolve the dependencies, create the directories beforehand, and the race would be resolved (I've done it before with LTP), but it's trickier with xvid because it uses some whacky pattern rules and I'm short on time right now (I might submit a proper patch upstream after I submit the bug report). The attached patch just changes $(INSTALL) to mkdir -m 0755 -p as a simple hack, because mkdir -p doesn't fail if the target directory already exists. >How-To-Repeat: >Fix: Patch attached with submission follows: --- Makefile 2012-01-07 20:28:54.382985196 -0800 +++ Makefile 2012-01-07 20:31:19.373992363 -0800 @@ -85,7 +85,7 @@ $(BUILD_DIR): @echo " D: $(BUILD_DIR)" - @$(INSTALL) -d $(BUILD_DIR) + @mkdir -m 0755 -p $(BUILD_DIR) #----------------------------------------------------------------------------- # Generic assembly rule @@ -93,7 +93,7 @@ .$(ASSEMBLY_EXTENSION).$(OBJECT_EXTENSION): @echo " A: $(@D)/$(Release-Note: >Audit-Trail: >Unformatted: