[rfc] [icedtea-web] make links

Andrew Hughes ahughes at redhat.com
Thu Apr 19 11:54:09 PDT 2012



----- Original Message -----
> can I dare to ping? :)
> 
> -------- Original Message --------
> Subject: [rfc] [icedtea-web] make links
> Date: Fri, 06 Apr 2012 16:55:04 +0200
> From: Jiri Vanek <jvanek at redhat.com>
> To: IcedTea Distro List <distro-pkg-dev at openjdk.java.net>
> 
> Hi!
> 
> This is third from total of 5 patches which are introducing Tets For
> Applets[1]
> 
> This particular one is introducing  detection of browsers, linking
> the newly compiled plugin to
> detected ones and forwarding this information to testengine..
> 
> I know this linking by makefile is controversial, but it gives sense
> to me.
> Yes  - I can link the plugin with browsers manually before tests' run
> (and yes, this can be done
> once for all the runs in future), but I think this is much more
> versatile and is much more
> straightforward and much better controllable and also more
> fool-proof. The question weather to
> *UNlink* is more accurate:) ( there is no unlink right now, but
> should be easily addable if requested.
> Also when tests are run from makefile, then also all the possible
> preparation should be done from
> makefile. And this step is necessary. I have also introduced test
> weather linking is correct see
> private void testBrowser(Browser browser) calls in [2]
> 

There are two main problems I see:

1.  You're calling global-links from the main run-netx-dist-tests
target.  This means it'll get called by make check.  So you're now
requiring that test runs need root privileges and alter the installed
plugin without reverting it. I don't think this is acceptable.
I have no problem with the targets being present, but they should be
called manually.

2.  You don't provide a way of reverting to the original status quo.
I'd suggest:

	    mv -v ${HOME}/.mozilla/plugins/libjavaplugin.so ${HOME}/.mozilla/plugins/libjavaplugin.original.so && \
	    ln -s $(DESTDIR)$(libdir)/IcedTeaPlugin.so libjavaplugin.so && \

and adding the inverse to revert back to the original setup after testing.

            if [ -e ${HOME}/.mozilla/plugins/libjavaplugin.original.so ] ; \
               rm -f ${HOME}/.mozilla/plugins/libjavaplugin.so && \
               mv ${HOME}/.mozilla/plugins/libjavaplugin.original.so ${HOME}/.mozilla/plugins/libjavaplugin.so ; \
            fi ;

Other issues:

1.  Why is user-links never called from anywhere?  This is actually less
dangerous (doesn't require root) and could be automated.
2.  You don't check that ${HOME}/.mozilla/plugins exists.
3.  I think using ${HOME} as above may be safer than relying on tilde expansion by the shell.
4.  I don't think we need the messages.  They may have been useful for debugging but can now be removed.
5.  The dependencies on the new targets seem excessive.  All you need is whatever dependency ensures
the plugin has been installed.  You don't need e.g. javaws.desktop or docs.stamp because you don't use
them.
6.  On that note, surely it should use the plugin from the build directory as people tend to run "make check"
before "make install"?

> What I'm missing is When I have choose AC_CHECK_PROGS, then it does
> not support --with-val :-/ Is
> there any AC_CHECK_PROGS which allows to set with-val?
> Becasue I will probably put rather
> --with-firefox=/my/preconfiguired/firefox instead of let it use
> my default one. Although Lynks is quite good alternative during tests
> runtime :)
> Also this can be maybe intorduced as new patch later.
> 

You probably want to look at mirroring something like IT_FIND_JAVAH in IcedTea.

> Best regards J.
> 
> [1]
> http://mail.openjdk.java.net/pipermail/distro-pkg-dev/2012-March/017799.html
> [2]
> http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20120320/8ef6bdfe/browserTests-tests-0001.diff
> (btw, this page is partially corrupted - there is html test, and
> firefox is trying to translate it
> as html page :-/.. so see source rather :-/)
> 
> 
> changelog:
> 2012-04-06  Jiri Vanek <jvanek at redhat.com>
> 
> 	Added detection of installed browsers and added targets to create
> 	symbolic links from install dir
> to browsers' plugin directories. Primarily for testing purposes
> 	*Makefile.am: (clean-local) optionally delets links' stamps
> 	(stamps/user-links.stamp) with alias (links) - new target for
> 	creating symlinks for all users. One
> must be root to execute this target.
> 	(stamps/global-links.stamp) with alias (user-links) - new target for
> 	creating symlinks for logged
> user only. Because opera is missing this feature, quite useless.
> 	*configure.ac: added basic check whether and which browsers are
> 	installed
> 
> 

-- 
Andrew :)

Free Java Software Engineer
Red Hat, Inc. (http://www.redhat.com)

PGP Key: 248BDC07 (https://keys.indymedia.org/)
Fingerprint = EC5A 1F5E C0AD 1D15 8F1F  8F91 3B96 A578 248B DC07




More information about the distro-pkg-dev mailing list