From owner-freebsd-ports@FreeBSD.ORG Sun Aug 6 06:24:11 2006 Return-Path: X-Original-To: freebsd-ports@freebsd.org Delivered-To: freebsd-ports@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 32F0D16A4DF for ; Sun, 6 Aug 2006 06:24:11 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from mail2.fluidhosting.com (mx22.fluidhosting.com [204.14.89.5]) by mx1.FreeBSD.org (Postfix) with SMTP id A7F0F43D49 for ; Sun, 6 Aug 2006 06:24:10 +0000 (GMT) (envelope-from dougb@FreeBSD.org) Received: (qmail 4176 invoked by uid 399); 6 Aug 2006 06:24:09 -0000 Received: from localhost (HELO ?192.168.0.3?) (dougb@dougbarton.us@127.0.0.1) by localhost with SMTP; 6 Aug 2006 06:24:09 -0000 Date: Sat, 5 Aug 2006 23:23:59 -0700 (PDT) From: Doug Barton To: freebsd-ports@freebsd.org Message-ID: <20060805225435.T90125@qbhto.arg> Organization: http://www.FreeBSD.org/ X-OpenPGP-Key-ID: 0xD5B2F0FB X-message-flag: Outlook -- Not just for spreading viruses anymore! MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Subject: LOCALBASE vs. X11BASE (head to head deathmatch!) X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 06 Aug 2006 06:24:11 -0000 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Ok, I'm kidding about the deathmatch part. :) I have put some thought, and testing into this question though, so I thought I would post my results. First the conclusion. IMO the ideal technical solution would be to add a new variable, something like X11_CODE_BASE for the X11R7 bits, but default LOCALBASE, X11BASE, and the new one all to /usr/local. However, given that the resources to provide any kind of reasonable testing and user support to those different variables (there are 8 combinations at least that would require testing, multiplied by > 15,000 ports) does not now, and is not likely to ever exist, my actual recommendation is to collapse everything into one prefix. I came to this conclusion by actually testing the various options. I decided to delete all my ports, and install something big and hairy to see where we stand. I chose gnome for my guinea pig (which also had the side effect of allowing me to torture-test the new version of portmaster, but that's another e-mail). My first test was to set LOCALBASE and X11BASE (*BASE) both to the same, non-standard location. Fortunately for me, that failed on the very first port it tried to compile (python), so I settled for setting them both to /usr/local. The good news is that with *BASE set to /usr/local, everything built just fine, so we are at least PREFIX-clean enough so that things build. Everything runs fine for the most part as well, although when things failed, it was in non-obvious and annoying ways. In particular, gdm took me a long time to fix because of its multiple config file locations, and weird assumptions about PATH, etc. (It also has a really annoying "feature" of source'ing ~/.profile, but that's also another story altogether.) These tests, and the work I put into stuff to get everything to work, lead me to the conclusion that it doesn't actually matter if we put the new bits into /usr/X11R7, or /usr/local. The two problems look exactly the same from the standpoint of the rest of the ports. For example, the problems I ran into with gdm need to be fixed by patching the original files with something like %%LOCALBASE%%, then sed'ing that out to be whatever the variable is set to in the ports (or make.conf). Thus, it doesn't really matter which change we make, if we start with the assumption that we're not going to install xorg 7.x into /usr/X11R6 (which is my understanding) then the solution to making the rest of the ports work with the new location looks the same regardless of the destination. Stated more simply, my previous contention that the real problem needs to be defined as, "Our ports need to be PREFIX-clean, period" seems to have been proved out. This leads to my "ideal" solution, which would be to have the stuff split into 3 locations, instead of the current 2. There is a nice architectural purity to that, and I could envision scenarios where it would be useful to have things divided this way. The problem is that we simply don't have the resources to handle the 2 locations we have now (never mind enforcing PREFIX-cleanliness in general), and therefore I feel that the most rational way of dealing with this is to collapse it all into the same location. This does several things for us. It makes the development problem easier, since we'll always know where to find the bits (no artificial distinction between x11 bits, and "other" bits). It makes the support problem easier, because if a user is trying to do something non-standard, at least they will only be able to do _one_ thing in a non-standard way, which will make it easier to debug. It will also make the testing problem easier, since testing all the ports for installation into a non-standard PREFIX can be done with one pass on pointyhat. It's also probably worth noting that I don't see any valid reason for continuing to support two discrete locations for ports to install to (LOCALBASE and X11BASE). If we're going to bite the bullet, we should bite the whole bullet, get it over with, and move on. If I'm understanding the discussions around DESTDIR correctly (and there is no guarantee that I am), then I think the work that will go into making that successful can also be leveraged into helping make collapsing the *BASE stuff successful. This has been long, so if you're still reading, thanks! :) I hope that it's useful, and that we can continue having a rational discussion about the pros and cons of the various alternatives. Regards, Doug - -- This .signature sanitized for your protection -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.5 (FreeBSD) iD8DBQFE1YsIyIakK9Wy8PsRArDPAKCMIfXUsQITNTLChNOvQclRGzbCCACfbdeD czbec9WIGtVWxlI+eD0AzEE= =L2u8 -----END PGP SIGNATURE-----