Your message dated Sat, 23 Dec 2023 09:49:33 +0000
with message-id <[email protected]>
and subject line Bug#1056311: fixed in lirc 0.10.2-0.1
has caused the Debian Bug report #1056311,
regarding lirc: FTBFS on hurd-i386
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 [email protected]
immediately.)


-- 
1056311: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1056311
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Source: lirc
Version: 0.10.1-7.2
Severity: important
Tags: patch
User: [email protected]
Usertags: hurd
X-Debbugs-CC: [email protected]

Hi,

lirc FTBFS on hurd-i386. (Built in the past, last successful build version was
0.10.1-5.2)

This is due to usage of __u32 in the patch 0007-lirc-gpio-ir-0.10.patch, which
is not defined on GNU/Hurd. This patch was added to version 0.10.1-6 in 2019.  

Attached is that patch updated to use uint32_t which is defined. (In fact
uint32_t is used in an earlier statement in that patch.)

Moreover, MODINFO is not available on GNU/Hurd since Hurd does not use modules
at all. This change is reflected in the second patch for debian/rules.

The two patches enabling a successful build on GNU/Hurd are attached:
The updated patch 0007-lirc-gpio-ir-0.10.patch
and debian_rules.patch.

I'm sending this bug report to Debian instead of upstream since this package has
been NMU-ed twice, and the second patch is Debian-specific.

Thanks!









From: Debian Lirc Team <[email protected]>
Date: Thu, 12 May 2022 21:07:56 +0200
Subject: lirc-gpio-ir-0.10

Origin: https://github.com/neuralassembly/raspi/blob/master/lirc-gpio-ir-0.10.patch
Bug-Debian: bugs.debian.org/931078
---
 lib/config_file.c    |  2 +-
 lib/ir_remote.h      |  9 +++++++--
 lib/irrecord.c       | 41 +++++++++++++++++++++++++++--------------
 lib/lirc/ir_remote.h |  9 +++++++--
 tools/mode2.cpp      | 18 +++++++++++++++---
 5 files changed, 57 insertions(+), 22 deletions(-)

Index: lirc-0.10.1/lib/config_file.c
===================================================================
--- lirc-0.10.1.orig/lib/config_file.c
+++ lirc-0.10.1/lib/config_file.c
@@ -71,7 +71,7 @@ struct void_array {
 typedef void* (*array_guest_func)(void* item, void* arg);
 
 
-#define LINE_LEN 1024
+#define LINE_LEN 4096
 #define MAX_INCLUDES 10
 
 const char* whitespace = " \t";
Index: lirc-0.10.1/lib/ir_remote.h
===================================================================
--- lirc-0.10.1.orig/lib/ir_remote.h
+++ lirc-0.10.1/lib/ir_remote.h
@@ -110,12 +110,17 @@ static inline ir_code reverse(ir_code da
 
 static inline int is_pulse(lirc_t data)
 {
-	return data & PULSE_BIT ? 1 : 0;
+	return ((data & LIRC_MODE2_MASK)==LIRC_MODE2_PULSE) ? 1 : 0;
 }
 
 static inline int is_space(lirc_t data)
 {
-	return !is_pulse(data);
+	return ((data & LIRC_MODE2_MASK)==LIRC_MODE2_SPACE) ? 1 : 0;
+}
+
+static inline int is_timeout(lirc_t data)
+{
+	return ((data & LIRC_MODE2_MASK)==LIRC_MODE2_TIMEOUT) ? 1 : 0;
 }
 
 static inline int has_repeat(const struct ir_remote* remote)
Index: lirc-0.10.1/lib/irrecord.c
===================================================================
--- lirc-0.10.1.orig/lib/irrecord.c
+++ lirc-0.10.1/lib/irrecord.c
@@ -1398,9 +1398,16 @@ enum lengths_status get_lengths(struct l
 		state->retval = 0;
 		return STS_LEN_TIMEOUT;
 	}
+	if (is_timeout(state->data)) {
+		return STS_LEN_AGAIN;
+	}
 	state->count++;
 	if (state->mode == MODE_GET_GAP) {
-		state->sum += state->data & PULSE_MASK;
+		if (state->sum != 0 || is_pulse(state->data)) {
+			state->sum += state->data & PULSE_MASK;
+		}else{
+			return STS_LEN_AGAIN;
+		}
 		if (state->average == 0 && is_space(state->data)) {
 			if (state->data > 100000) {
 				state->sum = 0;
@@ -1472,6 +1479,10 @@ enum lengths_status get_lengths(struct l
 		state->keypresses = lastmaxcount;
 		return STS_LEN_AGAIN;
 	} else if (state->mode == MODE_HAVE_GAP) {
+		if (state->count==1 && is_space(state->data))  {
+			state->count = 0;
+			return STS_LEN_AGAIN;
+		}
 		if (state->count <= MAX_SIGNALS) {
 			signals[state->count - 1] = state->data & PULSE_MASK;
 		} else {
@@ -1510,7 +1521,7 @@ enum lengths_status get_lengths(struct l
 			/* such long pulses may appear with
 			 * crappy hardware (receiver? / remote?)
 			 */
-			else {
+			else if(is_pulse(state->data)) {
 				remote->gap = 0;
 				return STS_LEN_NO_GAP_FOUND;
 			}
@@ -1811,22 +1822,24 @@ ssize_t raw_read(void* buffer, size_t si
 
 static int raw_data_ok(struct button_state* btn_state)
 {
-	int r;
+	int r = 0;
 	int ref;
 
-	if (!is_space(btn_state->data)) {
+	if (is_pulse(btn_state->data)) {
 		r = 0;
-	} else if (is_const(&remote)) {
-		if (remote.gap > btn_state->sum) {
-			ref = (remote.gap - btn_state->sum);
-			ref *= (100 - remote.eps);
-			ref /= 100;
+	} else if (is_space(btn_state->data)) {
+		if (is_const(&remote)) {
+			if (remote.gap > btn_state->sum) {
+				ref = (remote.gap - btn_state->sum);
+				ref *= (100 - remote.eps);
+				ref /= 100;
+			} else {
+				ref = 0;
+			}
+			r = btn_state->data > ref;
 		} else {
-			ref = 0;
+			r = btn_state->data > (remote.gap * (100 - remote.eps)) / 100;
 		}
-		r = btn_state->data > ref;
-	} else {
-		r = btn_state->data > (remote.gap * (100 - remote.eps)) / 100;
 	}
 	return r;
 }
@@ -1970,7 +1983,7 @@ enum button_status record_buttons(struct
 				btn_state->data = remote.gap;
 			}
 			if (btn_state->count == 0) {
-				if (!is_space(btn_state->data)
+				if (is_pulse(btn_state->data)
 				    || btn_state->data <
 				    remote.gap - remote.gap * remote.eps /
 				    100) {
Index: lirc-0.10.1/lib/lirc/ir_remote.h
===================================================================
--- lirc-0.10.1.orig/lib/lirc/ir_remote.h
+++ lirc-0.10.1/lib/lirc/ir_remote.h
@@ -110,12 +110,17 @@ static inline ir_code reverse(ir_code da
 
 static inline int is_pulse(lirc_t data)
 {
-	return data & PULSE_BIT ? 1 : 0;
+	return ((data & LIRC_MODE2_MASK)==LIRC_MODE2_PULSE) ? 1 : 0;
 }
 
 static inline int is_space(lirc_t data)
 {
-	return !is_pulse(data);
+	return ((data & LIRC_MODE2_MASK)==LIRC_MODE2_SPACE) ? 1 : 0;
+}
+
+static inline int is_timeout(lirc_t data)
+{
+	return ((data & LIRC_MODE2_MASK)==LIRC_MODE2_TIMEOUT) ? 1 : 0;
 }
 
 static inline int has_repeat(const struct ir_remote* remote)
Index: lirc-0.10.1/tools/mode2.cpp
===================================================================
--- lirc-0.10.1.orig/tools/mode2.cpp
+++ lirc-0.10.1/tools/mode2.cpp
@@ -326,12 +326,24 @@ unsigned int get_codelength(int fd, int
 void print_mode2_data(unsigned int data)
 {
 	static int bitno = 1;
+	static bool leading_space = true;
+	unsigned int msg = data & LIRC_MODE2_MASK;
 
 	switch (opt_dmode) {
 	case 0:
-		printf("%s %u\n", (
-			       data & PULSE_BIT) ? "pulse" : "space",
-		       (uint32_t)(data & PULSE_MASK));
+		if (leading_space && msg == LIRC_MODE2_SPACE ) {
+			break;
+		} else {
+			leading_space = false;
+		}
+		if (msg == LIRC_MODE2_PULSE) {
+			printf("pulse %u\n", (uint32_t)(data & PULSE_MASK));
+		} else if (msg == LIRC_MODE2_SPACE) {
+			printf("space %u\n", (uint32_t)(data & PULSE_MASK));
+		} else if (msg == LIRC_MODE2_TIMEOUT) {
+			printf("timeout %u\n", (uint32_t)(data & PULSE_MASK));
+			leading_space = true;
+		}
 		break;
 	case 1: {
 		/* print output like irrecord raw config file data */
--- a/debian/rules	2022-12-28 12:25:42.000000000 +0100
+++ b/debian/rules	2023-11-18 15:13:23.000000000 +0100
@@ -29,7 +29,7 @@
 else
 	dh_auto_configure -- \
 	    SH_PATH=/bin/sh \
-	    MODINFO=/sbin/modinfo \
+	    MODINFO= \
 	    --disable-uinput --disable-devinput \
 	    --enable-silent-rules
 endif

--- End Message ---
--- Begin Message ---
Source: lirc
Source-Version: 0.10.2-0.1
Done: Gianfranco Costamagna <[email protected]>

We believe that the bug you reported is fixed in the latest version of
lirc, 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 [email protected],
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Gianfranco Costamagna <[email protected]> (supplier of updated lirc 
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 [email protected])


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

Format: 1.8
Date: Sun, 17 Dec 2023 08:47:03 +0100
Source: lirc
Built-For-Profiles: noudeb
Architecture: source
Version: 0.10.2-0.1
Distribution: unstable
Urgency: medium
Maintainer: Debian Lirc Team <[email protected]>
Changed-By: Gianfranco Costamagna <[email protected]>
Closes: 810445 1014760 1022021 1025002 1056311
Changes:
 lirc (0.10.2-0.1) unstable; urgency=medium
 .
   * Non-maintainer upload.
   * New upstream release
     (Closes: #1056311, Closes: #1025002, Closes: #1022021).
   * Switch everywhere to libusb-1.0 (Closes: #810445)
   * Drop patches now part of upstream codebase:
     - 0003-logging-Don-t-use-broken-LOG_CONS-syslog-flag.patch
     - 0004-lircd-Fix-connect-option-parsing-error-343.patch
     - 0005-systemd-support-Notify-systemd-on-successful-startup.patch
     - 0007-lirc-gpio-ir-0.10.patch
     - 0008-python3.8.diff
     - 0009-Replace-the-obsolete-get_event_loop-with-get_running.patch
     - 0011-yaml.load.diff
   * Refresh patches:
     - 0001-lirc.org-Remove-non-free-advertising.patch
     - 0002-lirc-setup-Fix-crash-on-start-on-missing-lirc.config.patch
     - 0010-Patch-configure.ac-to-support-passing-MODINFO.patch
     - check-for-devinput-using-ac_check_file.patch
     - drop-ubuntu-hack.patch
   * Add new binaries to lirc
     - lirc-data2table
     - lirc-postinstall
   * Drop Break/Replaces, and transitional packages
   * Drop old debian/lirc.maintscript script
   * Mark -doc package as multiarch: foreign
   * Rename patches
   * Add proposed patch to fix zotac poll (Closes: #1014760)
Checksums-Sha1:
 42b5aab61f2fa7dd3df56815ff99e0a6a42c8e63 2533 lirc_0.10.2-0.1.dsc
 81156038bde1172c3a741f3d490ab6dfafa6732a 2607203 lirc_0.10.2.orig.tar.gz
 0c7c823879bb64776a7e071daa2520ba12f9f276 38992 lirc_0.10.2-0.1.debian.tar.xz
 f249559a3e974ab14f75051de44b18a38b4eb956 10528 lirc_0.10.2-0.1_source.buildinfo
Checksums-Sha256:
 ff426fbaf02d6db529a2cc6e941f200a5779b8df85c4f4833b40c6f017533f92 2533 
lirc_0.10.2-0.1.dsc
 a44a26caf9ba55c2343e065f0a9451425c136572b279ea1e011ad012b36b607e 2607203 
lirc_0.10.2.orig.tar.gz
 e19f2a5d686b5ad3ec202817137eb4290b1889a418d49407fb2ee7f850d8bee3 38992 
lirc_0.10.2-0.1.debian.tar.xz
 62458545da73c3f0b1a983f8c5c1cb5675ca888ef82dbf646ab1340d29a5c749 10528 
lirc_0.10.2-0.1_source.buildinfo
Files:
 061589d1fa008ab354bd95d6ff04ea18 2533 utils optional lirc_0.10.2-0.1.dsc
 281e43e8428cdbc56660c4c4902ddcea 2607203 utils optional lirc_0.10.2.orig.tar.gz
 4bc47088e7f19249b3680900f894e978 38992 utils optional 
lirc_0.10.2-0.1.debian.tar.xz
 c944b677d6473d43035e1b8cf020df21 10528 utils optional 
lirc_0.10.2-0.1_source.buildinfo

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

iQIzBAEBCAAdFiEEkpeKbhleSSGCX3/w808JdE6fXdkFAmV+vz8ACgkQ808JdE6f
XdlVVg//VbZW/IO38VTDMdFUueBiDLbf+S5sEpLuOZSi4+bZbfR5m0gBT3S3+q6o
xGGMOL5aE/xK+XYJTn+xIkxfcQTXEYJI9PItZtLDsBaLpOEB3YrE/UDThjBKyvBr
Owwb9zGSRAHb98FCEhsDB6GOWHzYhL8JzKkZk2x4uDOMmgeuRXeLKqhue4cB7+Sw
aKcYO0Tk0cS8bJ/nsYeZAfBlgbCdBEBzwuD4Pn2KZyhi0vIuV3gAbfLog7wmzFtc
aNeH2wSiTqRM9m0Mqr+TTyqO2tzs1fLRbiORmfQl+YbhiJ88bCjqzCKNr8iCeIDj
NI5wUvdbQf6f8X2IZgYKlHY0jhwGLkCbJnbWJEUHxArUjiP5HXq0RG8clS1ZVy7M
Z/RRwH1CHybXp29Unfvb9Dl5RtwVolExHFfaBJK6zysxNxme7R1aDop6pP/RuWQe
TNVypzCrAi3G2IuFZxWVxi4DF0dFnxUrrhvmyrIUBGWfkx4THp4E/chgABCgQoAd
11PINfQvJ239Qa8qurk43Y/J5qHMNGTbOd47wce5vOIM5si8cWDdcjcSyTzMaimZ
ZvrdhgVc6SNCS4cFEdsT30h1NE8xbqn8MXVG13nLCV7Led6gxYh20Ne4vT4q1iKl
3fqIZ05oZCKHh2Q6BBNBfgol4vG/JQ3CrLZD4vMxYu9JmX8f10Y=
=pm8j
-----END PGP SIGNATURE-----

--- End Message ---
_______________________________________________
Python-modules-team mailing list
[email protected]
https://alioth-lists.debian.net/cgi-bin/mailman/listinfo/python-modules-team

Reply via email to