Ubuntu - Copyright File in Deb Package - How To - Stack Overflow

Download as pdf or txt
Download as pdf or txt
You are on page 1of 2

Share Your Experience: Take the 2024 Developer Survey

copyright file in deb package - how to


Asked 10 years, 10 months ago Modified 9 years, 8 months ago Viewed 6k times

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:
6
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
Source:

Files: *
Copyright: 2013 myproj. All rights reserved.
License: Limited Use Software License Agreement
License Text Here

ubuntu debian packaging dpkg

Share Improve this question edited Sep 11, 2014 at 11:36 asked Aug 2, 2013 at 12:39
Follow Drew Noakes hithwen
307k 167 687 755 2,164 30 46

2 Answers Sorted by: Highest score (default)

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.
5
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/

Share Improve this answer Follow answered Aug 4, 2013 at 14:14


umläute
30.2k 9 70 126

But from what I see dpkg-buildpackage is intended for packages that are going to be build with make, I
want to create a package from binaries – hithwen Aug 19, 2013 at 11:30

dpkg-buildpackage knows nothing about make for building the package. (actually, it uses make
internally to process the debian/rules file, but this is totally independent from (not) creating any
files during the package's build process). e.g. a lot of packages contain only scripts, so no compilation
is needed and the "source-files" can be used as is. still dpkg-buildpackage is used to assemble the
package. – umläute Aug 21, 2013 at 7:52

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:
3
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:

https://bugs.launchpad.net/ubuntu/+source/software-center/+bug/435183

They started working in the issue in July

Share Improve this answer Follow answered Aug 19, 2013 at 11:40
hithwen
2,164 30 46

You might also like