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

Bug#975895: marked as done (libxkbregistry-dev: missing dependency on libxml2-dev)



Your message dated Thu, 26 Nov 2020 13:19:12 +0000
with message-id <E1kiHB2-000Aft-OY@fasolo.debian.org>
and subject line Bug#975895: fixed in libxkbcommon 1.0.3-2
has caused the Debian Bug report #975895,
regarding libxkbregistry-dev: missing dependency on libxml2-dev
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.)


-- 
975895: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=975895
Debian Bug Tracking System
Contact owner@bugs.debian.org with problems
--- Begin Message ---
Package: libxkbregistry-dev
Version: 1.0.3-1
Severity: important
Tags: patch

If you have libxkbregistry-dev installed, but not libxml2-dev:

    $ pkg-config --cflags --libs xkbregistry
    Package libxml-2.0 was not found in the pkg-config search path.
    Perhaps you should add the directory containing `libxml-2.0.pc'
    to the PKG_CONFIG_PATH environment variable
    Package 'libxml-2.0', required by 'xkbregistry', not found

See attached patch 0001 for a trivial solution.

This class of bug is easy to catch with an autopkgtest that links
a trivial executable to the library (and in fact that's how I found
it, by running that type of test on a library that recently gained a
libxkbregistry dependency). Please consider adding a test for each
library in xkbcommon, as in the attached patch 0002.

Thanks,
    smcv

-- System Information:
Debian Release: bullseye/sid
  APT prefers unstable-debug
  APT policy: (500, 'unstable-debug'), (500, 'stable-debug'), (500, 'buildd-unstable'), (500, 'unstable'), (500, 'testing'), (500, 'stable'), (500, 'oldstable'), (1, 'experimental-debug'), (1, 'buildd-experimental'), (1, 'experimental')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 5.9.0-3-amd64 (SMP w/8 CPU threads)
Locale: LANG=en_GB.utf8, LC_CTYPE=en_GB.utf8 (charmap=UTF-8), LANGUAGE=en_GB:en
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

Versions of packages libxkbregistry-dev depends on:
ii  libxkbcommon-dev  1.0.3-1
ii  libxkbregistry0   1.0.3-1

libxkbregistry-dev recommends no packages.

libxkbregistry-dev suggests no packages.

-- no debconf information
>From 7c3b7f1b4aa741af5145c991dc7f6b170e25a65b Mon Sep 17 00:00:00 2001
From: Simon McVittie <smcv@debian.org>
Date: Thu, 26 Nov 2020 10:53:46 +0000
Subject: [PATCH 1/2] libxkbregistry-dev: Depend on libxml2-dev

Otherwise, using pkg-config to check for the library or a library that
depends on it can fail:

$ pkg-config --cflags --libs xkbregistry
Package libxml-2.0 was not found in the pkg-config search path.
Perhaps you should add the directory containing `libxml-2.0.pc'
to the PKG_CONFIG_PATH environment variable
Package 'libxml-2.0', required by 'xkbregistry', not found

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

diff --git a/debian/control b/debian/control
index 3bc8bf0..27a6f54 100644
--- a/debian/control
+++ b/debian/control
@@ -183,6 +183,7 @@ Pre-Depends: ${misc:Pre-Depends}
 Depends:
  libxkbcommon-dev (= ${binary:Version}),
  libxkbregistry0 (= ${binary:Version}),
+ libxml2-dev,
  ${shlibs:Depends},
  ${misc:Depends}
 Description: library to query available RMLVO - development files
-- 
2.29.2

>From 916af9f7828fba99b54cada57f2c600919f80881 Mon Sep 17 00:00:00 2001
From: Simon McVittie <smcv@debian.org>
Date: Thu, 26 Nov 2020 10:50:38 +0000
Subject: [PATCH 2/2] Add a superficial compile/link/run test for each -dev
 package

This can be used to check that each -dev package is self-contained.

Signed-off-by: Simon McVittie <smcv@debian.org>
---
 debian/tests/control              | 11 +++++++++
 debian/tests/libxkbcommon-dev     | 36 +++++++++++++++++++++++++++++
 debian/tests/libxkbcommon-x11-dev | 37 ++++++++++++++++++++++++++++++
 debian/tests/libxkbregistry-dev   | 38 +++++++++++++++++++++++++++++++
 4 files changed, 122 insertions(+)
 create mode 100644 debian/tests/control
 create mode 100644 debian/tests/libxkbcommon-dev
 create mode 100644 debian/tests/libxkbcommon-x11-dev
 create mode 100644 debian/tests/libxkbregistry-dev

diff --git a/debian/tests/control b/debian/tests/control
new file mode 100644
index 0000000..fb0588f
--- /dev/null
+++ b/debian/tests/control
@@ -0,0 +1,11 @@
+Tests: libxkbcommon-dev
+Restrictions: allow-stderr, superficial
+Depends: build-essential, pkg-config, libxkbcommon-dev
+
+Tests: libxkbcommon-x11-dev
+Restrictions: allow-stderr, superficial
+Depends: build-essential, pkg-config, libxkbcommon-x11-dev
+
+Tests: libxkbregistry-dev
+Restrictions: allow-stderr, superficial
+Depends: build-essential, pkg-config, libxkbregistry-dev
diff --git a/debian/tests/libxkbcommon-dev b/debian/tests/libxkbcommon-dev
new file mode 100644
index 0000000..14fc4a5
--- /dev/null
+++ b/debian/tests/libxkbcommon-dev
@@ -0,0 +1,36 @@
+#!/bin/sh
+# Copyright 2020 Collabora Ltd.
+# Copyright 2020 Simon McVittie
+# SPDX-License-Identifier: MIT
+
+set -eux
+
+if [ -n "${DEB_HOST_GNU_TYPE:-}" ]; then
+    CROSS_COMPILE="$DEB_HOST_GNU_TYPE-"
+    CC="${CROSS_COMPILE}gcc"
+    PKG_CONFIG="${CROSS_COMPILE}pkg-config"
+else
+    CROSS_COMPILE=
+    CC=cc
+    PKG_CONFIG=pkg-config
+fi
+
+cd "$AUTOPKGTEST_TMP"
+
+cat > trivial.c <<EOF
+#undef NDEBUG
+#include <assert.h>
+
+#include <xkbcommon/xkbcommon.h>
+
+int main (void)
+{
+    assert(xkb_keysym_from_name("A", XKB_KEYSYM_NO_FLAGS) == XKB_KEY_A);
+    return 0;
+}
+EOF
+
+# Deliberately word-splitting pkg-config's output:
+# shellcheck disable=SC2046
+"${CC}" -otrivial trivial.c $("${PKG_CONFIG}" --cflags --libs xkbcommon)
+./trivial
diff --git a/debian/tests/libxkbcommon-x11-dev b/debian/tests/libxkbcommon-x11-dev
new file mode 100644
index 0000000..68e6a93
--- /dev/null
+++ b/debian/tests/libxkbcommon-x11-dev
@@ -0,0 +1,37 @@
+#!/bin/sh
+# Copyright 2020 Collabora Ltd.
+# Copyright 2020 Simon McVittie
+# SPDX-License-Identifier: MIT
+
+set -eux
+
+if [ -n "${DEB_HOST_GNU_TYPE:-}" ]; then
+    CROSS_COMPILE="$DEB_HOST_GNU_TYPE-"
+    CC="${CROSS_COMPILE}gcc"
+    PKG_CONFIG="${CROSS_COMPILE}pkg-config"
+else
+    CROSS_COMPILE=
+    CC=cc
+    PKG_CONFIG=pkg-config
+fi
+
+cd "$AUTOPKGTEST_TMP"
+
+cat > trivial.c <<EOF
+#undef NDEBUG
+#include <assert.h>
+
+#include <xkbcommon/xkbcommon-x11.h>
+
+int main (void)
+{
+    int32_t (*func) (xcb_connection_t *) = xkb_x11_get_core_keyboard_device_id;
+    assert(func);
+    return 0;
+}
+EOF
+
+# Deliberately word-splitting pkg-config's output:
+# shellcheck disable=SC2046
+"${CC}" -otrivial trivial.c $("${PKG_CONFIG}" --cflags --libs xkbcommon-x11)
+./trivial
diff --git a/debian/tests/libxkbregistry-dev b/debian/tests/libxkbregistry-dev
new file mode 100644
index 0000000..f4ef176
--- /dev/null
+++ b/debian/tests/libxkbregistry-dev
@@ -0,0 +1,38 @@
+#!/bin/sh
+# Copyright 2020 Collabora Ltd.
+# Copyright 2020 Simon McVittie
+# SPDX-License-Identifier: MIT
+
+set -eux
+
+if [ -n "${DEB_HOST_GNU_TYPE:-}" ]; then
+    CROSS_COMPILE="$DEB_HOST_GNU_TYPE-"
+    CC="${CROSS_COMPILE}gcc"
+    PKG_CONFIG="${CROSS_COMPILE}pkg-config"
+else
+    CROSS_COMPILE=
+    CC=cc
+    PKG_CONFIG=pkg-config
+fi
+
+cd "$AUTOPKGTEST_TMP"
+
+cat > trivial.c <<EOF
+#undef NDEBUG
+#include <assert.h>
+
+#include <xkbcommon/xkbregistry.h>
+
+int main (void)
+{
+    struct rxkb_context *ctx = rxkb_context_new(RXKB_CONTEXT_NO_FLAGS);
+    assert(ctx);
+    rxkb_context_unref(ctx);
+    return 0;
+}
+EOF
+
+# Deliberately word-splitting pkg-config's output:
+# shellcheck disable=SC2046
+"${CC}" -otrivial trivial.c $("${PKG_CONFIG}" --cflags --libs xkbregistry)
+./trivial
-- 
2.29.2


--- End Message ---
--- Begin Message ---
Source: libxkbcommon
Source-Version: 1.0.3-2
Done: Timo Aaltonen <tjaalton@debian.org>

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

Debian distribution maintenance software
pp.
Timo Aaltonen <tjaalton@debian.org> (supplier of updated libxkbcommon 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: Thu, 26 Nov 2020 14:55:39 +0200
Source: libxkbcommon
Architecture: source
Version: 1.0.3-2
Distribution: unstable
Urgency: medium
Maintainer: Debian X Strike Force <debian-x@lists.debian.org>
Changed-By: Timo Aaltonen <tjaalton@debian.org>
Closes: 975895
Changes:
 libxkbcommon (1.0.3-2) unstable; urgency=medium
 .
   [ Simon McVittie ]
   * libxkbregistry-dev: Depend on libxml2-dev (Closes: #975895)
   * Add a superficial compile/link/run test for each -dev package
Checksums-Sha1:
 f6af29a37548c273113d368cb16ddf8bb1c99706 2754 libxkbcommon_1.0.3-2.dsc
 75d670c1bd5c3ba6f02130123ca28eed02b845bf 7844 libxkbcommon_1.0.3-2.debian.tar.xz
 589f9295fbdc4080fd32f56e2693f10524d175fa 8632 libxkbcommon_1.0.3-2_source.buildinfo
Checksums-Sha256:
 478a29edcc52dafae5a5df78d783343e451380d993faf13905cc1fd8dbc404ec 2754 libxkbcommon_1.0.3-2.dsc
 d007ae250a71dc13102477c0dbf0b02dd8a86cd881cd001d102478a81466d2f1 7844 libxkbcommon_1.0.3-2.debian.tar.xz
 c9f03e19d8cfebbf57cfe1dd9d139ce3c50e6aae655cdd8ff275750f83efc7c7 8632 libxkbcommon_1.0.3-2_source.buildinfo
Files:
 62bd440f4296fa584ef5b94dc4bbaae5 2754 x11 optional libxkbcommon_1.0.3-2.dsc
 29fb9c0f596f4945bea773bcfc92ef83 7844 x11 optional libxkbcommon_1.0.3-2.debian.tar.xz
 1149fc49414efde1fdf133d05173bf20 8632 x11 optional libxkbcommon_1.0.3-2_source.buildinfo

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

iQIzBAEBCgAdFiEEdS3ifE3rFwGbS2Yjy3AxZaiJhNwFAl+/pg4ACgkQy3AxZaiJ
hNyXyhAAhFU+VFS+wfDJpQqqgHbfL4TyEIIFKIW1fiZ65syCgOa7CAytx67kiNzP
xq/8GHy5UH8m9JZwDwDPdVOTQBnIVVqP6Z43+QzrfKLK8qBVaFBGLztponYCXUc5
g8dmCgeiRShpWN/4Thmwie3+qOgsSLFBdwNmk3G8dOhLjvfP7Be3KhNLYPXxV/dY
K9h78DdE6baEkRgLGe/mSMgzLhI2Zjf2XVMALwouqh/ieDq3qGrgDUGXb6a9S/99
pLao3o2rUPb5//oXFmbaHzKTeiL209DbMU9pwKVMuesYOPUB1lQSclM1g6QUbPWd
XaEwdd2qChawgsbf2iHnyBYatvVYgxI0PtLo/q72SZTZcXW2LAGE+LhWcU1RwcDZ
pLTXCvzx6e/d8RV3vDRLf/f3lziO4JqbUudCXKMh5rusE5Zl55CY7Ir92lrrqU0F
KNcwWF7wr48EXcGseMWO8OSG+1vJpa8rF/tAlLmb6aIoxBBBbtkEmNqHes/PaflO
/RLXU2eaLc3TurRqd0k20NdfgUX682H6x4hzcZ8S4T1WKyBorsMPzkFpzLFQsNff
EikoRHezC3E8Gvf4cDBGaFq70j6l9l9R1Ep5CAQ5iINHycOIz5Cr1x9pVGM4V1xZ
HoGnnlgZkZwuRUaNcsdwJNR9H5JZVP29ZMJgwD3bJixFNtc35dE=
=kQyJ
-----END PGP SIGNATURE-----

--- End Message ---

Reply to: