]> pere.pagekite.me Git - homepage.git/blob - blog/data/2014-04-23-isenkram.txt
New tag.
[homepage.git] / blog / data / 2014-04-23-isenkram.txt
1 Title: Install hardware dependent packages using tasksel (Isenkram 0.7)
2 Tags: english, debian, isenkram
3 Date: 2014-04-23 14:50
4
5 <p>It would be nice if it was easier in Debian to get all the hardware
6 related packages relevant for the computer installed automatically.
7 So I implemented one, using
8 <a href="http://packages.qa.debian.org/isenkram">my Isenkram
9 package</a>. To use it, install the tasksel and isenkram packages and
10 run tasksel as user root. You should be presented with a new option,
11 "Hardware specific packages (autodetected by isenkram)". When you
12 select it, tasksel will install the packages isenkram claim is fit for
13 the current hardware, hot pluggable or not.<p>
14
15 <p>The implementation is in two files, one is the tasksel menu entry
16 description, and the other is the script used to extract the list of
17 packages to install. The first part is in
18 <tt>/usr/share/tasksel/descs/isenkram.desc</tt> and look like
19 this:</p>
20
21 <p><blockquote><pre>
22 Task: isenkram
23 Section: hardware
24 Description: Hardware specific packages (autodetected by isenkram)
25 Based on the detected hardware various hardware specific packages are
26 proposed.
27 Test-new-install: mark show
28 Relevance: 8
29 Packages: for-current-hardware
30 </pre></blockquote></p>
31
32 <p>The second part is in
33 <tt>/usr/lib/tasksel/packages/for-current-hardware</tt> and look like
34 this:</p>
35
36 <p><blockquote><pre>
37 #!/bin/sh
38 #
39 (
40 isenkram-lookup
41 isenkram-autoinstall-firmware -l
42 ) | sort -u
43 </pre></blockquote></p>
44
45 <p>All in all, a very short and simple implementation making it
46 trivial to install the hardware dependent package we all may want to
47 have installed on our machines. I've not been able to find a way to
48 get tasksel to tell you exactly which packages it plan to install
49 before doing the installation. So if you are curious or careful,
50 check the output from the isenkram-* command line tools first.</p>
51
52 <p>The information about which packages are handling which hardware is
53 fetched either from the isenkram package itself in
54 /usr/share/isenkram/, from git.debian.org or from the APT package
55 database (using the Modaliases header). The APT package database
56 parsing have caused a nasty resource leak in the isenkram daemon (bugs
57 <a href="http://bugs.debian.org/719837">#719837</a> and
58 <a href="http://bugs.debian.org/730704">#730704</a>). The cause is in
59 the python-apt code (bug
60 <a href="http://bugs.debian.org/745487">#745487</a>), but using a
61 workaround I was able to get rid of the file descriptor leak and
62 reduce the memory leak from ~30 MiB per hardware detection down to
63 around 2 MiB per hardware detection. It should make the desktop
64 daemon a lot more useful. The fix is in version 0.7 uploaded to
65 unstable today.</p>
66
67 <p>I believe the current way of mapping hardware to packages in
68 Isenkram is is a good draft, but in the future I expect isenkram to
69 use the AppStream data source for this. A proposal for getting proper
70 AppStream support into Debian is floating around as
71 <a href="https://wiki.debian.org/DEP-11">DEP-11</a>, and
72 <a href="https://wiki.debian.org/SummerOfCode2014/Projects#SummerOfCode2014.2FProjects.2FAppStreamDEP11Implementation.AppStream.2FDEP-11_for_the_Debian_Archive">GSoC
73 project</a> will take place this summer to improve the situation. I
74 look forward to seeing the result, and welcome patches for isenkram to
75 start using the information when it is ready.</p>
76
77 <p>If you want your package to map to some specific hardware, either
78 add a "Xb-Modaliases" header to your control file like I did in
79 <a href="http://packages.qa.debian.org/pymissile">the pymissile
80 package</a> or submit a bug report with the details to the isenkram
81 package. See also
82 <a href="http://people.skolelinux.org/pere/blog/tags/isenkram/">all my
83 blog posts tagged isenkram</a> for details on the notation. I expect
84 the information will be migrated to AppStream eventually, but for the
85 moment I got no better place to store it.</p>