Subject: Re: NetBSD-release-2-0 build fails
To: Steven M. Bellovin <smb@research.att.com>
From: Ian Zagorskih <ianzag@megasignal.com>
List: current-users
Date: 06/02/2004 21:33:22
> >
> >AFAIU there should be .cf files that install expects to see in /etc/mail/
> > but they are missing in my DESTDIR:
> >
> ># ls -l /usr/build/dest/i386/etc/mail
> >total 16
> >-rw-r--r--  1 root  wheel  1346 Jun  6  2002 aliases
> >-r--r--r--  1 root  wheel  5648 Mar 26 01:14 helpfile
> >-rw-r--r--  1 root  wheel     0 Jun  2 21:06 local-host-names
>
> Very strange!
>
> b220$ cd /usr/BUILD/netbsd/etc/mail
> b221$ ls -l
> total 105
> -rw-r--r--  1 root  wheel   1346 Jun  2 02:09 aliases
> -r--r--r--  1 root  wheel   5648 Jun  1 23:59 helpfile
> -rw-r--r--  1 root  wheel      0 Jun  2 02:09 local-host-names
> -r--r--r--  1 root  wheel  59062 Jun  2 02:09 sendmail.cf
> -r--r--r--  1 root  wheel  39537 Jun  2 02:09 submit.cf
>
> I'll ask two semi-random questions:  did you do your build with a clean
> obj and destination tree

Yes. Destination, obj and tools directories are located in /usr/build i.e. 
outside of sources tree. Technically, build is done with the following 
script:

---/usr/build/release.sh---
#!/bin/sh

TOP=`pwd`
SRC=/usr/src
BUILDSH=$SRC/build.sh
MACHLIST=./machine

for m in `cat $MACHLIST`; do
        MACHINE=$m
        TOOLDIR=$TOP/tools/$MACHINE
        OBJDIR=$TOP/obj/$MACHINE
        DESTDIR=$TOP/dest/$MACHINE
        RELDIR=$TOP/release

        mkdir -p $TOOLDIR $OBJDIR $DESTDIR $RELDIR
        $BUILDSH -m$MACHINE -O$OBJDIR -T$TOOLDIR -D$DESTDIR -R$RELDIR -u 
release
done
---/usr/build/release.sh---

So prior to every build i
1. update /usr/src with "cd /usr/src && cvs update -dP"
2. delete all dirs from /usr/build
3. run build script

> and were you using NFS or read-only overlays 
> or some such?

No. I'm building release as root from local sources tree (/usr/src) which is 
read/write accessible. I want to believe it's actually not altered by build 
proces but if i'm wrong nothing prevents build to modify it :)

> Both are frequently mentioned in the context of build 
> failures (but I have no idea if either is involved here).

Looks like here's some other reason :(

// wbr