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

Bug#556015: Clarify requirements for copyright file



I think there was general consensus on the basic idea of the earlier
version of this patch, but Steve Langasek questioned the need for a
/usr/share/doc symlink to be supported by a direct dependency, as opposed
to an indirect dependency.  This version of the patch relaxes that and
allows the dependency to be indirect, provided that all the packages
involved are built from the same source package.  I believe this means we
will not be imposing any new requirements in this area than what Policy
had already required, but we'll be stating them more clearly.

Here's a revised version of the patch.  Objections or seconds?

diff --git a/policy.sgml b/policy.sgml
index bad28af..fb8468a 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>
@@ -9314,39 +9317,88 @@ 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 of the following
+	  requirements are met:
+	  <enumlist>
+	    <item>
+	      All the requirements for using a symlink instead of a
+	      directory as <file>/usr/share/doc/<var>package</var></file>
+	      described in <ref id="addl-docs"> must be met.  This means
+	      both packages must come from the same source package and the
+	      package must depend on the package containing its copyright
+	      and distribution license.
+	    </item>
+
+	    <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>
+
+	    <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.
+	    </item>
+
+	    <item>
+	      The copyright file contained in the other package must meet
+	      all of the requirements listed below.
+	    </item>
+	  </enumlist>
 	</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>
@@ -9381,10 +9433,12 @@ END-INFO-DIR-ENTRY
 	</p>
 
 	<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>
+	  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>
       </sect>
 
       <sect>

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



Reply to: