tech-pkg archive

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

Re: DESTDIR=full?

On Thu, Apr 03, 2008 at 09:16:09PM +0300, Aleksey Cheusov wrote:
> Packages mentioned in BUILD_DEPENDS do not need to be installed as
> root and do not need s[ug]id permission or special ownerships. So,
> /usr/pkg made for bulk builds (not for actual work, of course) can
> be 'chown -R pkgsrc /usr/pkg' before building bootstrap tarball.  This
> (+ METALOG) gives a way to to run bulk builds in *FULLY* unprivileged
> mode.

Sure and it makes it impossible for the bulk build to detect if
something does want to modify /usr/pkg during the build. This is not
about running bulk builds completely unprivileged -- that never was a
goal. It was all about making it possible to build packages as
unprivileged user to install to /usr/pkg.

> > (a) METALOG is not portable as most install programs don't have the
> > backend.
> BSD install + chmod + chown is enough. It is easy to write a wrapper
> for them that should create METALOG instead of setting actual
> permission and ownerships just like does.

Please look at how works and what assumption it makes about the
tools before lecturing me.

> > (b) You would have to change all programs to not use cp, pax and random
> > other tools for installing. Installation would also fail for anything
> > doing direct system calls (e.g. from python interpreters).
> This is not a problem at all, because many programs do not use
> DESTDIR variable too. So, all these packages should be patched
> either for supporting DESTDIR variable of for using BSD install.

Many packages need one or two changes to use a different prefix during
installation. Most work for normal unprivileged builds already. So no --
your assumptions are simple wrong here. Also most packages don't need
any special permission files at all and those that do should specify
them explicitly. This is not done yet, but it is one of the biggest
warts in pkgsrc (and one of the few things where FreeBSD ports is

> Anyway using PKG_DESTDIR_SUPPORT variable is REALLY UGLY approach and
> IMHO USE_DESTDIR=full in its current form looks like USE_DESTDIR=fake :(
> If it needs root privileges for installation
> it should NOT be named as FULL. It doesn't give any advantages
> over normal unprivileged building with SU_CMD set.

I haven't heard you providing a better mean to distinguish packages that
can be installed using destdir or not. The two different values exist
mostly because of short comings in the other parts and interesting
behaviour of some packages. Allowing incremental conversion is a
requirement for anything in this area. You seem to have a major problem
understanding what this functionality is addressing and what not.
USE_DESTDIR=full works exactly as advertised. It is not a replacement
for unprivileged builds. Unprivileged builds have limitations as well,
but you don't seem to be aware of those.


Home | Main Index | Thread Index | Old Index