On Thu Nov 09, 2000 at 05:28:09PM +0100, Alexander Skwar wrote:

> fakeroot isn't needed.  All the Mandrake RPMs (besides the kernel.src.rpm)
> are buildable as a user.  When you write your spec you just use %configure
> and %makeinstall, and everything is taken care off.  What this does is, that
> configure gets called with --prefix=%{_prefix} (/usr), but in the make
> install phase, make get's called with make prefix=%buildroot%{_prefix},
> which will most always give ~/RPM/tmp/package-name/usr, if you follow the
> Mandrake RPM howto.

No, fakeroot would be exceptionally handy.  The macros can only do so
much.  For example, let's look at my qmail rpm... you *need* to be
root in order to build it.  why?  Because qmail is stupid and needs
the qmail users installed at build time.  The reason for this is also
stupid... you cannot distribute qmail in binary form with
patches... this means you can't patch the Makefile (if one even
existed, it uses a program called compile).  The end result is I had
to write my own script to install everything to the buildroot.  FYI,
this works perfectly but took a lot of work.  Using a fakeroot would
have been handy.

What really needs to be done is some way to tell rpm in the %files
section to arbitrarily use specific uid/gid information.  If I could
list something as:

%attr(-,401,401) /path/to/file

Then in my %pre I can install the appropriate users to the system with
hard-coded uid/gid information and then I could build without forcing
the builder to install the users prior to building and then remove the
users after the build (which I have to do).  In other words, the only
way you can build the qmail rpm is to do as root... you cannot
possibly do it as a non-root user.   It's impossible.  And this causes
problems because no one who builds an rpm likes to muck with
installing/uninstalling users during the build.  It was especially
problematic on a system with qmail already installed (which I recently
fixed), but is an ugly hack and doesn't change the fact that you must
build the rpm as root.

I think a fakeroot of some sort would be ideal.  I also think rpm
needs to be able to handle specific uid/gid info in the %files section.

-- 
[EMAIL PROTECTED], OpenPGP key available on www.keyserver.net
1024D/FE6F2AFD   88D8 0D23 8D4B 3407 5BD7  66F9 2043 D0E5 FE6F 2AFD
 - Danen Consulting Services    www.danen.net, www.freezer-burn.org
 - MandrakeSoft, Inc.           www.linux-mandrake.com

Current Linux uptime: 2 days 12 hours 14 minutes.

Reply via email to