[PATCH] openjdk 14 package

DoneSubmitted by Michael Zucchi.
Details
3 participants
  • Björn Höfling
  • Michael Zucchi
  • Ricardo Wurmus
Owner
unassigned
Severity
normal
M
M
Michael Zucchi wrote on 28 Apr 2020 03:26
(address . guix-patches@gnu.org)
50eb5354-39d1-ee49-6f4e-78dd26862aa1@gmail.com
This mostly is just a simple copy of openjdk12 with changed links.  openjdk13 is also included as it must be used to bootstrap openjdk14.
openjdk14 uses "help" as a rather poor choice of autoconf test for the availability of a shell builtin and this isn't available in bash-minimal, so a small patch is needed to make configure complete.  I've contacted the openjdk developers with a suggested change but so far have had no response after a couple of business days.
Attachment: file
From 7f8f90eea8c3eb9d104e7d9a865897f2456d14a3 Mon Sep 17 00:00:00 2001From: Not Zed <notzed@gmail.com>Date: Tue, 28 Apr 2020 10:33:46 +0930Subject: [PATCH] * gnu/packages/java.scm (openjdk13, opnejdk14) * gnu/packages/patches/openjdk-14-builtins.patch: Added openjdk 13 and 14.
--- gnu/packages/java.scm | 93 +++++++++++++++++++ .../patches/openjdk-14-builtins.patch | 11 +++ 2 files changed, 104 insertions(+) create mode 100644 gnu/packages/patches/openjdk-14-builtins.patch
Toggle diff (123 lines)diff --git a/gnu/packages/java.scm b/gnu/packages/java.scmindex cab90fb4e7..41c2e3c547 100644--- a/gnu/packages/java.scm+++ b/gnu/packages/java.scm@@ -2250,6 +2250,99 @@ new Date();")) ("zip" ,zip))) (home-page "https://openjdk.java.net/projects/jdk/12"))) +(define-public openjdk13+ (package+ (inherit openjdk11)+ (name "openjdk")+ (version "13.0")+ (source (origin+ (method url-fetch)+ (uri "http://hg.openjdk.java.net/jdk/jdk13/archive/9c250a7600e1.tar.bz2")+ (file-name (string-append name "-" version ".tar.bz2"))+ (sha256+ (base32+ "0v0ljvx5dyzp96dw4z4ksw3pvasil7783mgnmd1wk9gads5ab8iq"))+ (modules '((guix build utils)))+ (snippet+ `(begin+ (for-each delete-file (find-files "." ".*.bin$"))+ (for-each delete-file (find-files "." ".*.exe$"))+ (for-each delete-file (find-files "." ".*.jar$"))+ #t))))+ (inputs+ `(("alsa-lib" ,alsa-lib)+ ("cups" ,cups)+ ("fontconfig" ,fontconfig)+ ("freetype" ,freetype)+ ("giflib" ,giflib)+ ("lcms" ,lcms)+ ("libjpeg" ,libjpeg)+ ("libpng" ,libpng)+ ("libx11" ,libx11)+ ("libxext" ,libxext)+ ("libxrandr" ,libxrandr)+ ("libxrender" ,libxrender)+ ("libxt" ,libxt)+ ("libxtst" ,libxtst)))+ ;; openjdk13 must be bootstrapped with java 12 or 13+ (native-inputs+ `(("autoconf" ,autoconf)+ ("openjdk12" ,openjdk11)+ ("openjdk12:jdk" ,openjdk12 "jdk")+ ("pkg-config" ,pkg-config)+ ("unzip" ,unzip)+ ("which" ,which)+ ("zip" ,zip)))+ (home-page "https://openjdk.java.net/projects/jdk/13")))++(define-public openjdk14+ (package+ (inherit openjdk11)+ (name "openjdk")+ (version "14.0")+ (source (origin+ (method url-fetch)+ (uri "http://hg.openjdk.java.net/jdk/jdk14/archive/bc54620a3848.tar.bz2")+ (file-name (string-append name "-" version ".tar.bz2"))+ (sha256+ (base32+ "0z485pk7r1xpw8004g4nrwrzj17sabgx8yfdbxwfvzkjp8qyajch"))+ ;; openjdk14 autoconf uses 'help' to search for builtins, not available in bash-minimal+ (patches+ (search-patches "openjdk-14-builtins.patch"))+ (modules '((guix build utils)))+ (snippet+ `(begin+ (for-each delete-file (find-files "." ".*.bin$"))+ (for-each delete-file (find-files "." ".*.exe$"))+ (for-each delete-file (find-files "." ".*.jar$"))+ #t))))+ (inputs+ `(("alsa-lib" ,alsa-lib)+ ("cups" ,cups)+ ("fontconfig" ,fontconfig)+ ("freetype" ,freetype)+ ("giflib" ,giflib)+ ("lcms" ,lcms)+ ("libjpeg" ,libjpeg)+ ("libpng" ,libpng)+ ("libx11" ,libx11)+ ("libxext" ,libxext)+ ("libxrandr" ,libxrandr)+ ("libxrender" ,libxrender)+ ("libxt" ,libxt)+ ("libxtst" ,libxtst)))+ ;; openjdk14 must be bootstrapped with java 13 or 14+ (native-inputs+ `(("autoconf" ,autoconf)+ ("openjdk13" ,openjdk11)+ ("openjdk13:jdk" ,openjdk13 "jdk")+ ("pkg-config" ,pkg-config)+ ("unzip" ,unzip)+ ("which" ,which)+ ("zip" ,zip)))+ (home-page "https://openjdk.java.net/projects/jdk/14")))+ (define-public icedtea icedtea-8) diff --git a/gnu/packages/patches/openjdk-14-builtins.patch b/gnu/packages/patches/openjdk-14-builtins.patchnew file mode 100644index 0000000000..0e7e3dcaa9--- /dev/null+++ b/gnu/packages/patches/openjdk-14-builtins.patch@@ -0,0 +1,11 @@+--- jdk14-bc54620a3848/make/autoconf/basics.m4 2020-02-07 04:40:54.000000000 +1030++++ jdk14-bc54620a3848-new/make/autoconf/basics.m4 2020-04-24 10:59:33.056098506 +0930+@@ -583,7 +583,7 @@+ BASIC_SETUP_TOOL($1, [AC_PATH_PROGS($1, $2, , $3)])+ if test "x[$]$1" = x; then+ AC_MSG_NOTICE([Required tool $2 not found in PATH, checking built-in])+- if help $2 > /dev/null 2>&1; then++ if command -v $2 > /dev/null 2>&1; then+ AC_MSG_NOTICE([Found $2 as shell built-in. Using it])+ $1="$2"+ else-- 2.26.2
M
M
Michael Zucchi wrote on 28 Apr 2020 03:34
update
(address . 40918@debbugs.gnu.org)
f4ffbad3-5c18-df40-2b79-60710a20ead6@gmail.com
Sorry I missed a response from openjdk about the requested config change so I will follow that up and create another patch once it has filtered through their system since that shouldn't need a config patch to work.
Attachment: file
B
B
Björn Höfling wrote on 29 Apr 2020 00:38
Re: [bug#40918] [PATCH] openjdk 14 package
(name . Michael Zucchi)(address . notzed@gmail.com)(address . 40918@debbugs.gnu.org)
20200429003859.3abd5a7a@alma-ubu
On Tue, 28 Apr 2020 10:56:55 +0930Michael Zucchi <notzed@gmail.com> wrote:
Toggle quote (12 lines)> > This mostly is just a simple copy of openjdk12 with changed links.  > openjdk13 is also included as it must be used to bootstrap openjdk14.> > openjdk14 uses "help" as a rather poor choice of autoconf test for> the availability of a shell builtin and this isn't available in > bash-minimal, so a small patch is needed to make configure complete.  > I've contacted the openjdk developers with a suggested change but so> far have had no response after a couple of business days.> >
Hi Michael,
thank you for your patch.
When sending in the second version of yourpatch, could you please split up the commits, having one distinctcommit per added/changed package.
Please update your commit message according to the Changelog-style. Youwill find examples in the old commit logs, for example for how to addthe patch-file.
Excited to see your second version,
Björn
-----BEGIN PGP SIGNATURE-----
iF0EARECAB0WIQQiGUP0np8nb5SZM4K/KGy2WT5f/QUCXqiwhAAKCRC/KGy2WT5f/SWpAKC7FtMhlT7o8UFPWPS/zFR4DoSekwCfVf7ellcu5tA+C0yAyec2VS+OAE4==+a/0-----END PGP SIGNATURE-----

M
M
Michael Zucchi wrote on 29 Apr 2020 01:47
(name . Björn Höfling)(address . bjoern.hoefling@bjoernhoefling.de)(address . 40918@debbugs.gnu.org)
db218c03-eed0-f10d-60a2-88af45e56165@gmail.com
On 29/4/20 8:08 am, Björn Höfling wrote:
Toggle quote (32 lines)> On Tue, 28 Apr 2020 10:56:55 +0930> Michael Zucchi <notzed@gmail.com> wrote:>>> This mostly is just a simple copy of openjdk12 with changed links.>> openjdk13 is also included as it must be used to bootstrap openjdk14.>>>> openjdk14 uses "help" as a rather poor choice of autoconf test for>> the availability of a shell builtin and this isn't available in>> bash-minimal, so a small patch is needed to make configure complete.>> I've contacted the openjdk developers with a suggested change but so>> far have had no response after a couple of business days.>>>>> Hi Michael,>> thank you for your patch.>> When sending in the second version of your> patch, could you please split up the commits, having one distinct> commit per added/changed package.>> Please update your commit message according to the Changelog-style. You> will find examples in the old commit logs, for example for how to add> the patch-file.>> Excited to see your second version,>> Björn>


I'm sorry i don't understand your second point, i used emacs changelog mode to create the commit message.
B
B
Björn Höfling wrote on 29 Apr 2020 23:01
(name . Michael Zucchi)(address . notzed@gmail.com)(address . 40918@debbugs.gnu.org)
20200429230155.0e4f53d9@alma-ubu
Hi Michael,
On Wed, 29 Apr 2020 09:17:22 +0930Michael Zucchi <notzed@gmail.com> wrote:
Toggle quote (7 lines)> > Please update your commit message according to the Changelog-style.> > You will find examples in the old commit logs, for example for how> > to add the patch-file.
> I'm sorry i don't understand your second point, i used emacs> changelog mode to create the commit message.
Let me try to explain that in more details. Guix is the pickiestproject I came along when it comes to commit messages. It took me awhile to get used to it. So please this shouldn't be a show-stopper foryou :-) In the end, a commiter can/will correct it.
Your git log consists of only one line:
* gnu/packages/java.scm (openjdk13, opnejdk14) * gnu/packages/patches/openjdk-14-builtins.patch: Added openjdk 13 and 14.
I would have expected something like:
----BEGIN EXAMPLE---gnu: Add openjdk14.
* gnu/packages/java.scm (openjdk14): New variable.* gnu/packages/patches/openjdk...patch: New file.* gnu/local.mk (dist_patch_DATA): Add it.----END EXAMPLE---
So you really document every file you add, every variable/locationwhere you change something.
It is somewhat explained here, but at best look through older commits:
https://guix.gnu.org/manual/en/html_node/Submitting-Patches.html#Submitting-Patcheshttps://www.gnu.org/prep/standards/html_node/Change-Logs.html#Change-Logs
Hope this explains it better,
Björn
-----BEGIN PGP SIGNATURE-----
iF0EARECAB0WIQQiGUP0np8nb5SZM4K/KGy2WT5f/QUCXqnrQwAKCRC/KGy2WT5f/c/zAKC4cWym22SW9/KCknlAKmt0L1nNYgCbBi9nsLCHmR3ou+CDrxjrUYW7I3M==ii1c-----END PGP SIGNATURE-----

R
R
Ricardo Wurmus wrote on 16 May 2020 11:54
(name . Björn Höfling)(address . bjoern.hoefling@bjoernhoefling.de)
87wo5cgq86.fsf@elephly.net
Hi Michael,
thank you for your contribution!
I’ve split the commit into two (one for each package addition), replacedthe patch with a substitution, simplified the snippet, removed unusedinputs, used libjpeg-turbo instead of libjpeg, and corrected the commitmessage.
I’ve pushed the two commits to the master branch:
Toggle snippet (19 lines)commit 65a11a59de86fa759f2ffbb7db53430a6727c2eaAuthor: Not Zed <notzed@gmail.com>
gnu: Add openjdk14. * gnu/packages/java.scm (openjdk14): New variable. Signed-off-by: Ricardo Wurmus <rekado@elephly.net>
commit c4618174ecb6375849529f1d1026585817bb139eAuthor: Not Zed <notzed@gmail.com>
gnu: Add openjdk13. * gnu/packages/java.scm (openjdk13): New variable. Signed-off-by: Ricardo Wurmus <rekado@elephly.net>
Thanks again!
-- Ricardo
Closed
?
Your comment

Commenting via the web interface is currently disabled.

To comment on this conversation send email to 40918@debbugs.gnu.org