Date: Thu, 31 Jul 1997 08:53:51 -0700 From: Scott Blachowicz <scott@statsci.com> To: asami@cs.berkeley.edu (Satoshi Asami) Cc: jkh@time.cdrom.com, freebsd-ports@FreeBSD.ORG Subject: Re: how to handle compiled in paths? Message-ID: <199707311553.IAA21201@knife.statsci.com> In-Reply-To: <199707310959.CAA10512@silvia.HIP.Berkeley.EDU> References: <199707310959.CAA10512@silvia.HIP.Berkeley.EDU>
next in thread | previous in thread | raw e-mail | index | archive | help
asami@cs.berkeley.edu (Satoshi Asami) wrote: > * You repeat the @cwd line twice at the top of the package's PLIST, > * "stapling" it to the canned prefix and preventing a -p override. Not > * every user's desire, of course, this still at least ensures that > * what's installed will work and is probably the best that can be done > * under the circumstances. > > Um, this is not the case of "doctor, it hurts when I shoot my feet!", So, maybe it's more like a case of "I shot my feet with a nail gun, but now I want to be nailed to the floor over THERE!" :-). Yeah...the only reason I noticed this is that I'd done my initial builds with a PREFIX=/usr/local/nmh-0.17, then a 'make package', then a 'pkg_add -p /usr/local' and found that my binaries had /usr/local/nmh-0.17 compiled into them.... > What he is asking is how to make ports not compile in the compile-time > PREFIX into the binaries so the users can "pkg_add -p /wherever" to > install the package anywhere s/he wants. (Besides, your method will > defeat ports which can change the PREFIX at compile time.) Unless you leave the pkg/PLIST file alone and have a rule in the 'make package' processing that doubles it up if necessary on its way into the package tar file. > The short answer is that we don't have any provisions of that > currently; the long answer to that is that it may be doable (I do have > some ideas), but it is very hard. Well...I was wondering what kinds of tools we have available at package install time. Maybe the prefix value could be compiled into a small shared object that is built by a pkg/INSTALL script, assuming that the PREFIX/lib directory can be added to the ldconfig cache or whatever? Or does FreeBSD do anything like the SunOS 5.x (SVR4?) ld -R option to put directories into the executable file and have programs to adjust a binary's library path on the fly? Or maybe using ELF formats would let you edit a section on the fly? Scott Blachowicz Ph: 206/283-8802x240 Mathsoft (Data Analysis Products Div) 1700 Westlake Ave N #500 scott@statsci.com Seattle, WA USA 98109 Scott.Blachowicz@seaslug.org
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199707311553.IAA21201>