Logo Questions Linux Laravel Mysql Ubuntu Git Menu

copyright file in deb package - how to

I'm trying to create a deb package from binaries but I have a problem with copyright file. If I place a file named copyright inside DEBIAN folder it complains of two things:

  • Missing copyright
  • Unknown control file copyright

If I place it under /usr/share/doc or /usr/share/doc/mypackage it does not complain at all but, in any case, when I open generated debian package, Ubuntu Software Center states License: Unknown

Using: ubuntu raring

Executing fakeroot dpkg-deb -z8 -Zgzip --build myproj

Copyright file looks as follows:

Format: http://dep.debian.net/deps/dep5
Upstream-Name: myproj

Files: *
Copyright: 2013 myproj. All rights reserved.
License: Limited Use Software License Agreement
 License Text Here
like image 615
hithwen Avatar asked Mar 23 '23 05:03


2 Answers

if you build a package using low-level tools like dpkg-deb you should have a good knowledge on the internals of a debian package.

the DEBIAN/-folder is really only for control files, e.g. the control description file of the package, and various pre/post installation scripts (e.g. postinst).

otoh, the usual way to build packages is using high-level tools, namely dpkg-buildpackage, which uses a debian/ directory, which has a similar name to DEBIAN/ but is really something completely different (note the upper/lower case spelling).

dpkg-buildpackage (or rather it's underlying tools like debhelper or cdbs or whatever you choose) will install the debian/changelog file into /usr/share/doc/<packagename>/. if you insist on using low-level tools, then you must not put your changelog into DEBIAN/ but rather into /usr/share/doc/myproj/.

btw, you should use the DEP5-format described in it's final version and also indicate that you did so using

Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
like image 183
umläute Avatar answered Mar 25 '23 19:03


Apparently the "Unknown" issue in Ubuntu Software Center is not an issue and cannot be solved for the moment. From ubuntu lists, Feb'13 thread:

Your copyright file looks perfect. Unfortunately, software-center still doesn't actually parse the copyright file to gather that information. It seems to use "License: Open Source" or everything in Ubuntu main and universe, "Proprietary" for things in restricted, and "Unknown" for everything else. There is an open bug report about the issue here:


They started working in the issue in July

like image 23
hithwen Avatar answered Mar 25 '23 17:03