Bug#1077046: colord: Add Appstream metainfo announcing HW support

Petter Reinholdtsen pere at hungry.com
Thu Jul 25 14:04:55 BST 2024


Package: colord
Version: 1.4.7-1
Tags: patch
User: pere at hungry.com
Usertags: appstream-modalias

Here is a patch to add Appstream metainfo XML announcing the hardware
handled by this package.

Including this information in the package will ensure programs mapping
hardware to packages using Appstream information, like the isenkram
package, will know that this package is useful on machines where the
hardware is discovered.

My guess is that colord is the package to propose to install when this
hardware is present.  If other packages listed in d/control also should
be recommended, they too should get a Appstream meatadata file.

The appstream metadata file can be checked using this command after
package build:

  appstreamcli validate-tree  --no-net --explain debian/colord

diff --git a/debian/colord.install b/debian/colord.install
index a1f02edb..005a98ae 100644
--- a/debian/colord.install
+++ b/debian/colord.install
@@ -16,3 +16,4 @@ usr/share/dbus-1
 usr/share/glib-2.0/schemas
 usr/share/man
 usr/share/polkit-1
+org.freedesktop.colord.metainfo.xml usr/share/metainfo
diff --git a/debian/patches/1000-appstream-metainfo.patch b/debian/patches/1000-appstream-metainfo.patch
new file mode 100644
index 00000000..58deade0
--- /dev/null
+++ b/debian/patches/1000-appstream-metainfo.patch
@@ -0,0 +1,65 @@
+Description: Added AppStream metainfo XML with hardware provide info.
+ This allow isenkram to propose this package the right hardware is
+ present.
+
+ The provides list was generated using
+
+   for m in $(grep ATT rules/69-cd-sensors.rules.in|cut -d\" -f2,4|tr a-z A-Z|tr \" p); do echo "<modalias>usb:v${m}d*</modalias>"; done    
+Author: Petter Reinholdtsen
+Forwarded: no
+Last-Update: 2024-07-25
+---
+Index: colord-salsa/org.freedesktop.colord.metainfo.xml
+===================================================================
+--- /dev/null  1970-01-01 00:00:00.000000000 +0000
++++ colord-salsa/org.freedesktop.colord.metainfo.xml   2024-07-25 12:28:25.668594282 +0000
+@@ -0,0 +1,49 @@
++<?xml version="1.0" encoding="UTF-8"?>
++<component type="desktop">
++  <id>org.freedesktop.colord</id>
++  <metadata_license>MIT</metadata_license>
++  <name>colord</name>
++  <summary>system service to manage device colour profiles -- system daemon</summary>
++  <description>
++    <p>colord is a system service that makes it easy to manage,
++    install and generate colour profiles to accurately colour manage
++    input and output devices.</p>
++    <p>It provides a D-Bus API for system frameworks to query, a
++    persistent data store, and a mechanism for session applications to
++    set system policy.</p>
++    <p>This package contains the dbus-activated colord system
++    daemon.</p>
++  </description>
++  <url type="homepage">https://www.freedesktop.org/software/colord/</url>
++  <provides>
++    <modalias>usb:v0765pD020d*</modalias>
++    <modalias>usb:v0765pD092d*</modalias>
++    <modalias>usb:v0765pD094d*</modalias>
++    <modalias>usb:v0670p0001d*</modalias>
++    <modalias>usb:v0971p2003d*</modalias>
++    <modalias>usb:v0971p2001d*</modalias>
++    <modalias>usb:v0971p2000d*</modalias>
++    <modalias>usb:v0765p5020d*</modalias>
++    <modalias>usb:v0765p6003d*</modalias>
++    <modalias>usb:v0971p2007d*</modalias>
++    <modalias>usb:v04DBp005Bd*</modalias>
++    <modalias>usb:v085Cp0100d*</modalias>
++    <modalias>usb:v085Cp0200d*</modalias>
++    <modalias>usb:v085Cp0300d*</modalias>
++    <modalias>usb:v085Cp0400d*</modalias>
++    <modalias>usb:v085Cp0500d*</modalias>
++    <modalias>usb:v085Cp0A00d*</modalias>
++    <modalias>usb:v0971p2005d*</modalias>
++    <modalias>usb:v0765p5001d*</modalias>
++    <modalias>usb:v0765p5010d*</modalias>
++    <modalias>usb:v04D8pF8DAd*</modalias>
++    <modalias>usb:v273Fp1000d*</modalias>
++    <modalias>usb:v273Fp1005d*</modalias>
++    <modalias>usb:v273Fp1001d*</modalias>
++    <modalias>usb:v273Fp1004d*</modalias>
++    <modalias>usb:v273Fp1002d*</modalias>
++    <modalias>usb:v273Fp1006d*</modalias>
++    <modalias>usb:v273Fp1007d*</modalias>
++    <modalias>usb:v273Fp1008d*</modalias>
++  </provides>
++</component>
diff --git a/debian/patches/series b/debian/patches/series
index 72ca9dea..65173b5f 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -3,3 +3,4 @@ Fix-USB-scanners-not-working-with-RestrictAddressFamilies.patch
 fix-NULL-passed-to-free-with-sqlite3-error_msg-pointers.patch
 use-char-instead-of-gchar-for-pointers-passed-to-sqlite3_.patch
 use-g_autoptr-again-but-with-a-custom-CLEANUP_FUNC.patch
+1000-appstream-metainfo.patch

-- 
Happy hacking
Petter Reinholdtsen



More information about the Pkg-freedesktop-maintainers mailing list