]> 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;
15 is taking shape in Debian, and one provided feature is a very
16 convenient way to tell you which package to install to make a given
17 firmware file available when the kernel is looking for it. This can
18 be done using apt-file too, but that is for someone else to blog
19 about. :)&lt;/p&gt;
20
21 &lt;p&gt;Here is a small recipe to find the package with a given firmware
22 file, in this example I am looking for ctfw-3.2.3.0.bin, randomly
23 picked from the set of firmware announced using appstream in Debian
24 unstable. In general you would be looking for the firmware requested
25 by the kernel during kernel module loading. To find the package
26 providing the example file, do like this:&lt;/p&gt;
27
28 &lt;blockquote&gt;&lt;pre&gt;
29 % apt install appstream
30 [...]
31 % apt update
32 [...]
33 % appstreamcli what-provides firmware:runtime ctfw-3.2.3.0.bin | \
34 awk &#39;/Package:/ {print $2}&#39;
35 firmware-qlogic
36 %
37 &lt;/pre&gt;&lt;/blockquote&gt;
38
39 &lt;p&gt;See &lt;a href=&quot;https://wiki.debian.org/AppStream/Guidelines&quot;&gt;the
40 appstream wiki&lt;/a&gt; page to learn how to embed the package metadata in
41 a way appstream can use.&lt;/p&gt;
42
43 &lt;p&gt;This same approach can be used to find any package supporting a
44 given MIME type. This is very useful when you get a file you do not
45 know how to handle. First find the mime type using &lt;tt&gt;file
46 --mime-type&lt;/tt&gt;, and next look up the package providing support for
47 it. Lets say you got an SVG file. Its MIME type is image/svg+xml,
48 and you can find all packages handling this type like this:&lt;/p&gt;
49
50 &lt;blockquote&gt;&lt;pre&gt;
51 % apt install appstream
52 [...]
53 % apt update
54 [...]
55 % appstreamcli what-provides mimetype image/svg+xml | \
56 awk &#39;/Package:/ {print $2}&#39;
57 bkchem
58 phototonic
59 inkscape
60 shutter
61 tetzle
62 geeqie
63 xia
64 pinta
65 gthumb
66 karbon
67 comix
68 mirage
69 viewnior
70 postr
71 ristretto
72 kolourpaint4
73 eog
74 eom
75 gimagereader
76 midori
77 %
78 &lt;/pre&gt;&lt;/blockquote&gt;
79
80 &lt;p&gt;I believe the MIME types are fetched from the desktop file for
81 packages providing appstream metadata.&lt;/p&gt;
82 </description>
83 </item>
84
85 </channel>
86 </rss>