Subject: Re: handling machine-dependent files in syspkg
To: Pavel Cahyna <pavel.cahyna@st.mff.cuni.cz>
From: Bill Studenmund <wrstuden@netbsd.org>
List: current-users
Date: 05/27/2003 12:50:55
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.
> the binary package is first built, and then installed. So I suppose
> (haven't studied it too deep) that it's possible to make a binary
> package without being root. And this could have an advantage that it
> would be easier to control what a package is trying to install (I guess
> that currently, if a package installs a file during "make install" which
> it shouldn't, it will go unnoticed.
Take care,
Bill