]> pere.pagekite.me Git - homepage.git/blobdiff - blog/index.rss
Generated.
[homepage.git] / blog / index.rss
index da7ed46c2c41af54d84db5147cddff3988719876..778bd237097ad82d4a918adae3fe364615af7e4b 100644 (file)
@@ -6,6 +6,115 @@
                 <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>Using appstream with isenkram to install hardware related packages in Debian</title>
+               <link>http://people.skolelinux.org/pere/blog/Using_appstream_with_isenkram_to_install_hardware_related_packages_in_Debian.html</link>
+               <guid isPermaLink="true">http://people.skolelinux.org/pere/blog/Using_appstream_with_isenkram_to_install_hardware_related_packages_in_Debian.html</guid>
+                <pubDate>Sun, 20 Dec 2015 12:20:00 +0100</pubDate>
+               <description>&lt;p&gt;Around three years ago, I created
+&lt;a href=&quot;http://packages.qa.debian.org/isenkram&quot;&gt;the isenkram
+system&lt;/a&gt; to get a more practical solution in Debian for handing
+hardware related packages.  A GUI system in the isenkram package will
+present a pop-up dialog when some hardware dongle supported by
+relevant packages in Debian is inserted into the machine.  The same
+lookup mechanism to detect packages is available as command line
+tools in the isenkram-cli package.  In addition to mapping hardware,
+it will also map kernel firmware files to packages and make it easy to
+install needed firmware packages automatically.  The key for this
+system to work is a good way to map hardware to packages, in other
+words, allow packages to announce what hardware they will work
+with.&lt;/p&gt;
+
+&lt;p&gt;I started by providing data files in the isenkram source, and
+adding code to download the latest version of these data files at run
+time, to ensure every user had the most up to date mapping available.
+I also added support for storing the mapping in the Packages file in
+the apt repositories, but did not push this approach because while I
+was trying to figure out how to best store hardware/package mappings,
+&lt;a href=&quot;http://www.freedesktop.org/software/appstream/docs/&quot;&gt;the
+appstream system&lt;/a&gt; was announced.  I got in touch and suggested to
+add the hardware mapping into that data set to be able to use
+appstream as a data source, and this was accepted at least for the
+Debian version of appstream.&lt;/p&gt;
+
+&lt;p&gt;A few days ago using appstream in Debian for this became possible,
+and today I uploaded a new version 0.20 of isenkram adding support for
+appstream as a data source for mapping hardware to packages.  The only
+package so far using appstream to announce its hardware support is my
+pymissile package.  I got help from Matthias Klumpp with figuring out
+how do add the required
+&lt;a href=&quot;https://appstream.debian.org/html/sid/main/metainfo/pymissile.html&quot;&gt;metadata
+in pymissile&lt;/a&gt;.  I added a file debian/pymissile.metainfo.xml with
+this content:&lt;/p&gt;
+
+&lt;blockquote&gt;&lt;pre&gt;
+&amp;lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&amp;gt;
+&amp;lt;component&amp;gt;
+  &amp;lt;id&amp;gt;pymissile&amp;lt;/id&amp;gt;
+  &amp;lt;metadata_license&amp;gt;MIT&amp;lt;/metadata_license&amp;gt;
+  &amp;lt;name&amp;gt;pymissile&amp;lt;/name&amp;gt;
+  &amp;lt;summary&amp;gt;Control original Striker USB Missile Launcher&amp;lt;/summary&amp;gt;
+  &amp;lt;description&amp;gt;
+    &amp;lt;p&amp;gt;
+      Pymissile provides a curses interface to control an original
+      Marks and Spencer / Striker USB Missile Launcher, as well as a
+      motion control script to allow a webcamera to control the
+      launcher.
+    &amp;lt;/p&amp;gt;
+  &amp;lt;/description&amp;gt;
+  &amp;lt;provides&amp;gt;
+    &amp;lt;modalias&amp;gt;usb:v1130p0202d*&amp;lt;/modalias&amp;gt;
+  &amp;lt;/provides&amp;gt;
+&amp;lt;/component&amp;gt;
+&lt;/pre&gt;&lt;/blockquote&gt;
+
+&lt;p&gt;The key for isenkram is the component/provides/modalias value,
+which is a glob style match rule for hardware specific strings
+(modalias strings) provided by the Linux kernel.  In this case, it
+will map to all USB devices with vendor code 1130 and product code
+0202.&lt;/p&gt;
+
+&lt;p&gt;Note, it is important that the license of all the metadata files
+are compatible to have permissions to aggregate them into archive wide
+appstream files.  Matthias suggested to use MIT or BSD licenses for
+these files.  A challenge is figuring out a good id for the data, as
+it is supposed to be globally unique and shared across distributions
+(in other words, best to coordinate with upstream what to use).  But
+it can be changed later or, so we went with the package name as
+upstream for this project is dormant.&lt;/p&gt;
+
+&lt;p&gt;To get the metadata file installed in the correct location for the
+mirror update scripts to pick it up and include its content the
+appstream data source, the file must be installed in the binary
+package under /usr/share/appdata/.  I did this by adding the following
+line to debian/pymissile.install:&lt;/p&gt;
+
+&lt;blockquote&gt;&lt;pre&gt;
+debian/pymissile.metainfo.xml usr/share/appdata
+&lt;/pre&gt;&lt;/blockquote&gt;
+
+&lt;p&gt;With that in place, the command line tool isenkram-lookup will list
+all packages useful on the current computer automatically, and the GUI
+pop-up handler will propose to install the package not already
+installed if a hardware dongle is inserted into the machine in
+question.&lt;/p&gt;
+
+&lt;p&gt;Details of the modalias field in appstream is available from the 
+&lt;a href=&quot;https://wiki.debian.org/DEP-11&quot;&gt;DEP-11&lt;/a&gt; proposal.&lt;/p&gt;
+
+&lt;p&gt;To locate the modalias values of all hardware present in a machine,
+try running this command on the command line:&lt;/p&gt;
+
+&lt;blockquote&gt;&lt;pre&gt;
+cat $(find /sys/devices/|grep modalias)
+&lt;/pre&gt;&lt;/blockquote&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;
+</description>
+       </item>
+       
        <item>
                <title>Bokhandeldistribusjon av boken Fri kultur av Lawrence Lessig</title>
                <link>http://people.skolelinux.org/pere/blog/Bokhandeldistribusjon_av_boken_Fri_kultur_av_Lawrence_Lessig.html</link>
@@ -1036,65 +1145,5 @@ på papir fra lulu.com&lt;/a&gt;,» avslutter Reinholdtsen.&lt;/p&gt;
 </description>
        </item>
        
-       <item>
-               <title>&quot;Fri kultur&quot; av @lessig - norsk utgave av &quot;Free Culture&quot; tilgjengelig på papir, PDF og ePub</title>
-               <link>http://people.skolelinux.org/pere/blog/_Fri_kultur__av__lessig___norsk_utgave_av__Free_Culture__tilgjengelig_p__papir__PDF_og_ePub.html</link>
-               <guid isPermaLink="true">http://people.skolelinux.org/pere/blog/_Fri_kultur__av__lessig___norsk_utgave_av__Free_Culture__tilgjengelig_p__papir__PDF_og_ePub.html</guid>
-                <pubDate>Wed, 28 Oct 2015 09:30:00 +0100</pubDate>
-               <description>&lt;p&gt;&lt;a href=&quot;http://www.lulu.com/shop/lawrence-lessig/fri-kultur/paperback/product-22406445.html&quot;&gt;Klikk her for å kjøpe boken&lt;/a&gt;.&lt;/p&gt;
-
-&lt;p&gt;I 2004, mens &lt;a href=&quot;https://creativecommons.org/&quot;&gt;Creative
-Commons-bevegelsen&lt;/a&gt; vokste frem, skrev bevegelsens stifter Lawrence
-Lessig boken
-&lt;a href=&quot;https://en.wikipedia.org/wiki/Free_Culture_(book)&quot;&gt;Free
-Culture&lt;/a&gt; for å forklare problemene med økene åndsverksregulering og
-for å foreslå noen løsninger.  Jeg leste boken den gangen, og den både
-inspirerte meg og endret på hvordan jeg så på opphavsrettslovigving.
-Jeg skulle ønske flere folk leste denne boken.  Den gir en god
-gjennomgang av hvordan økende åndsverksregulering skader både
-nyskapning og kulturlivet, og skisserer hvordan både lovgivere og oss
-vanlige borgere kan bidra for å få slutt på dette.&lt;/p&gt;
-
-&lt;p&gt;Derfor bestemte jeg meg sommeren 2012 for å oversette den til norsk
-bokmål og gjøre den tilgjengelig for de blant mine venner og familie
-som foretrekker å lese bøker på norsk.  Jeg oversatte boken ved hjelp
-av docbook og en gettext PO-fil, og endte opp med to utgaver, en på
-norsk og en på engelsk.  Den engelske publiserte jeg i forrige uke, og
-den norske utgaven på papir
-&lt;a href=&quot;http://www.lulu.com/shop/lawrence-lessig/fri-kultur/paperback/product-22406445.html&quot;&gt;er
-nå klar for salg&lt;/a&gt;.  Jeg fikk heldigvis hjelp med oversetting og
-korrekturlesing av den norske utgaven fra en rekke frivillige.  Se
-side 245 for en komplett liste.  Slik ser omslaget ut:
-
-&lt;p align=&quot;center&quot;&gt;&lt;a href=&quot;http://www.lulu.com/shop/lawrence-lessig/fri-kultur/paperback/product-22406445.html&quot;&gt;&lt;img align=&quot;center&quot; src=&quot;http://people.skolelinux.org/pere/blog/images/2015-10-28-free-culture-norwegian-published-cover.png&quot;/&gt;&lt;/a&gt;&lt;/p&gt;
-
-&lt;p&gt;I tillegg til den norske og engelske utgaven holder vi på med en
-fransk utgave.  Den koordineres av dblatex-utvikleren Benoît Guillon,
-og oversettelsen var komplett denne uka men må korrekturleses før den
-kan gis ut.  Flere frivillige trengs her, så ta kontakt med Benoît
-hvis du vil bidra.&lt;/p&gt;
-
-&lt;p&gt;Boken er også tilgjengelig i PDF, ePub og MOBI-format fra
-&lt;a href=&quot;https://github.com/petterreinholdtsen/free-culture-lessig&quot;&gt;min
-github-prosjektside&lt;/a&gt;.  Merk at ePub og MOBI-utgavene har noen
-formatteringsproblemer som jeg tror kommer av feil i docbook-verktøyet
-dbtoepub (Debian BTS-rapporter
-&lt;a href=&quot;https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=795842&quot;&gt;#795842&lt;/a&gt;
-og
-&lt;a href=&quot;https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=796871&quot;&gt;#796871&lt;/a&gt;),
-men jeg har ikke tatt meg tid til å undersøke problemene.  For de som
-vil ha elektronisk kopi anbefaler jeg å bruke PDF- og ePub-utgaven i
-denne omgang, da de ser ut til å hånderes bra av de fremviserne jeg
-har tilgjengelig.&lt;/p&gt;
-
-&lt;p&gt;Etter at oversettelsen til bokmål var ferdig klarte jeg å overtale
-&lt;a href=&quot;http://www.nuugfoundation.no/&quot;&gt;NUUG Foundation&lt;/a&gt; til å
-sponse trykking av boken.  Det er årsaken til at stiftelsens logo er
-på baksiden av omslaget.  Jeg er svært takknemlig for dette, og bruker
-bidraget til å gi en kopi av den norske utgaven til alle
-Stortingsrepresentanter og andre beslutningstakere her i Norge.&lt;/p&gt;
-</description>
-       </item>
-       
         </channel>
 </rss>