* [bug#72508] [PATCH 0/5] Erlang update to 27.0.1.
@ 2024-08-07 8:10 Igor Goryachev via Guix-patches via
2024-08-07 8:23 ` [bug#72508] [PATCH 1/5] gnu: erlang-jsx: Fix tests under Erlang 27+ Igor Goryachev via Guix-patches via
` (6 more replies)
0 siblings, 7 replies; 13+ messages in thread
From: Igor Goryachev via Guix-patches via @ 2024-08-07 8:10 UTC (permalink / raw)
To: 72508; +Cc: Igor Goryachev
Erlang package was cleaned up, updated to version 27.0.1 and several fixes/hacks were performed to make it deterministic by modifying its bootstrap.
Igor Goryachev (5):
gnu: erlang-jsx: Fix tests under Erlang 27+.
gnu: erlang-yamerl: Update to 0.10.0.a24f448.
gnu: erlang-jose: Relax build options.
gnu: ejabberd: Include jiffy dependence under Erlang 27.
gnu: erlang: Update to 27.0.1.
gnu/packages/erlang-xyz.scm | 12 +++++
gnu/packages/erlang.scm | 91 +++++++++++++++++++++----------------
gnu/packages/messaging.scm | 3 ++
3 files changed, 68 insertions(+), 38 deletions(-)
base-commit: 5e567587dd4abf51f9a6fa44f5a852dde1115ce9
--
2.45.2
^ permalink raw reply [flat|nested] 13+ messages in thread
* [bug#72508] [PATCH 1/5] gnu: erlang-jsx: Fix tests under Erlang 27+.
2024-08-07 8:10 [bug#72508] [PATCH 0/5] Erlang update to 27.0.1 Igor Goryachev via Guix-patches via
@ 2024-08-07 8:23 ` Igor Goryachev via Guix-patches via
2024-08-07 8:23 ` [bug#72508] [PATCH 2/5] gnu: erlang-yamerl: Update to 0.10.0.a24f448 Igor Goryachev via Guix-patches via
` (5 subsequent siblings)
6 siblings, 0 replies; 13+ messages in thread
From: Igor Goryachev via Guix-patches via @ 2024-08-07 8:23 UTC (permalink / raw)
To: 72508; +Cc: Igor Goryachev, Andrew Tropin
* gnu/packages/erlang.scm (erlang-jsx): Fix tests under Erlang 27+.
Change-Id: Iaade94de64b5e5837a6a54376ba946c20d7107b9
---
gnu/packages/erlang.scm | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/gnu/packages/erlang.scm b/gnu/packages/erlang.scm
index b6a31f26e9..60d644ab8d 100644
--- a/gnu/packages/erlang.scm
+++ b/gnu/packages/erlang.scm
@@ -541,6 +541,16 @@ (define-public erlang-jsx
(base32
"1wr7jkxm6nlgvd52xhniav64xr9rml2ngb35rwjwqlqvq7ywhp0c"))))
(build-system rebar-build-system)
+ (arguments
+ `(#:phases
+ (modify-phases %standard-phases
+ ;; Fix tests for running under Erlang 27+.
+ (add-after 'unpack 'fix-tests-for-erlang-27
+ (lambda _
+ (substitute* "src/jsx_decoder.erl"
+ (("\\{\"-0\\.0\", \\[\\{float, 0\\.0\\}, end_json\\], <<\"-0\\.0\">>\\},")
+ "{\"0.0\", [{float, 0.0}, end_json], <<\"0.0\">>},
+{\"-0.0\", [{float, -0.0}, end_json], <<\"-0.0\">>},")))))))
(synopsis "Streaming, evented JSON parsing toolkit")
(description
"An Erlang application for consuming, producing and manipulating json.")
--
2.45.2
^ permalink raw reply related [flat|nested] 13+ messages in thread
* [bug#72508] [PATCH 2/5] gnu: erlang-yamerl: Update to 0.10.0.a24f448.
2024-08-07 8:10 [bug#72508] [PATCH 0/5] Erlang update to 27.0.1 Igor Goryachev via Guix-patches via
2024-08-07 8:23 ` [bug#72508] [PATCH 1/5] gnu: erlang-jsx: Fix tests under Erlang 27+ Igor Goryachev via Guix-patches via
@ 2024-08-07 8:23 ` Igor Goryachev via Guix-patches via
2024-08-07 15:49 ` Andrew Tropin via Guix-patches via
2024-08-07 8:23 ` [bug#72508] [PATCH 3/5] gnu: erlang-jose: Relax build options Igor Goryachev via Guix-patches via
` (4 subsequent siblings)
6 siblings, 1 reply; 13+ messages in thread
From: Igor Goryachev via Guix-patches via @ 2024-08-07 8:23 UTC (permalink / raw)
To: 72508; +Cc: Igor Goryachev, Andrew Tropin
* gnu/packages/erlang.scm (erlang-yamerl): Update to 0.10.0.a24f448.
Change-Id: Ib279881ff14e6e46ef639c1bcbc53706fa55aef6
---
gnu/packages/erlang.scm | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/gnu/packages/erlang.scm b/gnu/packages/erlang.scm
index 60d644ab8d..2452fd88ab 100644
--- a/gnu/packages/erlang.scm
+++ b/gnu/packages/erlang.scm
@@ -292,17 +292,18 @@ (define-public erlang-cf
(define-public erlang-yamerl
(package
(name "erlang-yamerl")
- (version "0.10.0")
+ (version "0.10.0.a24f448")
(source
(origin
(method git-fetch)
(uri (git-reference
;; There are no tests included on Hex.
(url "https://github.com/yakaz/yamerl")
- (commit (string-append "v" version))))
+ ;; Fetching commit which includes Erlang 27+ related fixes.
+ (commit "a24f448c0a8084f70b751dc38621047e56fb53cc")))
(file-name (git-file-name name version))
(sha256
- (base32 "0if8abgmispcfk7zhd0a5dndzwzbsmqrbyrm5shk375r2dbbwak6"))))
+ (base32 "1csq0z4igyybjgmrynz4d49ysv437iyd2xzkhifb5x47lpdpfpkq"))))
(build-system rebar-build-system)
(synopsis "YAML and JSON parser in pure Erlang")
(description
--
2.45.2
^ permalink raw reply related [flat|nested] 13+ messages in thread
* [bug#72508] [PATCH 3/5] gnu: erlang-jose: Relax build options.
2024-08-07 8:10 [bug#72508] [PATCH 0/5] Erlang update to 27.0.1 Igor Goryachev via Guix-patches via
2024-08-07 8:23 ` [bug#72508] [PATCH 1/5] gnu: erlang-jsx: Fix tests under Erlang 27+ Igor Goryachev via Guix-patches via
2024-08-07 8:23 ` [bug#72508] [PATCH 2/5] gnu: erlang-yamerl: Update to 0.10.0.a24f448 Igor Goryachev via Guix-patches via
@ 2024-08-07 8:23 ` Igor Goryachev via Guix-patches via
2024-08-07 8:23 ` [bug#72508] [PATCH 4/5] gnu: ejabberd: Include jiffy dependence under Erlang 27 Igor Goryachev via Guix-patches via
` (3 subsequent siblings)
6 siblings, 0 replies; 13+ messages in thread
From: Igor Goryachev via Guix-patches via @ 2024-08-07 8:23 UTC (permalink / raw)
To: 72508; +Cc: Igor Goryachev, Andrew Tropin
* gnu/packages/erlang-xyz.scm (erlang-jose): Relax build options.
Change-Id: I0e90cb54558260aea07bc33a11a2ab56261a20bf
---
gnu/packages/erlang-xyz.scm | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/gnu/packages/erlang-xyz.scm b/gnu/packages/erlang-xyz.scm
index 5661bf52dd..6f1c033aec 100644
--- a/gnu/packages/erlang-xyz.scm
+++ b/gnu/packages/erlang-xyz.scm
@@ -59,6 +59,18 @@ (define-public erlang-jose
(sha256
(base32 "0576jdjygby37qmzrs8cm5l6n622b0mi3z28j6r4s5xsz1px6v0d"))))
(build-system rebar-build-system)
+ (arguments
+ (list
+ #:phases
+ #~(modify-phases %standard-phases
+ ;; Do not treat warnings as errors, for more info see:
+ ;; https://github.com/potatosalad/erlang-jose/issues/168
+ (add-after 'unpack 'relax-build-options
+ (lambda _
+ (substitute* "rebar.config"
+ (("debug_info,") "debug_info"))
+ (substitute* "rebar.config"
+ (("warnings_as_errors") "")))))))
(synopsis
"JSON Object Signing and Encryption for Erlang and Elixir")
(description
--
2.45.2
^ permalink raw reply related [flat|nested] 13+ messages in thread
* [bug#72508] [PATCH 4/5] gnu: ejabberd: Include jiffy dependence under Erlang 27.
2024-08-07 8:10 [bug#72508] [PATCH 0/5] Erlang update to 27.0.1 Igor Goryachev via Guix-patches via
` (2 preceding siblings ...)
2024-08-07 8:23 ` [bug#72508] [PATCH 3/5] gnu: erlang-jose: Relax build options Igor Goryachev via Guix-patches via
@ 2024-08-07 8:23 ` Igor Goryachev via Guix-patches via
2024-08-07 8:23 ` [bug#72508] [PATCH 5/5] gnu: erlang: Update to 27.0.1 Igor Goryachev via Guix-patches via
` (2 subsequent siblings)
6 siblings, 0 replies; 13+ messages in thread
From: Igor Goryachev via Guix-patches via @ 2024-08-07 8:23 UTC (permalink / raw)
To: 72508; +Cc: Igor Goryachev, Andrew Tropin
* gnu/packages/messaging.scm (ejabberd): Include jiffy dependence under Erlang 27.
Change-Id: Id0b0e7acb8100b406a6c686227dd497e0d7434fd
---
gnu/packages/messaging.scm | 3 +++
1 file changed, 3 insertions(+)
diff --git a/gnu/packages/messaging.scm b/gnu/packages/messaging.scm
index fb80866791..da04c34636 100644
--- a/gnu/packages/messaging.scm
+++ b/gnu/packages/messaging.scm
@@ -3706,6 +3706,9 @@ (define-public ejabberd
(substitute* "rebar.config"
(("\\{copy, \"rel/files/erl\",")
"%{copy, \"rel/files/erl\","))
+ ;; It seems ejabberd still needs jiffy due to p1_acme.
+ (substitute* "rebar.config"
+ (("\\{if_version_below, \"27\",") "{if_version_below, \"30\","))
;; Unpin pinned dependences.
(substitute* "rebar.lock"
((",1\\}") ",0}"))
--
2.45.2
^ permalink raw reply related [flat|nested] 13+ messages in thread
* [bug#72508] [PATCH 5/5] gnu: erlang: Update to 27.0.1.
2024-08-07 8:10 [bug#72508] [PATCH 0/5] Erlang update to 27.0.1 Igor Goryachev via Guix-patches via
` (3 preceding siblings ...)
2024-08-07 8:23 ` [bug#72508] [PATCH 4/5] gnu: ejabberd: Include jiffy dependence under Erlang 27 Igor Goryachev via Guix-patches via
@ 2024-08-07 8:23 ` Igor Goryachev via Guix-patches via
2024-08-07 16:32 ` [bug#72508] [PATCH v2 1/5] gnu: erlang-jsx: Fix tests under Erlang 27+ Igor Goryachev via Guix-patches via
2024-08-09 1:01 ` [bug#72508] [PATCH 0/5] Erlang update " Andrew Tropin via Guix-patches via
6 siblings, 0 replies; 13+ messages in thread
From: Igor Goryachev via Guix-patches via @ 2024-08-07 8:23 UTC (permalink / raw)
To: 72508; +Cc: Igor Goryachev, Andrew Tropin
* gnu/packages/erlang.scm (erlang): Update to 27.0.1.
Change-Id: Ic603c441cc304ef460e2559c57d765d7e499aad5
---
gnu/packages/erlang.scm | 74 ++++++++++++++++++++++-------------------
1 file changed, 39 insertions(+), 35 deletions(-)
diff --git a/gnu/packages/erlang.scm b/gnu/packages/erlang.scm
index 2452fd88ab..793f311376 100644
--- a/gnu/packages/erlang.scm
+++ b/gnu/packages/erlang.scm
@@ -49,7 +49,7 @@ (define-module (gnu packages erlang)
(define-public erlang
(package
(name "erlang")
- (version "26.2.5")
+ (version "27.0.1")
(source (origin
(method git-fetch)
;; The tarball from http://erlang.org/download contains many
@@ -61,7 +61,7 @@ (define-public erlang
(file-name (git-file-name name version))
(sha256
(base32
- "0hd4flm9x8254rcv8hj0hra5lh5n51vcpharxy2d1ph8059vfsmx"))
+ "1gzlvbbc1zm87910pnhi94mcpag1zxylhy7m2g4vhlmclyir7gd1"))
(patches (search-patches "erlang-man-path.patch"))))
(build-system gnu-build-system)
(native-inputs
@@ -69,13 +69,17 @@ (define-public erlang
;; Erlang's documentation is distributed in a separate tarball.
("erlang-manpages"
- ,(origin
- (method url-fetch)
- (uri (string-append "https://github.com/erlang/otp/releases/download"
- "/OTP-" version "/otp_doc_man_" version ".tar.gz"))
- (sha256
- (base32
- "08ngil8578asjzmqa657l4zdy0cr0h9spkg88wp9kxl95bfyli8p"))))))
+ ;; Manpages tarball is not released for 27.0.1, so we take it from the
+ ;; previous version. Details:
+ ;; https://erlangforums.com/t/patch-package-otp-27-0-1-released/3824/4
+ ,(let ((version "27.0"))
+ (origin
+ (method url-fetch)
+ (uri (string-append "https://github.com/erlang/otp/releases/download"
+ "/OTP-" version "/otp_doc_man_" version ".tar.gz"))
+ (sha256
+ (base32
+ "0f3w2152090860aci4a38d1bd19c5sslbwadwxc7sjza487fm8lm")))))))
(inputs
(list ncurses openssl wxwidgets))
(propagated-inputs
@@ -84,6 +88,7 @@ (define-public erlang
`(#:test-target "release_tests"
#:configure-flags
(list "--disable-saved-compile-time"
+ "--enable-deterministic-build"
"--enable-dynamic-ssl-lib"
"--enable-native-libs"
"--enable-shared-zlib"
@@ -106,34 +111,22 @@ (define-public erlang
(time-utc->date
(make-time time-utc 0 (string->number
(getenv "SOURCE_DATE_EPOCH"))))))
- (substitute* "lib/reltool/src/reltool_target.erl"
- (("Date = date\\(\\),")
- (string-append "Date = "
- (date->string source-date-epoch
- "'{~Y,~m,~d}',"))))
- (substitute* "lib/reltool/src/reltool_target.erl"
- (("Time = time\\(\\),")
- (string-append "Time = "
- (date->string source-date-epoch
- "'{~H,~M,~S}',"))))
- (substitute* '("lib/reltool/src/reltool_target.erl"
- "lib/sasl/src/systools_make.erl")
- (("date\\(\\), time\\(\\),")
- (date->string source-date-epoch
- "{~Y,~m,~d}, {~H,~M,~S},")))
(substitute* "lib/dialyzer/test/small_SUITE_data/src/gs_make.erl"
(("tuple_to_list\\(date\\(\\)\\),tuple_to_list\\(time\\(\\)\\)")
(date->string
source-date-epoch
- "tuple_to_list({~Y,~m,~d}), tuple_to_list({~H,~M,~S})")))
- (substitute* "lib/snmp/src/compile/snmpc_mib_to_hrl.erl"
- (("\\{Y,Mo,D\\} = date\\(\\),")
- (date->string source-date-epoch
- "{Y,Mo,D} = {~Y,~m,~d},")))
- (substitute* "lib/snmp/src/compile/snmpc_mib_to_hrl.erl"
- (("\\{H,Mi,S\\} = time\\(\\),")
- (date->string source-date-epoch
- "{H,Mi,S} = {~H,~M,~S},"))))))
+ "tuple_to_list({~Y,~m,~d}), tuple_to_list({~H,~M,~S})"))))))
+ ;; When compiling with 'deterministic' option the important meta
+ ;; information is still needed for some Erlang's dependants, such as
+ ;; Elixir. We make compiler to preserve it.
+ ;; For more info see: https://github.com/erlang/otp/issues/8602
+ (add-after 'unpack 'preserve-source-meta
+ (lambda _
+ (substitute* "lib/compiler/src/compile.erl"
+ (("\\[\\{source,Source\\} \\| Info0\\];")
+ "[{source,Source} | Info0];
+ [_|_] = Source when IsDeterministic ->
+ [{source,Source} | Info0];"))))
(add-after 'unpack 'patch-/bin/sh
(lambda* (#:key inputs #:allow-other-keys)
(let ((sh (search-input-file inputs "/bin/sh")))
@@ -160,10 +153,21 @@ (define-public erlang
"lib/reltool/examples/display_args"
"lib/reltool/examples/mnesia_core_dump_viewer"
"lib/snmp/src/compile/snmpc.src"
- "make/verify_runtime_dependencies"
- "make/emd2exml.in"))))
+ "make/verify_runtime_dependencies"))))
(substitute* escripts
(("/usr/bin/env") (which "env"))))))
+ ;; Copy modified compiler to bootstrap. It is deterministic, but
+ ;; preserves 'source' meta information to be used by dependants
+ ;; of Erlang.
+ (add-after 'build 'copy-modified-compiler
+ (lambda _
+ (copy-recursively "lib/compiler/ebin/compile.beam"
+ "bootstrap/lib/compiler/ebin/compile.beam")))
+ ;; ... clean everything and rebuild with modified bootstrap.
+ (add-after 'copy-modified-compiler 'clean-and-make-again
+ (lambda _
+ (invoke "make" "clean")
+ (invoke "make")))
(add-before 'configure 'set-erl-top
(lambda _
(setenv "ERL_TOP" (getcwd))))
--
2.45.2
^ permalink raw reply related [flat|nested] 13+ messages in thread
* [bug#72508] [PATCH 2/5] gnu: erlang-yamerl: Update to 0.10.0.a24f448.
2024-08-07 8:23 ` [bug#72508] [PATCH 2/5] gnu: erlang-yamerl: Update to 0.10.0.a24f448 Igor Goryachev via Guix-patches via
@ 2024-08-07 15:49 ` Andrew Tropin via Guix-patches via
0 siblings, 0 replies; 13+ messages in thread
From: Andrew Tropin via Guix-patches via @ 2024-08-07 15:49 UTC (permalink / raw)
To: 72508; +Cc: Igor Goryachev
[-- Attachment #1: Type: text/plain, Size: 1794 bytes --]
On 2024-08-07 11:23, Igor Goryachev via Guix-patches via wrote:
> * gnu/packages/erlang.scm (erlang-yamerl): Update to 0.10.0.a24f448.
>
> Change-Id: Ib279881ff14e6e46ef639c1bcbc53706fa55aef6
> ---
> gnu/packages/erlang.scm | 7 ++++---
> 1 file changed, 4 insertions(+), 3 deletions(-)
>
> diff --git a/gnu/packages/erlang.scm b/gnu/packages/erlang.scm
> index 60d644ab8d..2452fd88ab 100644
> --- a/gnu/packages/erlang.scm
> +++ b/gnu/packages/erlang.scm
> @@ -292,17 +292,18 @@ (define-public erlang-cf
> (define-public erlang-yamerl
> (package
> (name "erlang-yamerl")
> - (version "0.10.0")
> + (version "0.10.0.a24f448")
Take a look at package examples, with non-release version:
https://git.savannah.gnu.org/cgit/guix.git/tree/gnu/packages/emacs.scm?h=#n560
The revision starts at 0 and get increased every time commit value is
updated. It resets to 0, when the version changes.
Please, adjust to this style and send the whole series as v2.
> (source
> (origin
> (method git-fetch)
> (uri (git-reference
> ;; There are no tests included on Hex.
> (url "https://github.com/yakaz/yamerl")
> - (commit (string-append "v" version))))
> + ;; Fetching commit which includes Erlang 27+ related fixes.
> + (commit "a24f448c0a8084f70b751dc38621047e56fb53cc")))
> (file-name (git-file-name name version))
> (sha256
> - (base32 "0if8abgmispcfk7zhd0a5dndzwzbsmqrbyrm5shk375r2dbbwak6"))))
> + (base32 "1csq0z4igyybjgmrynz4d49ysv437iyd2xzkhifb5x47lpdpfpkq"))))
> (build-system rebar-build-system)
> (synopsis "YAML and JSON parser in pure Erlang")
> (description
--
Best regards,
Andrew Tropin
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 832 bytes --]
^ permalink raw reply [flat|nested] 13+ messages in thread
* [bug#72508] [PATCH v2 1/5] gnu: erlang-jsx: Fix tests under Erlang 27+.
2024-08-07 8:10 [bug#72508] [PATCH 0/5] Erlang update to 27.0.1 Igor Goryachev via Guix-patches via
` (4 preceding siblings ...)
2024-08-07 8:23 ` [bug#72508] [PATCH 5/5] gnu: erlang: Update to 27.0.1 Igor Goryachev via Guix-patches via
@ 2024-08-07 16:32 ` Igor Goryachev via Guix-patches via
2024-08-07 16:32 ` [bug#72508] [PATCH v2 2/5] gnu: erlang-yamerl: Update to 0.10.0-0.a24f448 Igor Goryachev via Guix-patches via
` (3 more replies)
2024-08-09 1:01 ` [bug#72508] [PATCH 0/5] Erlang update " Andrew Tropin via Guix-patches via
6 siblings, 4 replies; 13+ messages in thread
From: Igor Goryachev via Guix-patches via @ 2024-08-07 16:32 UTC (permalink / raw)
To: 72508; +Cc: Igor Goryachev, Andrew Tropin
* gnu/packages/erlang.scm (erlang-jsx): Fix tests under Erlang 27+.
Change-Id: Iaade94de64b5e5837a6a54376ba946c20d7107b9
---
gnu/packages/erlang.scm | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/gnu/packages/erlang.scm b/gnu/packages/erlang.scm
index b6a31f26e9..60d644ab8d 100644
--- a/gnu/packages/erlang.scm
+++ b/gnu/packages/erlang.scm
@@ -541,6 +541,16 @@ (define-public erlang-jsx
(base32
"1wr7jkxm6nlgvd52xhniav64xr9rml2ngb35rwjwqlqvq7ywhp0c"))))
(build-system rebar-build-system)
+ (arguments
+ `(#:phases
+ (modify-phases %standard-phases
+ ;; Fix tests for running under Erlang 27+.
+ (add-after 'unpack 'fix-tests-for-erlang-27
+ (lambda _
+ (substitute* "src/jsx_decoder.erl"
+ (("\\{\"-0\\.0\", \\[\\{float, 0\\.0\\}, end_json\\], <<\"-0\\.0\">>\\},")
+ "{\"0.0\", [{float, 0.0}, end_json], <<\"0.0\">>},
+{\"-0.0\", [{float, -0.0}, end_json], <<\"-0.0\">>},")))))))
(synopsis "Streaming, evented JSON parsing toolkit")
(description
"An Erlang application for consuming, producing and manipulating json.")
base-commit: 5e567587dd4abf51f9a6fa44f5a852dde1115ce9
--
2.45.2
^ permalink raw reply related [flat|nested] 13+ messages in thread
* [bug#72508] [PATCH v2 2/5] gnu: erlang-yamerl: Update to 0.10.0-0.a24f448.
2024-08-07 16:32 ` [bug#72508] [PATCH v2 1/5] gnu: erlang-jsx: Fix tests under Erlang 27+ Igor Goryachev via Guix-patches via
@ 2024-08-07 16:32 ` Igor Goryachev via Guix-patches via
2024-08-07 16:32 ` [bug#72508] [PATCH v2 3/5] gnu: erlang-jose: Relax build options Igor Goryachev via Guix-patches via
` (2 subsequent siblings)
3 siblings, 0 replies; 13+ messages in thread
From: Igor Goryachev via Guix-patches via @ 2024-08-07 16:32 UTC (permalink / raw)
To: 72508; +Cc: Igor Goryachev, Andrew Tropin
* gnu/packages/erlang.scm (erlang-yamerl): Update to 0.10.0-0.a24f448.
Change-Id: Ib279881ff14e6e46ef639c1bcbc53706fa55aef6
---
gnu/packages/erlang.scm | 41 ++++++++++++++++++++++-------------------
1 file changed, 22 insertions(+), 19 deletions(-)
diff --git a/gnu/packages/erlang.scm b/gnu/packages/erlang.scm
index 60d644ab8d..80ec673a56 100644
--- a/gnu/packages/erlang.scm
+++ b/gnu/packages/erlang.scm
@@ -290,26 +290,29 @@ (define-public erlang-cf
(license license:expat)))
(define-public erlang-yamerl
- (package
- (name "erlang-yamerl")
- (version "0.10.0")
- (source
- (origin
- (method git-fetch)
- (uri (git-reference
- ;; There are no tests included on Hex.
- (url "https://github.com/yakaz/yamerl")
- (commit (string-append "v" version))))
- (file-name (git-file-name name version))
- (sha256
- (base32 "0if8abgmispcfk7zhd0a5dndzwzbsmqrbyrm5shk375r2dbbwak6"))))
- (build-system rebar-build-system)
- (synopsis "YAML and JSON parser in pure Erlang")
- (description
- "Erlang application to parse YAML 1.1 and YAML 1.2 documents, as well as
+ (let ((commit "a24f448c0a8084f70b751dc38621047e56fb53cc")
+ (revision "0"))
+ (package
+ (name "erlang-yamerl")
+ (version (git-version "0.10.0" revision commit))
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ ;; There are no tests included on Hex.
+ (url "https://github.com/yakaz/yamerl")
+ ;; Fetching commit which includes Erlang 27+ related fixes.
+ (commit commit)))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32 "1csq0z4igyybjgmrynz4d49ysv437iyd2xzkhifb5x47lpdpfpkq"))))
+ (build-system rebar-build-system)
+ (synopsis "YAML and JSON parser in pure Erlang")
+ (description
+ "Erlang application to parse YAML 1.1 and YAML 1.2 documents, as well as
JSON documents.")
- (home-page "https://hexdocs.pm/yamerl/")
- (license license:bsd-2)))
+ (home-page "https://hexdocs.pm/yamerl/")
+ (license license:bsd-2))))
(define-public erlang-covertool
(package
--
2.45.2
^ permalink raw reply related [flat|nested] 13+ messages in thread
* [bug#72508] [PATCH v2 3/5] gnu: erlang-jose: Relax build options.
2024-08-07 16:32 ` [bug#72508] [PATCH v2 1/5] gnu: erlang-jsx: Fix tests under Erlang 27+ Igor Goryachev via Guix-patches via
2024-08-07 16:32 ` [bug#72508] [PATCH v2 2/5] gnu: erlang-yamerl: Update to 0.10.0-0.a24f448 Igor Goryachev via Guix-patches via
@ 2024-08-07 16:32 ` Igor Goryachev via Guix-patches via
2024-08-07 16:32 ` [bug#72508] [PATCH v2 4/5] gnu: ejabberd: Include jiffy dependence under Erlang 27 Igor Goryachev via Guix-patches via
2024-08-07 16:32 ` [bug#72508] [PATCH v2 5/5] gnu: erlang: Update to 27.0.1 Igor Goryachev via Guix-patches via
3 siblings, 0 replies; 13+ messages in thread
From: Igor Goryachev via Guix-patches via @ 2024-08-07 16:32 UTC (permalink / raw)
To: 72508; +Cc: Igor Goryachev, Andrew Tropin
* gnu/packages/erlang-xyz.scm (erlang-jose): Relax build options.
Change-Id: I0e90cb54558260aea07bc33a11a2ab56261a20bf
---
gnu/packages/erlang-xyz.scm | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/gnu/packages/erlang-xyz.scm b/gnu/packages/erlang-xyz.scm
index 5661bf52dd..6f1c033aec 100644
--- a/gnu/packages/erlang-xyz.scm
+++ b/gnu/packages/erlang-xyz.scm
@@ -59,6 +59,18 @@ (define-public erlang-jose
(sha256
(base32 "0576jdjygby37qmzrs8cm5l6n622b0mi3z28j6r4s5xsz1px6v0d"))))
(build-system rebar-build-system)
+ (arguments
+ (list
+ #:phases
+ #~(modify-phases %standard-phases
+ ;; Do not treat warnings as errors, for more info see:
+ ;; https://github.com/potatosalad/erlang-jose/issues/168
+ (add-after 'unpack 'relax-build-options
+ (lambda _
+ (substitute* "rebar.config"
+ (("debug_info,") "debug_info"))
+ (substitute* "rebar.config"
+ (("warnings_as_errors") "")))))))
(synopsis
"JSON Object Signing and Encryption for Erlang and Elixir")
(description
--
2.45.2
^ permalink raw reply related [flat|nested] 13+ messages in thread
* [bug#72508] [PATCH v2 4/5] gnu: ejabberd: Include jiffy dependence under Erlang 27.
2024-08-07 16:32 ` [bug#72508] [PATCH v2 1/5] gnu: erlang-jsx: Fix tests under Erlang 27+ Igor Goryachev via Guix-patches via
2024-08-07 16:32 ` [bug#72508] [PATCH v2 2/5] gnu: erlang-yamerl: Update to 0.10.0-0.a24f448 Igor Goryachev via Guix-patches via
2024-08-07 16:32 ` [bug#72508] [PATCH v2 3/5] gnu: erlang-jose: Relax build options Igor Goryachev via Guix-patches via
@ 2024-08-07 16:32 ` Igor Goryachev via Guix-patches via
2024-08-07 16:32 ` [bug#72508] [PATCH v2 5/5] gnu: erlang: Update to 27.0.1 Igor Goryachev via Guix-patches via
3 siblings, 0 replies; 13+ messages in thread
From: Igor Goryachev via Guix-patches via @ 2024-08-07 16:32 UTC (permalink / raw)
To: 72508; +Cc: Igor Goryachev, Andrew Tropin
* gnu/packages/messaging.scm (ejabberd): Include jiffy dependence under Erlang 27.
Change-Id: Id0b0e7acb8100b406a6c686227dd497e0d7434fd
---
gnu/packages/messaging.scm | 3 +++
1 file changed, 3 insertions(+)
diff --git a/gnu/packages/messaging.scm b/gnu/packages/messaging.scm
index fb80866791..da04c34636 100644
--- a/gnu/packages/messaging.scm
+++ b/gnu/packages/messaging.scm
@@ -3706,6 +3706,9 @@ (define-public ejabberd
(substitute* "rebar.config"
(("\\{copy, \"rel/files/erl\",")
"%{copy, \"rel/files/erl\","))
+ ;; It seems ejabberd still needs jiffy due to p1_acme.
+ (substitute* "rebar.config"
+ (("\\{if_version_below, \"27\",") "{if_version_below, \"30\","))
;; Unpin pinned dependences.
(substitute* "rebar.lock"
((",1\\}") ",0}"))
--
2.45.2
^ permalink raw reply related [flat|nested] 13+ messages in thread
* [bug#72508] [PATCH v2 5/5] gnu: erlang: Update to 27.0.1.
2024-08-07 16:32 ` [bug#72508] [PATCH v2 1/5] gnu: erlang-jsx: Fix tests under Erlang 27+ Igor Goryachev via Guix-patches via
` (2 preceding siblings ...)
2024-08-07 16:32 ` [bug#72508] [PATCH v2 4/5] gnu: ejabberd: Include jiffy dependence under Erlang 27 Igor Goryachev via Guix-patches via
@ 2024-08-07 16:32 ` Igor Goryachev via Guix-patches via
3 siblings, 0 replies; 13+ messages in thread
From: Igor Goryachev via Guix-patches via @ 2024-08-07 16:32 UTC (permalink / raw)
To: 72508; +Cc: Igor Goryachev, Andrew Tropin
* gnu/packages/erlang.scm (erlang): Update to 27.0.1.
Change-Id: Ic603c441cc304ef460e2559c57d765d7e499aad5
---
gnu/packages/erlang.scm | 74 ++++++++++++++++++++++-------------------
1 file changed, 39 insertions(+), 35 deletions(-)
diff --git a/gnu/packages/erlang.scm b/gnu/packages/erlang.scm
index 80ec673a56..175bbdf8a5 100644
--- a/gnu/packages/erlang.scm
+++ b/gnu/packages/erlang.scm
@@ -49,7 +49,7 @@ (define-module (gnu packages erlang)
(define-public erlang
(package
(name "erlang")
- (version "26.2.5")
+ (version "27.0.1")
(source (origin
(method git-fetch)
;; The tarball from http://erlang.org/download contains many
@@ -61,7 +61,7 @@ (define-public erlang
(file-name (git-file-name name version))
(sha256
(base32
- "0hd4flm9x8254rcv8hj0hra5lh5n51vcpharxy2d1ph8059vfsmx"))
+ "1gzlvbbc1zm87910pnhi94mcpag1zxylhy7m2g4vhlmclyir7gd1"))
(patches (search-patches "erlang-man-path.patch"))))
(build-system gnu-build-system)
(native-inputs
@@ -69,13 +69,17 @@ (define-public erlang
;; Erlang's documentation is distributed in a separate tarball.
("erlang-manpages"
- ,(origin
- (method url-fetch)
- (uri (string-append "https://github.com/erlang/otp/releases/download"
- "/OTP-" version "/otp_doc_man_" version ".tar.gz"))
- (sha256
- (base32
- "08ngil8578asjzmqa657l4zdy0cr0h9spkg88wp9kxl95bfyli8p"))))))
+ ;; Manpages tarball is not released for 27.0.1, so we take it from the
+ ;; previous version. Details:
+ ;; https://erlangforums.com/t/patch-package-otp-27-0-1-released/3824/4
+ ,(let ((version "27.0"))
+ (origin
+ (method url-fetch)
+ (uri (string-append "https://github.com/erlang/otp/releases/download"
+ "/OTP-" version "/otp_doc_man_" version ".tar.gz"))
+ (sha256
+ (base32
+ "0f3w2152090860aci4a38d1bd19c5sslbwadwxc7sjza487fm8lm")))))))
(inputs
(list ncurses openssl wxwidgets))
(propagated-inputs
@@ -84,6 +88,7 @@ (define-public erlang
`(#:test-target "release_tests"
#:configure-flags
(list "--disable-saved-compile-time"
+ "--enable-deterministic-build"
"--enable-dynamic-ssl-lib"
"--enable-native-libs"
"--enable-shared-zlib"
@@ -106,34 +111,22 @@ (define-public erlang
(time-utc->date
(make-time time-utc 0 (string->number
(getenv "SOURCE_DATE_EPOCH"))))))
- (substitute* "lib/reltool/src/reltool_target.erl"
- (("Date = date\\(\\),")
- (string-append "Date = "
- (date->string source-date-epoch
- "'{~Y,~m,~d}',"))))
- (substitute* "lib/reltool/src/reltool_target.erl"
- (("Time = time\\(\\),")
- (string-append "Time = "
- (date->string source-date-epoch
- "'{~H,~M,~S}',"))))
- (substitute* '("lib/reltool/src/reltool_target.erl"
- "lib/sasl/src/systools_make.erl")
- (("date\\(\\), time\\(\\),")
- (date->string source-date-epoch
- "{~Y,~m,~d}, {~H,~M,~S},")))
(substitute* "lib/dialyzer/test/small_SUITE_data/src/gs_make.erl"
(("tuple_to_list\\(date\\(\\)\\),tuple_to_list\\(time\\(\\)\\)")
(date->string
source-date-epoch
- "tuple_to_list({~Y,~m,~d}), tuple_to_list({~H,~M,~S})")))
- (substitute* "lib/snmp/src/compile/snmpc_mib_to_hrl.erl"
- (("\\{Y,Mo,D\\} = date\\(\\),")
- (date->string source-date-epoch
- "{Y,Mo,D} = {~Y,~m,~d},")))
- (substitute* "lib/snmp/src/compile/snmpc_mib_to_hrl.erl"
- (("\\{H,Mi,S\\} = time\\(\\),")
- (date->string source-date-epoch
- "{H,Mi,S} = {~H,~M,~S},"))))))
+ "tuple_to_list({~Y,~m,~d}), tuple_to_list({~H,~M,~S})"))))))
+ ;; When compiling with 'deterministic' option the important meta
+ ;; information is still needed for some Erlang's dependants, such as
+ ;; Elixir. We make compiler to preserve it.
+ ;; For more info see: https://github.com/erlang/otp/issues/8602
+ (add-after 'unpack 'preserve-source-meta
+ (lambda _
+ (substitute* "lib/compiler/src/compile.erl"
+ (("\\[\\{source,Source\\} \\| Info0\\];")
+ "[{source,Source} | Info0];
+ [_|_] = Source when IsDeterministic ->
+ [{source,Source} | Info0];"))))
(add-after 'unpack 'patch-/bin/sh
(lambda* (#:key inputs #:allow-other-keys)
(let ((sh (search-input-file inputs "/bin/sh")))
@@ -160,10 +153,21 @@ (define-public erlang
"lib/reltool/examples/display_args"
"lib/reltool/examples/mnesia_core_dump_viewer"
"lib/snmp/src/compile/snmpc.src"
- "make/verify_runtime_dependencies"
- "make/emd2exml.in"))))
+ "make/verify_runtime_dependencies"))))
(substitute* escripts
(("/usr/bin/env") (which "env"))))))
+ ;; Copy modified compiler to bootstrap. It is deterministic, but
+ ;; preserves 'source' meta information to be used by dependants
+ ;; of Erlang.
+ (add-after 'build 'copy-modified-compiler
+ (lambda _
+ (copy-recursively "lib/compiler/ebin/compile.beam"
+ "bootstrap/lib/compiler/ebin/compile.beam")))
+ ;; ... clean everything and rebuild with modified bootstrap.
+ (add-after 'copy-modified-compiler 'clean-and-make-again
+ (lambda _
+ (invoke "make" "clean")
+ (invoke "make")))
(add-before 'configure 'set-erl-top
(lambda _
(setenv "ERL_TOP" (getcwd))))
--
2.45.2
^ permalink raw reply related [flat|nested] 13+ messages in thread
* [bug#72508] [PATCH 0/5] Erlang update to 27.0.1.
2024-08-07 8:10 [bug#72508] [PATCH 0/5] Erlang update to 27.0.1 Igor Goryachev via Guix-patches via
` (5 preceding siblings ...)
2024-08-07 16:32 ` [bug#72508] [PATCH v2 1/5] gnu: erlang-jsx: Fix tests under Erlang 27+ Igor Goryachev via Guix-patches via
@ 2024-08-09 1:01 ` Andrew Tropin via Guix-patches via
6 siblings, 0 replies; 13+ messages in thread
From: Andrew Tropin via Guix-patches via @ 2024-08-09 1:01 UTC (permalink / raw)
To: 72508, 72508-done; +Cc: Igor Goryachev
[-- Attachment #1: Type: text/plain, Size: 937 bytes --]
On 2024-08-07 11:10, Igor Goryachev via Guix-patches via wrote:
> Erlang package was cleaned up, updated to version 27.0.1 and several fixes/hacks were performed to make it deterministic by modifying its bootstrap.
>
> Igor Goryachev (5):
> gnu: erlang-jsx: Fix tests under Erlang 27+.
> gnu: erlang-yamerl: Update to 0.10.0.a24f448.
> gnu: erlang-jose: Relax build options.
> gnu: ejabberd: Include jiffy dependence under Erlang 27.
> gnu: erlang: Update to 27.0.1.
>
> gnu/packages/erlang-xyz.scm | 12 +++++
> gnu/packages/erlang.scm | 91 +++++++++++++++++++++----------------
> gnu/packages/messaging.scm | 3 ++
> 3 files changed, 68 insertions(+), 38 deletions(-)
>
>
> base-commit: 5e567587dd4abf51f9a6fa44f5a852dde1115ce9
Applied, pushed as
https://git.savannah.gnu.org/cgit/guix.git/commit/?id=20dbf225f3
Thank you for keeping erlang uptodate! :)
--
Best regards,
Andrew Tropin
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 832 bytes --]
^ permalink raw reply [flat|nested] 13+ messages in thread
end of thread, other threads:[~2024-08-09 1:02 UTC | newest]
Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-08-07 8:10 [bug#72508] [PATCH 0/5] Erlang update to 27.0.1 Igor Goryachev via Guix-patches via
2024-08-07 8:23 ` [bug#72508] [PATCH 1/5] gnu: erlang-jsx: Fix tests under Erlang 27+ Igor Goryachev via Guix-patches via
2024-08-07 8:23 ` [bug#72508] [PATCH 2/5] gnu: erlang-yamerl: Update to 0.10.0.a24f448 Igor Goryachev via Guix-patches via
2024-08-07 15:49 ` Andrew Tropin via Guix-patches via
2024-08-07 8:23 ` [bug#72508] [PATCH 3/5] gnu: erlang-jose: Relax build options Igor Goryachev via Guix-patches via
2024-08-07 8:23 ` [bug#72508] [PATCH 4/5] gnu: ejabberd: Include jiffy dependence under Erlang 27 Igor Goryachev via Guix-patches via
2024-08-07 8:23 ` [bug#72508] [PATCH 5/5] gnu: erlang: Update to 27.0.1 Igor Goryachev via Guix-patches via
2024-08-07 16:32 ` [bug#72508] [PATCH v2 1/5] gnu: erlang-jsx: Fix tests under Erlang 27+ Igor Goryachev via Guix-patches via
2024-08-07 16:32 ` [bug#72508] [PATCH v2 2/5] gnu: erlang-yamerl: Update to 0.10.0-0.a24f448 Igor Goryachev via Guix-patches via
2024-08-07 16:32 ` [bug#72508] [PATCH v2 3/5] gnu: erlang-jose: Relax build options Igor Goryachev via Guix-patches via
2024-08-07 16:32 ` [bug#72508] [PATCH v2 4/5] gnu: ejabberd: Include jiffy dependence under Erlang 27 Igor Goryachev via Guix-patches via
2024-08-07 16:32 ` [bug#72508] [PATCH v2 5/5] gnu: erlang: Update to 27.0.1 Igor Goryachev via Guix-patches via
2024-08-09 1:01 ` [bug#72508] [PATCH 0/5] Erlang update " Andrew Tropin via Guix-patches via
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).