]> pere.pagekite.me Git - homepage.git/blobdiff - blog/archive/2016/02/index.html
Generated.
[homepage.git] / blog / archive / 2016 / 02 / index.html
index 245b6e81d59535af27e3bbfb1dbd372223a99317..e0d7bd5bb81efb105716fd756695cffc1e4fee0c 100644 (file)
 
     <h3>Entries from February 2016.</h3>
     
 
     <h3>Entries from February 2016.</h3>
     
+    <div class="entry">
+      <div class="title">
+        <a href="http://people.skolelinux.org/pere/blog/Creating__updating_and_checking_debian_copyright_semi_automatically.html">Creating, updating and checking debian/copyright semi-automatically</a>
+      </div>
+      <div class="date">
+        19th February 2016
+      </div>
+      <div class="body">
+        <p>Making packages for Debian requires quite a lot of attention to
+details.  And one of the details is the content of the
+debian/copyright file, which should list all relevant licenses used by
+the code in the package in question, preferably in
+<a href="https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/">machine
+readable DEP5 format</a>.</p>
+
+<p>For large packages with lots of contributors it is hard to write
+and update this file manually, and if you get some detail wrong, the
+package is normally rejected by the ftpmasters.  So getting it right
+the first time around get the package into Debian faster, and save
+both you and the ftpmasters some work..  Today, while trying to figure
+out what was wrong with
+<a href="https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=686447">the
+zfsonlinux copyright file</a>, I decided to spend some time on
+figuring out the options for doing this job automatically, or at least
+semi-automatically.</p>
+
+<p>Lucikly, there are at least two tools available for generating the
+file based on the code in the source package,
+<tt><a href="https://tracker.debian.org/pkg/debmake">debmake</a></tt>
+and <tt><a href="https://tracker.debian.org/pkg/cme">cme</a></tt>.  I'm
+not sure which one of them came first, but both seem to be able to
+create a sensible draft file.  As far as I can tell, none of them can
+be trusted to get the result just right, so the content need to be
+polished a bit before the file is OK to upload.  I found the debmake
+option in
+<a href="http://goofying-with-debian.blogspot.com/2014/07/debmake-checking-source-against-dep-5.html">a
+blog posts from 2014</a>.
+
+<p>To generate using debmake, use the -cc option:
+
+<p><pre>
+debmake -cc > debian/copyright
+</pre></p>
+
+<p>Note there are some problems with python and non-ASCII names, so
+this might not be the best option.</p>
+
+<p>The cme option is based on a config parsing library, and I found
+this approach in
+<a href="https://ddumont.wordpress.com/2015/04/05/improving-creation-of-debian-copyright-file/">a
+blog post from 2015</a>.  To generate using cme, use the 'update
+dpkg-copyright' option:
+
+<p><pre>
+cme update dpkg-copyright
+</pre></p>
+
+<p>This will create or update debian/copyright.  The cme tool seem to
+handle UTF-8 names better than debmake.</p>
+
+<p>When the copyright file is created, I would also like some help to
+check if the file is correct.  For this I found two good options,
+<tt>debmake -k</tt> and <tt>license-reconcile</tt>.  The former seem
+to focus on license types and file matching, and is able to detect
+ineffective blocks in the copyright file.  The latter reports missing
+copyright holders and years, but was confused by inconsistent license
+names (like CDDL vs. CDDL-1.0).  I suspect it is good to use both and
+fix all issues reported by them before uploading.  But I do not know
+if the tools and the ftpmasters agree on what is important to fix in a
+copyright file, so the package might still be rejected.</p>
+
+<p>The devscripts tool <tt>licensecheck</tt> deserve mentioning.  It
+will read through the source and try to find all copyright statements.
+It is not comparing the result to the content of debian/copyright, but
+can be useful when verifying the content of the copyright file.</p>
+
+<p>Are you aware of better tools in Debian to create and update
+debian/copyright file.  Please let me know, or blog about it on
+planet.debian.org.</p>
+
+<p>As usual, if you use Bitcoin and want to show your support of my
+activities, please send Bitcoin donations to my address
+<b><a href="bitcoin:15oWEoG9dUPovwmUL9KWAnYRtNJEkP1u1b">15oWEoG9dUPovwmUL9KWAnYRtNJEkP1u1b</a></b>.</p>
+
+<p><strong>Update 2016-02-20</strong>: I got a tip from Mike Gabriel
+on how to use licensecheck and cdbs to create a draft copyright file
+
+<p><pre>
+licensecheck --copyright -r `find * -type f` | \
+  /usr/lib/cdbs/licensecheck2dep5 > debian/copyright.auto
+</pre></p>
+
+<p>He mentioned that he normally check the generated file into the
+version control system to make it easier to discover license and
+copyright changes in the upstream source.  I will try to do the same
+with my packages in the future.</p>
+
+<p><strong>Update 2016-02-21</strong>: The cme author recommended
+against using -quiet for new users, so I removed it from the proposed
+command line.</p>
+
+      </div>
+      <div class="tags">
+        
+        
+        Tags: <a href="http://people.skolelinux.org/pere/blog/tags/debian">debian</a>, <a href="http://people.skolelinux.org/pere/blog/tags/english">english</a>.
+        
+        
+      </div>
+    </div>
+    <div class="padding"></div>
+    
     <div class="entry">
       <div class="title">
         <a href="http://people.skolelinux.org/pere/blog/Using_appstream_in_Debian_to_locate_packages_with_firmware_and_mime_type_support.html">Using appstream in Debian to locate packages with firmware and mime type support</a>
     <div class="entry">
       <div class="title">
         <a href="http://people.skolelinux.org/pere/blog/Using_appstream_in_Debian_to_locate_packages_with_firmware_and_mime_type_support.html">Using appstream in Debian to locate packages with firmware and mime type support</a>
          4th February 2016
       </div>
       <div class="body">
          4th February 2016
       </div>
       <div class="body">
-        <p>The <a href="https://wiki.debian.org/DEP-11">appstream system</a> is
-taking shape in Debian, and one feature set that is very convenient is
-its ability to tell you want package to install to get a given
-firmware file.  This can be done using apt-file too, but that is for
-someone else to blog about. :)</p>
+        <p>The <a href="https://wiki.debian.org/DEP-11">appstream system</a>
+is taking shape in Debian, and one provided feature is a very
+convenient way to tell you which package to install to make a given
+firmware file available when the kernel is looking for it.  This can
+be done using apt-file too, but that is for someone else to blog
+about. :)</p>
 
 <p>Here is a small recipe to find the package with a given firmware
 file, in this example I am looking for ctfw-3.2.3.0.bin, randomly
 
 <p>Here is a small recipe to find the package with a given firmware
 file, in this example I am looking for ctfw-3.2.3.0.bin, randomly
@@ -121,7 +234,25 @@ packages providing appstream metadata.</p>
 
 <li><a href="http://people.skolelinux.org/pere/blog/archive/2016/01/">January (3)</a></li>
 
 
 <li><a href="http://people.skolelinux.org/pere/blog/archive/2016/01/">January (3)</a></li>
 
-<li><a href="http://people.skolelinux.org/pere/blog/archive/2016/02/">February (1)</a></li>
+<li><a href="http://people.skolelinux.org/pere/blog/archive/2016/02/">February (2)</a></li>
+
+<li><a href="http://people.skolelinux.org/pere/blog/archive/2016/03/">March (3)</a></li>
+
+<li><a href="http://people.skolelinux.org/pere/blog/archive/2016/04/">April (8)</a></li>
+
+<li><a href="http://people.skolelinux.org/pere/blog/archive/2016/05/">May (8)</a></li>
+
+<li><a href="http://people.skolelinux.org/pere/blog/archive/2016/06/">June (2)</a></li>
+
+<li><a href="http://people.skolelinux.org/pere/blog/archive/2016/07/">July (2)</a></li>
+
+<li><a href="http://people.skolelinux.org/pere/blog/archive/2016/08/">August (5)</a></li>
+
+<li><a href="http://people.skolelinux.org/pere/blog/archive/2016/09/">September (2)</a></li>
+
+<li><a href="http://people.skolelinux.org/pere/blog/archive/2016/10/">October (3)</a></li>
+
+<li><a href="http://people.skolelinux.org/pere/blog/archive/2016/11/">November (8)</a></li>
 
 </ul></li>
 
 
 </ul></li>
 
@@ -354,41 +485,41 @@ packages providing appstream metadata.</p>
 
  <li><a href="http://people.skolelinux.org/pere/blog/tags/bitcoin">bitcoin (9)</a></li>
 
 
  <li><a href="http://people.skolelinux.org/pere/blog/tags/bitcoin">bitcoin (9)</a></li>
 
- <li><a href="http://people.skolelinux.org/pere/blog/tags/bootsystem">bootsystem (15)</a></li>
+ <li><a href="http://people.skolelinux.org/pere/blog/tags/bootsystem">bootsystem (16)</a></li>
 
  <li><a href="http://people.skolelinux.org/pere/blog/tags/bsa">bsa (2)</a></li>
 
  <li><a href="http://people.skolelinux.org/pere/blog/tags/chrpath">chrpath (2)</a></li>
 
 
  <li><a href="http://people.skolelinux.org/pere/blog/tags/bsa">bsa (2)</a></li>
 
  <li><a href="http://people.skolelinux.org/pere/blog/tags/chrpath">chrpath (2)</a></li>
 
- <li><a href="http://people.skolelinux.org/pere/blog/tags/debian">debian (119)</a></li>
+ <li><a href="http://people.skolelinux.org/pere/blog/tags/debian">debian (141)</a></li>
 
 
- <li><a href="http://people.skolelinux.org/pere/blog/tags/debian edu">debian edu (154)</a></li>
+ <li><a href="http://people.skolelinux.org/pere/blog/tags/debian edu">debian edu (158)</a></li>
 
  <li><a href="http://people.skolelinux.org/pere/blog/tags/digistan">digistan (10)</a></li>
 
 
  <li><a href="http://people.skolelinux.org/pere/blog/tags/digistan">digistan (10)</a></li>
 
- <li><a href="http://people.skolelinux.org/pere/blog/tags/dld">dld (15)</a></li>
+ <li><a href="http://people.skolelinux.org/pere/blog/tags/dld">dld (16)</a></li>
 
 
- <li><a href="http://people.skolelinux.org/pere/blog/tags/docbook">docbook (20)</a></li>
+ <li><a href="http://people.skolelinux.org/pere/blog/tags/docbook">docbook (23)</a></li>
 
  <li><a href="http://people.skolelinux.org/pere/blog/tags/drivstoffpriser">drivstoffpriser (4)</a></li>
 
 
  <li><a href="http://people.skolelinux.org/pere/blog/tags/drivstoffpriser">drivstoffpriser (4)</a></li>
 
- <li><a href="http://people.skolelinux.org/pere/blog/tags/english">english (301)</a></li>
+ <li><a href="http://people.skolelinux.org/pere/blog/tags/english">english (333)</a></li>
 
  <li><a href="http://people.skolelinux.org/pere/blog/tags/fiksgatami">fiksgatami (23)</a></li>
 
  <li><a href="http://people.skolelinux.org/pere/blog/tags/fildeling">fildeling (12)</a></li>
 
 
  <li><a href="http://people.skolelinux.org/pere/blog/tags/fiksgatami">fiksgatami (23)</a></li>
 
  <li><a href="http://people.skolelinux.org/pere/blog/tags/fildeling">fildeling (12)</a></li>
 
- <li><a href="http://people.skolelinux.org/pere/blog/tags/freeculture">freeculture (25)</a></li>
+ <li><a href="http://people.skolelinux.org/pere/blog/tags/freeculture">freeculture (29)</a></li>
 
  <li><a href="http://people.skolelinux.org/pere/blog/tags/freedombox">freedombox (9)</a></li>
 
 
  <li><a href="http://people.skolelinux.org/pere/blog/tags/freedombox">freedombox (9)</a></li>
 
- <li><a href="http://people.skolelinux.org/pere/blog/tags/frikanalen">frikanalen (16)</a></li>
+ <li><a href="http://people.skolelinux.org/pere/blog/tags/frikanalen">frikanalen (18)</a></li>
 
  <li><a href="http://people.skolelinux.org/pere/blog/tags/h264">h264 (20)</a></li>
 
  <li><a href="http://people.skolelinux.org/pere/blog/tags/intervju">intervju (42)</a></li>
 
 
  <li><a href="http://people.skolelinux.org/pere/blog/tags/h264">h264 (20)</a></li>
 
  <li><a href="http://people.skolelinux.org/pere/blog/tags/intervju">intervju (42)</a></li>
 
- <li><a href="http://people.skolelinux.org/pere/blog/tags/isenkram">isenkram (11)</a></li>
+ <li><a href="http://people.skolelinux.org/pere/blog/tags/isenkram">isenkram (13)</a></li>
 
  <li><a href="http://people.skolelinux.org/pere/blog/tags/kart">kart (19)</a></li>
 
 
  <li><a href="http://people.skolelinux.org/pere/blog/tags/kart">kart (19)</a></li>
 
@@ -402,21 +533,21 @@ packages providing appstream metadata.</p>
 
  <li><a href="http://people.skolelinux.org/pere/blog/tags/mesh network">mesh network (8)</a></li>
 
 
  <li><a href="http://people.skolelinux.org/pere/blog/tags/mesh network">mesh network (8)</a></li>
 
- <li><a href="http://people.skolelinux.org/pere/blog/tags/multimedia">multimedia (37)</a></li>
+ <li><a href="http://people.skolelinux.org/pere/blog/tags/multimedia">multimedia (39)</a></li>
 
 
- <li><a href="http://people.skolelinux.org/pere/blog/tags/nice free software">nice free software (7)</a></li>
+ <li><a href="http://people.skolelinux.org/pere/blog/tags/nice free software">nice free software (8)</a></li>
 
 
- <li><a href="http://people.skolelinux.org/pere/blog/tags/norsk">norsk (273)</a></li>
+ <li><a href="http://people.skolelinux.org/pere/blog/tags/norsk">norsk (283)</a></li>
 
 
- <li><a href="http://people.skolelinux.org/pere/blog/tags/nuug">nuug (177)</a></li>
+ <li><a href="http://people.skolelinux.org/pere/blog/tags/nuug">nuug (182)</a></li>
 
 
- <li><a href="http://people.skolelinux.org/pere/blog/tags/offentlig innsyn">offentlig innsyn (22)</a></li>
+ <li><a href="http://people.skolelinux.org/pere/blog/tags/offentlig innsyn">offentlig innsyn (26)</a></li>
 
  <li><a href="http://people.skolelinux.org/pere/blog/tags/open311">open311 (2)</a></li>
 
 
  <li><a href="http://people.skolelinux.org/pere/blog/tags/open311">open311 (2)</a></li>
 
- <li><a href="http://people.skolelinux.org/pere/blog/tags/opphavsrett">opphavsrett (58)</a></li>
+ <li><a href="http://people.skolelinux.org/pere/blog/tags/opphavsrett">opphavsrett (62)</a></li>
 
 
- <li><a href="http://people.skolelinux.org/pere/blog/tags/personvern">personvern (92)</a></li>
+ <li><a href="http://people.skolelinux.org/pere/blog/tags/personvern">personvern (95)</a></li>
 
  <li><a href="http://people.skolelinux.org/pere/blog/tags/raid">raid (1)</a></li>
 
 
  <li><a href="http://people.skolelinux.org/pere/blog/tags/raid">raid (1)</a></li>
 
@@ -426,27 +557,27 @@ packages providing appstream metadata.</p>
 
  <li><a href="http://people.skolelinux.org/pere/blog/tags/rfid">rfid (3)</a></li>
 
 
  <li><a href="http://people.skolelinux.org/pere/blog/tags/rfid">rfid (3)</a></li>
 
- <li><a href="http://people.skolelinux.org/pere/blog/tags/robot">robot (9)</a></li>
+ <li><a href="http://people.skolelinux.org/pere/blog/tags/robot">robot (10)</a></li>
 
  <li><a href="http://people.skolelinux.org/pere/blog/tags/rss">rss (1)</a></li>
 
 
  <li><a href="http://people.skolelinux.org/pere/blog/tags/rss">rss (1)</a></li>
 
- <li><a href="http://people.skolelinux.org/pere/blog/tags/ruter">ruter (4)</a></li>
+ <li><a href="http://people.skolelinux.org/pere/blog/tags/ruter">ruter (5)</a></li>
 
  <li><a href="http://people.skolelinux.org/pere/blog/tags/scraperwiki">scraperwiki (2)</a></li>
 
 
  <li><a href="http://people.skolelinux.org/pere/blog/tags/scraperwiki">scraperwiki (2)</a></li>
 
- <li><a href="http://people.skolelinux.org/pere/blog/tags/sikkerhet">sikkerhet (45)</a></li>
+ <li><a href="http://people.skolelinux.org/pere/blog/tags/sikkerhet">sikkerhet (52)</a></li>
 
  <li><a href="http://people.skolelinux.org/pere/blog/tags/sitesummary">sitesummary (4)</a></li>
 
 
  <li><a href="http://people.skolelinux.org/pere/blog/tags/sitesummary">sitesummary (4)</a></li>
 
- <li><a href="http://people.skolelinux.org/pere/blog/tags/skepsis">skepsis (4)</a></li>
+ <li><a href="http://people.skolelinux.org/pere/blog/tags/skepsis">skepsis (5)</a></li>
 
 
- <li><a href="http://people.skolelinux.org/pere/blog/tags/standard">standard (48)</a></li>
+ <li><a href="http://people.skolelinux.org/pere/blog/tags/standard">standard (49)</a></li>
 
 
- <li><a href="http://people.skolelinux.org/pere/blog/tags/stavekontroll">stavekontroll (3)</a></li>
+ <li><a href="http://people.skolelinux.org/pere/blog/tags/stavekontroll">stavekontroll (5)</a></li>
 
  <li><a href="http://people.skolelinux.org/pere/blog/tags/stortinget">stortinget (10)</a></li>
 
 
  <li><a href="http://people.skolelinux.org/pere/blog/tags/stortinget">stortinget (10)</a></li>
 
- <li><a href="http://people.skolelinux.org/pere/blog/tags/surveillance">surveillance (36)</a></li>
+ <li><a href="http://people.skolelinux.org/pere/blog/tags/surveillance">surveillance (43)</a></li>
 
  <li><a href="http://people.skolelinux.org/pere/blog/tags/sysadmin">sysadmin (2)</a></li>
 
 
  <li><a href="http://people.skolelinux.org/pere/blog/tags/sysadmin">sysadmin (2)</a></li>
 
@@ -454,7 +585,7 @@ packages providing appstream metadata.</p>
 
  <li><a href="http://people.skolelinux.org/pere/blog/tags/valg">valg (8)</a></li>
 
 
  <li><a href="http://people.skolelinux.org/pere/blog/tags/valg">valg (8)</a></li>
 
- <li><a href="http://people.skolelinux.org/pere/blog/tags/video">video (55)</a></li>
+ <li><a href="http://people.skolelinux.org/pere/blog/tags/video">video (59)</a></li>
 
  <li><a href="http://people.skolelinux.org/pere/blog/tags/vitenskap">vitenskap (4)</a></li>
 
 
  <li><a href="http://people.skolelinux.org/pere/blog/tags/vitenskap">vitenskap (4)</a></li>