From owner-freebsd-bugs@FreeBSD.ORG Tue Apr 23 03:00:01 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]) by hub.freebsd.org (Postfix) with ESMTP id A287312D for ; Tue, 23 Apr 2013 03:00:01 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) by mx1.freebsd.org (Postfix) with ESMTP id 8540413D5 for ; Tue, 23 Apr 2013 03:00:01 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.6/8.14.6) with ESMTP id r3N3011m089826 for ; Tue, 23 Apr 2013 03:00:01 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.6/8.14.6/Submit) id r3N301in089825; Tue, 23 Apr 2013 03:00:01 GMT (envelope-from gnats) Resent-Date: Tue, 23 Apr 2013 03:00:01 GMT Resent-Message-Id: <201304230300.r3N301in089825@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, Garrett Cooper Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id CC9AA11B for ; Tue, 23 Apr 2013 02:59:32 +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 BE80213CB for ; Tue, 23 Apr 2013 02:59:32 +0000 (UTC) Received: from red.freebsd.org (localhost [127.0.0.1]) by red.freebsd.org (8.14.5/8.14.5) with ESMTP id r3N2xWv4053553 for ; Tue, 23 Apr 2013 02:59:32 GMT (envelope-from nobody@red.freebsd.org) Received: (from nobody@localhost) by red.freebsd.org (8.14.5/8.14.5/Submit) id r3N2xWp4053552; Tue, 23 Apr 2013 02:59:32 GMT (envelope-from nobody) Message-Id: <201304230259.r3N2xWp4053552@red.freebsd.org> Date: Tue, 23 Apr 2013 02:59:32 GMT From: Garrett Cooper To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-3.1 Subject: conf/178065: [PATCH] _worldtmp can fail sometimes if WORLDTMP/LIB32TMP is chflag'ed 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: Tue, 23 Apr 2013 03:00:01 -0000 >Number: 178065 >Category: conf >Synopsis: [PATCH] _worldtmp can fail sometimes if WORLDTMP/LIB32TMP is chflag'ed >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: Tue Apr 23 03:00:01 UTC 2013 >Closed-Date: >Last-Modified: >Originator: Garrett Cooper >Release: 10-CURRENT >Organization: EMC Isilon >Environment: FreeBSD gran-tourismo.west.isilon.com 10.0-CURRENT FreeBSD 10.0-CURRENT #2 r+ba9afe9: Fri Apr 19 20:29:10 PDT 2013 gcooper@gran-tourismo.west.isilon.com:/usr/obj/usr/src/sys/GRAN-TOURISMO amd64 >Description: In the event that make libraries fails and ${MAKEOBJDIRPREFIX} != /usr/obj and NO_CLEAN is not set, the build can fail to nuke ${WORLDTMP} and/or ${LIB32TMP} nigh immediately. This patch addresses those issues by following the same pattern that cleanworld employs in .../Makefile . >How-To-Repeat: See above comments. >Fix: Patch attached with submission follows: >From 6c2f1c4cb7aa053910c70b8b49c9a1643a309ef4 Mon Sep 17 00:00:00 2001 From: Garrett Cooper Date: Mon, 22 Apr 2013 17:15:51 -0700 Subject: [PATCH 1/3] Nuke chflags on LIB32TMP and WORLDTMP Sometimes these directories can be chflag'ed noschg, which means that the rm -rf will fail immediately; just unchflag the entire directory like cleanworld does today. Signed-off-by: Garrett Cooper --- Makefile.inc1 | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/Makefile.inc1 b/Makefile.inc1 index 4ce189c..27e0d1b 100644 --- a/Makefile.inc1 +++ b/Makefile.inc1 @@ -422,10 +422,18 @@ _worldtmp: @echo ">>> Rebuilding the temporary build tree" @echo "--------------------------------------------------------------" .if !defined(NO_CLEAN) +.if exists(${WORLDTMP}/) + -rm -rf ${WORLDTMP} + -chflags -R 0 ${WORLDTMP} rm -rf ${WORLDTMP} +.endif .if defined(LIB32TMP) +.if exists(${LIB32TMP}/) + -rm -rf ${LIB32TMP} + -chflags -R 0 ${LIB32TMP} rm -rf ${LIB32TMP} .endif +.endif .else rm -rf ${WORLDTMP}/legacy/usr/include # XXX - These three can depend on any header file. -- 1.8.2 >Release-Note: >Audit-Trail: >Unformatted: