From owner-freebsd-bugs Sat Sep 21 17:30: 6 2002 Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 78CEF37B404 for ; Sat, 21 Sep 2002 17:30:03 -0700 (PDT) Received: from freefall.freebsd.org (freefall.FreeBSD.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id C60DE43E6E for ; Sat, 21 Sep 2002 17:30:02 -0700 (PDT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.12.6/8.12.6) with ESMTP id g8M0U2Co033019 for ; Sat, 21 Sep 2002 17:30:02 -0700 (PDT) (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.12.6/8.12.6/Submit) id g8M0U2hi033018; Sat, 21 Sep 2002 17:30:02 -0700 (PDT) Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 7D90837B401 for ; Sat, 21 Sep 2002 17:29:20 -0700 (PDT) Received: from wantadilla.lemis.com (wantadilla.lemis.com [192.109.197.80]) by mx1.FreeBSD.org (Postfix) with ESMTP id 08D1143E3B for ; Sat, 21 Sep 2002 17:29:19 -0700 (PDT) (envelope-from grog@lemis.com) Received: by wantadilla.lemis.com (Postfix, from userid 1004) id ABAB48130F; Sun, 22 Sep 2002 09:59:16 +0930 (CST) Message-Id: <20020922002916.ABAB48130F@wantadilla.lemis.com> Date: Sun, 22 Sep 2002 09:59:16 +0930 (CST) From: "Greg 'groggy' Lehey" Reply-To: "Greg 'groggy' Lehey" To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 Subject: bin/43214: mergemaster does not handle missing /etc correctly Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org >Number: 43214 >Category: bin >Synopsis: mergemaster does not handle missing /etc correctly >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Sat Sep 21 17:30:02 PDT 2002 >Closed-Date: >Last-Modified: >Originator: Greg 'groggy' Lehey >Release: FreeBSD 5.0-CURRENT i386 >Organization: LEMIS (SA) Pty Ltd >Environment: System: FreeBSD wantadilla.lemis.com 5.0-CURRENT FreeBSD 5.0-CURRENT #0: Mon Dec 31 19:08:24 CST 2001 grog@monorchid.lemis.com:/src/FreeBSD/5-CURRENT-MONORCHID/src/sys/i386/compile/MONORCHID i386 >Description: If mergemaster is run with a non-existent or empty /etc directory, it does not do anything useful. It would be hoped that this method could be used to install a virgin /etc directory. # mergemaster -p -a *** The directory specified for the temporary root environment, /var/tmp/temproot, exists. This can be a security risk if untrusted users have access to the system. *** Creating the temporary root environment in /var/tmp/temproot.0922.00.20.04 *** /var/tmp/temproot.0922.00.20.04 ready for use *** Creating and populating directory structure in /var/tmp/temproot.0922.00.20.04 *** Beginning comparison *** ./etc/master.passwd will remain for your consideration *** ./etc/group will remain for your consideration *** Comparison complete *** Files that remain for you to merge by hand: /var/tmp/temproot.0922.00.20.04/etc/master.passwd /var/tmp/temproot.0922.00.20.04/etc/group grep: /etc/make.conf: No such file or directory *** Comparing make variables *** From /etc/make.conf *** From /usr/src/share/examples/etc/make.conf In this case, it returns a condition code 0. # ls -l /etc ls: /etc: No such file or directory # mergemaster -i -a *** The directory specified for the temporary root environment, /var/tmp/temproot, exists. This can be a security risk if untrusted users have access to the system. *** Creating the temporary root environment in /var/tmp/temproot.0922.00.20.47 *** /var/tmp/temproot.0922.00.20.47 ready for use *** Creating and populating directory structure in /var/tmp/temproot.0922.00.20.47 set - `grep "^[a-zA-Z]" /src/FreeBSD/5-CURRENT-WANTADILLA/src/etc/locale.deprecated`; while [ $# -gt 0 ] ; do for dir in /usr/share/locale /usr/share/nls /usr/local/share/nls; do test -d /var/tmp/temproot.0922.00.20.47/${dir} && cd /var/tmp/temproot.0922.00.20.47/${dir}; test -L "$2" && rm -rf "$2"; test \! -L "$1" && test -d "$1" && mv "$1" "$2"; done; shift; shift; done mtree -deU -f /src/FreeBSD/5-CURRENT-WANTADILLA/src/etc/mtree/BSD.root.dist -p /var/tmp/temproot.0922.00.20.47/ mtree: line 6: unknown user root *** Error code 1 Stop in /src/FreeBSD/5-CURRENT-WANTADILLA/src/etc. *** FATAL ERROR: Cannot 'cd' to /usr/src/etc and install files to the temproot environment >How-To-Repeat: As above >Fix: It's probably not worth fixing this bug in isolation. The real issue here is the difficulty of installing /etc at all. The only way I know is via a release CD-ROM. It shouldn't be that difficult: it should be part of the base installworld target. Consider this PR a flag to be closed when a good solution has been found. >Release-Note: >Audit-Trail: >Unformatted: To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message