]> pere.pagekite.me Git - homepage.git/blob - blog/archive/2016/02/02.rss
Generated.
[homepage.git] / blog / archive / 2016 / 02 / 02.rss
1 <?xml version="1.0" encoding="ISO-8859-1"?>
2 <rss version='2.0' xmlns:lj='http://www.livejournal.org/rss/lj/1.0/'>
3 <channel>
4 <title>Petter Reinholdtsen - Entries from February 2016</title>
5 <description>Entries from February 2016</description>
6 <link>http://people.skolelinux.org/pere/blog/</link>
7
8
9 <item>
10 <title>Using appstream in Debian to locate packages with firmware and mime type support</title>
11 <link>http://people.skolelinux.org/pere/blog/Using_appstream_in_Debian_to_locate_packages_with_firmware_and_mime_type_support.html</link>
12 <guid isPermaLink="true">http://people.skolelinux.org/pere/blog/Using_appstream_in_Debian_to_locate_packages_with_firmware_and_mime_type_support.html</guid>
13 <pubDate>Thu, 4 Feb 2016 16:40:00 +0100</pubDate>
14 <description>&lt;p&gt;The &lt;a href=&quot;https://wiki.debian.org/DEP-11&quot;&gt;appstream system&lt;/a&gt; is
15 taking shape in Debian, and one feature set that is very convenient is
16 its ability to tell you want package to install to get a given
17 firmware file. This can be done using apt-file too, but that is for
18 someone else to blog about. :)&lt;/p&gt;
19
20 &lt;p&gt;Here is a small recipe to find the package with a given firmware
21 file, in this example I am looking for ctfw-3.2.3.0.bin, randomly
22 picked from the set of firmware announced using appstream in Debian
23 unstable. In general you would be looking for the firmware requested
24 by the kernel during kernel module loading. To find the package
25 providing the example file, do like this:&lt;/p&gt;
26
27 &lt;blockquote&gt;&lt;pre&gt;
28 % apt install appstream
29 [...]
30 % apt update
31 [...]
32 % appstreamcli what-provides firmware:runtime ctfw-3.2.3.0.bin | \
33 awk &#39;/Package:/ {print $2}&#39;
34 firmware-qlogic
35 %
36 &lt;/pre&gt;&lt;/blockquote&gt;
37
38 &lt;p&gt;See &lt;a href=&quot;https://wiki.debian.org/AppStream/Guidelines&quot;&gt;the
39 appstream wiki&lt;/a&gt; page to learn how to embed the package metadata in
40 a way appstream can use.&lt;/p&gt;
41
42 &lt;p&gt;This same approach can be used to find any package supporting a
43 given MIME type. This is very useful when you get a file you do not
44 know how to handle. First find the mime type using &lt;tt&gt;file
45 --mime-type&lt;/tt&gt;, and next look up the package providing support for
46 it. Lets say you got an SVG file. Its MIME type is image/svg+xml,
47 and you can find all packages handling this type like this:&lt;/p&gt;
48
49 &lt;blockquote&gt;&lt;pre&gt;
50 % apt install appstream
51 [...]
52 % apt update
53 [...]
54 % appstreamcli what-provides mimetype image/svg+xml | \
55 awk &#39;/Package:/ {print $2}&#39;
56 bkchem
57 phototonic
58 inkscape
59 shutter
60 tetzle
61 geeqie
62 xia
63 pinta
64 gthumb
65 karbon
66 comix
67 mirage
68 viewnior
69 postr
70 ristretto
71 kolourpaint4
72 eog
73 eom
74 gimagereader
75 midori
76 %
77 &lt;/pre&gt;&lt;/blockquote&gt;
78
79 &lt;p&gt;I believe the MIME types are fetched from the desktop file for
80 packages providing appstream metadata.&lt;/p&gt;
81 </description>
82 </item>
83
84 </channel>
85 </rss>