Source: lirc Version: 0.10.2-0.2 Severity: important Tags: patch User: debian-hurd@lists.debian.org Usertags: hurd X-Debbugs-CC: debian-hurd@lists.debian.org
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 (and __u16,__u64) in include/media/lirc.h, which is not defined on GNU/Hurd. Additionally inclusion of header files is ifdef-ed and config.h is included. 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 (and GNU/Linux)are attached in next mail: - include/media/lirc.h - debian_rules.patch. I'm sending this bug report to Debian instead of upstream since this package has been NMU-ed several times, and the second patch is Debian- specific. Thanks!
Index: lirc-0.10.2/include/media/lirc.h =================================================================== --- lirc-0.10.2.orig/include/media/lirc.h +++ lirc-0.10.2/include/media/lirc.h @@ -6,8 +6,27 @@ #ifndef _LINUX_LIRC_H #define _LINUX_LIRC_H +#include "config.h" + +#ifdef HAVE_STDINT_H +#include <stdint.h> +#endif + +#ifdef HAVE_LINUX_TYPES_H #include <linux/types.h> +#endif + +#ifdef HAVE_LINUX_IOCTL_H #include <linux/ioctl.h> +#endif + +#ifdef HAVE_SYS_IOCTL_H +#include <sys/ioctl.h> +#endif + +#ifdef __GNU__ +#include <hurd/ioctl.h> +#endif #define PULSE_BIT 0x01000000 #define PULSE_MASK 0x00FFFFFF @@ -93,55 +112,55 @@ /*** IOCTL commands for lirc driver ***/ -#define LIRC_GET_FEATURES _IOR('i', 0x00000000, __u32) +#define LIRC_GET_FEATURES _IOR('i', 0x00000000, uint32_t) -#define LIRC_GET_SEND_MODE _IOR('i', 0x00000001, __u32) -#define LIRC_GET_REC_MODE _IOR('i', 0x00000002, __u32) -#define LIRC_GET_REC_RESOLUTION _IOR('i', 0x00000007, __u32) +#define LIRC_GET_SEND_MODE _IOR('i', 0x00000001, uint32_t) +#define LIRC_GET_REC_MODE _IOR('i', 0x00000002, uint32_t) +#define LIRC_GET_REC_RESOLUTION _IOR('i', 0x00000007, uint32_t) -#define LIRC_GET_MIN_TIMEOUT _IOR('i', 0x00000008, __u32) -#define LIRC_GET_MAX_TIMEOUT _IOR('i', 0x00000009, __u32) +#define LIRC_GET_MIN_TIMEOUT _IOR('i', 0x00000008, uint32_t) +#define LIRC_GET_MAX_TIMEOUT _IOR('i', 0x00000009, uint32_t) /* code length in bits, currently only for LIRC_MODE_LIRCCODE */ -#define LIRC_GET_LENGTH _IOR('i', 0x0000000f, __u32) +#define LIRC_GET_LENGTH _IOR('i', 0x0000000f, uint32_t) -#define LIRC_SET_SEND_MODE _IOW('i', 0x00000011, __u32) -#define LIRC_SET_REC_MODE _IOW('i', 0x00000012, __u32) +#define LIRC_SET_SEND_MODE _IOW('i', 0x00000011, uint32_t) +#define LIRC_SET_REC_MODE _IOW('i', 0x00000012, uint32_t) /* Note: these can reset the according pulse_width */ -#define LIRC_SET_SEND_CARRIER _IOW('i', 0x00000013, __u32) -#define LIRC_SET_REC_CARRIER _IOW('i', 0x00000014, __u32) -#define LIRC_SET_SEND_DUTY_CYCLE _IOW('i', 0x00000015, __u32) -#define LIRC_SET_TRANSMITTER_MASK _IOW('i', 0x00000017, __u32) +#define LIRC_SET_SEND_CARRIER _IOW('i', 0x00000013, uint32_t) +#define LIRC_SET_REC_CARRIER _IOW('i', 0x00000014, uint32_t) +#define LIRC_SET_SEND_DUTY_CYCLE _IOW('i', 0x00000015, uint32_t) +#define LIRC_SET_TRANSMITTER_MASK _IOW('i', 0x00000017, uint32_t) /* * when a timeout != 0 is set the driver will send a * LIRC_MODE2_TIMEOUT data packet, otherwise LIRC_MODE2_TIMEOUT is * never sent, timeout is disabled by default */ -#define LIRC_SET_REC_TIMEOUT _IOW('i', 0x00000018, __u32) +#define LIRC_SET_REC_TIMEOUT _IOW('i', 0x00000018, uint32_t) /* 1 enables, 0 disables timeout reports in MODE2 */ -#define LIRC_SET_REC_TIMEOUT_REPORTS _IOW('i', 0x00000019, __u32) +#define LIRC_SET_REC_TIMEOUT_REPORTS _IOW('i', 0x00000019, uint32_t) /* * if enabled from the next key press on the driver will send * LIRC_MODE2_FREQUENCY packets */ -#define LIRC_SET_MEASURE_CARRIER_MODE _IOW('i', 0x0000001d, __u32) +#define LIRC_SET_MEASURE_CARRIER_MODE _IOW('i', 0x0000001d, uint32_t) /* * to set a range use LIRC_SET_REC_CARRIER_RANGE with the * lower bound first and later LIRC_SET_REC_CARRIER with the upper bound */ -#define LIRC_SET_REC_CARRIER_RANGE _IOW('i', 0x0000001f, __u32) +#define LIRC_SET_REC_CARRIER_RANGE _IOW('i', 0x0000001f, uint32_t) -#define LIRC_SET_WIDEBAND_RECEIVER _IOW('i', 0x00000023, __u32) +#define LIRC_SET_WIDEBAND_RECEIVER _IOW('i', 0x00000023, uint32_t) /* * Return the recording timeout, which is either set by * the ioctl LIRC_SET_REC_TIMEOUT or by the kernel after setting the protocols. */ -#define LIRC_GET_REC_TIMEOUT _IOR('i', 0x00000024, __u32) +#define LIRC_GET_REC_TIMEOUT _IOR('i', 0x00000024, uint32_t) /** * struct lirc_scancode - decoded scancode with protocol for use with @@ -157,11 +176,11 @@ * @scancode: the scancode received or to be sent */ struct lirc_scancode { - __u64 timestamp; - __u16 flags; - __u16 rc_proto; - __u32 keycode; - __u64 scancode; + uint64_t timestamp; + uint16_t flags; + uint16_t rc_proto; + uint32_t keycode; + uint64_t scancode; }; /* Set if the toggle bit of rc-5 or rc-6 is enabled */
--- a/debian/rules 2023-12-16 18:35:11.000000000 +0100 +++ b/debian/rules 2024-01-02 12:49:12.000000000 +0100 @@ -4,7 +4,14 @@ include /usr/share/dpkg/pkg-info.mk export DEB_BUILD_MAINT_OPTIONS = hardening=+all -export _PYTHON_SYSCONFIGDATA_NAME=_sysconfigdata__$(DEB_HOST_ARCH_OS)_$(DEB_HOST_MULTIARCH) + +ifeq ($(DEB_HOST_ARCH_OS), hurd) +#FIXME: Replace gnu0 with either gnu or hurd in python3.11! +#/usr/lib/python3.11/__pycache__/_sysconfigdata__gnu0_i386-gnu.cpython-311.pyc + export _PYTHON_SYSCONFIGDATA_NAME=_sysconfigdata__gnu0_$(DEB_HOST_MULTIARCH) +else + export _PYTHON_SYSCONFIGDATA_NAME=_sysconfigdata__$(DEB_HOST_ARCH_OS)_$(DEB_HOST_MULTIARCH) +endif export LC_ALL=C.UTF-8 @@ -33,7 +40,7 @@ else dh_auto_configure -- \ SH_PATH=/bin/sh \ - MODINFO=/sbin/modinfo \ + MODINFO= \ --disable-uinput --disable-devinput endif