Subject: Re: handling machine-dependent files in syspkg
To: Bill Studenmund <>
From: Alistair Crooks <>
List: current-users
Date: 05/28/2003 11:41:08
On Tue, May 27, 2003 at 12:50:55PM -0700, Bill Studenmund wrote:
> On Mon, 26 May 2003, Pavel Cahyna wrote:
> > > On Sun, 18 May 2003, Jeff Rizzo wrote:
> > >
> > > > So, I just started playing around with syspkg the other day, and
> > > > it's got a lot of potential, but looks like it's suffered a little
> > > > bitrot since its initial commit over a year ago.  I noticed that
> > >
> > > Yes, it has. It's worst problem is that it doesn't support unpriv'd
> > > builds, and a #2 problem is that it doesn't seem to do DESTDIR builds so
> > > well.
> >
> > Maybe I misunderstood the problem, but doesn't its root lie in the fact
> > that to build a binary package ('make package' in pkgsrc) the package
> > need to be installed first and you need root privileges for this? This
> > is annoying on itself. In OpenBSD "ports" it is done in some way so that
> Kinda. And that "Kinda" is the key of the problem. For pkgsrc installed
> into /usr/pkg, yes, you have to be root.
> But the deal here is that we have unprivileged builds. You can install
> into DESTDIR without being root, and we will build .tgz files with the
> correct permissions/settings.
> The tools, however, haven't caught up with that idea. Making the created
> tar file use the METALOG should be no big deal (pax, which actually
> creates the file, already can). But the tools need to 1) pay attention to
> DESTDIR, and 2) relax root-requirements if we're working with a DESTDIR.

You also need to check every package to make sure it is using
nbinstall to install files into DESTDIR, so that it can work with
nbpax and METALOG in the same way that src/ uses nbpax and METALOG. 
In addition, you'd probably have to check every package that uses one
of its own binaries or scripts in its build process to make sure that
it is modified to work as a host tool.

The OpenBSD FAKE approach is to install into a separate DISTDIR, make
a binary package from that, and then use the pkg_install tools to
install that binary package.