Date: Tue, 24 May 2005 11:24:54 +0200 From: Andrea Campi <andrea+freebsd_cvs_all@webcom.it> To: Poul-Henning Kamp <phk@FreeBSD.org> Cc: cvs-src@FreeBSD.org, src-committers@FreeBSD.org, cvs-all@FreeBSD.org Subject: Re: cvs commit: src/tools/tools/nanobsd/Customize files pkgs Message-ID: <20050524092454.GI12943@webcom.it> In-Reply-To: <200505191520.j4JFKnVi043884@repoman.freebsd.org> References: <200505191520.j4JFKnVi043884@repoman.freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
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.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20050524092454.GI12943>