apache2 location
Mike Savory
msavory1 at nzbox.com
Tue Feb 24 19:13:06 PST 2009
Hi Scott
I think you are confusing destroot.violate_mtree
For which the docs say:
This means that the port installed files outside of their normal
locations in ${prefix}. These could be files totally outside of $
{prefix}, which could cause problems on your computer, or files inside
of ${prefix} that are not in a standard location. Use port contents
portname to see the location for all files that were installed by a
given port.
And the apache2 port which actually does install all its files in
$prefix in a normal Mac OSX install, as the command "port contents
apache2" shows
For most people $prefix is /opt/local/
The issue is that apache2 does not follow the macports hierarchy and
instead just follows the standard apache setup
http://httpd.apache.org/docs/2.2/install.html#configure
By default, make install will install all the files in /usr/local/
apache2/bin, /usr/local/apache2/lib etc. You can specify an
installation prefix other than /usr/local/apache2 using --prefix, for
instance --prefix=$HOME.--enable-layout=LAYOUTConfigure the source
code and build scripts to assume an installation tree based on the
layout LAYOUT. This allows you to separately specify the locations for
each type of file within the Apache HTTP Server installation.
Theconfig.layout file contains several example configurations, and you
can also create your own custom configuration following the examples.
The different layouts in this file are grouped into <Layout FOO>...</
Layout> sections and referred to by name as in FOO. The default layout
is Apache.
----- from the layout file....
# Classical Apache path layout.
<Layout Apache>
prefix: /usr/local/apache2
exec_prefix: ${prefix}
bindir: ${exec_prefix}/bin
sbindir: ${exec_prefix}/bin
libdir: ${exec_prefix}/lib
libexecdir: ${exec_prefix}/modules
mandir: ${prefix}/man
sysconfdir: ${prefix}/conf
datadir: ${prefix}
installbuilddir: ${datadir}/build
errordir: ${datadir}/error
iconsdir: ${datadir}/icons
htdocsdir: ${datadir}/htdocs
manualdir: ${datadir}/manual
cgidir: ${datadir}/cgi-bin
includedir: ${prefix}/include
localstatedir: ${prefix}
runtimedir: ${localstatedir}/logs
logfiledir: ${localstatedir}/logs
proxycachedir: ${localstatedir}/proxy
</Layout>
So what you are actually suggesting is changing the default layout
htdocsdir: ${datadir}/htdocs
to read in macports
htdocsdir: ${prefix}/www
to comply with the standard layout?
I believe the
destroot.violate_mtree yes
in the portfile is primarily to allow the platform Darwin to install
files outside the prefix.
Mike
On Feb 24, 2009, at 5:03 PM, Scott Haneda wrote:
> On Feb 24, 2009, at 3:31 PM, Chris Janton wrote:
>> On 2009-02-24 , at 15:35 , Scott Haneda wrote:
>>
>>> My feeling is, the sooner the better, there are already a handful
>>> of blogs out there, which instructions and hard paths in their
>>> instructions pointing to the current location. The sooner we put
>>> it where MacPorts recommends, the better the long term usability
>>> is going to be.
>>
>> how about leaving it where it has been for years? I suspect many
>> people who use the port have become "attached" to the current
>> location, including me.
>
> I suspect that as well, which is why I was asking. I believe it
> should be moved, and if you are so inclined, you can symblink to the
> old location.
>
>> Do a Google search on "/opt/apache2" and you'll see that the choice
>> of /opt/local/apache2 is perfectly sensible when compared to where
>> other "systems" put the application and files.
>
> Correct, I noticed that as well, but it is contrary to the docs,
> which I am reading, and trying to understand. I am trying to work
> on several ports to add to MacPorts, and I want to do things the
> right way, not just the way everyone has gotten used to.
>
>> Is there a compelling reason to put it somewhere else?
>
> Warning: portname requests to install files outside the common
> directory structure!
> ( That to me sound serious, ominous, and something we should strive
> to solve for new users )
>
> It generates an error, which is something people have to learn to
> ignore or research about why the error happened. For a user who is
> not a port contributor, this error is off putting to them.
>
> It happened to me, I installed mysql devel, saw the error, and had
> to track it down, to learn that the sql bench files are put in /opt/
> local
>
> Now I know what the error is about. There are a lot of people I try
> to get to use ports, and they all tell me they tried in the past but
> could not get past errors, maybe this is one of those issues.
>
> From the docs, this is open to new user interpretation, and could be
> very off putting:
>
> MacPorts tests for compliance to the common directory structure in $
> {prefix}. If a port is not compliant with the standard, set it to yes.
>
> You can find the macports standard in MacPorts File Hierarchy or in
> the porthier(7) man page.
>
> If destroot.violate_mtree is set to yes, the following warning is
> issued during the installation.
>
> Warning: portname requests to install files outside the common
> directory structure!
> This means that the port installed files outside of their normal
> locations in ${prefix}. These could be files totally outside of $
> {prefix}, which could cause problems on your computer, or files
> inside of ${prefix} that are not in a standard location. Use port
> contents portname to see the location for all files that were
> installed by a given port.
>
> My vote is to fix it, those who tend to like the old location, spend
> time in it, and can symblink it.
> --
> Scott
>
> _______________________________________________
> macports-users mailing list
> macports-users at lists.macosforge.org
> http://lists.macosforge.org/mailman/listinfo.cgi/macports-users
>
More information about the macports-users
mailing list