tech-pkg archive

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

Re: DESTDIR=full?

On Fri, Apr 04, 2008 at 05:53:33PM +0300, Aleksey Cheusov wrote:
> > 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 better).
> I know that there are packages that need to be patched for:
> DESTDIR support, UNPRIVILEGED support etc. 
> This was NOT my question. Did you really read my post?

If I was not clear on this part: that there are two different options
for destdir for two reasons:
(1) USE_DESTDIR=full needs a new enough pkg_install. This is now
required anyway for unrelated reasons, so no reason to distinguish here.
It likely can be dropped after some discussion.
(2) PKG_DESTDIR_SUPPORT has two values as some packages do require the
extended permissions for installing. postfix was an example here. One
reason for this is that USE_DESTDIR=full works by overriding the file
system permissions and nothing currently tags the permissions and
ownership in the PLIST. This should be changed and one positive side
effect is that auditing for s[ug]id binaries can be done much easier.
SPECIAL_PERMS is another workaround for that.

> > You seem to have a major problem
> > understanding what this functionality is addressing and what not.
> > USE_DESTDIR=full works exactly as advertised. 
> Yes, I think that FULL DESTDIR support is such level of support that
> allows me to run bulk builds without root privileges at all.
> "Stupid Linux developers" do so for many years.
> Unprivileged build and "prefixed" packaging is big step
> forward for pkgsrc but it is not enough.

If all packages would be able to work with user-destdir, a bulk build
can be easily done unprivileged. Testing the installation is important
though and you will see a number of install scripts fail if they can't
run as root. Whether or not they should is a different question. What
pbulk currently does is check if a package claims to support
user-destdir (aka USE_DESTDIR=full) support and in that case builds it
as unprivileged user. After the package build it still runs pkg_add as
root to test install/deinstall rules.


Home | Main Index | Thread Index | Old Index