From matthias.andree@web.de  Mon Sep 27 22:44:06 2004
Return-Path: <matthias.andree@web.de>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id 5064E16A4CE
	for <FreeBSD-gnats-submit@freebsd.org>; Mon, 27 Sep 2004 22:44:06 +0000 (GMT)
Received: from unimail.uni-dortmund.de (mx1.HRZ.Uni-Dortmund.DE [129.217.128.51])
	by mx1.FreeBSD.org (Postfix) with ESMTP id AC26743D46
	for <FreeBSD-gnats-submit@freebsd.org>; Mon, 27 Sep 2004 22:44:05 +0000 (GMT)
	(envelope-from matthias.andree@web.de)
Received: from m2a2.myip.org (fyxs4br5gbrc0bde@p54854E94.dip.t-dialin.net [84.133.78.148])
	(authenticated bits=0)
	by unimail.uni-dortmund.de (8.13.0/8.13.0) with ESMTP id i8RMhsgv027577
	for <FreeBSD-gnats-submit@freebsd.org>; Tue, 28 Sep 2004 00:43:59 +0200 (CEST)
Received: by merlin.emma.line.org (Postfix, from userid 1001)
	id 845381B217; Tue, 28 Sep 2004 00:43:53 +0200 (CEST)
Message-Id: <20040927224353.845381B217@merlin.emma.line.org>
Date: Tue, 28 Sep 2004 00:43:53 +0200 (CEST)
From: Matthias Andree <matthias.andree@web.de>
Reply-To: Matthias Andree <matthias.andree@web.de>
To: FreeBSD-gnats-submit@freebsd.org
Cc:
Subject: libc.so.5 isn't installed in a safe way
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         72138
>Category:       bin
>Synopsis:       libc.so.5 isn't installed in a safe way
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    delphij
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Mon Sep 27 22:50:06 GMT 2004
>Closed-Date:    Sat Apr 09 02:20:03 GMT 2005
>Last-Modified:  Sat Apr 09 02:20:35 GMT 2005
>Originator:     Matthias Andree
>Release:        FreeBSD 5.3-BETA5 i386
>Organization:
>Environment:
System: FreeBSD merlin.emma.line.org 5.3-BETA5 FreeBSD 5.3-BETA5 #6: Sat Sep 25 15:03:30 CEST 2004 root@merlin.emma.line.org:/usr/src/sys/i386/compile/MA5 i386


	
>Description:
I ran "make installworld" from a ready built BETA6 while / was low on space.
Make installworld crashed in the middle of its process and left me with
a system that had no libc.so.5.

I have no "INSTALL"-related options in /etc/make.conf.
	
>How-To-Repeat:
1. build world and install rescue so you can back out
2. fill / (perhaps with dd if=/dev/zero of=/deleteme) so it
   cannot hold another libc.so.5 copy
3. install world

Depending on the exact amount of free space on / in step #2 and #3, you may not
hit a problem with installing libc.so.5 but some other installation.

to recover, use: /rescue/cp /usr/obj/usr/src/lib/libc/libc.so.5 /lib
	
>Fix:
Let the installation for ESSENTIAL files use the -S flag so that there is
always a usable copy of these files in place.
	


>Release-Note:
>Audit-Trail:

From: Xin LI <delphij@frontfree.net>
To: Matthias Andree <matthias.andree@web.de>
Cc: FreeBSD-gnats-submit@FreeBSD.org, current@FreeBSD.org,
	ru@FreeBSD.org
Subject: Re: bin/72138: libc.so.5 isn't installed in a safe way
Date: Tue, 28 Sep 2004 12:33:51 +0800

 (-CURRENT is cc'ed for a boarder review)
 
 I fell like this idea, and here is the patch for review:
 
 Index: Makefile
 ===================================================================
 RCS file: /r/ncvs/src/lib/libc/Makefile,v
 retrieving revision 1.52
 diff -u -r1.52 Makefile
 --- Makefile	14 May 2004 12:04:29 -0000	1.52
 +++ Makefile	28 Sep 2004 04:30:26 -0000
 @@ -16,6 +16,7 @@
  CFLAGS+=-I${.CURDIR}/include -I${.CURDIR}/../../include
  CFLAGS+=-I${.CURDIR}/${MACHINE_ARCH}
  CLEANFILES+=tags
 +SHLINSTALLFLAGS+=	-S
  INSTALL_PIC_ARCHIVE=	yes
  PRECIOUSLIB=	yes
  
 
 It's also available here:
 
 	http://people.freebsd.org/~delphij/patch-libc
State-Changed-From-To: open->analyzed 
State-Changed-By: delphij 
State-Changed-When: Tue Sep 28 15:59:45 GMT 2004 
State-Changed-Why:  
Ruslan has posted an excellent patch on current@, bump state to analyzed 

http://www.freebsd.org/cgi/query-pr.cgi?pr=72138 
State-Changed-From-To: analyzed->patched 
State-Changed-By: delphij 
State-Changed-When: Fri Oct 1 08:48:33 GMT 2004 
State-Changed-Why:  
Ruslan has committed the patch to -HEAD 

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

From: Matteo Riondato <rionda@gufi.org>
To: Gnats PR Database <freebsd-gnats-submit@freebsd.org>
Cc: delphij@freebsd.org
Subject: Re: bin/72138: libc.so.5 isn't installed in a safe way
Date: Fri, 8 Apr 2005 22:43:55 +0200

 --QQ0dNM4HnH4+xgqD
 Content-Type: text/plain; charset=us-ascii
 Content-Disposition: inline
 Content-Transfer-Encoding: quoted-printable
 
 This was fixed and merged to RELENG_5, so this PR can be closed.
 Thank you.
 Best Regards
 --=20
 Rionda aka Matteo Riondato
 Disinformato per default
 G.U.F.I. Staff Member (http://www.gufi.org)
 FreeSBIE Developer (http://www.freesbie.org)
 
 --QQ0dNM4HnH4+xgqD
 Content-Type: application/pgp-signature
 Content-Disposition: inline
 
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.0 (FreeBSD)
 
 iD8DBQFCVu0L2Mp4pR7Fa+wRArR6AJ9l5BJDkL52UasTAxOGFh2Rs+ag/wCfYp5t
 AymsYYXdBBiV7ilYLdQ7o24=
 =epqJ
 -----END PGP SIGNATURE-----
 
 --QQ0dNM4HnH4+xgqD--
State-Changed-From-To: patched->closed 
State-Changed-By: delphij 
State-Changed-When: Sat Apr 9 02:19:39 GMT 2005 
State-Changed-Why:  
MFC'ed 

http://www.freebsd.org/cgi/query-pr.cgi?pr=72138 
Responsible-Changed-From-To: freebsd-bugs->delphij 
Responsible-Changed-By: delphij 
Responsible-Changed-When: Sat Apr 9 02:20:10 GMT 2005 
Responsible-Changed-Why:  
Bug me if anything goes wrong :-) 

http://www.freebsd.org/cgi/query-pr.cgi?pr=72138 
>Unformatted:
