[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH]: Add IcedTea 6
From: |
Ludovic Courtès |
Subject: |
Re: [PATCH]: Add IcedTea 6 |
Date: |
Tue, 27 Jan 2015 22:55:06 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.4 (gnu/linux) |
Ricardo Wurmus <address@hidden> skribis:
> attached is a patch that gives us the liberated OpenJDK in the form of
> IcedTea (version 6). IcedTea 6 is built with GCJ. Unfortunately, it
> needs Ant, which cannot be built with GCJ, so it depends on a binary
> bootstrap Ant.
OK.
> There are a couple of issues with this patch set that I'm aware of:
>
> * IcedTea 6 is built without JavaScript support as this would require
> Rhino.
>
> * I'm not happy with replacing the unpack phase and I don't like to
> refer to the OpenJDK source tarball by its full name
> "openjdk-6-src-b34-20_jan_2015.tar.xz". Is there a way around this?
You can just call it whatever you want in the 2nd argument to
‘copy-file’, no?
> * The test suite has been disabled. I have been able to fix most issues
> relating to the build environment (mostly hardcoded paths and
> corrupted PATH variable), but even then many tests fail. One group of
> tests depends on a shell wrapper around Xvfb, which is currently not
> part of the xorg-server package. A considerable number of tests fails
> upstream (see http://builder.classpath.org/icedtea/icedtea6/test/ for
> logs).
OK. I guess you did your best, we’re no substitute for upstream hackers
anyway. ;-)
> * All this patching of tests is really not pretty. I'm not sure if
> there's a better or more concise way to achieve this. I also don't
> know which of these steps should better be implemented as snippets.
>
> * The patch to
> openjdk/jdk/src/share/classes/java/util/CurrencyData.properties
> really should be implemented upstream.
>
> * the make check-* targets do not return a non-zero status code upon
> failure. This doesn't affect us now because tests are disabled
> anyway, but using (and (zero? ...)) is just wishful thinking.
>
> * the synopsis tells us about IcedTea (the build harness), but actually
> what we get after the build is a liberated OpenJDK. The same problem
> affects the description, which probably should describe the purpose of
> OpenJDK instead.
Yeah, probably.
> From 13490591fe7ad774e8ec95626113138d828366fb Mon Sep 17 00:00:00 2001
> From: Ricardo Wurmus <address@hidden>
> Date: Tue, 23 Dec 2014 12:32:25 +0100
> Subject: [PATCH] gnu: Add IcedTea 6
>
> * gnu/packages/java.scm: New file.
> * gnu-system.am (GNU_SYSTEM_MODULES): Add it.
[...]
> + `(;; There are many failing tests.
You can add that many are known to fail upstream.
[...]
> + 'unpack
> + (lambda* (#:key source inputs #:allow-other-keys)
> + (let ((target (string-append ,name "-" ,version)))
> + (and (zero? (system* "tar" "xvf" source))
> + (zero? (system* "tar" "xvjf" (assoc-ref inputs
> "ant-bootstrap")))
> + (chdir target))
> + (mkdir "openjdk")
> + (with-directory-excursion "openjdk"
> + (copy-file (assoc-ref inputs "openjdk6-src")
> + "openjdk-6-src-b34-20_jan_2015.tar.xz")
> + (system* "tar" "xvf" "openjdk-6-src-b34-20_jan_2015.tar.xz"))))
(zero? (system* ...))
> + (substitute* "Makefile.in"
> + ;; link against libgcj to avoid linker error
> + (("-o native-ecj")
> + "-lgcj -o native-ecj")
> + ;; do not leak information about the build host
> + (("DISTRIBUTION_ID=\"\\$\\(DIST_ID\\)\"")
> + "DISTRIBUTION_ID=\"\\\"guix\\\"\""))
This could go to ‘snippet’ because it’s independent of the inputs used
for the build, but do whatever seems most appropriate to you in terms of
structure.
[...]
> + ;; JDK tests
> + (with-directory-excursion "openjdk/jdk/test/"
> + (substitute* "com/sun/jdi/JdbReadTwiceTest.sh"
> + (("/bin/pwd") (which "pwd")))
> + (substitute* "com/sun/jdi/ShellScaffold.sh"
> + (("/bin/kill") (which "kill")))
> + (substitute* "start-Xvfb.sh"
> + (("/usr/bin/X11/Xvfb") (which "Xvfb"))
> + (("/usr/bin/nohup") (which "nohup")))
> + (substitute* "javax/security/auth/Subject/doAs/Test.sh"
> + (("/bin/rm") (which "rm")))
Maybe something coarser would work as well:
(substitute* (find-files "openjdk/jdk/test" ".")
(("/usr/bin/([[:graphic:]]+)" _ command)
(or (which command) command))
(("/bin/([[:graphic:]]+)" _ command)
(or (which command) command)))
WDYT?
> + (alist-replace
> + 'check
> + (lambda _
> + (and (zero? (system* "make" "check-hotspot"))
> + (zero? (system* "make" "check-langtools"))
> + (zero? (system* "make" "check-jdk"))))
Maybe add a comment that the check- targets always return zero?
> + (synopsis "A harness to build OpenJDK using Free Software build tools")
“Java development kit”?
> + (description
> + "The IcedTea project provides a harness to build the source code from
> +http://openjdk.java.net using Free Software build tools along with additional
> +features such as a Free Software plugin and web start implementation and an
> +LLVM-based JIT.")
No good idea here. :-)
I remember spending hours on this in my Nix days, so a big thanks, and
congratulations for getting this far!
Ludo’.