public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
From: Peter Lemenkov <lemenkov@gmail.com>
To: git-commits@fedoraproject.org
Subject: [rpms/erlang-amf] rawhide: Fix FTBFS
Date: Wed, 29 Jul 2026 12:44:17 GMT	[thread overview]
Message-ID: <178532905795.1.1529102221413462841.rpms-erlang-amf-74ceb89c65ba@fedoraproject.org> (raw)

            A new commit has been pushed.

            Repo   : rpms/erlang-amf
            Branch : rawhide
            Commit : 74ceb89c65babcb9dd5134f8eef6d58ac9c5083b
            Author : Peter Lemenkov <lemenkov@gmail.com>
            Date   : 2026-07-29T14:39:23+02:00
            Stats  : +35/-1 in 2 file(s)
            URL    : https://src.fedoraproject.org/rpms/erlang-amf/c/74ceb89c65babcb9dd5134f8eef6d58ac9c5083b?branch=rawhide

            Log:
            Fix FTBFS

Signed-off-by: Peter Lemenkov <lemenkov@gmail.com>

---
diff --git a/erlang-amf-0001-Fix-gb_trees-iterator-exhaustion-for-OTP-27.patch b/erlang-amf-0001-Fix-gb_trees-iterator-exhaustion-for-OTP-27.patch
new file mode 100644
index 0000000..1987aa3
--- /dev/null
+++ b/erlang-amf-0001-Fix-gb_trees-iterator-exhaustion-for-OTP-27.patch
@@ -0,0 +1,33 @@
+From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
+From: Peter Lemenkov <lemenkov@gmail.com>
+Date: Wed, 29 Jul 2026 14:36:18 +0200
+Subject: [PATCH] Fix gb_trees iterator exhaustion for OTP 27
+
+In OTP 27, gb_trees:next/1 returns 'none' when the iterator is
+exhausted, instead of the empty list '[]' as in previous versions. The
+encode_as_reference/2 function only handled the '[]' case via a function
+clause, causing a {case_clause, none} crash at runtime when encoding
+objects, arrays or typed objects.
+
+Add a 'none' clause to the case expression to handle iterator exhaustion
+correctly under OTP 27 while remaining compatible with older OTP
+versions.
+
+Fixes FTBFS on Fedora Rawhide (OTP 27).
+
+Signed-off-by: Peter Lemenkov <lemenkov@gmail.com>
+Assisted-by: Claude (Anthropic) <https://claude.ai>
+
+diff --git a/src/amf0.erl b/src/amf0.erl
+index 33145c3..463c290 100644
+--- a/src/amf0.erl
++++ b/src/amf0.erl
+@@ -248,6 +248,8 @@ encode_as_reference(_Value, []) ->
+     inline;
+ encode_as_reference(Value, Iterator0) ->
+     case gb_trees:next(Iterator0) of
++        none ->
++            inline;
+ 	{Key, Value, _} ->
+ 	    {ok, <<?REFERENCE, Key:16>>};
+ 	{_, _, Iterator1} ->

diff --git a/erlang-amf.spec b/erlang-amf.spec
index 57ce169..f61db1a 100644
--- a/erlang-amf.spec
+++ b/erlang-amf.spec
@@ -10,7 +10,8 @@ Summary:	Erlang Action Message Format Library
 License:	BSD-2-Clause
 URL:		https://github.com/abuibrahim/erlang-%{realname}
 VCS:		git:%{url}.git
-Source0:	%{url}/archive/%{git_commit}/%{realname}-%{version}.tar.gz
+Source:		%{url}/archive/%{git_commit}/%{realname}-%{version}.tar.gz
+Patch:		erlang-amf-0001-Fix-gb_trees-iterator-exhaustion-for-OTP-27.patch
 BuildSystem:	rebar3
 
 %description

                 reply	other threads:[~2026-07-29 12:44 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=178532905795.1.1529102221413462841.rpms-erlang-amf-74ceb89c65ba@fedoraproject.org \
    --to=lemenkov@gmail.com \
    --cc=git-commits@fedoraproject.org \
    /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.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox