Control: tags -1 patch
Please find attached the debdiff for the incoming NMU for this.
diff -Nru lirc-0.10.2/debian/changelog lirc-0.10.2/debian/changelog --- lirc-0.10.2/debian/changelog 2024-02-28 16:15:12.000000000 -0500 +++ lirc-0.10.2/debian/changelog 2024-03-15 06:21:53.000000000 -0400 @@ -1,3 +1,12 @@ +lirc (0.10.2-0.8) unstable; urgency=medium + + * Non-maintainer upload. + * debian/patches/fix-ftbfs-32bit-arches-64bit-time_t.patch: Add + upstream patch to fix FTBFS on 32-bit arches with 64-bit time_t. + (Closes: #1066905) + + -- Amin Bandali <band...@debian.org> Fri, 15 Mar 2024 06:21:53 -0400 + lirc (0.10.2-0.7) unstable; urgency=medium * Non-maintainer upload. diff -Nru lirc-0.10.2/debian/patches/fix-ftbfs-32bit-arches-64bit-time_t.patch lirc-0.10.2/debian/patches/fix-ftbfs-32bit-arches-64bit-time_t.patch --- lirc-0.10.2/debian/patches/fix-ftbfs-32bit-arches-64bit-time_t.patch 1969-12-31 19:00:00.000000000 -0500 +++ lirc-0.10.2/debian/patches/fix-ftbfs-32bit-arches-64bit-time_t.patch 2024-03-15 05:59:32.000000000 -0400 @@ -0,0 +1,71 @@ +From c23dd2512a4dbb3944f5494d26b40d6f25a27faf Mon Sep 17 00:00:00 2001 +From: Rudi Heitbaum <r...@heitbaum.com> +Date: Wed, 20 Jul 2022 07:36:38 +0000 +Subject: [PATCH] migrate struct input_event.time to .input_event_sec and + .input_event_usec + +This allows compiling lircd as 32-bit userland with the Y2038 safe +options - -D_FILE_OFFSET_BITS=64 -D_TIME_BITS=64 + +ref: https://lkml.org/lkml/2018/1/6/324 + +struct timeval is not y2038 safe. +All usage of timeval in the kernel will be replaced by +y2038 safe structures. +The change is also necessary as glibc is introducing support +for 32 bit applications to use 64 bit time_t. Without this +change, many applications would incorrectly interpret values +in the struct input_event. +More details about glibc at +https://sourceware.org/glibc/wiki/Y2038ProofnessDesign . + +struct input_event maintains time for each input event. +Real time timestamps are not ideal for input as this +time can go backwards as noted in the patch a80b83b7b8 +by John Stultz. Hence, having the input_event.time fields +only big enough for monotonic and boot times are +sufficient. + +The change leaves the representation of struct input_event as is +on 64 bit architectures. But uses 2 unsigned long values on 32 bit +machines to support real timestamps until year 2106. +This intentionally breaks the ABI on 32 bit architectures and +compat handling on 64 bit architectures. +This is as per maintainer's preference to introduce compile time errors +rather than run into runtime incompatibilities. + +The change requires any 32 bit userspace utilities reading or writing +from event nodes to update their reading format to match the new +input_event. The changes to the popular libraries will be posted once +we agree on the kernel change. +--- + plugins/devinput.c | 6 +++++- + 1 file changed, 5 insertions(+), 1 deletion(-) + +diff --git a/plugins/devinput.c b/plugins/devinput.c +index 70220483..e6bd335d 100644 +--- a/plugins/devinput.c ++++ b/plugins/devinput.c +@@ -51,6 +51,10 @@ + #define LONG(x) ((x) / BITS_PER_LONG) + #define test_bit(bit, array) ((array[LONG(bit)] >> OFF(bit)) & 1) + ++#ifndef input_event_sec ++#define input_event_sec time.tv_sec ++#define input_event_usec time.tv_usec ++#endif + + static const logchannel_t logchannel = LOG_DRIVER; + +@@ -458,7 +462,7 @@ char* devinput_rec(struct ir_remote* remotes) + return 0; + } + +- log_trace("time %ld.%06ld type %d code %d value %d", event.time.tv_sec, event.time.tv_usec, event.type, ++ log_trace("time %ld.%06ld type %d code %d value %d", event.input_event_sec, event.input_event_usec, event.type, + event.code, event.value); + + value = (unsigned)event.value; +-- +2.43.0 + diff -Nru lirc-0.10.2/debian/patches/series lirc-0.10.2/debian/patches/series --- lirc-0.10.2/debian/patches/series 2024-01-17 08:21:20.000000000 -0500 +++ lirc-0.10.2/debian/patches/series 2024-03-15 06:03:52.000000000 -0400 @@ -7,3 +7,4 @@ 0013-drop-ubuntu-hack.patch 0014-fix-zotac-poll.patch include_media_lirc.h.diff +fix-ftbfs-32bit-arches-64bit-time_t.patch