From owner-freebsd-bugs@FreeBSD.ORG Sun Jul 29 21:40:09 2012 Return-Path: Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 03B0F106564A for ; Sun, 29 Jul 2012 21:40:08 +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 C72B58FC0C for ; Sun, 29 Jul 2012 21:40:08 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.5/8.14.5) with ESMTP id q6TLe822079197 for ; Sun, 29 Jul 2012 21:40:08 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.5/8.14.5/Submit) id q6TLe8Rc079196; Sun, 29 Jul 2012 21:40:08 GMT (envelope-from gnats) Resent-Date: Sun, 29 Jul 2012 21:40:08 GMT Resent-Message-Id: <201207292140.q6TLe8Rc079196@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, Matthias Petermann Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 0E8471065673 for ; Sun, 29 Jul 2012 21:37:22 +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 D28AF8FC14 for ; Sun, 29 Jul 2012 21:37:21 +0000 (UTC) Received: from red.freebsd.org (localhost [127.0.0.1]) by red.freebsd.org (8.14.4/8.14.4) with ESMTP id q6TLbLAQ025892 for ; Sun, 29 Jul 2012 21:37:21 GMT (envelope-from nobody@red.freebsd.org) Received: (from nobody@localhost) by red.freebsd.org (8.14.4/8.14.4/Submit) id q6TLbLx3025891; Sun, 29 Jul 2012 21:37:21 GMT (envelope-from nobody) Message-Id: <201207292137.q6TLbLx3025891@red.freebsd.org> Date: Sun, 29 Jul 2012 21:37:21 GMT From: Matthias Petermann To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-3.1 Cc: Subject: misc/170264: bsdinstall into jail doesn't find FTP distribution folder when executed on a system running a patch release kernel X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 29 Jul 2012 21:40:09 -0000 >Number: 170264 >Category: misc >Synopsis: bsdinstall into jail doesn't find FTP distribution folder when executed on a system running a patch release kernel >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: Sun Jul 29 21:40:08 UTC 2012 >Closed-Date: >Last-Modified: >Originator: Matthias Petermann >Release: FreeBSD 9.0-RELEASE-p3 >Organization: >Environment: FreeBSD compaq 9.0-RELEASE-p3 FreeBSD 9.0-RELEASE-p3 #0: Tue Jun 12 02:52:29 UTC 2012 root@amd64-builder.daemonology.net:/usr/obj/usr/src/sys/GENERIC amd64 >Description: Scope: Using bsdinstall to create a new jail with distribution files from FTP Symptom: After selecting the to-be-used mirror bsdinstall aborts with the message "An installation step has beeen aborted. Would you like to restart the installer or exit the installer?". Investigation: Discussion in freebsd-questions (http://lists.freebsd.org/pipermail/freebsd-questions/2012-July/243878.html) and further analysis showed up the reason. Bsdinstall's mirrorselect script uses the output of "uname -r" to construct the BSDINSTALL_DISTSITE variable which is used as URL for getting the distribution files later on. As the system was updated to 9.0-RELEASE-p3 and the FTP mirrors don't have a folder for this special patch version (but only for 9.0-RELEASE) bsdinstall breaks. >How-To-Repeat: Execute # bsdinstall jail /usr/jails/myjail on a system running 9.0-RELEASE-p3 >Fix: A smart idea for a fix was illustrated by Darren Baginski in freebsd-questions (http://lists.freebsd.org/pipermail/freebsd-questions/2012-July/243884.html). He proposed to introduce an environment variable to allow modifications to the release name. In addition to this it probably makes sense to let mirrorselect try to access the FTP site with the default (uname -r) settings as the very first step. If this fails, either the mentioned environment variable should be consulted, or the FTP directory one level above should be queried to list the available release versions and let the user decide in a dialog which one to use. I tried to find out how this could work out for the amd64 version and did not understand exactly the layout of the FTP directory. E.g. in ftp://ftp1.freebsd.org/pub/FreeBSD/releases/amd64/ there are: drwxrwxr-x 14 89987 546 512 Feb 20 2011 8.2-RELEASE drwxrwxr-x 14 89987 546 512 Apr 10 18:13 8.3-RELEASE lrwxr-xr-x 1 89987 546 17 Jan 7 2012 9.0-RELEASE -> amd64/9.0-RELEASE drwxrwxr-x 7 89987 546 512 Feb 19 02:05 ISO-IMAGES -rw-rw-r-- 1 89987 546 637 Nov 23 2005 README.TXT drwxrwxr-x 5 89987 546 512 Jul 15 03:17 amd64 [*] while listing the included amd64[*] subdirectory shows: drwxrwxr-x 2 89987 546 512 Jan 7 2012 9.0-RELEASE drwxrwxr-x 2 89987 546 512 Jul 15 03:22 9.1-BETA1 drwxrwxr-x 4 89987 546 512 Jul 15 03:18 ISO-IMAGES bsdinstall itself uses ftp1.freebsd.org/pub/FreeBSD/releases/amd64/amd64/`uname -r` What is the purpose to have this additional amd64[*] directory within the base amd64 directory? >Release-Note: >Audit-Trail: >Unformatted: