Subject: unprivileged staged installs and libarchive (was Re: "make install"
To: Joerg Sonnenberger <>
From: Jeremy C. Reed <>
List: tech-pkg
Date: 06/29/2005 09:36:13
On Wed, 29 Jun 2005, Joerg Sonnenberger wrote:

> > Also this make possible (maybe not always) to do
> > the full build including make install under normal user rights, and
> > use root user only for pkgsrc stuff: moving/copying files, setting
> > rights, and so on.
> Often, but not always. Still missing is a way to change ownership of
> individual files or specify mode bits more explicitly. That would need
> some integration with pkg_create.

NetBSD has a good pax that has great feature for utilizing a mtree
specification for creating files. I also heard that a CD9660 or other
filesystem writing tools could be made to honor the mtree specification
for creating files also. (I don't know if this has been done yet though.)

Wrappers could be done to make sure the mtree specification is always

If we move to a staged install, we will have to clean up all code that
manually use /bin/cp or their own non-standard routines for installing
files anyways. So it will be easy to use our INSTALL_* scripts to do the
mtree specifications (just like NetBSD already does for its unprivileged

> The only thing root privs are needed for would be installation of actual
> packages. IMO that's a huge pro.
> BTW, this leads to another question. Would there be interest in rewriting
> the pkg_tools to use e.g. libarchive? It would make e.g. pkg_add fully
> self-contained and can allow various optimisations currently not possible.

Please tell us more. Why more self-contained? And what types of

(And I assume libarchive could honor mtree specifications easily too.)

 Jeremy C. Reed

 	  	 	 technical support & remote administration