On Thu, Aug 30, 2001 at 11:37:36PM -0700, Patrick R. Wade wrote:
> On Thu, Aug 30, 2001 at 06:24:03PM -0700, Jacob Meuser wrote:
> >
> >9 month old binaries? Come on, this is OpenBSD! ;P
> >
>
> Depending on how you handle your source code updates and world makes, your
> timestamps for your binaries may not be updated; i was looking at some
> FreeBSD machine recently where the operator had been synchronizing his source
> since FreeBSD 1.0, his uname showed an up to date kernel and the timestamps
> on all the things in his /bin directory were from before i could buy beer...
Yes, make is a wondeful thing ...
However, the suggested way to to a 'make build' in OpenBSD (similar to
FreeBSD's 'make world') is to first issue 'make obj', which creates a bunch
of symlinks in /usr/obj, that serve as the ${OBJDIR}s. What this means, is
that you can use newfs (if /usr/obj is it's own fs) instead of 'make
cleandir', which is much faster. It also means that you have all new
binaries after each 'make build'. I don't like having old build cruft
around when I do a 'make build', and it's recommended to start anew.
OpenBSD doesn't have an installworld (I think that's right) target; it
installs as it goes. One *could* set ${DESTDIR} to something other than /
during 'make build', but it's not suggested, and would most likely break
recursion tests.
After a 'make build', you can set ${DESTDIR} to something like
/home/dest-i386, and issue a 'make release', to make your own 'snapshot'
binary install package set. This is how the CDs are made, so the binaries
on the CDs have recent timestamps.
Here's a script to make simple binary 'patches'. It's a 'make install'
wrapper for errata source patches. Just an example of alternate uses of
${DESTDIR} ...
#!/bin/sh
# ${extra} could be a revision number, if you will
extra=$1
export DESTDIR="/home/fakeroot"
pkgdir="/home/pkg"
startdir=`pwd`
test -d ${DESTDIR} && rm -rf ${DESTDIR}
mkdir -p ${DESTDIR} ${pkgdir}
cd ${DESTDIR}
mtree -d -f /etc/mtree/4.4BSD.dist |cut -d ' ' -f 2 |xargs mkdir -p
cd ${startdir}
make install
patch_pkg=`basename ${startdir}`${extra}.tgz
test -f ${pkgdir}/${patch_pkg} && rm -f ${pkgdir}/${patch_pkg}
cd ${DESTDIR}
files=`find . -type f -print`
for file in ${files}; do
real=`echo -n ${file} |sed s,^.,,`
flag=`diff --brief ${real} ${file} |cut -d ' ' -f 1`
if [ ${flag} ]; then
echo "selecting ${file}"
patchfiles="${patchfiles} ${file}"
fi
done
tar czpf ${patch_pkg} ${patchfiles}
BTW, was FreeBSD immune to the fts bug a few months ago, or
does it not staticly build things like /bin/rm and bin/cp?
--
<[EMAIL PROTECTED]>
<[EMAIL PROTECTED]>
<[EMAIL PROTECTED]>