]> pere.pagekite.me Git - homepage.git/blobdiff - blog/index.rss
Generated.
[homepage.git] / blog / index.rss
index 35669e8e131b27a5ec96597289c102fe45d6789f..b2e2a84081f7167ca46df76554cf07844b3716ef 100644 (file)
@@ -6,6 +6,125 @@
                 <link>http://people.skolelinux.org/pere/blog/</link>
                 <atom:link href="http://people.skolelinux.org/pere/blog/index.rss" rel="self" type="application/rss+xml" />
        
+       <item>
+               <title>Isenkram, Appstream and udev make life as a LEGO builder easier</title>
+               <link>http://people.skolelinux.org/pere/blog/Isenkram__Appstream_and_udev_make_life_as_a_LEGO_builder_easier.html</link>
+               <guid isPermaLink="true">http://people.skolelinux.org/pere/blog/Isenkram__Appstream_and_udev_make_life_as_a_LEGO_builder_easier.html</guid>
+                <pubDate>Fri, 7 Oct 2016 09:50:00 +0200</pubDate>
+               <description>&lt;p&gt;&lt;a href=&quot;http://packages.qa.debian.org/isenkram&quot;&gt;The Isenkram
+system&lt;/a&gt; provide a practical and easy way to figure out which
+packages support the hardware in a given machine.  The command line
+tool &lt;tt&gt;isenkram-lookup&lt;/tt&gt; and the tasksel options provide a
+convenient way to list and install packages relevant for the current
+hardware during system installation, both user space packages and
+firmware packages. The GUI background daemon on the other hand provide
+a pop-up proposing to install packages when a new dongle is inserted
+while using the computer.  For example, if you plug in a smart card
+reader, the system will ask if you want to install &lt;tt&gt;pcscd&lt;/tt&gt; if
+that package isn&#39;t already installed, and if you plug in a USB video
+camera the system will ask if you want to install &lt;tt&gt;cheese&lt;/tt&gt; if
+cheese is currently missing.  This already work just fine.&lt;/p&gt;
+
+&lt;p&gt;But Isenkram depend on a database mapping from hardware IDs to
+package names.  When I started no such database existed in Debian, so
+I made my own data set and included it with the isenkram package and
+made isenkram fetch the latest version of this database from git using
+http.  This way the isenkram users would get updated package proposals
+as soon as I learned more about hardware related packages.&lt;/p&gt;
+
+&lt;p&gt;The hardware is identified using modalias strings.  The modalias
+design is from the Linux kernel where most hardware descriptors are
+made available as a strings that can be matched using filename style
+globbing.  It handle USB, PCI, DMI and a lot of other hardware related
+identifiers.&lt;/p&gt;
+
+&lt;p&gt;The downside to the Isenkram specific database is that there is no
+information about relevant distribution / Debian version, making
+isenkram propose obsolete packages too.  But along came AppStream, a
+cross distribution mechanism to store and collect metadata about
+software packages.  When I heard about the proposal, I contacted the
+people involved and suggested to add a hardware matching rule using
+modalias strings in the specification, to be able to use AppStream for
+mapping hardware to packages.  This idea was accepted and AppStream is
+now a great way for a package to announce the hardware it support in a
+distribution neutral way.  I wrote
+&lt;a href=&quot;http://people.skolelinux.org/pere/blog/Using_appstream_with_isenkram_to_install_hardware_related_packages_in_Debian.html&quot;&gt;a
+recipe on how to add such meta-information&lt;/a&gt; in a blog post last
+December.  If you have a hardware related package in Debian, please
+announce the relevant hardware IDs using AppStream.&lt;/p&gt;
+
+&lt;p&gt;In Debian, almost all packages that can talk to a LEGO Mindestorms
+RCX or NXT unit, announce this support using AppStream.  The effect is
+that when you insert such LEGO robot controller into your Debian
+machine, Isenkram will propose to install the packages needed to get
+it working.  The intention is that this should allow the local user to
+start programming his robot controller right away without having to
+guess what packages to use or which permissions to fix.&lt;/p&gt;
+
+&lt;p&gt;But when I sat down with my son the other day to program our NXT
+unit using his Debian Stretch computer, I discovered something
+annoying.  The local console user (ie my son) did not get access to
+the USB device for programming the unit.  This used to work, but no
+longer in Jessie and Stretch.  After some investigation and asking
+around on #debian-devel, I discovered that this was because udev had
+changed the mechanism used to grant access to local devices.  The
+ConsoleKit mechanism from &lt;tt&gt;/lib/udev/rules.d/70-udev-acl.rules&lt;/tt&gt;
+no longer applied, because LDAP users no longer was added to the
+plugdev group during login.  Michael Biebl told me that this method
+was obsolete and the new method used ACLs instead.  This was good
+news, as the plugdev mechanism is a mess when using a remote user
+directory like LDAP.  Using ACLs would make sure a user lost device
+access when she logged out, even if the user left behind a background
+process which would retain the plugdev membership with the ConsoleKit
+setup.  Armed with this knowledge I moved on to fix the access problem
+for the LEGO Mindstorms related packages.&lt;/p&gt;
+
+&lt;p&gt;The new system uses a udev tag, &#39;uaccess&#39;.  It can either be
+applied directly for a device, or is applied in
+/lib/udev/rules.d/70-uaccess.rules for classes of devices.  As the
+LEGO Mindstorms udev rules did not have a class, I decided to add the
+tag directly in the udev rules files included in the packages.  Here
+is one example.  For the nqc C compiler for the RCX, the
+&lt;tt&gt;/lib/udev/rules.d/60-nqc.rules&lt;/tt&gt; file now look like this:
+
+&lt;p&gt;&lt;pre&gt;
+SUBSYSTEM==&quot;usb&quot;, ACTION==&quot;add&quot;, ATTR{idVendor}==&quot;0694&quot;, ATTR{idProduct}==&quot;0001&quot;, \
+    SYMLINK+=&quot;rcx-%k&quot;, TAG+=&quot;uaccess&quot;
+&lt;/pre&gt;&lt;/p&gt;
+
+&lt;p&gt;I suspect all packages using plugdev in their /lib/udev/rules.d/
+files should be changed to use this tag (either directly or indirectly
+via &lt;tt&gt;70-uaccess.rules&lt;/tt&gt;).  Perhaps a lintian check should be
+created to detect this?&lt;/p&gt;
+
+&lt;p&gt;I&#39;ve been unable to find good documentation on the uaccess feature.
+It is unclear to me if the uaccess tag is an internal implementation
+detail like the udev-acl tag used by
+&lt;tt&gt;/lib/udev/rules.d/70-udev-acl.rules&lt;/tt&gt;.  If it is, I guess the
+indirect method is the preferred way.  Michael
+&lt;a href=&quot;https://github.com/systemd/systemd/issues/4288&quot;&gt;asked for more
+documentation from the systemd project&lt;/a&gt; and I hope it will make
+this clearer.  For now I use the generic classes when they exist and
+is already handled by &lt;tt&gt;70-uaccess.rules&lt;/tt&gt;, and add the tag
+directly if no such class exist.&lt;/p&gt;
+
+&lt;p&gt;To learn more about the isenkram system, please check out
+&lt;a href=&quot;http://people.skolelinux.org/pere/blog/tags/isenkram/&quot;&gt;my
+blog posts tagged isenkram&lt;/a&gt;.&lt;/p&gt;
+
+&lt;p&gt;To help out making life for LEGO constructors in Debian easier,
+please join us on our IRC channel
+&lt;a href=&quot;irc://irc.debian.org/%23debian-lego&quot;&gt;#debian-lego&lt;/a&gt; and join
+the &lt;a href=&quot;https://alioth.debian.org/projects/debian-lego/&quot;&gt;Debian
+LEGO team&lt;/a&gt; in the Alioth project we created yesterday.  A mailing
+list is not yet created, but we are working on it. :)&lt;/p&gt;
+
+&lt;p&gt;As usual, if you use Bitcoin and want to show your support of my
+activities, please send Bitcoin donations to my address
+&lt;b&gt;&lt;a href=&quot;bitcoin:15oWEoG9dUPovwmUL9KWAnYRtNJEkP1u1b&amp;label=PetterReinholdtsenBlog&quot;&gt;15oWEoG9dUPovwmUL9KWAnYRtNJEkP1u1b&lt;/a&gt;&lt;/b&gt;.&lt;/p&gt;
+</description>
+       </item>
+       
        <item>
                <title>Aftenposten-redaktøren med lua i hånda</title>
                <link>http://people.skolelinux.org/pere/blog/Aftenposten_redakt_ren_med_lua_i_h_nda.html</link>
@@ -626,46 +745,5 @@ using them, so I am stuck with Signal for now.&lt;/p&gt;
 </description>
        </item>
        
-       <item>
-               <title>The new &quot;best&quot; multimedia player in Debian?</title>
-               <link>http://people.skolelinux.org/pere/blog/The_new__best__multimedia_player_in_Debian_.html</link>
-               <guid isPermaLink="true">http://people.skolelinux.org/pere/blog/The_new__best__multimedia_player_in_Debian_.html</guid>
-                <pubDate>Mon, 6 Jun 2016 12:50:00 +0200</pubDate>
-               <description>&lt;p&gt;When I set out a few weeks ago to figure out
-&lt;a href=&quot;http://people.skolelinux.org/pere/blog/What_is_the_best_multimedia_player_in_Debian_.html&quot;&gt;which
-multimedia player in Debian claimed to support most file formats /
-MIME types&lt;/a&gt;, I was a bit surprised how varied the sets of MIME types
-the various players claimed support for.  The range was from 55 to 130
-MIME types.  I suspect most media formats are supported by all
-players, but this is not really reflected in the MimeTypes values in
-their desktop files.  There are probably also some bogus MIME types
-listed, but it is hard to identify which one this is.&lt;/p&gt;
-
-&lt;p&gt;Anyway, in the mean time I got in touch with upstream for some of
-the players suggesting to add more MIME types to their desktop files,
-and decided to spend some time myself improving the situation for my
-favorite media player VLC.  The fixes for VLC entered Debian unstable
-yesterday. The complete list of MIME types can be seen on the
-&lt;a href=&quot;https://wiki.debian.org/DebianMultimedia/PlayerSupport&quot;&gt;Multimedia
-player MIME type support status&lt;/a&gt; Debian wiki page.&lt;/p&gt;
-
-&lt;p&gt;The new &quot;best&quot; multimedia player in Debian?  It is VLC, followed by
-totem, parole, kplayer, gnome-mpv, mpv, smplayer, mplayer-gui and
-kmplayer.  I am sure some of the other players desktop files support
-several of the formats currently listed as working only with vlc,
-toten and parole.&lt;/p&gt;
-
-&lt;p&gt;A sad observation is that only 14 MIME types are listed as
-supported by all the tested multimedia players in Debian in their
-desktop files: audio/mpeg, audio/vnd.rn-realaudio, audio/x-mpegurl,
-audio/x-ms-wma, audio/x-scpls, audio/x-wav, video/mp4, video/mpeg,
-video/quicktime, video/vnd.rn-realvideo, video/x-matroska,
-video/x-ms-asf, video/x-ms-wmv and video/x-msvideo.  Personally I find
-it sad that video/ogg and video/webm is not supported by all the media
-players in Debian.  As far as I can tell, all of them can handle both
-formats.&lt;/p&gt;
-</description>
-       </item>
-       
         </channel>
 </rss>