Date: 10 Dec 2000 22:52:48 -0000 From: mwm@mired.org To: FreeBSD-gnats-submit@freebsd.org Subject: docs/23450: The Porter's handbook doesn't say how to test for PREFIX-clean Message-ID: <20001210225248.4400.qmail@guru.mired.org> Resent-Message-ID: <200012102300.eBAN02V47839@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 23450 >Category: docs >Synopsis: The Porter's handbook doesn't say how to test for PREFIX-clean >Confidential: no >Severity: serious >Priority: medium >Responsible: freebsd-doc >State: open >Quarter: >Keywords: >Date-Required: >Class: doc-bug >Submitter-Id: current-users >Arrival-Date: Sun Dec 10 15:00:01 PST 2000 >Closed-Date: >Last-Modified: >Originator: Mike Meyer >Release: FreeBSD 5.0-CURRENT i386 >Organization: Meyer Consulting >Environment: System: FreeBSD guru.mired.org 5.0-CURRENT FreeBSD 5.0-CURRENT #0: Sun Dec 10 11:48:38 CST 2000 mwm@guru.mired.org:/usr/obj/sharetmp/src/sys/GURU i386 >Description: Ports are showing up that aren't PREFIX-clean, even though the Porters Handbook recommends against that. I suspect that telling people *how* to test a port to see if it's PREFIX clean will help with that. >How-To-Repeat: Try running a system with LOCALBASE set to something other than /usr/local for a year or so, and note how much stuff winds up installed in /usr/local. >Fix: Here are patches to the Porter's Handbook. --- /usr/doc/en_US.ISO_8859-1/books/porters-handbook/book.sgml Sat Nov 25 12:34:48 2000 +++ book.sgml Sun Dec 10 16:49:00 2000 @@ -3277,6 +3277,22 @@ <makevar>PREFIX</makevar>, as this variable is automatically passed down to every stage of the build and install processes.</para> + <para>Make sure your application isn't installing things in + <filename>/usr/local</filename> instead of <makevar>PREFIX</makevar>. + A quick test for this is to do this is:</para> + + <screen>&prompt.root; <userinput>make clean; make package PREFIX=/var/tmp/<replaceable>port-name</replaceable></userinput></screen> + + <para>If anything is installed outside of <makevar>PREFIX</makevar>, + making the package creation process will complain that it + can't find the files.</para> + + <para>This does not test for the existence of internal references, + or correct use of <makevar>LOCALBASE</makevar> for references to + files from other ports. Testing the installation in + <filename>/var/tmp/<replaceable>port-name</replaceable></filename> + to do that that while you have it installed would do that.</para> + <para>Do not set <makevar>USE_X_PREFIX</makevar> unless your port truly requires it (i.e., it links against X libs or it needs to reference files in <makevar>X11BASE</makevar>).</para> >Release-Note: >Audit-Trail: >Unformatted: To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-doc" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20001210225248.4400.qmail>