cvs commit: src/tools/tools/nanobsd/Customize files pkgs

Andrea Campi andrea+freebsd_cvs_all at webcom.it
Tue May 24 09:24:56 GMT 2005


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.


More information about the cvs-src mailing list