misc/151697: [nanobsd] [patch] nanobsd.sh copy links to packages as links to chrooted environment

Lev Serebryakov lev at FreeBSD.org
Sun Oct 24 18:40:10 UTC 2010


>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 at 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:


More information about the freebsd-bugs mailing list