Don Armstrong <d...@debian.org> writes:
> On Mon, 05 Jul 2010, Russ Allbery wrote:

>> Well, they do, in that binNMUs do change the changelog included in the
>> package. I'm inclined to agree that it's not a big deal if we lose that
>> information in the installed package, though.

> Right; this is kind of an odd thing, because a binNMU has a source
> version which doesn't match the entry in the changelog.

>> any -> any can use (= ${binary:Version})
>> any -> all can use (= ${source:Version})
>> all -> all can use (= ${source:Version})
>> 
>> The question is what to do for all -> any.  Right now, I think best
>> practice is to do something like:
>> 
>>     (>= ${source:Version}), (<< ${source:Version}+b99)

> In general, if you had an arch all package which had to be installed, it
> should have the changelog in it, and the arch any package wouldn't.

> The only exception I can see is a case where the arch: all package
> wouldn't be a dependency of the arch: any package, but the arch: all
> package requires functionality in the arch: any package (and there isn't
> any required arch: all package from the same source). [Like a source
> package which builds a core set of binaries, and an -examples package of
> perl scripts which needs the core set to function.]

Here's a patch that is explicit about the required dependencies and
discourages the last case.  Does this look good to everyone?

diff --git a/policy.sgml b/policy.sgml
index 7736ddb..c7be32f 100644
--- a/policy.sgml
+++ b/policy.sgml
@@ -573,10 +573,15 @@
        <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></file>
+         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 +1684,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>
@@ -9247,7 +9251,7 @@ END-INFO-DIR-ENTRY
        </p>
       </sect>
 
-      <sect>
+      <sect id="addl-docs">
        <heading>Additional documentation</heading>
 
        <p>
@@ -9289,21 +9293,65 @@ 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 a dependency that ensures exactly the right
+             version of the other package be installed.  For a dependency
+             between two binary-dependent packages, use:
+             <example>
+Depends: foo (= ${binary:Version})
+             </example>
+             For a dependency between two architecture-independent
+             packages or from an architecture-dependent package to an
+             architecture-independent package, use:
+             <example>
+Depends: foo (= ${source:Version})
+             </example>
+             Putting the symlink in an architecture-independent package
+             and the documentation directory in an architecture-dependent
+             package should be avoided if the documentation can be moved
+             to an architecture-independent package instead, but if
+             required, a dependency similar to:
+             <example>
+Depends: foo (>= ${source:Version}), foo (<< ${source:Version}+b99)
+             </example>
+             can be used.
+           </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>
@@ -9349,39 +9397,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 (r...@debian.org)               <http://www.eyrie.org/~eagle/>



-- 
To UNSUBSCRIBE, email to debian-policy-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/87bpajnudg....@windlord.stanford.edu

Reply via email to