[Python-modules-team] Bug#989304: NMU fixing FTBFS, cross-building and reproducible builds bugs

Vagrant Cascadian vagrant at reproducible-builds.org
Wed Dec 6 00:18:23 GMT 2023


I've uploaded an NMU fixing several cross building and reproducible
builds bugs and an RC bug to DELAYED/10. The changes should also be
available via dgit.

debdiff follows:

diff -Nru lirc-0.10.1/debian/changelog lirc-0.10.1/debian/changelog
--- lirc-0.10.1/debian/changelog	2022-12-28 03:25:42.000000000 -0800
+++ lirc-0.10.1/debian/changelog	2023-12-05 15:52:45.000000000 -0800
@@ -1,3 +1,28 @@
+lirc (0.10.1-7.3) unstable; urgency=medium
+
+  [ Vagrant Cascadian ]
+  * Non-maintainer upload.
+  * tools: Do not embed build date and kernel version in various files.
+    (Closes: #979019)
+  * debian/rules: Run build in the C.UTF-8 locale. (Closes: #979023)
+
+  [ Helmut Grohne ]
+  * Build verbosely by default. (Closes: #988907)
+
+  [ Vagrant Cascadian ]
+  * debian/rules: Normalize shipped tarball of python source code.
+    (Closes: #979024)
+
+  [ Helmut Grohne ]
+  * Fix FTBFS when systemdsystemunitdir changes in systemd.pc.
+    (Closes: #1052309)
+  * Fix build vs host confusion. (Closes: #1052309)
+  * Check for /dev/input using AC_CHECK_FILE. (Closes: #989304)
+  * Multiarchify python Build-Depends. (Closes: #989304)
+  * Export _PYTHON_SYSCONFIGDATA_NAME for setup.py. (Closes: #989304)
+
+ -- Vagrant Cascadian <vagrant at reproducible-builds.org>  Tue, 05 Dec 2023 15:52:45 -0800
+
 lirc (0.10.1-7.2) unstable; urgency=medium
 
   * Non-maintainer upload.
diff -Nru lirc-0.10.1/debian/control lirc-0.10.1/debian/control
--- lirc-0.10.1/debian/control	2022-12-28 03:25:42.000000000 -0800
+++ lirc-0.10.1/debian/control	2023-12-05 15:52:45.000000000 -0800
@@ -18,6 +18,7 @@
  kmod [linux-any],
  libasound2-dev [linux-any kfreebsd-any],
  libftdi1-dev,
+ libpython3-dev (>= 3.5),
  libsystemd-dev [linux-any],
  libudev-dev [linux-any],
  libusb-1.0-0-dev [!kfreebsd-any],
@@ -26,9 +27,9 @@
  man2html-base,
  pkg-config,
  portaudio19-dev,
- python3-dev (>= 3.5),
+ python3-dev:any (>= 3.5),
  python3-setuptools,
- python3-yaml,
+ python3-yaml:native,
  socat [!hurd-any],
  systemd [linux-any],
  xsltproc
diff -Nru lirc-0.10.1/debian/install lirc-0.10.1/debian/install
--- lirc-0.10.1/debian/install	2022-12-28 03:25:42.000000000 -0800
+++ lirc-0.10.1/debian/install	2023-12-05 15:52:45.000000000 -0800
@@ -1,7 +1,7 @@
 #! /usr/bin/dh-exec
 
 etc/lirc
-[linux-any] lib/systemd/*
+[linux-any] ${systemdsystemunitdir}
 [linux-any] usr/lib/tmpfiles.d/*
 [linux-any] usr/bin/lirc-make-devinput
 [linux-any] usr/bin/irpipe
diff -Nru lirc-0.10.1/debian/patches/check-for-devinput-using-ac_check_file.patch lirc-0.10.1/debian/patches/check-for-devinput-using-ac_check_file.patch
--- lirc-0.10.1/debian/patches/check-for-devinput-using-ac_check_file.patch	1969-12-31 16:00:00.000000000 -0800
+++ lirc-0.10.1/debian/patches/check-for-devinput-using-ac_check_file.patch	2023-12-05 15:52:45.000000000 -0800
@@ -0,0 +1,44 @@
+From: Helmut Grohne <helmut at subdivi.de>
+Date: Mon, 31 May 2021 13:09:56 +0200
+X-Dgit-Generated: 0.10.1-7.3 54cb42673c340f60f85764753d13da093aad4baf
+Subject: Check for /dev/input using AC_CHECK_FILE.
+
+(Closes: #989304)
+
+---
+
+diff --git a/configure.ac b/configure.ac
+index 1d910b0..66f96aa 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -289,29 +289,12 @@ else
+ fi
+ 
+ AC_MSG_CHECKING(for devinput)
+-AC_RUN_IFELSE([AC_LANG_PROGRAM([[
+-  #include <unistd.h>
+-]],[[
+-  return access("/dev/input", R_OK) == 0 ? 0 : 1;
+-]])],[
++AC_CHECK_FILE([/dev/input],[
+   have_devinput="yes"
+   AC_MSG_RESULT(yes)
+ ],[
+   AC_MSG_RESULT(no)
+   have_devinput="no"
+-],[
+-  AS_IF([test x$DEVINPUT_HEADER = x -a x$enable_devinput = xyes], [
+-    AC_MSG_ERROR([
+-      cannot cross-compile with devinput without DEVINPUT_HEADER
+-      defined, giving up
+-    ])
+-  ])
+-  if test -n "$DEVINPUT_HEADER" ; then
+-    have_devinput="yes"
+-  else
+-    have_devinput="no"
+-  fi
+-  AC_MSG_RESULT(yes)
+ ])
+ 
+ 
diff -Nru lirc-0.10.1/debian/patches/series lirc-0.10.1/debian/patches/series
--- lirc-0.10.1/debian/patches/series	2022-12-28 03:25:42.000000000 -0800
+++ lirc-0.10.1/debian/patches/series	2023-12-05 15:52:45.000000000 -0800
@@ -9,3 +9,5 @@
 0009-Replace-the-obsolete-get_event_loop-with-get_running.patch
 0010-Patch-configure.ac-to-support-passing-MODINFO.patch
 0011-yaml.load.diff
+tools-do-not-embed-build-date-and-kernel.patch
+check-for-devinput-using-ac_check_file.patch
diff -Nru lirc-0.10.1/debian/patches/tools-do-not-embed-build-date-and-kernel.patch lirc-0.10.1/debian/patches/tools-do-not-embed-build-date-and-kernel.patch
--- lirc-0.10.1/debian/patches/tools-do-not-embed-build-date-and-kernel.patch	1969-12-31 16:00:00.000000000 -0800
+++ lirc-0.10.1/debian/patches/tools-do-not-embed-build-date-and-kernel.patch	2023-12-05 15:52:45.000000000 -0800
@@ -0,0 +1,59 @@
+From: Vagrant Cascadian <vagrant at reproducible-builds.org>
+Date: Sat, 2 Jan 2021 00:01:20 +0000
+X-Dgit-Generated: 0.10.1-7.3 1f430917c5ab786478d575d9714dd4e19defd8e1
+Subject: tools: Do not embed build date and kernel version in various files.
+
+(Closes: #979019)
+
+https://reproducible-builds.org/docs/timestamps/
+https://tests.reproducible-builds.org/debian/issues/unstable/captures_kernel_version_issue.html
+
+Partially fixed upstream:
+https://sourceforge.net/p/lirc/git/merge-requests/36/
+
+---
+
+diff --git a/tools/irdb-get b/tools/irdb-get
+index e4e0a26..7688475 100755
+--- a/tools/irdb-get
++++ b/tools/irdb-get
+@@ -193,7 +193,7 @@ def do_yaml_config():
+         lircmd_by_driver[driver].append("%s/%s" % (tokens[0], tokens[2]))
+ 
+     print("#")
+-    print("# Created by 'irdb-get yaml-config' at " + time.ctime())
++    print("# Created by 'irdb-get yaml-config' ")
+     print("#")
+     print("\nlircd_by_driver:")
+     print_yaml_dict(lircd_by_driver)
+diff --git a/tools/lirc-lsplugins.cpp b/tools/lirc-lsplugins.cpp
+index ba67a3c..d38087f 100644
+--- a/tools/lirc-lsplugins.cpp
++++ b/tools/lirc-lsplugins.cpp
+@@ -415,10 +415,9 @@ static void print_header(void)
+ static void print_yaml_header(void)
+ {
+ 	static const char* const YAML_HEADER =
+-		"#\n# Generated by lirc-lsplugins --yaml (%s) at %s#\n ";
+-	const time_t now = time(NULL);
++		"#\n# Generated by lirc-lsplugins --yaml (%s)\n ";
+ 
+-	printf(YAML_HEADER, VERSION, ctime(&now));
++	printf(YAML_HEADER, VERSION);
+ 	printf("\ndrivers:\n");
+ }
+ 
+diff --git a/tools/lirc-make-devinput b/tools/lirc-make-devinput
+index f7e6f97..c37b5e1 100755
+--- a/tools/lirc-make-devinput
++++ b/tools/lirc-make-devinput
+@@ -61,8 +61,7 @@ if test -n "$lirc_map"; then
+ fi
+ 
+ 
+-echo "# Generated by $(basename $0) on $(uname -r)"
+-echo "# Date: $(date)"
++echo "# Generated by $(basename $0)"
+ cat <<EOF
+ 
+ begin remote
diff -Nru lirc-0.10.1/debian/rules lirc-0.10.1/debian/rules
--- lirc-0.10.1/debian/rules	2022-12-28 03:25:42.000000000 -0800
+++ lirc-0.10.1/debian/rules	2023-12-05 15:52:45.000000000 -0800
@@ -1,9 +1,15 @@
 #!/usr/bin/make -f
 
 include /usr/share/dpkg/architecture.mk
+include /usr/share/dpkg/pkg-info.mk
 
 export DEB_BUILD_MAINT_OPTIONS      = hardening=+all
 export DEB_LDFLAGS_MAINT_APPEND     = -Wl,--as-needed
+export _PYTHON_SYSCONFIGDATA_NAME=_sysconfigdata__$(DEB_HOST_ARCH_OS)_$(DEB_HOST_MULTIARCH)
+
+export LC_ALL=C.UTF-8
+
+export systemdsystemunitdir=$(shell pkg-config --variable=systemdsystemunitdir systemd | sed s,^/,,)
 
 %:
 	dh $@ --with python3
@@ -20,18 +26,16 @@
 
 override_dh_auto_configure: debian/lirc.preinst
 override_dh_auto_configure:
-ifeq ($(DEB_BUILD_ARCH_OS), linux)
+ifeq ($(DEB_HOST_ARCH_OS), linux)
 	dh_auto_configure -- \
 	    SH_PATH=/bin/sh \
 	    MODINFO=/sbin/modinfo \
-	    --enable-uinput --enable-devinput \
-	    --enable-silent-rules
+	    --enable-uinput --enable-devinput
 else
 	dh_auto_configure -- \
 	    SH_PATH=/bin/sh \
 	    MODINFO=/sbin/modinfo \
-	    --disable-uinput --disable-devinput \
-	    --enable-silent-rules
+	    --disable-uinput --disable-devinput
 endif
 
 
@@ -44,7 +48,7 @@
 	find debian/tmp -name *.la -delete
 	rm -f debian/tmp/usr/share/doc/lirc/lirc.org/api-docs/api-docs
 	chmod 755 debian/tmp/usr/share/lirc/python-pkg/lirc/lirctool
-ifeq ($(DEB_BUILD_ARCH_OS), linux)
+ifeq ($(DEB_HOST_ARCH_OS), linux)
 	mkdir -p debian/tmp/usr/lib/tmpfiles.d
 	echo "d /run/lirc  0755  root  root  10d" \
 	    > debian/tmp/usr/lib/tmpfiles.d/lirc.conf
@@ -67,7 +71,7 @@
 endif
 
 override_dh_installsystemd:
-ifeq ($(DEB_BUILD_ARCH_OS), linux)
+ifeq ($(DEB_HOST_ARCH_OS), linux)
 	dh_installsystemd -p lirc lircd.socket
 	dh_installsystemd -p lirc --no-enable --no-start lircd.service
 	dh_installsystemd -p lirc --no-enable --no-start irexec.service
@@ -77,6 +81,18 @@
 
 override_dh_install:
 	dh_install --fail-missing
+	# Normalize python tarball
+	tar --extract --file debian/lirc/usr/share/lirc/lirc-$(DEB_VERSION_UPSTREAM).tar.gz
+	rm -v debian/lirc/usr/share/lirc/lirc-$(DEB_VERSION_UPSTREAM).tar.gz
+	tar --sort=name \
+		--mtime="@$(SOURCE_DATE_EPOCH)" \
+		--owner=0 --group=0 --numeric-owner \
+		--mode=u=rwX,go=rX \
+		--create \
+		--file debian/lirc/usr/share/lirc/lirc-$(DEB_VERSION_UPSTREAM).tar \
+		lirc-$(DEB_VERSION_UPSTREAM)
+	gzip --best --no-name debian/lirc/usr/share/lirc/lirc-$(DEB_VERSION_UPSTREAM).tar
+	rm -rvf lirc-$(DEB_VERSION_UPSTREAM)
 
 override_dh_installinit:
 	dh_installinit --package=lirc --name=lircd


live well,
  vagrant
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 227 bytes
Desc: not available
URL: <http://alioth-lists.debian.net/pipermail/python-modules-team/attachments/20231206/68cd25b3/attachment-0005.sig>


More information about the Python-modules-team mailing list