RFC: Changing apache2 to install its files to /opt/local/ instead of /opt/local/apache2
Rainer Müller
raimue at macports.org
Sun Mar 2 07:44:53 PST 2008
js wrote:
>> Before anyone does anything, I'd like to know why you want this
>> change.
>
> Consistency, period.
> When I upgraded from apache1 to apache2, it surprized me that
> there is no conf dir in /opt/local/etc and apachectl is in
> /opt/local/apache2/bin/.
I agree. Even more, the current apache2 layout violates the mtree which
should be avoided.
>> Let's figure out the pros and cons.
>>
>> A con would be that all ports that depend on apache2 would have to be
>> checked. They may have hard-coded the location where apache2 puts its
>> files now.
>>
>> Also, all existing users of apache2 would have to move their
>> httpd.conf files to the new location, and maybe update paths in it.
>> Anyone who just runs "sudo port upgrade apache2" will find their web
>> server suddenly broken.
>
> Agreed, but an easy migration script that handling this job would be ease
> the impact.
Also present some ui_msg how to do it. Isn't it just a cp from the old
to the new location?
Also, users have always been responsible for the config themself as they
have to copy it from httpd.conf.sample to httpd.conf at the moment.
Even if it is "suddenly broken", they can go back by using port
deactivate/activate as described in the guide.
>> Note that the apache port has a variant "apache_layout" which puts
>> files in a different place than usual. I think this is problematic
>> because some ports that depend on apache assume that the apache port
>> is installed either with or without this variant, and don't work in
>> the other case. There should be no such variant; the port should just
>> install files in a single place.
>
> I think options are good. I remember once you disagreed this idea,
> but this is not a point of discussion. Let's skip this.
File locations should not be changed by variants.
apache +apache_layout violates the mtree and does not even declare that.
>> The apache, apache2 and apache20 ports should be kept in sync if
>> possible.
>>
>> The apache port should be able to coexist with either the apache2 or
>> the apache20 port. Currently, they cannot coexist:
>>
>> $ sudo port activate apache
>> Password:
>> ---> Activating apache
>> Error: port activate failed: Image error: /opt/local/share/man/man1/
>> dbmmanage.1.gz is being used by the active apache2 port. Please
>> deactivate this port first, or use the -f flag to force the activation.
>> $
>
> suffix would fix this issue.
Do you mean dbmmanage.1{apache,apache20,apache2}.gz? That would be good.
Then you can read the man pages by using e.g. man 1apache2 dbmmanage.
Rainer
More information about the macports-dev
mailing list