0

When packaging an upstream binary for Debian, I get a lintian error as follows:

E: redwax-tool: copyright-file-contains-full-apache-2-license 

This is indeed true, the upstream package provides the full text of the Apache license, as it should.

According to https://lintian.debian.org/tags/copyright-file-contains-full-apache-2-license.html we get the following terse explanation:

The copyright file /usr/share/doc/pkg/copyright contains the complete text of the Apache 2.0 license. It should refer to the file /usr/share/common-licenses/Apache-2.0 instead. 

What is missing are instructions how to achieve this in the debian directory.

Further instructions at https://www.debian.org/doc/debian-policy/ch-docs.html#s-copyrightfile say "This file must neither be compressed nor be a symbolic link".

The debian/copyright file generated by the debmake tooling ends with the following sensible looking text:

#---------------------------------------------------------------------------- # Files marked as NO_LICENSE_TEXT_FOUND may be covered by the following # license/copyright files. #---------------------------------------------------------------------------- # License file: COPYING Apache License Version 2.0, January 2004 http://www.apache.org/licenses/ . TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION . [snip] 

Can anyone provide an example or some guidance on concrete packaging steps to take to remove this error.

1
  • 1
    I'm not saying it's completely off-topic here, but it does sound like something that should typically be discussed on a mailing list or forum for Debian package maintainers (to get a proper definitive and authoritative answer). Commented Feb 17 at 11:59

1 Answer 1

2

debian/copyright is supposed to include the license grant (the text from the source which specifies the applicable license), and if necessary, the license text itself. For licenses whose full text is included in /usr/share/common-licenses, the latter should be replaced by a pointer to the appropriate file instead. This is specified in the Policy section on copyright files:

Packages distributed under the Apache license (version 2.0), the Artistic license, the Creative Commons CC0-1.0 license, the GNU GPL (versions 1, 2, or 3), the GNU LGPL (versions 2, 2.1, or 3), the GNU FDL (versions 1.2 or 1.3), and the Mozilla Public License (version 1.1 or 2.0) should refer to the corresponding files under /usr/share/common-licenses, rather than quoting them in the copyright file.

For the Apache License this looks like the following, in a License stanza:

License: Apache-2.0 Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at . http://www.apache.org/licenses/LICENSE-2.0 . Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. . On Debian systems, the complete text of the Apache License version 2 can be found in /usr/share/common-licenses/Apache-2.0 

The debmake-produced snippet starting with

#---------------------------------------------------------------------------- # Files marked as NO_LICENSE_TEXT_FOUND may be covered by the following # license/copyright files. 

isn’t intended as final contents for debian/copyright; it’s added so that you have all the information handy to write a correct debian/copyright. In this instance you need to remove it.

0

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.