Irrationality in port build system

I want to build port as user but install as root (and you all know, that we can't install port as user).
Then, why do we have build environment-variable option for this called INSTALL_AS_USER but not BUILD_AS_USER? Anyway, we can't install as user!

Another trouble is that when you build (as user) port which has dependencies, they are tried to be installed as user at build time (which is absurd), and don't do switch to root credentials to install, so it fails and you must go to their directories and do
# make install
recursively for each dependency at installation of which you are stuck in building main port.
That is very annoying and irrational!

Will it be fixed some day? Is there any hope?
 
Why I am posting this:

All goes well if INSTALL_AS_USER is not set, but when I do$ make configon arbitrary port, it shows
Code:
===>  Switching to root credentials to create /home/ports/CONFIG/firefox
Password:
despite the fact that /home/ports and all subdirs are fully owned and writable by user!

Otherwise, if INSTALL_AS_USER is set to something (x, YES, etc.) then I can configure ports as user but there will be no switching to root credentials during their installation and problems which I describe in the first post arise.

Thanks.
 
Seems solved...But I politely ask some willing and helpful guy to test it if he can!

To fix this you need to replace INSTALL_AS_USER with (for example) BUILD_AS_USER in the $PORTSDIR/Mk/bsd.port.mk file as following:
line 6103:
Code:
.if ${UID} != 0 && !defined(BUILD_AS_USER)
line 6140:
Code:
if [ ${UID} != 0 -a "${BUILD_AS_USER}" != "" ]; then \
line 6241:
Code:
if [ ${UID} != 0 -a "${BUILD_AS_USER}" != "" ]; then \
, then add
Code:
BUILD_AS_USER=
to /etc/make.conf.

And this seems giving you ability to fully build ports as user (without switching to root credentials for writing configs!) and install them as root.

Thanks go to port-build system maintainers/developers if and only if they fix this of course!
 
For some reason I though you where trying to install as a user into a user dir; not for root.

What is the goal if your just removing root privilages to ports?
 
Oh, my third eye...

The goal was to enable full building of ports as user (in user-customized dirs), still leaving installation running as root (I don't know what is the point in installing as user, but why compile as root?) to default system dirs.
And then make package and clean as user.

Whole point was - it wasn't possible to write configs in user-writable dirs when building ports as user.
 
Back
Top