Subject: Re: "make install" lossage, redux
To: der Mouse <mouse@Rodents.Montreal.QC.CA>
From: Simon Burge <simonb@netbsd.org>
List: current-users
Date: 12/29/1999 12:27:32
der Mouse wrote:

> >> [...stuff about make install and installing on a clean disk...]
> 
> Well, I spoke too soon.  Again. :-/
> 
> "make DESTDIR=/mnt distribution" in /usr/src/etc failed:
> 
> 	install -c -o root -g wheel -m 600  hosts.equiv /mnt/etc
> 	install -c -o root -g wheel -m 644 aliases /mnt/etc
> 	/usr/libexec/sendmail/sendmail -O AliasFile=/mnt/etc/aliases -bi
> 	/etc/sendmail.cf: line 0: cannot open: No such file or directory
> 	*** Error code 72
> 	
> 	Stop.
> 
> This failure is hardly surprising; the machine I'm doing the make on
> does not (nor should it) have any sort of email set up on it.

Simple one first - you should be able to define NO_SENDMAIL somewhere
(/etc/mk.conf maybe) to disable installing sendmail altogether.  Also,
more recent versions of src/etc/Makefile (v1.126 onwards) should use the
sendmail.cf inside $DESTDIR.

> Shouldn't that be something more like
> 
> 	chroot /mnt /usr/libexec/sendmail/sendmail -O AliasFile=/etc/aliases -bi
> 
> rather than assuming that just because sendmail is being installed in
> the tree being created, it's installed and working in the system the
> make is being run on?

It looks like the aliases file is just a normal DB hash of aliases with
an extra "@","@" pair to donate that the map is complete.  Maybe makedbm
could be pressed into business to make the aliases file as well? "make
distribution" also uses pwd_mkdb(8), so we already have a reliance on
other NetBSD tools.  Certainly a generic db-maker would be useful (look
at cap_mkdb and netgroup_mkdb too...).

Simon.