[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#556015: Clarify requirements for copyright file



Jakub Wilk <jwilk@debian.org> writes:
> * Russ Allbery <rra@debian.org>, 2010-07-03, 12:15:

>>+	    <item>
>>+	      The dependency on the package containing the copyright
>>+	      information and distribution license must be strong
>>+	      (<tt>Depends</tt> or <tt>Pre-Depends</tt>).  This dependency
>>+	      may be indirect through other packages (for example,
>>+	      packages A and B may have symlinks pointing to package C
>>+	      with A depending on B and B depending on C), but only if all
>>+	      packages involved in the dependency chain are built from the
>>+	      same source package.
>>+	    </item>

> I think this point rather belongs in 12.3 ("Additional documentation").

Good point, and after looking at this further, I think all the
requirements should be moved to that section.  Otherwise, we have two
separate lists of requirements for /usr/share/doc symlinks that both have
to be followed.  I moved them all into 12.3 in the patch below.

>>-	  You should not use the copyright file as a general <file>README</file>
>>-	  file.  If your package has such a file it should be
>>-	  installed in <file>/usr/share/doc/<var>package</var>/README</file> or
>>-	  <file>README.Debian</file> or some other appropriate place.</p>
>>+	  You should not use the copyright file as a general
>>+	  <file>README</file> file.  If your package has such a file it
>>+	  should be installed in
>>+	  <file>/usr/share/doc/<var>package</var>/README</file> or
>>+	  <file>README.Debian</file> or some other appropriate place.
>>+	</p>

> This hunk is a whitespace-only change; could be please avoid such changes?

Yeah, sorry, I knew that was a bad idea when I did it.  Reverted.  I'll
make that change separately.

Here's the new version of the patch.

diff --git a/policy.sgml b/policy.sgml
index bad28af..b71a26b 100644
--- a/policy.sgml
+++ b/policy.sgml
@@ -573,10 +573,14 @@
 	<heading>Copyright considerations</heading>
 
 	<p>
-	  Every package must be accompanied by a verbatim copy of its
+	  Every binary package must include a verbatim copy of its
 	  copyright information and distribution license in the file
-	  <file>/usr/share/doc/<var>package</var>/copyright</file>
-	  (see <ref id="copyrightfile"> for further details).
+	  <file>/usr/share/doc/<var>package</var>/copyright</file> or
+	  symlink the <file>/usr/share/doc/<var>package</var> directory to
+	  a package that does (see <ref id="copyrightfile"> for further
+	  details).  Every source package must include a verbatim copy of
+	  its copyright information and distribution license in the file
+	  <file>debian/copyright</file> (see <ref id="dpkgcopyright">).
 	</p>
 
 	<p>
@@ -1679,12 +1683,11 @@
       <sect id="dpkgcopyright">
 	<heading>Copyright: <file>debian/copyright</file></heading>
         <p>
-	  Every package must be accompanied by a verbatim copy of its
-	  copyright information and distribution license in the file
-	  <file>/usr/share/doc/<var>package</var>/copyright</file>
-	  (see <ref id="copyrightfile"> for further details). Also see
-	  <ref id="pkgcopyright"> for further considerations related
-	  to copyrights for packages.
+	  Every source package must include a verbatim copy of
+	  its copyright information and distribution license in the file
+	  <file>debian/copyright</file> (see <ref id="copyrightfile"> for
+	  further details).  Also see <ref id="pkgcopyright"> for further
+	  considerations related to copyrights for packages.
         </p>
       </sect>
       <sect>
@@ -9212,7 +9215,7 @@ END-INFO-DIR-ENTRY
 	</p>
       </sect>
 
-      <sect>
+      <sect id="addl-docs">
 	<heading>Additional documentation</heading>
 
 	<p>
@@ -9254,21 +9257,46 @@ END-INFO-DIR-ENTRY
 	</p>
 
 	<p>
-	  <file>/usr/share/doc/<var>package</var></file> may be a symbolic
-	  link to another directory in <file>/usr/share/doc</file> only if
-	  the two packages both come from the same source and the
-	  first package Depends on the second.<footnote>
-            <p>
-              Please note that this does not override the section on
-              changelog files below, so the file 
-              <file>/usr/share/doc/<var>package</var>/changelog.Debian.gz</file>
-              must refer to the changelog for the current version of
-              <var>package</var> in question. In practice, this means
-              that the sources of the target and the destination of the
-              symlink must be the same (same source package and
-              version). 
-            </p>
-          </footnote>
+	  If two packages should share the same documentation, including
+	  the copyright file and the Debian
+	  changelog, <file>/usr/share/doc/<var>package</var></file> may be
+	  a symbolic link to the documentation directory
+	  in <file>/usr/share/doc</file> included in another package.
+	  This may only be done if all of the following requirements are
+	  met:
+	  <enumlist>
+	    <item>
+	      The two packages are built from the same source package.
+	    </item>
+	    <item>
+	      The package containing the symlink depends strongly
+	      (<tt>Depends</tt> or <tt>Pre-Depends</tt>) on the package
+	      containing the the <file>/usr/share/doc</file> and the files
+	      required to be in that directory.  This dependency may be
+	      indirect through other packages (for example, packages A and
+	      B may have symlinks pointing to package C with A depending
+	      on B and B depending on C), but only if all packages
+	      involved in the dependency chain are built from the same
+	      source package.
+	    </item>
+	    <item>
+	      The packages are the same version (both source and Debian
+	      revision) with the possible exception of binary-only
+	      rebuilds of one of the packages, since otherwise
+	      the <file>changelog.Debian.gz</file> in one of the two
+	      packages would not be the changelog for the latest version.
+	      This requires the dependency on the other package be tightly
+	      versioned.
+	    </item>
+	    <item>
+	      The <file>/usr/share/doc/<var>package</var>/copyright</file>
+	      file contained in the other package must contain the
+	      copyright information and distribution license for both
+	      packages and must meet all of the requirements for both
+	      packages.  See <ref id="copyrightfile"> for more
+	      information.
+	    </item>
+	  </enumlist>
 	</p>
 
 	<p>
@@ -9314,39 +9342,55 @@ END-INFO-DIR-ENTRY
 	<heading>Copyright information</heading>
 
 	<p>
-	  Every package must be accompanied by a verbatim copy of its
+	  Every binary package must either include a verbatim copy of its
 	  copyright information and distribution license in the file
-	  <file>/usr/share/doc/<var>package</var>/copyright</file>. This
-	  file must neither be compressed nor be a symbolic link.
+	  <file>/usr/share/doc/<var>package</var>/copyright</file> or must
+	  include a symlink
+	  named <file>/usr/share/doc/<var>package</var></file> that points
+	  to the <file>/usr/share/doc</file> directory of another package
+	  that includes the copyright file.<footnote>
+	    The <package>perl-base</package> and <package>perl</package>
+	    packages do not meet these requirements.
+	    <package>perl-base</package> contains the copyright file for
+	    both packages in the location appropriate for
+	    the <package>perl</package>, and <package>perl</package> does
+	    not include either a symlink or a copyright file.  Fixing this
+	    would be complex and result in potentially fragile upgrades,
+	    in part because <package>perl-base</package> is essential.
+	    This is therefore permitted as a special exception.  Other
+	    packages do not have the added complexity of being essential
+	    and do not get the same exception.
+	  </footnote>
+	  The second option may only be used if all the requirements
+	  described in <ref id="addl-docs"> are met.
 	</p>
 
 	<p>
-	  In addition, the copyright file must say where the upstream
-	  sources (if any) were obtained.  It should name the original
-	  authors of the package and the Debian maintainer(s) who were
-	  involved with its creation.
+	  The copyright file must neither be compressed nor be a symbolic
+	  link.
 	</p>
 
 	<p>
-	  Packages in the <em>contrib</em> or <em>non-free</em> archive
-	  areas should state in the copyright file that the package is not
-	  part of the Debian GNU/Linux distribution and briefly explain
-	  why.
+	  In addition to the copyright and distribution license, the
+	  copyright file must say where the upstream sources (if any) were
+	  obtained.  Packages in the <em>contrib</em> or <em>non-free</em>
+	  archive areas should state in the copyright file that the
+	  package is not part of the Debian GNU/Linux distribution and
+	  briefly explain why.
 	</p>
 
 	<p>
 	  A copy of the file which will be installed in
 	  <file>/usr/share/doc/<var>package</var>/copyright</file> should
-	  be in <file>debian/copyright</file> in the source package.
-	</p>
-
-	<p>
-	  <file>/usr/share/doc/<var>package</var></file> may be a symbolic
-	  link to another directory in <file>/usr/share/doc</file> only if
-	  the two packages both come from the same source and the
-	  first package Depends on the second.  These rules are
-	  important because copyrights must be extractable by
-	  mechanical means.
+	  normally be in <file>debian/copyright</file> in the
+	  corresponding source package.  If a source package produces
+	  binary packages with separate copyright files (if, for instance,
+	  different binary packages produced from one source package have
+	  substantially different distribution licenses), it may include
+	  multiple copyright files for installation into the different
+	  binary packages, but <file>debian/copyright</file> in the source
+	  package must still contain the copyright and distribution
+	  license for the entirety of the source package.
 	</p>
 
 	<p>

-- 
Russ Allbery (rra@debian.org)               <http://www.eyrie.org/~eagle/>



Reply to: