]> pere.pagekite.me Git - homepage.git/blobdiff - blog/archive/2016/02/02.rss
Generated.
[homepage.git] / blog / archive / 2016 / 02 / 02.rss
index 53042a00c943d5a0b9bf9fb4e4a4ede9251445a8..1f41edb0124670feb692ea4e9008d20b66b81d40 100644 (file)
@@ -6,6 +6,89 @@
                 <link>http://people.skolelinux.org/pere/blog/</link>
 
        
+       <item>
+               <title>Creating, updating and checking debian/copyright semi-automatically</title>
+               <link>http://people.skolelinux.org/pere/blog/Creating__updating_and_checking_debian_copyright_semi_automatically.html</link>        
+               <guid isPermaLink="true">http://people.skolelinux.org/pere/blog/Creating__updating_and_checking_debian_copyright_semi_automatically.html</guid>
+                <pubDate>Fri, 19 Feb 2016 15:00:00 +0100</pubDate>
+               <description>&lt;p&gt;Making packages for Debian require 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
+&lt;a href=&quot;https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/&quot;&gt;machine
+readable DEP5 format&lt;/a&gt;.&lt;/p&gt;
+
+&lt;p&gt;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
+&lt;a href=&quot;https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=686447&quot;&gt;the
+zfsonlinux copyright file&lt;/a&gt;, I decided to spend some time on
+figuring out the options for doing this job automatically, or at least
+semi-automatically.&lt;/p&gt;
+
+&lt;p&gt;Lucikly, there are at least two tools available for generating the
+file based on the code in the source package,
+&lt;tt&gt;&lt;a href=&quot;https://tracker.debian.org/pkg/debmake&quot;&gt;debmake&lt;/a&gt;&lt;/tt&gt;
+and &lt;tt&gt;&lt;a href=&quot;https://tracker.debian.org/pkg/cme&quot;&gt;cme&lt;/a&gt;&lt;/tt&gt;.  I&#39;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
+&lt;a href=&quot;http://goofying-with-debian.blogspot.com/2014/07/debmake-checking-source-against-dep-5.html&quot;&gt;a
+blog posts from 2014&lt;/a&gt;.
+
+&lt;p&gt;To generate using debmake, use the -cc option:
+
+&lt;p&gt;&lt;pre&gt;
+debmake -cc &gt; debian/copyright
+&lt;/pre&gt;&lt;/p&gt;
+
+&lt;p&gt;Note there are some problems with python and non-ASCII names, so
+this might not be the best option.&lt;/p&gt;
+
+&lt;p&gt;The cme option is based on a config parsing library, and I found
+this approach in
+&lt;a href=&quot;https://ddumont.wordpress.com/2015/04/05/improving-creation-of-debian-copyright-file/&quot;&gt;a
+blog post from 2015&lt;/a&gt;.  To generate using cme, use the &#39;update
+dpkg-copyright&#39; option:
+
+&lt;p&gt;&lt;pre&gt;
+cme update dpkg-copyright -quiet
+&lt;/pre&gt;&lt;/p&gt;
+
+&lt;p&gt;This will create or update debian/copyright.  The cme tool seem to
+handle UTF-8 names better than debmake.&lt;/p&gt;
+
+&lt;p&gt;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,
+&lt;tt&gt;debmake -k&lt;/tt&gt; and &lt;tt&gt;license-reconcile&lt;/tt&gt;.  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.&lt;/p&gt;
+
+&lt;p&gt;The devscripts tool &lt;tt&gt;licensecheck&lt;/tt&gt; 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.&lt;/p&gt;
+
+&lt;p&gt;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.&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&quot;&gt;15oWEoG9dUPovwmUL9KWAnYRtNJEkP1u1b&lt;/a&gt;&lt;/b&gt;.&lt;/p&gt;
+</description>
+       </item>
+       
        <item>
                <title>Using appstream in Debian to locate packages with firmware and mime type support</title>
                <link>http://people.skolelinux.org/pere/blog/Using_appstream_in_Debian_to_locate_packages_with_firmware_and_mime_type_support.html</link>