From: Maxim Cournoyer <maxim.cournoyer@gmail.com>
To: "Dr. Arne Babenhauserheide" <arne_bab@web.de>
Cc: 65926-done@debbugs.gnu.org
Subject: bug#65926: package openjdk 20.0.2 and release-candidate 21+35 and add helpers for that
Date: Sun, 21 Jan 2024 00:34:09 -0500 [thread overview]
Message-ID: <87v87n9rn2.fsf@gmail.com> (raw)
In-Reply-To: <87cyylu9bi.fsf@web.de> (Arne Babenhauserheide's message of "Wed, 13 Sep 2023 22:04:37 +0200")
Hello!
"Dr. Arne Babenhauserheide" <arne_bab@web.de> writes:
> Hi,
>
> attached are patches to add helpers and package openjdk 20.0.2 and
> 21+35.
>
> The 21+35 package skips the validation of the runpath, because that
> fails. I don’t know why.
>
> From e72a8ec42a4d4a199711c0abf7960f8caeab5c1e Mon Sep 17 00:00:00 2001
> Message-ID: <e72a8ec42a4d4a199711c0abf7960f8caeab5c1e.1694635452.git.arne_bab@web.de>
> From: Arne Babenhauserheide <arne_bab@web.de>
> Date: Wed, 13 Sep 2023 21:59:25 +0200
> Subject: [PATCH 1/4] Add version-prefix-+ for versions with + as separator of
> the build
>
> * guix/utils.scm (version-prefix-+): new procedure
It seems all of your series got sent as a single diff, instead of
multiple messages. Apply it with 'git am' only applies the first
commit. Am I missing something?
> ---
> guix/utils.scm | 6 ++++++
> 1 file changed, 6 insertions(+)
>
> diff --git a/guix/utils.scm b/guix/utils.scm
> index e9af33bdeb..2993b31a5c 100644
> --- a/guix/utils.scm
> +++ b/guix/utils.scm
> @@ -116,6 +116,7 @@ (define-module (guix utils)
> version>?
> version>=?
> version-prefix
> + version-prefix-+
> version-major+minor+point
> version-major+minor
> version-major
> @@ -822,6 +823,11 @@ (define (version-major version-string)
> "Return the major version number as string from the version-string."
> (version-prefix version-string 1))
>
> +(define (version-prefix-+ version-string)
> + "Truncate version-string to leave out a suffix appended with +.
> +For example, (version-prefix-+ \"21+35\" returns \"21\""
> + (string-join (take (string-split version-string #\+) 1) "+"))
This is probably odd enough to be better defined in java.scm, but see
below.
[...]
> Subject: [PATCH 2/4] Add syntax make-openjdk-release-candidate for versions
> like 21+35
>
> * gnu/packages/java.scm (make-openjdk-release-candidate): new procedure
I'm not sure we want this in Guix proper; it'd be good for a bleeding
edge java channel, perhaps?
]
> gnu/packages/java.scm | 39 +++++++++++++++++++++++++++++++++++++++
> 1 file changed, 39 insertions(+)
>
> diff --git a/gnu/packages/java.scm b/gnu/packages/java.scm
> index f7464e2168..0c22f4def9 100644
> --- a/gnu/packages/java.scm
> +++ b/gnu/packages/java.scm
> @@ -1431,6 +1431,45 @@ (define-syntax make-openjdk
> field
> ...)))))))
>
> +(define-syntax make-openjdk-release-candidate
> + ;; Return an OpenJDK package at VERSION with checksum HASH, using BOOTSTRAP,
> + ;; the bootstrap package. One or more FIELD can be provided to further
> + ;; refine the package definition; for convenience, the BASE, NAME and
> + ;; VERSION are defined in their scope.
> + (lambda (x)
> + (syntax-case x ()
> + ((_ bootstrap version* hash field ...)
> + (with-syntax ((base (datum->syntax x 'base))
> + (name (datum->syntax x 'name))
> + (version (datum->syntax x 'version)))
> + #'(let ((base (package
> + (inherit bootstrap)
> + (name "openjdk")
> + (version version*)
> + (source
> + (origin
> + (inherit (package-source bootstrap))
> + (method git-fetch)
> + (uri (git-reference
> + (url (format
> + #f "https://github.com/openjdk/jdk~au"
> + (version-prefix-+ version*)))
> + (commit (string-append "jdk-" version*))))
> + (file-name (git-file-name name version))
> + (sha256 (base32 hash))))
> + (native-inputs
> + (modify-inputs (package-native-inputs bootstrap)
> + (replace "openjdk" bootstrap)))
> + (home-page (string-append
> + "https://openjdk.java.net/projects/jdk/"
> + (version-major version)))))
> + (name "openjdk")
> + (version version*))
> + (package
> + (inherit base)
> + field
> + ...)))))))
> +
Especially since this mostly duplicates the macro from make-openjdk.
> Subject: [PATCH 3/4] Add openjdk 20.0.2
>
> * gnu/packages/java.scm (openjdk20): new package
> ---
> gnu/packages/java.scm | 16 ++++++++++++++++
> 1 file changed, 16 insertions(+)
>
> diff --git a/gnu/packages/java.scm b/gnu/packages/java.scm
> index 0c22f4def9..d541242b73 100644
> --- a/gnu/packages/java.scm
> +++ b/gnu/packages/java.scm
> @@ -1590,6 +1590,22 @@ (define-public openjdk19
> ;;; Convenience alias to point to the latest version of OpenJDK.
> (define-public openjdk openjdk19)
>
> +(define-public openjdk20
> + (make-openjdk openjdk19 "20.0.2"
> + "1af1v2c3d8x4c6shzl6cv9qwq7a4hn5map5pjh9vjcky0hkzd489"
> + (arguments
> + (substitute-keyword-arguments (package-arguments openjdk19)
> + ((#:phases phases)
> + #~(modify-phases #$phases
> + (replace 'fix-java-shebangs
> + (lambda _
> + ;; Update file path.
> + (substitute* "src/java.base/share/data/blockedcertsconverter/blocked.certs.pem"
> + (("^#!.*") "#! java BlockedCertsConverter SHA-256\n"))))
> + (add-before 'configure 'define-java-environment-variables
> + (lambda* (#:key inputs #:allow-other-keys)
> + ;; Fix for "valid range 1980-01-01T00:00:02Z to 2099-12-31T23:59:59Z".
> + (setenv "SOURCE_DATE_EPOCH" "1234567890")))))))))
I see we already have 20 on master. We could simply update it to 20.0.2
with its hash. The two phases above need not be duplicated; they are
attached to the openjdk19 package and inherited.
--
Thanks,
Maxim
prev parent reply other threads:[~2024-01-21 5:35 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-09-13 20:04 bug#65926: package openjdk 20.0.2 and release-candidate 21+35 and add helpers for that Dr. Arne Babenhauserheide
2024-01-21 5:34 ` Maxim Cournoyer [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://guix.gnu.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87v87n9rn2.fsf@gmail.com \
--to=maxim.cournoyer@gmail.com \
--cc=65926-done@debbugs.gnu.org \
--cc=arne_bab@web.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/guix.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).