From owner-freebsd-bugs@FreeBSD.ORG Fri Oct 29 19:10:09 2010 Return-Path: Delivered-To: freebsd-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 E31C6106566C for ; Fri, 29 Oct 2010 19:10:09 +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 A81DA8FC16 for ; Fri, 29 Oct 2010 19:10:08 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.4/8.14.4) with ESMTP id o9TJA8QB081191 for ; Fri, 29 Oct 2010 19:10:08 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.4/8.14.4/Submit) id o9TJA8S5081190; Fri, 29 Oct 2010 19:10:08 GMT (envelope-from gnats) Resent-Date: Fri, 29 Oct 2010 19:10:08 GMT Resent-Message-Id: <201010291910.o9TJA8S5081190@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, Devin Teske Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B13761065670; Fri, 29 Oct 2010 19:06:48 +0000 (UTC) (envelope-from dteske@vicor.com) Received: from postoffice.vicor.com (postoffice.vicor.com [69.26.56.53]) by mx1.freebsd.org (Postfix) with ESMTP id 999A08FC12; Fri, 29 Oct 2010 19:06:48 +0000 (UTC) Received: from [208.206.78.30] (port=54835 helo=dt.vicor.com) by postoffice.vicor.com with esmtpsa (SSLv3:RC4-MD5:128) (Exim 4.71) (envelope-from ) id 1PBttO-0000e7-Ci; Fri, 29 Oct 2010 11:41:37 -0700 Message-Id: <1288377694.17949.10.camel@localhost.localdomain> Date: Fri, 29 Oct 2010 11:41:34 -0700 From: Devin Teske To: FreeBSD-gnats-submit@FreeBSD.org Cc: Devin Teske , Randi Harper Subject: bin/151821: [patch] cpioVerbose=medium breaks sysinstall(8) during install of FreeBSD-8.x/CURRENT (all platforms/media) X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Devin Teske List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 29 Oct 2010 19:10:10 -0000 >Number: 151821 >Category: bin >Synopsis: [patch] cpioVerbose=medium breaks sysinstall(8) during install of FreeBSD-8.x/CURRENT (all platforms/media) >Confidential: no >Severity: serious >Priority: low >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Fri Oct 29 19:10:08 UTC 2010 >Closed-Date: >Last-Modified: >Originator: Devin Teske >Release: FreeBSD 8.1-RELEASE i386 >Organization: VICOR >Environment: System: FreeBSD push810.linux.vicor.com 8.1-RELEASE FreeBSD 8.1-RELEASE #0: Mon Jul 19 02:55:53 UTC 2010 root@almeida.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC i386 Occurs on all archs: alpha/amd64/arm/i386/ia64/mips/pc98/ppc/sparc64/sun4v Occurs on all platforms: Walnut Creek CD/DVD, FreeBSD Mall CD/DVD, USB, and from installed distribution. Occurs on tags: RELENG_8_BP RELENG_8_0_BP RELENG_8_0 RELENG_8_0_0_RELEASE RELENG_8_1_BP RELENG_8_1 RELENG_8_1_0_RELEASE RELENG_8 MAIN HEAD First occurred: Mon May 26 17:15:34 2008 UTC (2 years, 5 months ago) when src/usr.bin/cpio/* was committed to MAIN by kientzle with comment: Initial commit of bsddcpio 0.9.11b A new implementation of cpio that uses libarchive as it's back-end archiving/dearchiving infrastructure. Includes test harness; "make check" in the bsdcpio directory to build and run the test harness. >Description: When installing FreeBSD, either (a) as scripted installation using install.cfg, environment variables, or command-line arguments to sysinstall(8) or (b) as a manual installation using ncurses(3)-based menus, if the cpioVerbose feature is set to "medium", the installation fails with the following errors (after performing newfs(8), upon attempting to extract the first binary distribution-set [base]): 1. "Copy returned error status of 1!" See: http://druidbsd.sf.net/images/cpioVerbose_medium_ttyv0_error1.png 2. "installInitial: Couldn't clone the boot floppy onto the root file system. Aborting!" See: http://druidbsd.sf.net/images/cpioVerbose_medium_ttyv0_error2.png NOTE: These errors (#1 and #2) occur one after the other. 3. (on the debug console): DEBUG: Executing command `find -x /stand | cpio -V -pdum /mnt' Brief Usage: List: cpio -it < archive Extract: cpio -i < archive Create: cpio -o < filenames > archive Help: cpio --help DEBUG: Command `find -x /stand | cpio -V -pdum /mnt' returns status of 1 See: http://druidbsd.sf.net/images/cpioVerbose_medium_ttyv1_error.png NOTE: When installing from CD/DVD release, this output is visible by pressing Alt+F4 to bring up the debug console. Also note that much of the information displayed in the above image requires debug=YES to be set for sysinstall(8) (either as an environment variable, as a command-line argument, or in install.cfg). >How-To-Repeat: Start your installation process of installing a new FreeBSD system. Feel free to use any FreeBSD-8.x disc/media. 1. At the main menu of sysinstall(8), choose the option entitled: "Options View/Set various installation options" 2. Use the UP/DOWN cursor keys to highlight the "Extract Detail" option 3. Press SPACE until `medium' is shown 4. Press Q to exit the Options-Editor 5. Perform the rest of your install as usual 6. After newfs(8) is performed, just as sysinstall(8) attempts to extract the first binary distribution-set (using cpio(1)), the installation will error-out with the above errors. >Fix: Below is a unified patch for three files: usr.sbin/sysinstall/help/shortcuts.hlp,v 1.13 (RELENG_8_1) usr.sbin/sysinstall/media.c,v 1.127.2.2.4.1 (RELENG_8_1) usr.sbin/sysinstall/sysinstall.8,v 1.81.2.3.2.1 (RELENG_8_1) The below patch removes the `medium' option (passes `-V' to cpio(1)) for the cpioVerbose setting, making the only two options now `high' (passes `-v' flag to cpio(1)) or `low' (does not pass `-v' to cpio(1)). --- usr.sbin/sysinstall/help/shortcuts.hlp.orig 2007-06-25 09:37:17.000000000 -0700 +++ usr.sbin/sysinstall/help/shortcuts.hlp 2010-10-26 15:37:45.000000000 -0700 @@ -13,7 +13,7 @@ blanktime Screen blank tim bootManager Select boot manager: booteasy, standard or none browserBinary Which doc browser to use (default: links) browserPackage Which package to get browser from (default: links) -cpioVerbose How verbose to be with cpio: high, medium or low +cpioVerbose How verbose to be with cpio: high or low debug Extra debugging? defaultrouter IP address of default route disk Which disk to operate on (ad0, da0, etc). --- usr.sbin/sysinstall/media.c.orig 2010-06-13 19:09:06.000000000 -0700 +++ usr.sbin/sysinstall/media.c 2010-10-26 15:51:06.000000000 -0700 @@ -117,8 +117,6 @@ cpioVerbosity() if (cp && !strcmp(cp, "high")) return "-v"; - else if (cp && !strcmp(cp, "medium")) - return "-V"; return ""; } @@ -848,8 +846,6 @@ mediaSetCPIOVerbosity(dialogMenuItem *se } else { if (!strcmp(cp, "low")) - variable_set2(VAR_CPIO_VERBOSITY, "medium", 0); - else if (!strcmp(cp, "medium")) variable_set2(VAR_CPIO_VERBOSITY, "high", 0); else /* must be "high" - wrap around */ variable_set2(VAR_CPIO_VERBOSITY, "low", 0); --- usr.sbin/sysinstall/sysinstall.8.orig 2010-06-13 19:09:06.000000000 -0700 +++ usr.sbin/sysinstall/sysinstall.8 2010-10-26 15:57:21.000000000 -0700 @@ -749,8 +749,7 @@ .Sy Variables : .Bl -tag -width indent .It cpioVerbose -Can be used to set the verbosity of cpio extractions to low, medium or -high. +Can be used to set the verbosity of cpio extractions to low or high. .El .It mediaGetType Interactively get the user to specify some type of media. >Release-Note: >Audit-Trail: >Unformatted: X-send-pr-version: 3.113 X-GNATS-Notify: >From this point-on, you must restart the installation process as you are returned to the main install menu of sysinstall(8) after acknowledging errors #1 and #2 above. The problem is entirely that cpio(1) was replaced with a new version that does not accept the `-V' (or `--dot') flag. Historically, previous releases used GNU cpio(1) (in contrib) whereas FreeBSD-8.x uses BSD cpio (1) which is not forward-compatible with the GNU flags. In the error visible on the debug console, we see that passing of `-V' for when cpioVerbose=medium results in BSD cpio(1) producing a short usage-statement followed by an exit with error status 1.