[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: simple-cdd 0.2.0

On Tue, Jul 26, 2005 at 04:11:35PM -0600, Vagrant Cascadian wrote:

> local_packagtes is very limited.  it doesn't download the packages,
> doesn't do dependency resolution, 

That's a major problem for me. The packages I build do reply on Sarge
packages. Trying to manually track the dependencies has proven to be a
time-consuming and error-prone task.

> and you have to already have the
> packages available locally.  you have to specify the full path to all
> the .deb files (well, actually you should be able to point to a
> directory containing .deb files, but i haven't tested that. sorry.)
> i tried to figure out how to get the LOCAL and LOCALDEBS features of
> debian-cd to work, with no luck.

> > * checkpackages has no idea about local_packages . 
> i tried to fix this in svn.  not sure if it works.
> > * checkpackages also has some bashism in it (my shell is bash, but the
> >   script is /bin/sh)

dash is useful for that. '$()' is bash-specific. 

I attach my version of the script.

Also grep for '$@' . You should use '"$@"' (with quotes) for everything
that is not a makefile, normally. Otherwise it will not handle
parameters with spaces inside gracefully.

qemu-test seems to have that.

> if you could be more specific, that would be helpful.  checkbashisms
> didn't find anything.
> > * the debian-cd now barks off when creaing a disk about a syntax error
> >   with '(' . Could not work around it yet.
> what version of debian-cd ?  i have only tested with 2.2.22.

Me too. The following patch to /usr/share/debian-cd/Makefile fixes the

--- /usr/share/debian-cd/Makefile.orig  2005-07-26 21:35:35.000000000 +0300
+++ /usr/share/debian-cd/Makefile       2005-07-26 21:32:35.000000000 +0300
@@ -433,7 +433,7 @@
        for i in $(BDIR)/*.packages; do \
                num=$${i%%.packages}; num=$${num##$(BDIR)/}; \
                dir=$(BDIR)/CD$$num; \
-               echo -n $(BINDISKINFO) | sed 's/_NONUS//g' > $$dir/.disk/info; \
+               echo -n "$(BINDISKINFO)" | sed 's/_NONUS//g' > $$dir/.disk/info; \
                echo '#define DISKNAME ' $(BINDISKINFOND) | sed 's/_NONUS//g' \
                                        > $$dir/README.diskdefines; \
                echo '#define TYPE  binary' \

(double quotes around the argument of '-n')

Another note: in my distro I have originally opted to the same limited 
partitioning preseeding as you use in the first version. In the second 
version I preseed exactly the oposite of what you preseed:

  d-i     partman/confirm boolean true

This means that the user is asked two questions instead of one, but they
are both necessary, IMHO. This allows very convinient custom
partitioning. It also allows you to use a different tool to clear out
some disk space, and then install the custom distro there.

Any idea what to do to automate the packages selection?
I currently use apt-get (described in another thread) to automate this, and
this has proven to be rather useful.

Tzafrir Cohen     icq#16849755  +972-50-7952406
tzafrir.cohen@xorcom.com  http://www.xorcom.com

# checks if the packages needed for a profile are in the debian mirror

. simple-cdd.conf



find_cmd="find $CHECK_MIRROR/pool/main/ $local_packages -type f"

for profile in default $profiles ; do
  for a in `test -r profiles/$profile.packages && egrep -v ^# profiles/$profile.packages `; do 
    if ! $find_cmd -name ${a}_\*.deb >/dev/null
    then missing_packages="$missing_packages $a"
  if [ -n "$missing_packages" ]; then
    echo "ERROR: Packages missing from profile $profile : $missing_packages"
    status=1#"$(($status + 1))" #what if 256 packages are missing?
  for a in `test -r profiles/$profile.downloads && egrep -v ^# profiles/$profile.downloads `; do 
    if ! $find_cmd -name ${a}_\*.deb >/dev/null
    then missing_downloads="$missing_downloads $a"
  if [ -n "$missing_downloads" ]; then
    echo "WARNING: Extra packages missing from profile $profile : $missing_downloads"

exit $status

Reply to: