From nobody@FreeBSD.org  Wed May  3 12:18:09 2006
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id 620B316A400
	for <freebsd-gnats-submit@FreeBSD.org>; Wed,  3 May 2006 12:18:09 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (www.freebsd.org [216.136.204.117])
	by mx1.FreeBSD.org (Postfix) with ESMTP id C356043D5E
	for <freebsd-gnats-submit@FreeBSD.org>; Wed,  3 May 2006 12:18:08 +0000 (GMT)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (localhost [127.0.0.1])
	by www.freebsd.org (8.13.1/8.13.1) with ESMTP id k43CI8x0075472
	for <freebsd-gnats-submit@FreeBSD.org>; Wed, 3 May 2006 12:18:08 GMT
	(envelope-from nobody@www.freebsd.org)
Received: (from nobody@localhost)
	by www.freebsd.org (8.13.1/8.13.1/Submit) id k43CI8fx075471;
	Wed, 3 May 2006 12:18:08 GMT
	(envelope-from nobody)
Message-Id: <200605031218.k43CI8fx075471@www.freebsd.org>
Date: Wed, 3 May 2006 12:18:08 GMT
From: Martin Jackson <mhjacks@swbell.net>
To: freebsd-gnats-submit@FreeBSD.org
Subject: 6.1-RC2 fails binary upgrade: chmod var/empty not allowed
X-Send-Pr-Version: www-2.3

>Number:         96711
>Category:       bin
>Synopsis:       [sysinstall] 6.1-RC2 fails binary upgrade: chmod var/empty not allowed
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    ceri
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Wed May 03 12:20:18 GMT 2006
>Closed-Date:    Thu May 04 19:25:24 GMT 2006
>Last-Modified:  Fri May  5 06:50:14 GMT 2006
>Originator:     Martin Jackson
>Release:        6.1-RC2
>Organization:
>Environment:
6.1-RC2 Installer/GENERIC
>Description:
When doing a binary upgrade from various versions (I have directly observed this going from 6.0-RELEASE to 6.1-BETA4 and from 6.1-BETA4 to 6.1-RC2), the installer pukes while unpacking the base distribution, complaining that var/empty cannot be chmod'ed.  It definitely has the schg flag set; and if I use the holographic shell to remove that flag, and retry installation (which the installer prompts for) it will complete successfully.

I selected a custom distribution set, including:  base, kernels (GENERIC only), man, info, games, and doc.

I can work around the issue, but I would like to know if I'm doing something wrong or there is a bug in the installer.
>How-To-Repeat:
Select binary upgrade.  Pick the following distributions: base, kernel (GENERIC), doc, info, man, games.  The install should fail almost immediately with a write error.  The log VT should show a cpio/gzip error writing to var/empty
>Fix:
A workaround is to use the "holographic shell" on vt 4 to chflags noschg /var/empty.  Retrying the installation should succeed at that point.
>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-bugs->freebsd-qa 
Responsible-Changed-By: ceri 
Responsible-Changed-When: Thu May 4 11:38:36 UTC 2006 
Responsible-Changed-Why:  
sysinstall problem. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=96711 
Responsible-Changed-From-To: freebsd-qa->ceri 
Responsible-Changed-By: ceri 
Responsible-Changed-When: Thu May 4 12:04:41 UTC 2006 
Responsible-Changed-Why:  
I'll look into this. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=96711 

From: Makoto Matsushita <matusita@jp.FreeBSD.org>
To: Ceri Davies <ceri@freebsd.org>
Cc: bug-followup@freebsd.org, Nobuyuki Koganemaru <n-kogane@syd.odn.ne.jp>
Subject: Re: misc/96711: [sysinstall] 6.1-RC2 fails binary upgrade: chmod
 var/empty not allowed
Date: Fri, 05 May 2006 02:00:09 +0900

 > I'll look into this.
 
 FYI, there's a PR: 96780 that address the same issue (I've cc-ed this email to
 the originator of this PR).  This PR also has a patch to fix; use chflags(1)
 to change the schg flag.
 
 BTW... Kogane-san, why your patch adds "/var" instead of "/var/empty" to the
 list ?  You mentioned /var/empty only, but did you know any other directories
 in /var to set noschg?
 
 -- 
 Makoto `MAR' Matsushita

From: Martin Jackson <mhjacks@swbell.net>
To: bug-followup@FreeBSD.org,  mhjacks@swbell.net, 
 matusita@jp.FreeBSD.org,  ceri@freebsd.org
Cc:  
Subject: Re: bin/96711: [sysinstall] 6.1-RC2 fails binary upgrade: chmod var/empty
 not allowed
Date: Thu, 04 May 2006 14:14:08 -0500

 I believe that 96780 is a duplicate of this bug, and I have no objection 
 to this bug being closed and the issue being worked from 96780.
 
 I can also confirm that /var/empty is the only *additional* directory 
 that needs chflags run on it - In all the cases I have seen, "chflags 
 noschg /var/empty" allows installation to progress without issues.
 
 Thanks,
 Marty
State-Changed-From-To: open->closed 
State-Changed-By: ceri 
State-Changed-When: Thu May 4 19:25:03 UTC 2006 
State-Changed-Why:  
Same issue as 96780, which has a patch. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=96711 

From: Ceri Davies <ceri@submonkey.net>
To: Martin Jackson <mhjacks@swbell.net>
Cc: FreeBSD Gnats Submit <freebsd-gnats-submit@FreeBSD.org>
Subject: Re: bin/96711: [sysinstall] 6.1-RC2 fails binary upgrade: chmod var/empty not allowed
Date: Thu, 4 May 2006 20:35:28 +0100

 On Thu, May 04, 2006 at 07:20:21PM +0000, Martin Jackson wrote:
 > The following reply was made to PR bin/96711; it has been noted by GNATS.
 > 
 > From: Martin Jackson <mhjacks@swbell.net>
 > To: bug-followup@FreeBSD.org,  mhjacks@swbell.net, 
 >  matusita@jp.FreeBSD.org,  ceri@freebsd.org
 > Cc:  
 > Subject: Re: bin/96711: [sysinstall] 6.1-RC2 fails binary upgrade: chmod var/empty
 >  not allowed
 > Date: Thu, 04 May 2006 14:14:08 -0500
 > 
 >  I believe that 96780 is a duplicate of this bug, and I have no objection 
 >  to this bug being closed and the issue being worked from 96780.
 >  
 >  I can also confirm that /var/empty is the only *additional* directory 
 >  that needs chflags run on it - In all the cases I have seen, "chflags 
 >  noschg /var/empty" allows installation to progress without issues.
 
 Thanks for that, it'll be useful.
 
 Ceri
 -- 
 That must be wonderful!  I don't understand it at all.
                                                   -- Moliere

From: n-kogane@syd.odn.ne.jp (Nobuyuki Koganemaru)
To: ceri@freebsd.org, matusita@jp.FreeBSD.org
Cc: bug-followup@freebsd.org
Subject: Re: misc/96711: [sysinstall] 6.1-RC2 fails binary upgrade: chmod var/empty not allowed
Date: Fri, 5 May 2006 15:48:52 +0900 (JST)

 >Date: Fri, 05 May 2006 02:00:09 +0900
 >From: Makoto Matsushita <matusita@jp.FreeBSD.org>
 >
 >> I'll look into this.
 >
 >FYI, there's a PR: 96780 that address the same issue (I've cc-ed this email to
 >the originator of this PR).  This PR also has a patch to fix; use chflags(1)
 >to change the schg flag.
 >
 >BTW... Kogane-san, why your patch adds "/var" instead of "/var/empty" to the
 >list ?  You mentioned /var/empty only, but did you know any other directories
 >in /var to set noschg?
 
 
 |(void)vsystem("chflags -R noschg /bin /sbin /usr/sbin /usr/bin /lib /usr/lib /libexec /usr/libexec /var /kernel*");
 
 Other directories are top or sub-top directories, so I use /var.
 
 There is no problem even if /var/empty is used.
 
 --
 KOGANEMARU Computer Engineering Service Corporation.
 	(Ohnojou-shi, Fukuoka Japan)
 	Nobuyuki Koganemaru
 E-Mail: n-kogane@syd.odn.ne.jp
 E-Mail: kogane@jp.FreeBSD.org
 E-Mail: kogane@koganemaru.co.jp
 URL: http://www.koganemaru.co.jp
 
>Unformatted:
