From owner-freebsd-bugs@FreeBSD.ORG Sun Oct 24 18:40:10 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 DB46E1065674 for ; Sun, 24 Oct 2010 18:40:10 +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 BB52A8FC18 for ; Sun, 24 Oct 2010 18:40:10 +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 o9OIeAsj030338 for ; Sun, 24 Oct 2010 18:40:10 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.4/8.14.4/Submit) id o9OIeAgU030337; Sun, 24 Oct 2010 18:40:10 GMT (envelope-from gnats) Resent-Date: Sun, 24 Oct 2010 18:40:10 GMT Resent-Message-Id: <201010241840.o9OIeAgU030337@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, Lev Serebryakov Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3FECA106564A for ; Sun, 24 Oct 2010 18:37:44 +0000 (UTC) (envelope-from lev@ftp.translate.ru) Received: from ftp.translate.ru (ftp.translate.ru [80.249.188.42]) by mx1.freebsd.org (Postfix) with ESMTP id 014508FC08 for ; Sun, 24 Oct 2010 18:37:43 +0000 (UTC) Received: by ftp.translate.ru (Postfix, from userid 1000) id 15D5413DF48; Sun, 24 Oct 2010 22:37:43 +0400 (MSD) Message-Id: <20101024183743.15D5413DF48@ftp.translate.ru> Date: Sun, 24 Oct 2010 22:37:43 +0400 (MSD) From: Lev Serebryakov To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 Cc: Subject: misc/151697: [nanobsd] [patch] nanobsd.sh copy links to packages as links to chrooted environment X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Lev Serebryakov List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 24 Oct 2010 18:40:10 -0000 >Number: 151697 >Category: misc >Synopsis: [nanobsd] [patch] nanobsd.sh copy links to packages as links to chrooted environment >Confidential: no >Severity: serious >Priority: medium >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Sun Oct 24 18:40:10 UTC 2010 >Closed-Date: >Last-Modified: >Originator: Lev Serebryakov >Release: FreeBSD 8.1-STABLE i386 >Organization: >Environment: System: FreeBSD vmware-8-32.home.serebryakov.spb.ru 8.1-STABLE FreeBSD 8.1-STABLE #1: Wed Oct 20 18:55:10 MSD 2010 root@vmware-8-32.home.serebryakov.spb.ru:/usr/obj/usr/src/sys/GENERIC i386 >Description: "cust_pkg" function in nanobsd.sh script copy all packages from configured directory to nanobsd world ands chroot to this world dir. It uses "cpio" with options, whcih istructs cpio to copy symlinks as symlinks. Typical way to populate package directory is fill_pkg.sh script, whcih populates Pkg directory with symlinks. cust_pkg copies these links, and after chroot all symlinks becomes invalid. This patch adds "-L" option to "cpio" call to copy real files, not symlinks, to chroot environment. >How-To-Repeat: Populate "nanobsd/Pkg" directory with help from fill_pkg.sh, try to install these packages via "customize_cmd cust_pkg" command in nanobsd.sh config file. >Fix: --- nanobsd.sh.orig 2010-10-24 22:20:07.000000000 +0400 +++ nanobsd.sh.bugfix.pkg 2010-10-24 22:15:56.000000000 +0400 @@ -641,7 +641,7 @@ ( cd ${NANO_PACKAGE_DIR} find ${NANO_PACKAGE_LIST} -print | - cpio -dumpv ${NANO_WORLDDIR}/Pkg + cpio -Ldumpv ${NANO_WORLDDIR}/Pkg ) # Count & report how many we have to install >Release-Note: >Audit-Trail: >Unformatted: