Package: pipewire
Version: 1.0.3-1.1
Severity: serious
Tags: patch
Justification: ftbfs
User: ubuntu-de...@lists.ubuntu.com
Usertags: origin-ubuntu noble ubuntu-patch

Dear maintainers,

pipewire fails to build from source on 32-bit architectures under 64-bit
time_t, because it has a module that legitimately un-sets _FILE_OFFSET_BITS
for building but this is not allowed without also unsetting _TIME_BITS.

Since this is a legitimate un-setting of _FILE_OFFSET_BITS in order to get
access to the necessary libc6 prototypes and macros, and since the functions
being intercepted are not sensitive to time_t, the simplest solution is to
also unset _TIME_BITS.

Please see the attached patch, which has been uploaded to Ubuntu to fix this
build failure.

Thanks for considering,
-- 
Steve Langasek                   Give me a lever long enough and a Free OS
Debian Developer                   to set it on, and I can move the world.
Ubuntu Developer                                   https://www.debian.org/
slanga...@ubuntu.com                                     vor...@debian.org
diff -Nru pipewire-1.0.3/debian/control pipewire-1.0.3/debian/control
--- pipewire-1.0.3/debian/control       2024-03-04 08:54:55.000000000 -0800
+++ pipewire-1.0.3/debian/control       2024-03-13 23:11:56.000000000 -0700
@@ -1,8 +1,7 @@
 Source: pipewire
 Section: libs
 Priority: optional
-Maintainer: Ubuntu Developers <ubuntu-devel-disc...@lists.ubuntu.com>
-XSBC-Original-Maintainer: Utopia Maintenance Team 
<pkg-utopia-maintain...@alioth-lists.debian.net>
+Maintainer: Utopia Maintenance Team 
<pkg-utopia-maintain...@alioth-lists.debian.net>
 Uploaders: Jeremy Bicha <jbi...@debian.org>,
            Dylan Aïssi <dai...@debian.org>
 Build-Depends: dpkg-dev (>= 1.22.5), debhelper-compat (= 13),
diff -Nru pipewire-1.0.3/debian/patches/64-bit-time-t-compat.patch 
pipewire-1.0.3/debian/patches/64-bit-time-t-compat.patch
--- pipewire-1.0.3/debian/patches/64-bit-time-t-compat.patch    1969-12-31 
16:00:00.000000000 -0800
+++ pipewire-1.0.3/debian/patches/64-bit-time-t-compat.patch    2024-03-13 
23:11:47.000000000 -0700
@@ -0,0 +1,21 @@
+Description: 64-bit time_t compatibility for v4l2 module
+ The v4l2 build unsets _FILE_OFFSET_BITS, which is not allowed when setting
+ _TIME_BITS=64.  Having verified that nothing in this module is sensitive to
+ 64-bit time_t (none of the functions it intercepts handle time), we also
+ unset _TIME_BITS to allow this to build as before.
+Author: Steve Langasek <steve.langa...@canonical.com>
+Forwarded: no
+Last-Update: 2024-03-13
+
+Index: pipewire-1.0.3/pipewire-v4l2/src/meson.build
+===================================================================
+--- pipewire-1.0.3.orig/pipewire-v4l2/src/meson.build
++++ pipewire-1.0.3/pipewire-v4l2/src/meson.build
+@@ -12,6 +12,7 @@
+   '-U_FILE_OFFSET_BITS',
+   '-D_FILE_OFFSET_BITS=32',
+   '-D_LARGEFILE64_SOURCE',
++  '-U_TIME_BITS',
+   '-fvisibility=hidden',
+ ]
+ 
diff -Nru pipewire-1.0.3/debian/patches/series 
pipewire-1.0.3/debian/patches/series
--- pipewire-1.0.3/debian/patches/series        2024-03-04 08:54:55.000000000 
-0800
+++ pipewire-1.0.3/debian/patches/series        2024-03-13 23:09:06.000000000 
-0700
@@ -19,3 +19,4 @@
 snap/snap-policy-Manage-ENOPROTOOPT-error-in-aa_getpeercon.patch
 snap/snap-policy-ensure-audio-works-with-.deb-snapd.patch
 snap/snap-policy-fix-memory-leak.patch
+64-bit-time-t-compat.patch

Reply via email to