[icedtea-web] RFC: add javaws and itweb-settings to jre/bin as well
Dr Andrew John Hughes
ahughes at redhat.com
Tue Dec 14 07:39:28 PST 2010
On 10:08 Tue 14 Dec , Omair Majid wrote:
> On 12/13/2010 07:05 PM, Dr Andrew John Hughes wrote:
> > On 16:55 Mon 13 Dec , Omair Majid wrote:
> >> On 12/13/2010 04:23 PM, Dr Andrew John Hughes wrote:
> >>> On 15:55 Mon 13 Dec , Omair Majid wrote:
> >>>> IcedTea-Web does not add either the javaws or itweb-settings binary to
> >>>> jre/bin. The attached patch addresses that by creating symlinks under
> >>>> jre/bin/ to the actual javaws and itweb-settings binaries.
> >>> Until I read this, I wasn't even aware there was a jre/bin. I looked
> >>> under bin, saw the files and wondered what you were on about.
> >>> One problem I see is you are assuming jre/bin exists (i.e. that the
> >>> prefix being used is a jdk install). This may not be the case.
> >>> You should probably only create these symlinks if jre/bin exists in
> >>> prefix.
> >> The attached patch first creates $(DESTDIR)$(prefix)/jre/bin before
> >> creating the symlinks.
> > Sorry, missed that.
> Well, I can see how you missed it: it wasnt in the original patch that I
> posted, just in the updated patch ;)
> >> One thing that I did notice is that 'make install' will install over
> >> existing files but adding ln -s makes this fail. Should I guard ln -s
> >> with a check to ensure that the symlink does not exist? Should I rm the
> >> symlink location first? Or is there a better thing to do in such cases?
> > Do we actually need them? Could we not just fix javaws to use $(bindir)?
> > I'm not keen on having this non-standard directory (as regards the normal
> > /usr layout, not the JDK).
> My concern is more towards what users expect. If users expect a javaws
> binary under JDK_HOME/jre/bin/ as well as JDK_HOME/bin, then not having
> it might cause issues.
> As for fixing javaws, can I hardcode JDK_HOME/bin/javaws for now, or
> should I make it use $(bindir) from configure?
It should use $(bindir). It's perfectly possible someone could install in /usr
and /usr/jre/bin is going to look quite odd. As such, I'd suggest only creating
the symlinks if $(prefix)/jre/bin exists.
> > If we really really do, then they need to be created with a guard as you suggest.
> > I can't see an install option for links.
> What if the links exist but could be invalid? I would rather do
> something like
> rm -f old_link
> ln -s new_bin new_link
> Does that look ok?
You also check that old_link is a link and not a regular file. test -L.
So something like:
if [ -e $(prefix)/jre/bin ] ; then
if [ -L $(prefix)/jre/bin/javaws ] ; then
rm -f $(prefix)/jre/bin/javaws ;
if [ ! -e $(prefix)/jre/bin/javaws ] ; then
ln -s $(bindir)/javaws $(prefix)/jre/bin ;
and similar cases for the others.
> >>>> On a separate note, should we not create symlinks named jcontrol and
> >>>> ControlPanel (under jre/bin) that link to itweb-settings?
> >>> Why would you want these? ControlPanel especially is very ugly. We
> >>> already agreed on the name being itweb-settings.
> >> Yeah, and I dont have a problem with that. I was just thinking about
> >> compatibility (just like this jre/bin/javaws thing that tripped me up).
> >> The proprietary JDK, for example, symlinks ControlPanel to jcontrol.
> > Do we really want to be compatible to the level? It's a different control
> > panel with different options anyway.
> Right, but again this may cause issues if users expect 'jcontrol' to
> work. That said, I personally have no problems with this.
I think it will be more confusing, to be honest, to have a different tool with the
same name. I know we have 'javaws' but doing it with the control panel too seems
to go a bit far.
Free Java Software Engineer
Red Hat, Inc. (http://www.redhat.com)
Support Free Java!
Contribute to GNU Classpath and IcedTea
PGP Key: 94EFD9D8 (http://subkeys.pgp.net)
Fingerprint = F8EF F1EA 401E 2E60 15FA 7927 142C 2591 94EF D9D8
More information about the distro-pkg-dev