#840013 bluez: Please announce supported hardware using AppStream

Package:
bluez
Source:
bluez
Description:
Bluetooth tools and daemons
Submitter:
Petter Reinholdtsen
Date:
2025-01-25 05:21:02 UTC
Severity:
wishlist
Tags:
#840013#5
Date:
2016-10-07 16:25:04 UTC
From:
To:
Hi.

The bluez package is one of the packages in the Debian archive that
should be proposed for installation when a given piece of hardware is
inserted or available.  Thanks to the appstream system, this can now be
announced in a way other tools can use and act on.  I've written the
isenkram system to ask the current user if hardware specific packages
should be installed when a new dongle is installed or already present on
a machine, and isenkram now uses appstream as one source for hardware to
package mappings.

You can read more about this on my blog,
<URL: http://people.skolelinux.org/pere/blog/Using_appstream_with_isenkram_to_install_hardware_related_packages_in_Debian.html >.

Instructions on how to create the metadata XML file can be found in
<URL: https://wiki.debian.org/AppStream/Guidelines >.

It would be great if you could add an appstream metainfo file to the
bluez package, with content similar to this:

  <?xml version="1.0" encoding="UTF-8"?>
  <component>
   [...]
   <provides>
	<modalias>lkmodule:bluetooth</modalias>
   </provides>
  </component>


If there are other hardware ids or kernel modules also supported by the
package, please add those too. :)

#840013#10
Date:
2024-05-13 19:07:05 UTC
From:
To:
Any hope to have this patch applied to the package?
#840013#15
Date:
2024-07-31 21:40:07 UTC
From:
To:
Here is the proposal as a patch.

diff --git a/debian/bluez.install b/debian/bluez.install
index 3826f0d3a..c2408db45 100644
--- a/debian/bluez.install
+++ b/debian/bluez.install
@@ -28,3 +28,4 @@ ${env:deb_systemdsystemunitdir}/bluetooth.service
 usr/share/dbus-1/system.d/bluetooth.conf
 usr/share/dbus-1/system-services/org.bluez.service
 usr/share/zsh/site-functions/_bluetoothctl
+usr/share/metadata/org.bluez.tools.metainfo.xml
diff --git a/debian/patches/1000-appstream-metainfo.patch b/debian/patches/1000-appstream-metainfo.patch
new file mode 100644
index 000000000..c45088ebf
--- /dev/null
+++ b/debian/patches/1000-appstream-metainfo.patch
@@ -0,0 +1,55 @@
+Description: Added AppStream metainfo XML with hardware provide info.
+ This allow isenkram to propose this package when the hardware is
+ present.
+Author: Petter Reinholdtsen
+Forwarded: no
+Last-Update: 2024-07-31
+---
+Index: bluez-salsa/Makefile.am
+===================================================================
+--- bluez-salsa.orig/Makefile.am       2024-07-31 23:28:42.681571962 +0200
++++ bluez-salsa/Makefile.am    2024-07-31 23:28:42.677571922 +0200
+@@ -14,7 +14,8 @@
+
+ CLEANFILES =
+
+-EXTRA_DIST =
++EXTRA_DIST = \
++      org.bluez.tools.metainfo.xml
+
+ pkglibexecdir = @PKGLIBEXECDIR@
+
+@@ -35,6 +36,9 @@
+       install -dm555 $(DESTDIR)$(confdir)
+       install -dm700 $(DESTDIR)$(statedir)
+
++dist_metainfo_DATA = org.bluez.tools.metainfo.xml
++metainfodir = $(datarootdir)/metainfo
++
+ if DATAFILES
+ dbusdir = $(DBUS_CONFDIR)/dbus-1/system.d
+ dbus_DATA = src/bluetooth.conf
+Index: bluez-salsa/org.bluez.tools.metainfo.xml
+===================================================================
+--- /dev/null  1970-01-01 00:00:00.000000000 +0000
++++ bluez-salsa/org.bluez.tools.metainfo.xml   2024-07-31 23:29:03.737781465 +0200
+@@ -0,0 +1,19 @@
++<?xml version="1.0" encoding="UTF-8"?>
++<component>
++  <id>org.bluez.tools</id>
++  <metadata_license>MIT</metadata_license>
++  <name>bluez</name>
++  <summary>Bluetooth tools and daemons</summary>
++  <description>
++    <p>This package contains tools and system daemons for using
++    Bluetooth devices.</p>
++
++    <p>BlueZ is the official Linux Bluetooth protocol stack. It is an
++    Open Source project distributed under GNU General Public License
++    (GPL).</p>
++  </description>
++  <url type="homepage">http://www.bluez.org</url>
++  <provides>
++    <modalias>lkmodule:bluetooth</modalias>
++  </provides>
++</component>
diff --git a/debian/patches/series b/debian/patches/series
index 7bbb51d1a..edd4d4f70 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -9,3 +9,4 @@ shared-gatt-client-Fix-segfault-after-PIN-entry.patch
 main.conf-Add-more-details-Closes-904212.patch
 headers-use-releative-symlinks.patch
 Add-HCI_TO_STR-macro-for-FIRMWARE_DIR.patch
+1000-appstream-metainfo.patch

#840013#22
Date:
2025-01-25 05:21:51 UTC
From:
To:
Dear Debian Bluetooth Maintainers and Nobuhiro Iwamatsu,

Is there anything I can do to help get this Appstream patch applied in unstable?