Your message dated Tue, 24 Dec 2024 00:23:41 +0000
with message-id <e1tpsi5-004qh3...@fasolo.debian.org>
and subject line Bug#1091337: fixed in tina 0.1.13-2
has caused the Debian Bug report #1091337,
regarding [tina] May generate duplicate Item-ID on some architectures
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact ow...@bugs.debian.org
immediately.)


-- 
1091337: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1091337
Debian Bug Tracking System
Contact ow...@bugs.debian.org with problems
--- Begin Message ---
Source: tina
Version: 0.1.7
Severity: normal
Tags: upstream patch
X-Debbugs-Cc: r...@debian.org

The tina source includes, in the item.c file, a conversion of
a time_t value to a string, treating the integer value as
a C 'long int'. However, in some cases, e.g. 32-bit architectures with
a 64-bit time_t value, this assumption is wrong, and due to
some specificities of the C language's integer promotion,
this may lead to generating the same Item-ID value for
two or more newly-created database items.

The attached patch is merely a quick band-aid; a more elaborate fix and
a set of tests will be included in the next tina upstream release.

-- System Information:
Debian Release: trixie/sid
  APT prefers testing
  APT policy: (990, 'testing')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 6.12.5-amd64 (SMP w/16 CPU threads; PREEMPT)
Kernel taint flags: TAINT_WARN
Locale: LANG=bg_BG.UTF-8, LC_CTYPE=bg_BG.UTF-8 (charmap=UTF-8), LANGUAGE not set
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

-- no debconf information

Description: Fix handling 64-bit time_t on big-endian 32-bit architectures
 Due to some specificities of the C language's handling of
 integer values of different sizes, integer promotion, and
 the in-memory layout of integer values, if time_t is 64-bit and
 long int is 32-bit, new items generated in quick succession may get
 the same Item-ID.
 .
 This is a quick band-aid; a more elaborate fix (and tests) will
 be made upstream.
Forwarded: yes
Author: Peter Pentchev <r...@ringlet.net>
Last-Update: 2024-12-23

--- a/item.c
+++ b/item.c
@@ -7,6 +7,7 @@
 
 #define _GNU_SOURCE
 
+#include <inttypes.h>
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
@@ -23,7 +24,7 @@
   char buf[256];
   size_t len;
 
-  snprintf (buf, sizeof (buf), "<%lx.%x@", time (NULL), rand ());
+  snprintf (buf, sizeof (buf), "<%jx.%x@", (intmax_t)time (NULL), rand ());
   len = strlen (buf);
   gethostname (buf + len, sizeof (buf) - len - 1);
   strcat (buf, ">");

Attachment: signature.asc
Description: PGP signature


--- End Message ---
--- Begin Message ---
Source: tina
Source-Version: 0.1.13-2
Done: Peter Pentchev <r...@debian.org>

We believe that the bug you reported is fixed in the latest version of
tina, which is due to be installed in the Debian FTP archive.

A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to 1091...@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Peter Pentchev <r...@debian.org> (supplier of updated tina package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmas...@ftp-master.debian.org)


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512

Format: 1.8
Date: Tue, 24 Dec 2024 02:08:07 +0200
Source: tina
Architecture: source
Version: 0.1.13-2
Distribution: unstable
Urgency: medium
Maintainer: Peter Pentchev <r...@debian.org>
Changed-By: Peter Pentchev <r...@debian.org>
Closes: 1091337
Changes:
 tina (0.1.13-2) unstable; urgency=medium
 .
   * Add the 64-bit-time-t patch to fix the FTBFS on big-endian 32-bit
     architectures with a 64-bit time_t type. Closes: #1091337
Checksums-Sha1:
 536e5f359878450923bc288bb57d28f50a65d9f5 2700 tina_0.1.13-2.dsc
 b169982e0693dc125635fc7e8d4126900750ac31 9236 tina_0.1.13-2.debian.tar.xz
Checksums-Sha256:
 a4159c3d7c83ccefdb317206e85cae2e180488b45befd662a5e417b4a95f7d97 2700 
tina_0.1.13-2.dsc
 b1b3351ae5d8af527c98aa324e5dc642df9180b8186a8235138705b9ce07eea0 9236 
tina_0.1.13-2.debian.tar.xz
Files:
 f824b163862189a5f1dcf5585a2c1d34 2700 misc optional tina_0.1.13-2.dsc
 7563d42a20cfce1b8a53333b4c289d58 9236 misc optional tina_0.1.13-2.debian.tar.xz

-----BEGIN PGP SIGNATURE-----

iQJEBAEBCgAuFiEELuenpRf8EkzxFcNUZR7vsCUn3xMFAmdp+5IQHHJvYW1AZGVi
aWFuLm9yZwAKCRBlHu+wJSffE6T8EAC5GeFul8kUDue1NwQebyCCttbwWS+N86mD
Dw+h7sS9gGjHb10qwY8qWdj8EzG+G97fsFHI/OKZbZU6AhtHRzlftMLzsyILxqtd
gzyOPMtAWCsWh+AsR4vm7AK+9CVA74EUJ6aC4IlmLjns19fvbgBgNUnaZPpBI5Eh
8BdyggJzfDrlqENw5NjzqLZWcNvdqFps5LHyvOeojesoitiZ6VSxplSGwpFT16Iu
D+tK8QsJlrImUfI+5AqLDo0Xnv/yimKP55brMZ0AetP1hR+hJ2yODXpz1Tk6HlpN
llUtJAigzfwv4Qya+qdJY1FMdLqncFj4jWH8Slo/pdU7OkYR4AeO7KaVS/aU6kzR
mWBmdSUdzStT+Q0GC7tnUiZXGpxETlkzmDOP/9E3j2RvP7Ctq5N7FzIbgzSZYzGl
Be/p8tAj2UDT3n+P7im3S02w3aY6hbnt1R4PWMM55j9r8fHzZeXL8AN+iZD/Vwa+
Cl+pHqXviJvhHZCNinKYiQ9LbgZrASuiNYxn1Ic1VgmdSJZyFhEP+JOZ8BFWdD3I
3Q3fo4uxuq4YzfUD0NZo1ATEfAJrXZSiFk1D7CJ9HYyAUzjJ/o9aebf1mzCJUEdj
68PCBFgcees8/7PEAf2r5cSx9b0JJLwUoN3Zz4CDXeS324MTA6wRIo8QIG1ZTDp/
Mx5uM4jxFQ==
=yVk9
-----END PGP SIGNATURE-----

Attachment: pgpZT02wmpURB.pgp
Description: PGP signature


--- End Message ---

Reply via email to