You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by Justin Erenkrantz <je...@ebuilt.com> on 2002/03/08 21:22:24 UTC
Having sane default configs was Re: cvs commit: httpd-2.0 STATUS
On Fri, Mar 08, 2002 at 05:49:05PM -0000, aaron@apache.org wrote:
> aaron 02/03/08 09:49:05
>
> Modified: . STATUS
> Log:
> This is not a showstopper, and it's definately not new.
>
> Revision Changes Path
> 1.543 +4 -1 httpd-2.0/STATUS
>
> Index: STATUS
> ===================================================================
> RCS file: /home/cvs/httpd-2.0/STATUS,v
> retrieving revision 1.542
> retrieving revision 1.543
> diff -u -r1.542 -r1.543
> --- STATUS 8 Mar 2002 17:43:41 -0000 1.542
> +++ STATUS 8 Mar 2002 17:49:05 -0000 1.543
> @@ -1,5 +1,5 @@
> APACHE 2.0 STATUS: -*-text-*-
> -Last modified at [$Date: 2002/03/08 17:43:41 $]
> +Last modified at [$Date: 2002/03/08 17:49:05 $]
>
> Release:
>
> @@ -77,6 +77,9 @@
> * We do not properly substitute the prefix-variables in the configuration
> scripts or generated-configs. (i.e. if sysconfdir is etc,
> httpd-std.conf points to conf.)
> + Aaron says: This is not a showstopper, these problems have existed
> + for as long as I can remember. It would be nice to fix
> + them but they are not new.
Since we now have layout fixed, I think with any subsequent release
that we make, people will use layouts and complain that we generate
invalid default configurations for their layouts. I can imagine the
PRs coming in now. I have no desire to handle those PRs. Do you?
I realize that you feel that we should not provide any default
configuration assistance (I believe even setting Listen via
--with-port is bogus to you).
For those that may not understand the exact question, it is
this (restated):
"Should we modify httpd-std.conf to stop referring to logs/,
conf/ and substitute the $localstatedir and $sysconfdir values?"
I'll let the group decide. -- justin
Re: Having sane default configs was Re: cvs commit: httpd-2.0 STATUS
Posted by Justin Erenkrantz <je...@ebuilt.com>.
On Sat, Mar 09, 2002 at 03:04:49PM -0500, Jim Jagielski wrote:
> I must be misunderstanding the debate. Obviously for those that
> use config.layout layouts, then they will require that their httpd.conf
> file match with how things were build. Is the question then should
> configure build an appropriate httpd.conf file?
Yes (as httpd-std.conf). We do not properly generate httpd.conf
files for non-Apache layouts.
> My own POV is that I think it's pretty bogus hardwiring such paths into
> an executable. They are best done with a config file. After all,
> Apache *does* require a config file. Why this stuff couldn't be best
> handled at that level is beyond me.
I'm not aware where these paths are hard-coded, but the configuration
file when using a non-Apache layout is broken.
The idea is to substitute relative values into the config file
based on the layout where possible and absolute values when the
layout/configuration-parameters dictate doing so.
Does that sound reasonable? -- justin
Re: Having sane default configs was Re: cvs commit: httpd-2.0
STATUS
Posted by Jim Jagielski <ji...@jaguNET.com>.
At 10:07 AM -0800 3/9/02, Justin Erenkrantz wrote:
>On Sat, Mar 09, 2002 at 11:34:58AM -0500, Jim Jagielski wrote:
>> Putting absolute paths in the config file is a Bad Idea. Using
>> relatives, the entire Apache install location can be self-contained
>> and easily moved by changing one line.
>
>How would you deal with:
>
>./configure --prefix=/opt/apache --sysconfdir=/etc/apache \
>--localstatedir=/var/apache
>
>You can't use relative path names in this case. As I pointed
>out, there are several common layouts in config.layout that have
>a disjoint sysconfdir or localstatedir. -- justin
I must be misunderstanding the debate. Obviously for those that
use config.layout layouts, then they will require that their httpd.conf
file match with how things were build. Is the question then should
configure build an appropriate httpd.conf file?
My own POV is that I think it's pretty bogus hardwiring such paths into
an executable. They are best done with a config file. After all,
Apache *does* require a config file. Why this stuff couldn't be best
handled at that level is beyond me.
--
===========================================================================
Jim Jagielski [|] jim@jaguNET.com [|] http://www.jaguNET.com/
"A society that will trade a little liberty for a little order
will lose both and deserve neither" - T.Jefferson
Re: Having sane default configs was Re: cvs commit: httpd-2.0 STATUS
Posted by Justin Erenkrantz <je...@ebuilt.com>.
On Sat, Mar 09, 2002 at 11:34:58AM -0500, Jim Jagielski wrote:
> Putting absolute paths in the config file is a Bad Idea. Using
> relatives, the entire Apache install location can be self-contained
> and easily moved by changing one line.
How would you deal with:
./configure --prefix=/opt/apache --sysconfdir=/etc/apache \
--localstatedir=/var/apache
You can't use relative path names in this case. As I pointed
out, there are several common layouts in config.layout that have
a disjoint sysconfdir or localstatedir. -- justin
Re: Having sane default configs was Re: cvs commit: httpd-2.0 STATUS
Posted by Aaron Bannert <aa...@clove.org>.
On Fri, Mar 08, 2002 at 12:22:24PM -0800, Justin Erenkrantz wrote:
> > * We do not properly substitute the prefix-variables in the configuration
> > scripts or generated-configs. (i.e. if sysconfdir is etc,
> > httpd-std.conf points to conf.)
> > + Aaron says: This is not a showstopper, these problems have existed
> > + for as long as I can remember. It would be nice to fix
> > + them but they are not new.
>
> Since we now have layout fixed, I think with any subsequent release
> that we make, people will use layouts and complain that we generate
> invalid default configurations for their layouts. I can imagine the
> PRs coming in now.
I agree that this is a problem, but I personally don't think it is
a big enough feature to hold up a Beta or maybe even a GA. In the short
term I'd like to see us produce another Beta so we can gain some more
confidence in a GA.
> I have no desire to handle those PRs. Do you?
I've already begun looking into apachectl to correct this.
> I realize that you feel that we should not provide any default
> configuration assistance (I believe even setting Listen via
> --with-port is bogus to you).
That is irrelevant to this discussion since right now I'm more
interested in getting a stable 2.0 than bringing up this relatively
minor issue.
> For those that may not understand the exact question, it is
> this (restated):
>
> "Should we modify httpd-std.conf to stop referring to logs/,
> conf/ and substitute the $localstatedir and $sysconfdir values?"
>
> I'll let the group decide. -- justin
I think for now the obvious answer is "Yes, we should". There are other
places where we make bad assumptions about apache paths that could use
some help as well (most notably apachectl and apxs). Should we hold up
a release because of it (beta or otherwise)? IMHO, No.
-aaron
Re: Having sane default configs was Re: cvs commit: httpd-2.0 STATUS
Posted by Thom May <th...@planetarytramp.net>.
* Justin Erenkrantz (jerenkrantz@ebuilt.com) wrote :
> On Fri, Mar 08, 2002 at 05:49:05PM -0000, aaron@apache.org wrote:
> > + Aaron says: This is not a showstopper, these problems have existed
> > + for as long as I can remember. It would be nice to fix
> > + them but they are not new.
>
> Since we now have layout fixed, I think with any subsequent release
> that we make, people will use layouts and complain that we generate
> invalid default configurations for their layouts. I can imagine the
> PRs coming in now. I have no desire to handle those PRs. Do you?
>
> I realize that you feel that we should not provide any default
> configuration assistance (I believe even setting Listen via
> --with-port is bogus to you).
>
> For those that may not understand the exact question, it is
> this (restated):
>
> "Should we modify httpd-std.conf to stop referring to logs/,
> conf/ and substitute the $localstatedir and $sysconfdir values?"
>
> I'll let the group decide. -- justin
>
My (meaningless as I'm not a committer) thought on this, is yes, we _should_
do this. I think that running a 'make install' should produce a software
installation that is ready to go in a basic configuration straight off.
Certainly I think it should be fixed for GA.
-Thom
Re: Having sane default configs was Re: cvs commit: httpd-2.0 STATUS
Posted by Justin Erenkrantz <je...@ebuilt.com>.
On Fri, Mar 08, 2002 at 04:12:39PM -0500, Rodent of Unusual Size wrote:
> Let me clarify: By putting absolute paths into the config
> files, we are locking the installation into a single location.
> By using ServerRoot-relative locations, as we always have, the
> installation can be moved around the filesystem, or even to
> another box.
They may not always be ServerRoot-relative since that is ${prefix}.
Darwin, RedHat, opt, SuSE, Solaris layouts all have disjoint
values for sysconfdir.
> Now, if the $foodir values can be defined as ServerRoot-relative,
> at least for some layouts (like the default), then I'm of
> the other opinion, and +1 on the idea. But absolute paths? No way!
Taking what Aaron's recent patches have done, if they can be
relative (given the value), they will do so. However, if they
don't share a common prefix, it becomes the absolute path.
-- justin
RE: Having sane default configs was Re: cvs commit: httpd-2.0 STATUS
Posted by Sander Striker <st...@apache.org>.
> From: Thom May [mailto:thom@planetarytramp.net]
> Sent: 09 March 2002 19:45
> * Aaron Bannert (aaron@clove.org) wrote :
>> On Fri, Mar 08, 2002 at 04:12:39PM -0500, Rodent of Unusual Size wrote:
>>> Let me clarify: By putting absolute paths into the config
>>> files, we are locking the installation into a single location.
>>> By using ServerRoot-relative locations, as we always have, the
>>> installation can be moved around the filesystem, or even to
>>> another box.
>>>
>>> Now, if the $foodir values can be defined as ServerRoot-relative,
>>> at least for some layouts (like the default), then I'm of
>>> the other opinion, and +1 on the idea. But absolute paths? No way!
Well, I think that we can't guarantee relative paths in all cases, but
we can in the case of --prefix without --layout and in some cases of
--layout.
>> Thom and I have had to deal with this lately and came up with a couple
>> of m4 macros to help:
>>
>> APR_EXPAND_VAR takes a variable and recursively interpolates the contents.
>> Useful for when datadir='${foodir}/bar'.
>>
>> APR_PATH_RELATIVE takes a path and a prefix var and strips off the prefix
>> (and any extra / characters) if they share a common prefix, else it
>> takes the literal of the original path.
>>
>> I'm thining that to deal with apachectl, apxs, httpd-std.conf, etc... we'll
>> have to come up with a couple sets of variables that parallel their $prefix
>> counterpars. For example:
>>
> To further facilitate this, I suggest that apxs and apachectl should have a
> -d argument added to them, analogous to httpd's -d; otherwise they have no
> concept of what the ServerRoot is if httpd has been run with -d.
+1.
Sander
Re: Having sane default configs was Re: cvs commit: httpd-2.0 STATUS
Posted by Thom May <th...@planetarytramp.net>.
* Aaron Bannert (aaron@clove.org) wrote :
> On Fri, Mar 08, 2002 at 04:12:39PM -0500, Rodent of Unusual Size wrote:
> > Let me clarify: By putting absolute paths into the config
> > files, we are locking the installation into a single location.
> > By using ServerRoot-relative locations, as we always have, the
> > installation can be moved around the filesystem, or even to
> > another box.
> >
> > Now, if the $foodir values can be defined as ServerRoot-relative,
> > at least for some layouts (like the default), then I'm of
> > the other opinion, and +1 on the idea. But absolute paths? No way!
>
> Thom and I have had to deal with this lately and came up with a couple
> of m4 macros to help:
>
> APR_EXPAND_VAR takes a variable and recursively interpolates the contents.
> Useful for when datadir='${foodir}/bar'.
>
> APR_PATH_RELATIVE takes a path and a prefix var and strips off the prefix
> (and any extra / characters) if they share a common prefix, else it
> takes the literal of the original path.
>
> I'm thining that to deal with apachectl, apxs, httpd-std.conf, etc... we'll
> have to come up with a couple sets of variables that parallel their $prefix
> counterpars. For example:
>
To further facilitate this, I suggest that apxs and apachectl should have a
-d argument added to them, analogous to httpd's -d; otherwise they have no
concept of what the ServerRoot is if httpd has been run with -d.
Cheers,
-Thom
Re: Having sane default configs was Re: cvs commit: httpd-2.0 STATUS
Posted by Aaron Bannert <aa...@clove.org>.
On Fri, Mar 08, 2002 at 01:18:44PM -0800, Justin Erenkrantz wrote:
> On Fri, Mar 08, 2002 at 01:14:20PM -0800, Aaron Bannert wrote:
> > prefix = '/path/to/apache2'
> >
> > sysconfdir = '${prefix}/conf'
> > ap_sysconfdir = '/path/to/apache2/conf'
> > rel_sysconfdir = 'conf'
>
> And, if rel_sysconfdir isn't really relative, it's absolute? So,
> that'd be the value we'd place in httpd-std.conf? -- justin
Yes, that's correct. If sysconfdir doesn't live under prefix, then it
remains absolute. perhaps rel_foodir isn't the right name, but you get
the picture.
-aaron
Re: Having sane default configs was Re: cvs commit: httpd-2.0 STATUS
Posted by Justin Erenkrantz <je...@ebuilt.com>.
On Fri, Mar 08, 2002 at 01:14:20PM -0800, Aaron Bannert wrote:
> prefix = '/path/to/apache2'
>
> sysconfdir = '${prefix}/conf'
> ap_sysconfdir = '/path/to/apache2/conf'
> rel_sysconfdir = 'conf'
And, if rel_sysconfdir isn't really relative, it's absolute? So,
that'd be the value we'd place in httpd-std.conf? -- justin
Re: Having sane default configs was Re: cvs commit: httpd-2.0 STATUS
Posted by Aaron Bannert <aa...@clove.org>.
On Fri, Mar 08, 2002 at 04:12:39PM -0500, Rodent of Unusual Size wrote:
> Let me clarify: By putting absolute paths into the config
> files, we are locking the installation into a single location.
> By using ServerRoot-relative locations, as we always have, the
> installation can be moved around the filesystem, or even to
> another box.
>
> Now, if the $foodir values can be defined as ServerRoot-relative,
> at least for some layouts (like the default), then I'm of
> the other opinion, and +1 on the idea. But absolute paths? No way!
Thom and I have had to deal with this lately and came up with a couple
of m4 macros to help:
APR_EXPAND_VAR takes a variable and recursively interpolates the contents.
Useful for when datadir='${foodir}/bar'.
APR_PATH_RELATIVE takes a path and a prefix var and strips off the prefix
(and any extra / characters) if they share a common prefix, else it
takes the literal of the original path.
I'm thining that to deal with apachectl, apxs, httpd-std.conf, etc... we'll
have to come up with a couple sets of variables that parallel their $prefix
counterpars. For example:
prefix = '/path/to/apache2'
sysconfdir = '${prefix}/conf'
ap_sysconfdir = '/path/to/apache2/conf'
rel_sysconfdir = 'conf'
We then export these with APACHE_SUBST and then turn httpd-std.conf into
an autoconf input file ala apachectl and apxs. Anyone see a problem with
this approach?
-aaron
Re: Having sane default configs was Re: cvs commit: httpd-2.0 STATUS
Posted by Rodent of Unusual Size <Ke...@Golux.Com>.
Rodent of Unusual Size wrote:
>
> > "Should we modify httpd-std.conf to stop referring to logs/,
> > conf/ and substitute the $localstatedir and $sysconfdir values?"
>
> Great Ghu, no!
Let me clarify: By putting absolute paths into the config
files, we are locking the installation into a single location.
By using ServerRoot-relative locations, as we always have, the
installation can be moved around the filesystem, or even to
another box.
Now, if the $foodir values can be defined as ServerRoot-relative,
at least for some layouts (like the default), then I'm of
the other opinion, and +1 on the idea. But absolute paths? No way!
--
#ken P-)}
Ken Coar, Sanagendamgagwedweinini http://Golux.Com/coar/
Author, developer, opinionist http://Apache-Server.Com/
"Millennium hand and shrimp!"
Re: Having sane default configs was Re: cvs commit: httpd-2.0 STATUS
Posted by Rodent of Unusual Size <Ke...@Golux.Com>.
Justin Erenkrantz wrote:
>
> For those that may not understand the exact question, it is
> this (restated):
>
> "Should we modify httpd-std.conf to stop referring to logs/,
> conf/ and substitute the $localstatedir and $sysconfdir values?"
Great Ghu, no!
--
#ken P-)}
Ken Coar, Sanagendamgagwedweinini http://Golux.Com/coar/
Author, developer, opinionist http://Apache-Server.Com/
"Millennium hand and shrimp!"