[Pkg-electronics-devel] Bug#1080036: teensy-loader-cli: Add Appstream metainfo announcing HW support

Petter Reinholdtsen pere at hungry.com
Thu Aug 29 22:15:58 BST 2024


Package: teensy-loader-cli
Version: 2.2-1
Tags: patch
User: pere at hungry.com
Usertags: appstream-modalias

Here is a draft patch to add Appstream metainfo XML announcing the
hardware handled by this package.  The USB ID were fetched from one
listed in debian/49-teensy.rules.  This should fix the
'appstream-metadata-missing-modalias-provide' lintian warning.

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.

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

  appstreamcli validate-tree  --no-net --explain debian/teensy-loader-cli

diff --git a/debian/install b/debian/install
index ef9bd71..ccf34c8 100644
--- a/debian/install
+++ b/debian/install
@@ -1,2 +1,3 @@
 teensy_loader_cli /usr/bin/
 debian/49-teensy.rules /lib/udev/rules.d/
+com.pjrc.teensy.loader_cli.metainfo.xml usr/share/metainfo
diff --git a/debian/lintian-overrides b/debian/lintian-overrides
deleted file mode 100644
index 41871cd..0000000
--- a/debian/lintian-overrides
+++ /dev/null
@@ -1,6 +0,0 @@
-teensy-loader-cli: appstream-metadata-missing-modalias-provide
-# to silence Lintian warning about lib/udev/rules.d/49-teensy.rules
-# Frankly:
-#   I think the warning is bogus
-# More Frankly:
-#   I don't understand https://wiki.debian.org/AppStream/Guidelines#Announcing_supported_hardware
diff --git a/debian/patches/1000-appstream-metainfo.patch b/debian/patches/1000-appstream-metainfo.patch
new file mode 100644
index 0000000..3b7556d
--- /dev/null
+++ b/debian/patches/1000-appstream-metainfo.patch
@@ -0,0 +1,29 @@
+Description: Added AppStream metainfo XML with hardware provide info.
+ This allow isenkram to propose this package when the relevant hardware is
+ present.
+Author: Petter Reinholdtsen
+Forwarded: no
+Last-Update: 2024-08-29
+---
+Index: teensy-loader-cli-salsa/com.pjrc.teensy.loader_cli.metainfo.xml
+===================================================================
+--- /dev/null  1970-01-01 00:00:00.000000000 +0000
++++ teensy-loader-cli-salsa/com.pjrc.teensy.loader_cli.metainfo.xml    2024-08-29 23:07:17.755293371 +0200
+@@ -0,0 +1,17 @@
++<?xml version="1.0" encoding="UTF-8"?>
++<component>
++  <id>com.pjrc.teensy.loader_cli</id>
++  <metadata_license>MIT</metadata_license>
++  <name>teensy-loader-cli</name>
++  <summary>load and run programs onto your Teensy micro controller</summary>
++  <description>
++    <p>The teensy loader cli is a command-line alternative to the
++    graphical teensy loader which is included with Teensyduino. The
++    cli version is preferred by advanced users who want to automate
++    programming, typically from within a Makefile or similar.</p>
++  </description>
++  <url type="homepage">https://www.pjrc.com/teensy/loader_cli.html</url>
++  <provides>
++    <modalias>usb:v16C0p04[789ABCD]?d*</modalias>
++  </provides>
++</component>
diff --git a/debian/patches/series b/debian/patches/series
index a6791a4..42e8b1a 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1 +1 @@
-# currently no patches for Debian
+1000-appstream-metainfo.patch

-- 
Happy hacking
Petter Reinholdtsen



More information about the Pkg-electronics-devel mailing list