Subject: Re: unpriviledged build + parallel builds
To: None <tech-pkg@NetBSD.org>
From: Joerg Sonnenberger <joerg@britannica.bec.de>
List: tech-pkg
Date: 06/03/2005 19:21:09
On Fri, Jun 03, 2005 at 06:48:34PM +0200, Hubert Feyrer wrote:
> Things to consider:
>  * how/where to install dependencies? (esp. bulk build code uses
>    binary pkgs where possible!)

Depending on the kind of dependency, it could either use a su/sudo hook
(which would achive privilige reduction) or install them into a temporary
area, enough to use buildlink. There's no general answer to this, simply
because too much stuff hard codes pathes into directories.

>  * how to install files with "special" permissions, e.g. setuid-root,
>    on "make install"?

Record them in the install-wrapper and forward that data for pkg_create.
Alternatively record them in the PLIST, might be a good place anyway.

>  * how to create proper binary pkgs on "make package"?

Installation should be done e.g. to $WRKDIR/.fake_dest
similiar to what OpenBSD and most Linux distros do. The nice part is
that it is already support for most packages, we would just have to
sort out which don't support it.

The real install step could become a pkg_add afterwards. This is also
a much cleaner appraoch since it avoids the stale PLIST problem by not
copying stuff which is not recorded in the PLIST.

>  * How to handle files that are not installed by install(1), cp(1)
>    or similar, I'm esp. thinking of some pkgs that have fancy
>    do-install/post-install targets which run application code.
>    Firefox comes to mind.

I think it depends on whether it is part of installation or the
package installation. This has to be checked on a per-case base.

Joerg