Subject: Re: Unprivileged builds
To: Hubert Feyrer <hubert@feyrer.de>
From: Julio M. Merino Vidal <jmmv84@gmail.com>
List: tech-pkg
Date: 05/29/2005 10:05:56
--=-giOMsJQGU3cpKoaomApz
Content-Type: text/plain
Content-Transfer-Encoding: 7bit

On Sat, 2005-05-28 at 23:18 +0200, Hubert Feyrer wrote:
> On Sat, 28 May 2005, Julio M. Merino Vidal wrote:
> > Comments?
> 
> Looks good to me (untested!).
> Seeing the various variables documented in the top of unprivileged.mk 
> reminds me that we should do the same for packages(7) ... but that's 
> probably also for some other thread. ;)

Talking about documentation... what about the attached patch to update a
question of the FAQ?

I can commit it, but dunno what to do later.  (Is the documentation in
the website updated automatically?)  Not to mention that I'm having a
lot of problems to build the guide; basically, it doesn't guess my
PKG_SYSCONFDIR correctly, so it doesn't find the catalog.

What's strange is that running 'make' by hand inside the work directory
works, but running it from doc/guide doesn't.

Cheers,

-- 
Julio M. Merino Vidal <jmmv84@gmail.com>
http://www.livejournal.com/users/jmmv/
The NetBSD Project - http://www.NetBSD.org/

--=-giOMsJQGU3cpKoaomApz
Content-Disposition: attachment; filename=patch.diff
Content-Type: text/x-patch; name=patch.diff; charset=UTF-8
Content-Transfer-Encoding: 7bit

Index: files/faq.xml
===================================================================
RCS file: /cvsroot/pkgsrc/doc/guide/files/faq.xml,v
retrieving revision 1.10
diff -u -r1.10 faq.xml
--- files/faq.xml	24 May 2005 12:14:42 -0000	1.10
+++ files/faq.xml	29 May 2005 08:03:18 -0000
@@ -232,11 +232,26 @@
 <sect1 id="non-root-pkgsrc">
     <title>How to use pkgsrc as non-root</title>
     
-     <para>  If you want to use pkgsrc as non-root user, you can set
-      some variables  to make pkgsrc work under these
-      conditions. Please see   <ulink
-      url="http://mail-index.NetBSD.org/tech-pkg/2003/09/27/0023.html">this
-      message</ulink> for more details.  </para> 
+    <para>If you want to use pkgsrc as non-root user, you can set some
+    variables to make pkgsrc work under these conditions.  At the very
+    least, you need to set <varname>UNPRIVILEGED</varname> to
+    <quote>yes</quote>; this will turn on unprivileged mode and set
+    multiple related variables to allow installation of packages as
+    non-root.</para>
+
+    <para>In case the defaults are not enough, you may want to tune some
+    other variables used.  For example, if the automatic user/group
+    detection leads to incorrect values (or not the ones you would like
+    to use), you can change them by setting
+    <varname>UNPRIVILEGED_USER</varname> and
+    <varname>UNPRIVILEGED_GROUP</varname> respectively.</para>
+
+    <para>As regards bootstrapping, please note that the
+    <command>bootstrap</command> script will ease non-root configuration
+    when given the <quote>--ignore-user-check</quote> flag, as it will
+    choose and use multiple default directories under
+    <filename>~/pkg</filename> as the installation targets (those can be
+    overriden by all the flags provided by the script).</para>
 </sect1>
 
 <sect1 id="resume-transfers">

--=-giOMsJQGU3cpKoaomApz--