Date: Wed, 01 Nov 2000 10:50:20 -0800 From: Tim Kientzle <kientzle@acm.org> To: Jordan Hubbard <jkh@winston.osd.bsdi.com> Cc: Patrick Bihan-Faou <patrick@mindstep.com>, "Daniel C. Sobral" <dcs@newsguy.com>, libh@FreeBSD.ORG Subject: Re: Making the Packages System Better Message-ID: <3A0065EC.C4ABA4AD@acm.org> References: <21943.973069819@winston.osd.bsdi.com>
next in thread | previous in thread | raw e-mail | index | archive | help
Jordan Hubbard wrote: > > > the approach that has been described is sound. However I would also like to > > hear about the arguments of people who oppose this. Maybe there is something > > that we missed and that will byte us badly at some point ? > > There are a number of more complex packages which "find" themselves by > examining argv[0] (or $0 if, more typically, they're scripts which > front-end executables which require significant environmental > pollution to run). These packages are often confused by finding their > base to be a symlink and will do parent-directory (..) relative path > smashing to find their other bits. If this fails to work, you're > hosed. > > These "complex packages" are also not very rare - both emacs 20.x as > well as java come immediately to mind, and there are others. > > - Jordan Later JDK releases are symlink-aware and do not have this problem. (I know for a fact that the native JDK 1.2.2 is symlink-aware. The Blackdown Linux JDK 1.2.2 is also symlink-aware, so I think it's a fix that's been incorporated in Sun's sources, not just a FreeBSD-specific fix.) There's also a stock workaround that should work for any such program: $ cd /usr/packages/emacs-20.35 $ mkdir bin-private $ mv bin/emacs bin-private/emacs $ cd bin $ cat >emacs #!/bin/sh exec /usr/packages/emacs-20.35/bin-private/emacs "$@" ^D $ chmod +x emacs Now, a symlink from /usr/packages/bin/emacs to /usr/packages/emacs-20.35/bin/emacs will invoke this shell script which will exec the "real" emacs with all of the expected path information. Gee, Jordan, I think even you could automate this one. ;-) - Tim To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-libh" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3A0065EC.C4ABA4AD>