[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: Victory - built subversion from RH9 source rpm!

From: Steve Cohen <scohen_at_javactivity.org>
Date: 2005-02-11 06:22:45 CET

Kenneth Porter wrote:
> --On Thursday, February 10, 2005 9:46 PM -0600 Steve Cohen
> <scohen@javactivity.org> wrote:
>
>> For one thing, the Apache documentation says that the User directive is
>> only applicable when running as root - and I was building as root,
>> against the advice of more experienced Linux administrative types. How
>> would you handle this if you were not root? You'd have to modify the
>> httpd.conf file.
>
>
> First, glad you got it working.
>
> This is really the heart of the problem, though. You were building as
> root, and the SRPM was *designed* to be built as a mortal. As a mortal,
> one would not have User/Group directives in the file in the first place.
> They're only needed when running as root, and since you're not supposed
> to build as root, you shouldn't need them.
>
> Perhaps one solution is to fail the build early if trying to build as
> root (ie. `id -u` evaluates to zero). This would at least document the
> assumption made by the test.
>
> BTW, is Apache (package httpd) a BuildPrereq in that SRPM? It should be,
> since it's needed for the test phase. Are there any distros that ship an
> httpd package that does NOT create the user apache? Given that
> assumption, and if the devs desire to add root-building capability to
> the package, it should be reasonable to ship a second Apache config file
> with User/Group directives set appropriately and use it if one is
> building as root.
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
> For additional commands, e-mail: users-help@subversion.tigris.org
>
>
>

Kenneth -

Well, I'm trying it your way now. I'll let you know how it comes out.
I've been building SRPMS for years as root without ever knowing that
this was frowned upon. In fact, I always assumed I HAD to be root to
build RPMs, if I even thought about it. Not sure where I got that idea.
  Maybe because you have to become root to INSTALL packages and I just
assumed that building them was the same. I'm not one of those who is
always root. Only rarely do I find it necessary to become root but I
thought this was one of those times.

Of course not many SRPMS require Apache as part of their build PROCESS
(as opposed to a mere prerequisite). And I hadn't understood the
intracicies of running apache as root vs. nonroot. Your suggestions
made no sense to me when you first made them, but they all make perfect
sense now. I'm not any kind of sys admin. The only user of my linux
system is me. Live and learn. That's why I enjoy spending so much time
on this crap.

By the way httpd IS required in this SRPM:
BuildPreReq: httpd >= %{apache_version}

I think your idea of breaking the build (with appropriate error message
though !) if root runs it is a good one. Would have saved me hours of
fun. Anyway, thanks for your advice even if I didn't take it until it
was too late. Actually, it's never too late, is it?

Steve

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Fri Feb 11 06:26:06 2005

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.