Guillaume Mazoyer: Status report Jigsaw num. 3 for GSoC 2011
To be able to generate man pages with help2man, I needed to be able to use the scripts. But with jtdiff.sh and jtreg.sh using jtreg.jar which is not in /usr/share/java during the build, I had to find a way to make the scripts work. I decided to patch the scripts (again) and make them depend of some environment variables. So in each script, there are 4 used variables:
- JAVA_HOME, which is the path where Java is,
- JTREG_HOME, which is the path where jtreg.jar is,
- JTHAR_HOME, which is the path where jtharness JAR are, and,
- JAR_HOME, which is the path where other JAR are.
#!/usr/bin/make -f
JAVA_HOME = /usr/lib/jvm/default-java
override_dh_auto_build:
ant -f make/build.xml
dh_auto_build
JTREG_HOME=./dist/jtreg/lib/ help2man \
--name="Regression Test Harness" \
--help-option="-help" \
./dist/jtreg/linux/bin/jtdiff > jtdiff.1
JTREG_HOME=./dist/jtreg/lib/ help2man \
--name="Regression Test Harness" \
--help-option="-help" \
./dist/jtreg/linux/bin/jtreg > jtreg.1
override_dh_auto_clean:
rm -r dist :
rm -r build :
rm jtdiff.1 :
rm jtreg.1 :
dh_auto_clean
%:
dh $@ --with javahelperAs you can see it is not really complicated. The most interesting part is the one when the man pages are generated. The JTREG_HOME variable is set to ./dist/jtreg/lib/ because it is the path where jtreg.jar is once it is built. I also used the help-option option of help2man because the help option of jtreg and jtdiff is -help and not help .
The jtreg package is now on the Debian Java team SVN so anyone can get it using:
svn checkout svn+ssh://$ SVN_USER @svn.debian.org/svn/pkg-java/trunk/jtregThanks to Sylestre Ledru, jtreg is now available in Sid and the ITP is now closed.
The second part of my work consisted in testing Jigsaw and fixed tests if necessary. All the packaging work is now useful since the tests need JTReg to be run. The problem with the current build system of Jigsaw is that it is enough generic to be used on any system. So I had to patch several makefiles. To find them:
cd jigsaw-testsfind . -name 'Makefile' grep '/test/Makefile'Then, the path to find jtreg has to be modified to match /usr/bin/jtreg . After that it is possible to run the tests with the following command:
make testPassing all the tests is something which takes a lot of time. After that, I identified 42 (that s a cool number right?) failing tests. Some of them came from the lack of X11 server and other from unreachable network hosts. Some hackers of IcedTea gave me some ideas to fix several tests. They told me to look here and here because I just had the same problems that they had before.
With this, I was able to fix the tests related to unreachable hosts and to the lack of X server. I used Xvfb to fix the X server depending tests.
After running the tests again, only 13 tests were still failing. That is a good result. Tom Marble and me decided to apply the patch of Alan Bateman and re-run the tests to see if it will break something:
cd jigsaw-tests
mkdir patches && cd patches
wget http://cr.openjdk.java.net/~alanb/jigsaw-mp-prototype1/webrev/jdk.patch
cd jdk
patch -p1 < ../patches/jdk.patch
make clean
make sanity
make all
make modules
xvfb-run -e xvfb-errors -a -s -ac make test -k15 tests failed against 13 before. The 2 new failing tests are:
- java/lang/management/MemoryMXBean/LowMemoryTestConcMarkSweepGC.sh
- java/util/Locale/Bug6989440.java
This 2 weeks were also dedicated to the understanding of Jigsaw and its modules. Reading the jigsaw-dev mailing list, I have found some interesting conversation about jigsaw and how to write modules. So I decided to write a module to see how it works. I followed the instruction of the quick start guide but when compiling the module didn t work. So I tried to understand why and then to fix it. I eventually compiled and installed my module and here is how I did it:
mkdir -p src/com.greetings/com/greetings/
mkdir -p src/org.astro/org/astro/
mkdir modules
vim src/com.greetings/module-info.java
vim src/com.greetings/com/greetings/Hello.java
vim src/org.astro/module-info.java
vim src/org.astro/org/astro/World.java
./jigsaw/build/linux-amd64/bin/javac -d modules \
-modulepath ./jigsaw/build/linux-amd64/modules/modules \
-sourcepath src find src -name '*.java'
./jigsaw/build/linux-amd64/bin/jmod create -L mlib
./jigsaw/build/linux-amd64/bin/jmod install \
modules org.astro com.greetings -L mlib
./jigsaw/build/linux-amd64/bin/java -L mlib -m com.greetingsAnd here it is, we have a nice hello world module. The documentation says to put the module-info.java of org.astro in src/org.astro/org/astro/ but it didn t work for me so I tried to put it in src/org.astro/ and it worked. Also the quick start guide says that we have to use the -modulepath option to specify where the modules are. I first tried to use ./jigsaw/build/linux-amd64/modules/ but javac told me he could not find java.lang so I noticed that there is a subdirectory called modules in ./jigsaw/build/linux-amd64/modules/ so I used it as module path and it worked.
Writing a module and seeing how Jigsaw modules are made started to make me think about the packaging of Jigsaw. Dependencies being available, knowing how to build and test Jigsaw and seeing how modules are made, I think that I will soon try to start the packaging of Jigsaw and getting started with the packaging will be my goal for the next two weeks.
My
Let data be textarea->value and browser be (firefox or chrome).I want the user to be able to sign the data he entered in the textarea as I do not trust the website to store the data without modification.So far I found a couple of GnuPG/PGP based solutions:

In a series of experiments performed over the past few days, I've
determined that the actual mechanism by which "water saving" shower
heads work is not, as you might naively imagine, reducing the amount
of water dispersed per unit time. Instead, they make showering
such an unpleasant experience that you perform amazing feats of
speed washing so you can get out as quickly as possible. In extreme
cases, I can imagine you would save even more water by just not
washing at all.
I sponsored the upload of fonts-anonymous-pro prepared by Rog rio
Brito. This fixed-width font is especially designed for people who
write code, for instance by making clear differences between
characters such as O and 0, or I, l and 1.
I fixed a few glitches in various l10n scripts related to D-I (those
tthigns that run daily, for which I receive a daily mail). They were
the consequence of Alioth migration and I omitted to fix them until
now....mumbling every morning about the scripts' noisy output..:-)
I worked on only one bug for samba (doh). This was #631118 which I
forwarded upstream in order to get it fixed in 3.5 series (even if 3.6
is due out soon and will be what we target for wheezy).
I tried to follow the flow of translations/reviews in DDTP for
French. The activity is high, here, with about 10 packages translated
every day (most often packages I target for the team...by using
high-popcon stats). We even had a big bump during the week-end when
Georges Khaznadar (who is very active when it comes at educative
software) initiated the translation of many edu-related packages (many
of which he maintains himself).
That's about it. Quiet week, indeed with more time invested in paid
work, including during my spare time..:-). And also a week-end in our
country house in Normandy, which usually means more gardening than hacking.
I read something about dh_make again a while ago, which made me wonder, besides dh_make, how do people generally bootstrap new Debian packages. I don't think I've ever actually used dh_make for anything but experimenting. For the longest time, copying over the packaging files from some similar package worked pretty well.

So