pkgsrc-Bulk archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: pkgsrc NetBSD 5.0_STABLE/x86_64 2009-07-24 10:40

On Thu, Jul 30, 2009 at 01:01:04PM -0400, D'Arcy J.M. Cain wrote:
> On Wed, 29 Jul 2009 23:04:38 +0200
> Joerg Sonnenberger <> wrote:
> > On Wed, Jul 29, 2009 at 04:55:37PM -0400, D'Arcy J.M. Cain wrote:
> > > I read this as meaning that setting it to "user-destdir" tells the build
> > > system that the package could be installed into the user's own space if
> > > desired but could be installed by root as well.
> > 
> > It means the install phase will use a temporary staging area under
> > ${WRKSRC} and from that the package will be built. This is not the same
> > as using pkgsrc as unprivileged user with a prefix in $HOME, but the
> > problems are somewhat similar.
> OK, so the man page should have been built under ${WRKSRC} in this
> case, right?  I assume that the builder has access to ${WRKSRC} due to
> either running as root or setting it to some place they have access to.

The installation should prefix all path names with ${DESTDIR}, which is
set to ${WRKSRC}/.destdir. This bulk build is running unprivileged
builds as user pbulk for those packages that are marked to support it.
That's why writing to /usr/pkg fails.

> > The difference between user-destdir and destdir is just whether this
> > happens as normal unprivileged user or as root.
> And if unprivileged then the user should have access to everything as
> long as no full path names (e.g. /etc/myapp.conf) are used.

Yes. It is generally nice if packages honor VARBASE and PKGSYSCONFDIR,
which is what it boils down to.

> > > If my understanding is incorrect then it seems to me that there would
> > > be few if any packages that could be installed by non-root.  Do I need
> > > to add "${DESTDIR}" in front of every line in PLIST?  I thought that
> > > the build system would handle that for me.  I can't find any other
> > > packages that do so.
> > 
> > Not the PLIST, the install commands. Looking at the package it might
> > be better to use do-install directly though.
> But in this case we are talking about such a plain, vanilla
> installation.  I install a grand total of three files.  Here's the
> entire PLIST:
> @comment $NetBSD: PLIST,v 2004/08/21 14:56:44 darcy Exp $
> bin/generate
> bin/rgenerate
> man/man1/generate.1
> I would have thought that the build system could handle such a simple
> installation without the maintainer needing to jump through hoops.

My comment about using do-install is related to three problems. First of
all, the existing rules don't honor DESTDIR. Either the variables in the
Makefile have to be overwritten or the result patched. Second, it tries
to change the permissions of the bin directory. That's a no-no. Third,
it would be nice if the automatic stripping of binaries was inherited,
but that is just nice.


Home | Main Index | Thread Index | Old Index