X-Git-Url: http://pere.pagekite.me/gitweb/homepage.git/blobdiff_plain/28fc7c9cda853737817ac78f576d322d574c696c..d53d22dfe29d299c3482f85d148df12e4bcfef9b:/blog/archive/2016/02/index.html diff --git a/blog/archive/2016/02/index.html b/blog/archive/2016/02/index.html index 245b6e81d5..e0d7bd5bb8 100644 --- a/blog/archive/2016/02/index.html +++ b/blog/archive/2016/02/index.html @@ -21,6 +21,118 @@

Entries from February 2016.

+
+
+ Creating, updating and checking debian/copyright semi-automatically +
+
+ 19th February 2016 +
+
+

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 +machine +readable DEP5 format.

+ +

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 +the +zfsonlinux copyright file, I decided to spend some time on +figuring out the options for doing this job automatically, or at least +semi-automatically.

+ +

Lucikly, there are at least two tools available for generating the +file based on the code in the source package, +debmake +and cme. 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 +blog posts from 2014. + +

To generate using debmake, use the -cc option: + +

+debmake -cc > debian/copyright
+

+ +

Note there are some problems with python and non-ASCII names, so +this might not be the best option.

+ +

The cme option is based on a config parsing library, and I found +this approach in +a +blog post from 2015. To generate using cme, use the 'update +dpkg-copyright' option: + +

+cme update dpkg-copyright
+

+ +

This will create or update debian/copyright. The cme tool seem to +handle UTF-8 names better than debmake.

+ +

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, +debmake -k and license-reconcile. 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.

+ +

The devscripts tool licensecheck 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.

+ +

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.

+ +

As usual, if you use Bitcoin and want to show your support of my +activities, please send Bitcoin donations to my address +15oWEoG9dUPovwmUL9KWAnYRtNJEkP1u1b.

+ +

Update 2016-02-20: I got a tip from Mike Gabriel +on how to use licensecheck and cdbs to create a draft copyright file + +

+licensecheck --copyright -r `find * -type f` | \
+  /usr/lib/cdbs/licensecheck2dep5 > debian/copyright.auto
+

+ +

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.

+ +

Update 2016-02-21: The cme author recommended +against using -quiet for new users, so I removed it from the proposed +command line.

+ +
+
+ + + Tags: debian, english. + + +
+
+
+
Using appstream in Debian to locate packages with firmware and mime type support @@ -29,11 +141,12 @@ 4th February 2016
-

The appstream system 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. :)

+

The appstream system +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. :)

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.

  • January (3)
  • -
  • February (1)
  • +
  • February (2)
  • + +
  • March (3)
  • + +
  • April (8)
  • + +
  • May (8)
  • + +
  • June (2)
  • + +
  • July (2)
  • + +
  • August (5)
  • + +
  • September (2)
  • + +
  • October (3)
  • + +
  • November (8)
  • @@ -354,41 +485,41 @@ packages providing appstream metadata.

  • bitcoin (9)
  • -
  • bootsystem (15)
  • +
  • bootsystem (16)
  • bsa (2)
  • chrpath (2)
  • -
  • debian (119)
  • +
  • debian (141)
  • -
  • debian edu (154)
  • +
  • debian edu (158)
  • digistan (10)
  • -
  • dld (15)
  • +
  • dld (16)
  • -
  • docbook (20)
  • +
  • docbook (23)
  • drivstoffpriser (4)
  • -
  • english (301)
  • +
  • english (333)
  • fiksgatami (23)
  • fildeling (12)
  • -
  • freeculture (25)
  • +
  • freeculture (29)
  • freedombox (9)
  • -
  • frikanalen (16)
  • +
  • frikanalen (18)
  • h264 (20)
  • intervju (42)
  • -
  • isenkram (11)
  • +
  • isenkram (13)
  • kart (19)
  • @@ -402,21 +533,21 @@ packages providing appstream metadata.

  • mesh network (8)
  • -
  • multimedia (37)
  • +
  • multimedia (39)
  • -
  • nice free software (7)
  • +
  • nice free software (8)
  • -
  • norsk (273)
  • +
  • norsk (283)
  • -
  • nuug (177)
  • +
  • nuug (182)
  • -
  • offentlig innsyn (22)
  • +
  • offentlig innsyn (26)
  • open311 (2)
  • -
  • opphavsrett (58)
  • +
  • opphavsrett (62)
  • -
  • personvern (92)
  • +
  • personvern (95)
  • raid (1)
  • @@ -426,27 +557,27 @@ packages providing appstream metadata.

  • rfid (3)
  • -
  • robot (9)
  • +
  • robot (10)
  • rss (1)
  • -
  • ruter (4)
  • +
  • ruter (5)
  • scraperwiki (2)
  • -
  • sikkerhet (45)
  • +
  • sikkerhet (52)
  • sitesummary (4)
  • -
  • skepsis (4)
  • +
  • skepsis (5)
  • -
  • standard (48)
  • +
  • standard (49)
  • -
  • stavekontroll (3)
  • +
  • stavekontroll (5)
  • stortinget (10)
  • -
  • surveillance (36)
  • +
  • surveillance (43)
  • sysadmin (2)
  • @@ -454,7 +585,7 @@ packages providing appstream metadata.

  • valg (8)
  • -
  • video (55)
  • +
  • video (59)
  • vitenskap (4)