[PyKDE] Root vs. non-root builds

Phil Thompson phil at river-bank.demon.co.uk
Tue Aug 27 12:08:00 BST 2002


Steve Simmons wrote:

> I find the PyKDE/PyQt/sip insistance on being *built* as root disturbing.
> Yes, it's a bit easier to build as root than as a user, but only a bit.
> Speaking as a 20-year UNIX admin and author of the influential paper 'Life
> Without Root', I would strongly argue that the only part of the process
> which should require root is the cp of the final files to their
> destinations.
> 
> For the moment, let's assume that we all understand the risks of running
> large, complex, arbitrary scripts as root, and that we think it's a habit
> we should not cultivate.  Instead, I'm going to address the opposite
> questions, ie:
> 
>   o  How can we modify the build/install mechanisms to avoid root.
>   o  Is anybody else interested.
> 
> The answer to the first is generally that the build process should
> look locally and deposit locally all the subsidiary items required
> for the build.  As an example, a ${BUILD}/{lib,bin,man,include,...}
> tree is where things should be placed during build   -I ${BUILD} and
> -L ${BUILD} switches should be added to the makefiles appropriately.
> The install process then consists primarily of copying ${BUILD} to
> ${REAL}.  Yes, I know I'm handwaving past a few things.
> 
> The answer to the second is what I'd like to hear from others.  If
> nobody cares, then I'm not gonna worry about it.  But if others think
> the ability to do most of the build sans root is a good idea, let me
> know.


Apologies for my late response on this - I've been lying on a Greek beach.


I agree that the root build is bad - but it's how the tmake/qmake 
generated Makefiles work when building libraries. I assume that this is 
done for a reason and that it is related to how shared libraries work on 
certain UNIX variants. If you look under the covers of how libtool works 
it performs some horrible contortions to allow portable non-root builds 
of libraries. I don't blame Trolltech for not bothering to try the same 
thing.

The other thing is that I hope the problem will be temporary. With SIP 
v4 the generated code will be built as plugins/modules and not shared 
libraries.

Phil






More information about the PyQt mailing list