From owner-cvs-all@FreeBSD.ORG Tue May 24 09:24:56 2005 Return-Path: X-Original-To: cvs-all@FreeBSD.org Delivered-To: cvs-all@FreeBSD.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 25FBB16A41C; Tue, 24 May 2005 09:24:56 +0000 (GMT) (envelope-from andrea@acampi.inet.it) Received: from acampi.inet.it (acampi.inet.it [213.92.1.165]) by mx1.FreeBSD.org (Postfix) with ESMTP id C978543D49; Tue, 24 May 2005 09:24:55 +0000 (GMT) (envelope-from andrea@acampi.inet.it) Received: by acampi.inet.it (Postfix, from userid 1000) id 65BB521; Tue, 24 May 2005 11:24:54 +0200 (CEST) Date: Tue, 24 May 2005 11:24:54 +0200 From: Andrea Campi To: Poul-Henning Kamp Message-ID: <20050524092454.GI12943@webcom.it> References: <200505191520.j4JFKnVi043884@repoman.freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200505191520.j4JFKnVi043884@repoman.freebsd.org> User-Agent: Mutt/1.5.9i Cc: cvs-src@FreeBSD.org, src-committers@FreeBSD.org, cvs-all@FreeBSD.org Subject: Re: cvs commit: src/tools/tools/nanobsd/Customize files pkgs X-BeenThere: cvs-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: CVS commit messages for the entire tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 May 2005 09:24:56 -0000 On Thu, May 19, 2005 at 03:20:49PM +0000, Poul-Henning Kamp wrote: > phk 2005-05-19 15:20:49 UTC > > FreeBSD src repository > > Added files: > tools/tools/nanobsd/Customize files pkgs > Log: > Add a couple of basic customization scripts. Don't these duplicate what already is in Customize/default? Even though I do prefer keeping the two steps separate the way you did... A few notes: - I'm sure I'm not the only one who keeps everything under CVS, so something like this might be useful: @@ -12,4 +12,4 @@ # ${CUSTOMIZE} ${WD} ${WORLDDIR} ${.CURDIR} [ ${LOCAL_FILES_LIST} ] cd $3/Files -find . -print | cpio -dumpv $1 +find . ! -path \*/CVS\* -print | cpio -dumpv $1 - I don't install pkg_add on the image, so Customize/pkgs has no chance of working; the Customize/default is better, any chance of using that instead? Something like (untested): Index: Customize/pkgs =================================================================== RCS file: /home/CVS/gw0/nanobsd/Customize/pkgs,v retrieving revision 1.1 diff -u -r1.1 pkgs --- Customize/pkgs 20 May 2005 08:55:44 -0000 1.1 +++ Customize/pkgs 24 May 2005 09:23:02 -0000 @@ -11,8 +11,11 @@ # Usage: # ${CUSTOMIZE} ${WD} ${WORLDDIR} ${.CURDIR} [ ${LOCAL_FILES_LIST} ] -rm -rf $1/tmp/Pkg $1/var/db/pkg/* $1/usr/local/* -mkdir $1/tmp/Pkg -ln $3/Pkg/* $1/tmp/Pkg -( chroot $1 sh -c "cd /tmp/Pkg && pkg_add -v *" ) -rm -rf $1/tmp/Pkg +pkg_relocate() { + sed -e "1,/^@cwd/s#^@cwd #&${WD}#" +} + +for pkg in `ls $1/var/db/pkg/* | grep -v CVS` + do pkg_add -M \${pkg} | pkg_relocate | pkg_add -S; +done + - if we go this way, default is only left with movelocaletc, which could be as well moved into its own script. Bye, Andrea -- Press every key to continue.