pkgsrc-Users archive

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

Re: non-root package-building sandbox?



On 5/17/15 6:53 AM, Ian D. Leroux wrote:
On Thu, 07 May 2015 15:45:31 -0500 Jason Bacon <jwbacon%tds.net@localhost> wrote:
I would think you could bootstrap a separate pkgsrc tree as a
non-root user.  I do this all the time, but on CentOS and Darwin. I
don't see why it couldn't work on NetBSD as well, though.

I use a wrapper script to automate the bootstrap process, which
allows me to easily maintain multiple trees on the same system. You
can find the script here: http://acadix.biz/pkgsrc.php
I've adapted the script a little and am now using it to set up
debugging environments.  Note that if you or your customers ever want
to use the script on NetBSD, you may want to make the following
adjustments:
- Don't pass the --no-same-permissions or -o options to tar, as these
are GNU-tar-specific.  As far as I understand, the behaviour you are
looking for (extracting without using the permissions that were stored
in the archive) can be obtained simply by omitting the -p option.
- Use bmake, not make, just as you do on other platforms.  The point
here is that, while working within the newly-extracted tree, we want to
use the bootstrapped bmake (which knows about all the relevant paths
and picks up its configuration from $sys_prefix/etc/mk.con) rather than
the base system make (which picks up its configuration
from /etc/mk.conf and will therefore lead to packages being installed
to /usr/pkg/).

Thanks for the helpful advice and code,

--
IDL

Ian,

Thanks very much for the patch. I've incorporated it into the main distribution
and posted it at http://acadix.biz/pkgsrc.php.

BTW, auto-pkgsrc-setup is part of my auto-admin scripts collection (cross-platform tools for automating systems-management tasks), which I recently began porting to NetBSD.

You can install it via wip/auto-admin.

Regards,

    Jason



Home | Main Index | Thread Index | Old Index