Subject: Re: read-only nfs mounted pkgsrc problems
To: None <>
From: Axel Scheepers <>
List: tech-pkg
Date: 02/23/2004 19:42:11
----- Original Message ----- 

> The problem is that builds in pkgsrc put countless files into the
> pkgsrc tree when the package source is unpacked, the source is built,
> build status files are touched, etc.  A quick review of the mk.conf and
> files points to WRKOBJDIR which should work for
> you, but I do not happen to use it.  However, you also need to keep in
> mind that you will want to change things like DISTDIR and PACKAGES
> since the retrieved source archives and created packages are placed
> into those directory structures as well, which are by default under
> your pkgsrc.

So far all information I've collected mentions setting of these variables.
I've set WRKOBJDIR and DISTDIR to an appropiate location, and
a 'make' works fine. The problem rises at the postinstall step, after the
binaries have been installed on the system. I think it needs the plist file
to generate the information in /var/db/pkg, but here it always failes with
make: don't know how to make .PLIST.
As far as I can see all the files needed are created in WRKOBJDIR:
janis:/tmp/pkgsrc/work/pkgtools/digest/work root$ ls -la
total 5
drwxr-xr-x  4 root  wheel   512 Feb 23 20:40 .
drwxr-xr-x  3 root  wheel   512 Feb 23 20:40 ..
-rw-r--r--  1 root  wheel     0 Feb 23 20:40 .build_done
drwxr-xr-x  5 root  wheel   512 Feb 23 20:40 .buildlink
-rw-r--r--  1 root  wheel     0 Feb 23 20:40 .buildlink_done
-rw-r--r--  1 root  wheel     0 Feb 23 20:40 .configure_done
-rw-r--r--  1 root  wheel    16 Feb 23 20:40 .extract_done
-rw-r--r--  1 root  wheel     0 Feb 23 20:40 .null
-rw-r--r--  1 root  wheel     0 Feb 23 20:40 .patch_done
drwxrwxr-x  3 root  wsrc   1024 Feb 23 20:40 digest-20021220
janis:/tmp/pkgsrc/work/pkgtools/digest/work root$
janis:/tmp/pkgsrc/work/pkgtools/digest/work root$ file
digest-20021220/digest: ELF 32-bit LSB executable, Intel 80386, version 1
(SYSV), for NetBSD, dynamically linked (uses shared libs), not stripped
janis:/tmp/pkgsrc/work/pkgtools/digest/work root$

I've been googling for a while regarding this now, but all I can find boils
down to 'set WRKOBJDIR and you can use it as usual', which is almost
literally from the announce of this feature in '98. Unfortunatly, it doesn't
seem to work for me.

> You also mentioned not wanting to do union mounts.  I am a little
> curious why this is the case, since I have been using union mounts for
> all my builds for a couple of years now with no problems.  Indeed, my
> builds in pkgsrc are done with union mounts in a chroot'ed sandbox
> [pointers to info about that are in another message I recently sent].

Just because I don't know much about it yet. :-)
I doubt if I can do that on solaris if I wanted to use the
pkgsrc there? (is that even supported? I've got one solaris box over here)
Plain nfs seemed to be less troublesome when I installed them.