public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
From: Yanko Kaneti <yaneti@declera.com>
To: git-commits@fedoraproject.org
Subject: [rpms/genimage] rawhide: Ustream uuid generation fix - FTBFS tests
Date: Thu, 16 Jul 2026 15:00:36 GMT [thread overview]
Message-ID: <178421403607.1.15732812444301843769.rpms-genimage-4120342560c8@fedoraproject.org> (raw)
A new commit has been pushed.
Repo : rpms/genimage
Branch : rawhide
Commit : 4120342560c82a589612de41c4ec228278a65da1
Author : Yanko Kaneti <yaneti@declera.com>
Date : 2026-07-16T17:59:13+03:00
Stats : +123/-0 in 2 file(s)
URL : https://src.fedoraproject.org/rpms/genimage/c/4120342560c82a589612de41c4ec228278a65da1?branch=rawhide
Log:
Ustream uuid generation fix - FTBFS tests
---
diff --git a/339.patch b/339.patch
new file mode 100644
index 0000000..b803b8f
--- /dev/null
+++ b/339.patch
@@ -0,0 +1,120 @@
+From c96734f03c7bc438aa0a268d1ca9c00cf6610191 Mon Sep 17 00:00:00 2001
+From: Michael Olbrich <m.olbrich@pengutronix.de>
+Date: Thu, 16 Jul 2026 14:42:48 +0200
+Subject: [PATCH 1/2] util: uuid_random: fix format string
+
+%x has not 'u' modifier. So %04ux was interpreted as an unsigned integer
+followed by a literal 'x'.
+
+Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
+---
+ test/randomseed.expected | 20 ++++++++++----------
+ util.c | 2 +-
+ 2 files changed, 11 insertions(+), 11 deletions(-)
+
+diff --git a/test/randomseed.expected b/test/randomseed.expected
+index ba958fc..1538ca4 100644
+--- a/test/randomseed.expected
++++ b/test/randomseed.expected
+@@ -5,33 +5,33 @@
+ *
+ 000001f0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 55 aa |..............U.|
+ 00000200 45 46 49 20 50 41 52 54 00 00 01 00 5c 00 00 00 |EFI PART....\...|
+-00000210 a8 9f e4 6e 00 00 00 00 01 00 00 00 00 00 00 00 |...n............|
++00000210 93 5b 01 c0 00 00 00 00 01 00 00 00 00 00 00 00 |.[..............|
+ 00000220 47 08 00 00 00 00 00 00 22 00 00 00 00 00 00 00 |G.......".......|
+-00000230 26 08 00 00 00 00 00 00 18 07 21 30 00 55 81 53 |&.........!0.U.S|
+-00000240 ff 99 08 fd 68 07 00 40 02 00 00 00 00 00 00 00 |....h..@........|
+-00000250 80 00 00 00 80 00 00 00 e5 81 84 df 00 00 00 00 |................|
++00000230 26 08 00 00 00 00 00 00 0b 4a 09 76 35 8a 1e 4e |&........J.v5..N|
++00000240 8f c7 9e 22 4b 42 68 81 02 00 00 00 00 00 00 00 |..."KBh.........|
++00000250 80 00 00 00 80 00 00 00 95 d3 6e fd 00 00 00 00 |..........n.....|
+ 00000260 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
+ *
+ 00000400 af 3d c6 0f 83 84 72 47 8e 79 3d 69 d8 47 7d e4 |.=....rG.y=i.G}.|
+-00000410 62 09 50 60 00 40 99 61 ff 94 03 fd 88 82 00 46 |b.P`.@.a.......F|
++00000410 78 f5 5d ec 67 8d 11 4c 97 e2 b7 00 81 61 e0 4d |x.].g..L.....a.M|
+ 00000420 22 00 00 00 00 00 00 00 21 08 00 00 00 00 00 00 |".......!.......|
+ 00000430 00 00 00 00 00 00 00 00 72 00 6f 00 6f 00 74 00 |........r.o.o.t.|
+ 00000440 66 00 73 00 00 00 00 00 00 00 00 00 00 00 00 00 |f.s.............|
+ 00000450 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
+ *
+ 00104e00 af 3d c6 0f 83 84 72 47 8e 79 3d 69 d8 47 7d e4 |.=....rG.y=i.G}.|
+-00104e10 62 09 50 60 00 40 99 61 ff 94 03 fd 88 82 00 46 |b.P`.@.a.......F|
++00104e10 78 f5 5d ec 67 8d 11 4c 97 e2 b7 00 81 61 e0 4d |x.].g..L.....a.M|
+ 00104e20 22 00 00 00 00 00 00 00 21 08 00 00 00 00 00 00 |".......!.......|
+ 00104e30 00 00 00 00 00 00 00 00 72 00 6f 00 6f 00 74 00 |........r.o.o.t.|
+ 00104e40 66 00 73 00 00 00 00 00 00 00 00 00 00 00 00 00 |f.s.............|
+ 00104e50 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
+ *
+ 00108e00 45 46 49 20 50 41 52 54 00 00 01 00 5c 00 00 00 |EFI PART....\...|
+-00108e10 e3 54 c1 02 00 00 00 00 47 08 00 00 00 00 00 00 |.T......G.......|
++00108e10 d8 90 24 ac 00 00 00 00 47 08 00 00 00 00 00 00 |..$.....G.......|
+ 00108e20 01 00 00 00 00 00 00 00 22 00 00 00 00 00 00 00 |........".......|
+-00108e30 26 08 00 00 00 00 00 00 18 07 21 30 00 55 81 53 |&.........!0.U.S|
+-00108e40 ff 99 08 fd 68 07 00 40 27 08 00 00 00 00 00 00 |....h..@'.......|
+-00108e50 80 00 00 00 80 00 00 00 e5 81 84 df 00 00 00 00 |................|
++00108e30 26 08 00 00 00 00 00 00 0b 4a 09 76 35 8a 1e 4e |&........J.v5..N|
++00108e40 8f c7 9e 22 4b 42 68 81 27 08 00 00 00 00 00 00 |..."KBh.'.......|
++00108e50 80 00 00 00 80 00 00 00 95 d3 6e fd 00 00 00 00 |..........n.....|
+ 00108e60 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
+ *
+ 00109000
+diff --git a/util.c b/util.c
+index d1375dd..369a441 100644
+--- a/util.c
++++ b/util.c
+@@ -818,7 +818,7 @@ char *uuid_random(void)
+ {
+ char *uuid;
+
+- xasprintf(&uuid, "%04ux%04ux-%04ux-%04ux-%04ux-%04ux%04ux%04ux",
++ xasprintf(&uuid, "%04x%04x-%04x-%04x-%04x-%04x%04x%04x",
+ random32() & 0xffff, random32() & 0xffff,
+ random32() & 0xffff,
+ (random32() & 0x0fff) | 0x4000,
+
+From e42617632be75899d0728c56ceb3671b7f3cc5b7 Mon Sep 17 00:00:00 2001
+From: Michael Olbrich <m.olbrich@pengutronix.de>
+Date: Thu, 16 Jul 2026 14:45:03 +0200
+Subject: [PATCH 2/2] util: uuid_random: generate the radomness first
+
+The order in which the arguments are evaluated seems to differ depending
+on the architecture. Since random32() is stateful, the result may be
+different.
+Use in the reverse order which seems to match what x86_64 does.
+
+Fixes: #335
+Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
+---
+ util.c | 15 ++++++++++-----
+ 1 file changed, 10 insertions(+), 5 deletions(-)
+
+diff --git a/util.c b/util.c
+index 369a441..af13f30 100644
+--- a/util.c
++++ b/util.c
+@@ -817,13 +817,18 @@ void uuid_parse(const char *str, unsigned char *uuid)
+ char *uuid_random(void)
+ {
+ char *uuid;
++ uint32_t d[8];
++ int i;
++
++ for (i = 0; i < 8; ++i)
++ d[i] = random32();
+
+ xasprintf(&uuid, "%04x%04x-%04x-%04x-%04x-%04x%04x%04x",
+- random32() & 0xffff, random32() & 0xffff,
+- random32() & 0xffff,
+- (random32() & 0x0fff) | 0x4000,
+- (random32() & 0x3fff) | 0x8000,
+- random32() & 0xffff, random32() & 0xffff, random32() & 0xffff);
++ d[7] & 0xffff, d[6] & 0xffff,
++ d[5] & 0xffff,
++ (d[4] & 0x0fff) | 0x4000,
++ (d[3] & 0x3fff) | 0x8000,
++ d[2] & 0xffff, d[1] & 0xffff, d[0] & 0xffff);
+
+ return uuid;
+ }
diff --git a/genimage.spec b/genimage.spec
index 7935d86..72b983a 100644
--- a/genimage.spec
+++ b/genimage.spec
@@ -42,6 +42,9 @@ License: GPL-2.0-only
URL: https://github.com/pengutronix/genimage/
Source0: %{url}/releases/download/v%{version}/genimage-%{version}.tar.xz
+# https://github.com/pengutronix/genimage/pull/339
+Patch0: 339.patch
+
Recommends: %{trim_fs_block_tools}
# https://bugzilla.redhat.com/show_bug.cgi?id=2374067
reply other threads:[~2026-07-16 15:00 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=178421403607.1.15732812444301843769.rpms-genimage-4120342560c8@fedoraproject.org \
--to=yaneti@declera.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