MacPorts' Directory Layout Guideline or suggestion?
Hi list. I'm wondering if there's any guideline or suggestion that MacPorts port creaters should follow. apache2 installs its conf files in /opt/local/apache2/conf but apache's in /opt/local/etc/apache/conf. Is this a bug? or just lack of good guidelines? Thanks.
On Aug 5, 2007, at 12:19 PM, js wrote:
I'm wondering if there's any guideline or suggestion that MacPorts port creaters should follow.
apache2 installs its conf files in /opt/local/apache2/conf but apache's in /opt/local/etc/apache/conf. Is this a bug? or just lack of good guidelines?
May I pose a follow up question to this one? The apache2 install in /opt/local/apache2 looks like a tweak to the default build to install it inside the /opt directory. But the postgresql build is scattered just like the OP's example of the apache install. (i.e., bulk is in /opt/local/lib, db cluster in /opt/ local/var/db/postgresql/defaultdb, ...etc) Is there is a historical reason for this? Just to get a handle on working with portfiles, I created a local repository and modified the original portfile to install the database into an /opt/local/pgsql82 direcotry. Ran into a couple of minor problems but was able to work it out. The server works fine. I realize that any attempt to use this modified port wouldn't be worth it, but was a good learning experience. Jeff
On Aug 5, 2007, at 22:35, Jeff Stubbs wrote:
On Aug 5, 2007, at 12:19 PM, js wrote:
I'm wondering if there's any guideline or suggestion that MacPorts port creaters should follow.
apache2 installs its conf files in /opt/local/apache2/conf but apache's in /opt/local/etc/apache/conf. Is this a bug? or just lack of good guidelines?
May I pose a follow up question to this one?
The apache2 install in /opt/local/apache2 looks like a tweak to the default build to install it inside the /opt directory. But the postgresql build is scattered just like the OP's example of the apache install. (i.e., bulk is in /opt/local/lib, db cluster in / opt/local/var/db/postgresql/defaultdb, ...etc) Is there is a historical reason for this?
Just to get a handle on working with portfiles, I created a local repository and modified the original portfile to install the database into an /opt/local/pgsql82 direcotry. Ran into a couple of minor problems but was able to work it out. The server works fine. I realize that any attempt to use this modified port wouldn't be worth it, but was a good learning experience.
Having a background coming from Mac OS 6, 7, 8 and 9, and not a UNIX variant, I don't really know where things "should" go, and don't really care much either. "port contents foo" will always tell you what the port foo installed, so it's not so hard to find where things are, whatever the layout. IMHO. Also, the mysql5 port specifically (and significantly) modifies its install so that it goes all over the place, to try to coerce it into the apparently standard layout, but this has been criticized as making it hard to see where things go, and has also caused some difficulties for software that needs to link against mysql5 (e.g. see the mysql5 variant in the php5 port) and has been contrasted with the official MySQL binaries which install entirely into /usr/local/mysql-$ {version}. Seems like people will complain (maybe not complain, but ask about it) either way.
"js " <ebgssth@gmail.com> writes:
I'm wondering if there's any guideline or suggestion that MacPorts port creaters should follow.
apache2 installs its conf files in /opt/local/apache2/conf but apache's in /opt/local/etc/apache/conf. Is this a bug? or just lack of good guidelines?
A good question; here's just my $.02. The thing to keep in mind are the overall goals of the MacPorts project. It isn't to make all the ports as consistent as possible. It is to make the ports as consistent as possible as far as the things we need to touch. The more we touch stuff an app's Makefile is performs fine without sufficient justification, we end up with so much customization in the portfile tree that it compromises the other goals of the project -easy and quck upgrades being one. The more we touch Makesfiles needlessly, the more we commit ourselves to touching them again down the road and this is time consuming. And the more our ports behave different from the FreeBSD and Gentoo ports collections. Bottom line is that we lean heavily upon the decisions of the developers upstream, unless there is a compelling reason not to. So probably in the case of Apache, the inconsistency is a result of changing developer choices between versions. BTW, when we disagree with choices made by developers, we should try to get them to change their defaults so the whole open source community benefits, and we don't have to customize all our portfiles. We want to do that as little as possible. Well that's my view; I hope that helps answer your question. There are general guidelines in the MacPorts guide (See MacPorts Internals -> MacPorts File Hierarchy), but I think it pretty much restates the general Unix guidelines. http://geeklair.net/new_macports_guide/ Mark
Personally I prefer "everything's in the right place" approach and I believe there's no disadvantage to do that. It would help - users customize packages. - port creators write new portfile. - avoiding package conflicts. I know it's not easy to define "the right layout" but there're plenty of resources that we can mimic. For example, HIER(7) OpenBSD Reference Manual http://www.openbsd.org/cgi-bin/man.cgi?query=hier&sektion=7&apropos=0&manpat... Filesystem Hierarchy Standard http://en.wikipedia.org/wiki/Filesystem_Hierarchy_Standard On 8/7/07, Ryan Schmidt <ryandesign@macports.org> wrote:
On Aug 5, 2007, at 22:35, Jeff Stubbs wrote:
On Aug 5, 2007, at 12:19 PM, js wrote:
I'm wondering if there's any guideline or suggestion that MacPorts port creaters should follow.
apache2 installs its conf files in /opt/local/apache2/conf but apache's in /opt/local/etc/apache/conf. Is this a bug? or just lack of good guidelines?
May I pose a follow up question to this one?
The apache2 install in /opt/local/apache2 looks like a tweak to the default build to install it inside the /opt directory. But the postgresql build is scattered just like the OP's example of the apache install. (i.e., bulk is in /opt/local/lib, db cluster in / opt/local/var/db/postgresql/defaultdb, ...etc) Is there is a historical reason for this?
Just to get a handle on working with portfiles, I created a local repository and modified the original portfile to install the database into an /opt/local/pgsql82 direcotry. Ran into a couple of minor problems but was able to work it out. The server works fine. I realize that any attempt to use this modified port wouldn't be worth it, but was a good learning experience.
Having a background coming from Mac OS 6, 7, 8 and 9, and not a UNIX variant, I don't really know where things "should" go, and don't really care much either. "port contents foo" will always tell you what the port foo installed, so it's not so hard to find where things are, whatever the layout. IMHO.
Also, the mysql5 port specifically (and significantly) modifies its install so that it goes all over the place, to try to coerce it into the apparently standard layout, but this has been criticized as making it hard to see where things go, and has also caused some difficulties for software that needs to link against mysql5 (e.g. see the mysql5 variant in the php5 port) and has been contrasted with the official MySQL binaries which install entirely into /usr/local/mysql-$ {version}. Seems like people will complain (maybe not complain, but ask about it) either way.
There are general guidelines in the MacPorts guide (See MacPorts Internals -> MacPorts File Hierarchy), but I think it pretty much restates the general Unix guidelines. http://geeklair.net/new_macports_guide/
Why isn't that doc on http://www.macports.org/? and for me it seems thatnot so many people honors that doc.
On Aug 10, 2007, at 09:41, js wrote:
There are general guidelines in the MacPorts guide (See MacPorts Internals -> MacPorts File Hierarchy), but I think it pretty much restates the general Unix guidelines. http://geeklair.net/new_macports_guide/
Why isn't that doc on http://www.macports.org/? and for me it seems thatnot so many people honors that doc.
The documentation is currently being developed. It was (is?) problematic to get new web content onto macports.org and a quick solution was needed so it was placed elsewhere.
participants (5)
-
Artie Ziff
-
Jeff Stubbs
-
js
-
markd@macports.org
-
Ryan Schmidt