[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#960445: marked as done (libsndfile1-dev: not multi-arch co-installable)



Your message dated Mon, 25 May 2020 16:09:08 +0000
with message-id <E1jdFf2-000CSq-Db@fasolo.debian.org>
and subject line Bug#960445: fixed in libsndfile 1.0.28-8
has caused the Debian Bug report #960445,
regarding libsndfile1-dev: not multi-arch co-installable
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 owner@bugs.debian.org
immediately.)


-- 
960445: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=960445
Debian Bug Tracking System
Contact owner@bugs.debian.org with problems
--- Begin Message ---
Package: libsndfile1-dev
Version: 1.0.28-7
Severity: normal
Tags: patch

While working on a Debian-based Flatpak-style runtime/SDK environment for
games, I noticed that libsndfile1-dev was one of only a few non-multiarch
-dev packages in my initial package set.

It isn't completely multiarch-compatible (or, strictly speaking,
Policy-compliant) because it installs config.h into
/usr/share/doc/libsndfile1-dev/examples, and that file is different on
different architectures. However, after decoupling the examples from
config.h (they include it, but don't appear to use it), it is possible to
make the package fully multiarch.

While testing this out, I added an autopkgtest. I've found that tests
like this are a useful way to automate checks that development files are
packaged correctly: even though they don't have significant coverage of
the actual library code, they can detect common mistakes like missing
header files, wrong search paths, and missing dependencies on other -dev
packages referenced by the pkg-config file.

    smcv
>From 4b5309b5e9d4e2426365db2205a50b4656e9bd72 Mon Sep 17 00:00:00 2001
From: Simon McVittie <smcv@collabora.com>
Date: Tue, 12 May 2020 16:09:59 +0100
Subject: [PATCH 1/3] examples: Decouple from config.h

This allows them to be built standalone, without the rest of the
libsndfile source tree. This is useful because config.h is
architecture-dependent, preventing multi-arch co-installation.

Signed-off-by: Simon McVittie <smcv@collabora.com>
---
 debian/examples/Makefile                      |  2 +-
 debian/libsndfile1-dev.examples               |  3 --
 .../examples-Decouple-from-config.h.patch     | 39 +++++++++++++++++++
 debian/patches/series                         |  1 +
 4 files changed, 41 insertions(+), 4 deletions(-)
 create mode 100644 debian/patches/examples-Decouple-from-config.h.patch

diff --git a/debian/examples/Makefile b/debian/examples/Makefile
index 82d9a97..89dc9c9 100644
--- a/debian/examples/Makefile
+++ b/debian/examples/Makefile
@@ -7,7 +7,7 @@ SNDLIBS=$(LIBS) $(shell pkg-config --cflags --libs sndfile) -lm
 default: $(APPS)
 
 %: %.c
-	$(CC) -Icommon $(CPPFLAGS) $(CFLAGS) -o $@ $< $(SNDLIBS)
+	$(CC) $(CPPFLAGS) $(CFLAGS) -o $@ $< $(SNDLIBS)
 
 clean:
 	rm -f $(APPS)
diff --git a/debian/libsndfile1-dev.examples b/debian/libsndfile1-dev.examples
index 12bd6a0..6722afb 100644
--- a/debian/libsndfile1-dev.examples
+++ b/debian/libsndfile1-dev.examples
@@ -1,5 +1,2 @@
 examples/*.c
 debian/examples/Makefile
-src/common.h
-src/sfconfig.h
-src/config.h
diff --git a/debian/patches/examples-Decouple-from-config.h.patch b/debian/patches/examples-Decouple-from-config.h.patch
new file mode 100644
index 0000000..d6360ff
--- /dev/null
+++ b/debian/patches/examples-Decouple-from-config.h.patch
@@ -0,0 +1,39 @@
+From: Simon McVittie <smcv@collabora.com>
+Date: Tue, 12 May 2020 16:09:19 +0100
+Subject: examples: Decouple from config.h
+
+This allows them to be built standalone, without the rest of the
+libsndfile source tree.
+
+Signed-off-by: Simon McVittie <smcv@collabora.com>
+---
+ examples/generate.c        | 2 --
+ examples/sndfile-loopify.c | 2 --
+ 2 files changed, 4 deletions(-)
+
+diff --git a/examples/generate.c b/examples/generate.c
+index 884e8d7..dade7d9 100644
+--- a/examples/generate.c
++++ b/examples/generate.c
+@@ -30,8 +30,6 @@
+ ** ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+ 
+-#include "sfconfig.h"
+-
+ #include <stdio.h>
+ #include <stdlib.h>
+ #include <string.h>
+diff --git a/examples/sndfile-loopify.c b/examples/sndfile-loopify.c
+index f0ceb6d..b0aded4 100644
+--- a/examples/sndfile-loopify.c
++++ b/examples/sndfile-loopify.c
+@@ -44,8 +44,6 @@
+ 
+ #include <sndfile.h>
+ 
+-#include "common.h"
+-
+ #define BUFFER_LEN		(1 << 14)
+ 
+ 
diff --git a/debian/patches/series b/debian/patches/series
index 5fb4b24..64496ee 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -10,3 +10,4 @@ a-ulaw-fix-multiple-buffer-overflows-432.patch
 double64_init-Check-psf-sf.channels-against-upper-bo.patch
 src-wav.c-Fix-heap-read-overflow.patch
 Check-MAX_CHANNELS-in-sndfile-deinterleave.patch
+examples-Decouple-from-config.h.patch
-- 
2.26.2

>From 86ac458b3b5a0d05aa54836564ba6321afb2b016 Mon Sep 17 00:00:00 2001
From: Simon McVittie <smcv@collabora.com>
Date: Tue, 12 May 2020 15:15:53 +0100
Subject: [PATCH 2/3] Mark libsndfile1-dev as Multi-Arch: same

Now that config.h isn't included, everything in a
non-architecture-specific directory is the same across architectures.

Signed-off-by: Simon McVittie <smcv@collabora.com>
---
 debian/control | 1 +
 1 file changed, 1 insertion(+)

diff --git a/debian/control b/debian/control
index e095391..c53975e 100644
--- a/debian/control
+++ b/debian/control
@@ -19,6 +19,7 @@ Standards-Version: 4.5.0
 Package: libsndfile1-dev
 Section: libdevel
 Architecture: any
+Multi-Arch: same
 Depends:
  ${misc:Depends},
  libsndfile1 (= ${binary:Version}),
-- 
2.26.2

>From e8289f9d192aa56d66f6ee9c8f1f639c19cc4ad8 Mon Sep 17 00:00:00 2001
From: Simon McVittie <smcv@collabora.com>
Date: Tue, 12 May 2020 15:22:38 +0100
Subject: [PATCH 3/3] Add a superficial compile/link/execute autopkgtest

This verifies that libsndfile1-dev contains all the necessary files.

Signed-off-by: Simon McVittie <smcv@collabora.com>
---
 debian/tests/control         |  3 +++
 debian/tests/libsndfile1-dev | 26 ++++++++++++++++++++++++++
 2 files changed, 29 insertions(+)
 create mode 100644 debian/tests/control
 create mode 100755 debian/tests/libsndfile1-dev

diff --git a/debian/tests/control b/debian/tests/control
new file mode 100644
index 0000000..06d9b45
--- /dev/null
+++ b/debian/tests/control
@@ -0,0 +1,3 @@
+Tests: libsndfile1-dev
+Restrictions: allow-stderr, superficial
+Depends: build-essential, libsndfile1-dev
diff --git a/debian/tests/libsndfile1-dev b/debian/tests/libsndfile1-dev
new file mode 100755
index 0000000..4eb0aef
--- /dev/null
+++ b/debian/tests/libsndfile1-dev
@@ -0,0 +1,26 @@
+#!/bin/sh
+# Copyright 2020 Collabora Ltd.
+# SPDX-License-Identifier: LGPL-2.1-or-later
+
+set -eux
+
+if [ -n "${AUTOPKGTEST_ARTIFACTS-}" ]; then
+	WORKDIR="$AUTOPKGTEST_ARTIFACTS"
+else
+	WORKDIR="$(mktemp -d)"
+	trap 'cd /; rm -fr "$WORKDIR"' 0 INT QUIT ABRT PIPE TERM
+fi
+
+if [ -n "${DEB_HOST_GNU_TYPE:-}" ]; then
+    CROSS_COMPILE="$DEB_HOST_GNU_TYPE-"
+else
+    CROSS_COMPILE=
+fi
+
+cp examples/make_sine.c "$WORKDIR"
+cd "$WORKDIR"
+
+# Deliberately word-splitting pkg-config's output:
+# shellcheck disable=SC2046
+"${CROSS_COMPILE}gcc" -omake_sine make_sine.c -lm $("${CROSS_COMPILE}pkg-config" --cflags --libs sndfile)
+./make_sine
-- 
2.26.2


--- End Message ---
--- Begin Message ---
Source: libsndfile
Source-Version: 1.0.28-8
Done: Mattia Rizzolo <mattia@debian.org>

We believe that the bug you reported is fixed in the latest version of
libsndfile, 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 960445@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Mattia Rizzolo <mattia@debian.org> (supplier of updated libsndfile 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 ftpmaster@ftp-master.debian.org)


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512

Format: 1.8
Date: Mon, 25 May 2020 17:33:03 +0200
Source: libsndfile
Architecture: source
Version: 1.0.28-8
Distribution: unstable
Urgency: medium
Maintainer: Debian Multimedia Maintainers <debian-multimedia@lists.debian.org>
Changed-By: Mattia Rizzolo <mattia@debian.org>
Closes: 960445
Changes:
 libsndfile (1.0.28-8) unstable; urgency=medium
 .
   * Team upload.
 .
   [ Simon McVittie ]
   * examples: Decouple from config.h.
     This allows them to be built standalone, without the rest of the
     libsndfile source tree. This is useful because config.h is
     architecture-dependent, preventing multi-arch co-installation.
   * Mark libsndfile1-dev as Multi-Arch: same.  (Closes: #960445; LP: #1720725)
   * Add a superficial compile/link/execute autopkgtest for libsndfile1-dev.
 .
   [ Mattia Rizzolo ]
   * d/control: Bump debhelper compat level to 13.
     + Add the .la file to d/not-installed.
   * d/rules: Remove now obsolete --dbgsym-migration option.
Checksums-Sha1:
 99398cd5350f741d2c31baefe30489802cbee551 2259 libsndfile_1.0.28-8.dsc
 c7d90a979d352c5909f10737597362b6ed067f6d 17392 libsndfile_1.0.28-8.debian.tar.xz
 51ad0a146971f2c985728af659e7c66a84036919 6878 libsndfile_1.0.28-8_amd64.buildinfo
Checksums-Sha256:
 c10fb104b3b47841c479f96d280b4de0cfd33f17d4bc9c0cd5ca357354e5f6b5 2259 libsndfile_1.0.28-8.dsc
 430679b0e7782b2109592cf686c1e5650638f80802770bcd7e37a7faa3d38b91 17392 libsndfile_1.0.28-8.debian.tar.xz
 884acfb05c562635cde87c2283752c5c56052db5a025eb11528d7bbb1025b96f 6878 libsndfile_1.0.28-8_amd64.buildinfo
Files:
 210a906c1f3e016954268bc856e1b87d 2259 devel optional libsndfile_1.0.28-8.dsc
 5222f256a7fa8ecc7f3e91ee15d98d0d 17392 devel optional libsndfile_1.0.28-8.debian.tar.xz
 31fcbbcfe3e2f54e1aba3afb17c74122 6878 devel optional libsndfile_1.0.28-8_amd64.buildinfo

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

iQIzBAEBCgAdFiEEi3hoeGwz5cZMTQpICBa54Yx2K60FAl7L5psACgkQCBa54Yx2
K63W1g//b7YHKAb1SYSgFnynbg/9UfGM/xoOnZ8OLUGTMHsfEtlzkrCc+8bUZFTI
NAK839g9AnrJj/AAQ5i/1AnJtes1CKI0lQcKWw5hPGCDIDQ6w+853Zu5QMMyo14K
Ng1PslQq9aR+iZmYnS7lX880FIq86CfEQH2IXTo65VkD3J5XomQOb3usP2qV9IOQ
aFM6NInOpCj/u8SuVXWU51aBr49LALvcnw6p7yNIRJSCFguIsNfJZqnBwtt5Sn7o
WOmVNaPZfEQD1g1NULIEj4z8JRuBl8RQDzZLNPA77cE2IwLC+giSzrD1AdXUX20+
4NTsvgpXGpXTTfKFKXY1b4ZrJ8/kJPSHxgHJ9NnYYkc9wmUZiyUTE+asWENqFbPr
7jYFv4v88olJt0BY34WEiSYx1bGBSA3Ci2pnlqvdBg3vWuR9JLvoGuePdRUS6KFV
j5dfaCkjNTJU9ZCmXmaqzuR/y+sEDwdgJyR5G7BOjowFSelh+Qj2BNdZKA/JLLY4
NCfXruWfgU31DzvUqz/MaP6jztD01FmVHjZrW0Gijo88S2agaCa3D7eRmSsP/Qxy
1Oq4oFqvd6KbnmPitwcBl5OS0EYKayAigVDJrfyTW65WB3SqHoG+U5cxJcnr4nnE
z2tKvL3XEMKq4UcufSRZjDjAK+F4vQD3Wp65RO3Na2+oGsijDhU=
=rN8l
-----END PGP SIGNATURE-----

--- End Message ---

Reply to: