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

Bug#542288: debian-policy: Version numbering: native packages, NMU's, and binary only uploads



Simon McVittie <smcv@debian.org> writes:
> On Sun, 25 Jun 2017 at 14:08:05 -0700, Russ Allbery wrote:

>> +                <replaceable>upstream_version</replaceable> components in
>> +                native packages ending in <literal>+nmu</literal> followed
>> +                by a number indicate an NMU of a native package.

> I thought 1.2.3-4+nmu1 was also allowed as an alternative to 1.2.3-4.1?
> But perhaps that's non-standard (it's certainly redundant).

There's some previous discussion in the bug.  The summary is that this was
proposed and is sometimes used, but pretty much everyone uses the 4.1
syntax still, so it doesn't seem to really have consensus.

Note that this list is not exclusive; there may be version numbering
conventions that aren't documented.  I just wanted to get down the most
likely ones that people will encounter.

>> +                <replaceable>N</replaceable> is the major version number
>> +                of the Debian stable release to which the package was
>> +                package uploaded directly to a stable release, and the

> You have some duplicated lines here I think.

Argh.  For some reason, less constantly messes with me when I cut and
paste diffs instead of saving them to a file and including them directly.
I could have sworn I configured it to never use partial pages.

Included is the correct version of the patch.

> One rarer case is missing here:

> 1.2.3-4~deb9u1
> 	Everything in 1.2.3-4 from unstable was in fact needed in Debian
> 	9, so it was simply rebuilt for Debian 9 and uploaded there
> 	(prominent examples: firefox-esr, intel-microcode)

Is this widespread enough to be worth describing?  It's kind of hard to
describe.

diff --git a/policy.xml b/policy.xml
index 7ba5fc0..fbc53c9 100644
--- a/policy.xml
+++ b/policy.xml
@@ -357,6 +357,21 @@
           </listitem>
         </varlistentry>
         <varlistentry>
+          <term>native package</term>
+          <listitem>
+            <para>
+              A native package is software written specifically for Debian
+              whose canonical distribution format is as a Debian package.
+              Native packages have no separate upstream source in their
+              source package representation and no separate Debian
+              revision in their version numbers.  Native packages are an
+              exception: most Debian packages are "non-native" and have
+              source packages composed of an upstream software release and
+              separate Debian-specific modifications.
+            </para>
+          </listitem>
+        </varlistentry>
+        <varlistentry>
           <term>UTF-8</term>
           <listitem>
             <para>
@@ -589,13 +604,10 @@
             <para>
               must not require or recommend a package outside of
               <emphasis>main</emphasis> for compilation or execution
-              (thus, the package must not declare a
-              <literal>Pre-Depends</literal>, <literal>Depends</literal>,
-              <literal>Recommends</literal>,
-              <literal>Build-Depends</literal>,
-              <literal>Build-Depends-Indep</literal>, or
-              <literal>Build-Depends-Arch</literal> relationship on a
-              non-<emphasis>main</emphasis> package),
+              (thus, the package must not declare a "Pre-Depends",
+              "Depends", "Recommends", "Build-Depends",
+              "Build-Depends-Indep", or "Build-Depends-Arch" relationship
+              on a non-<emphasis>main</emphasis> package),
             </para>
           </listitem>
           <listitem>
@@ -3725,11 +3737,11 @@ Package: libc6
               <para>
                 It is optional; if it isn't present then the
                 <replaceable>upstream_version</replaceable> may not
-                contain a hyphen.  This format represents the case where a
-                piece of software was written specifically to be a Debian
-                package, where the Debian package source must always be
-                identical to the pristine source and therefore no revision
-                indication is required.
+                contain a hyphen.  This format represents a native
+                package: a piece of software written specifically to be a
+                Debian package, where the Debian package source must
+                always be identical to the pristine source and therefore
+                no revision indication is required.
               </para>
               <para>
                 It is conventional to restart the
@@ -3814,6 +3826,110 @@ Package: libc6
             </para>
           </footnote>
         </para>
+
+        <section id="s-special-versions">
+          <title>Special version conventions</title>
+
+          <para>
+            The following special version numbering conventions are used in
+            the Debian archive:
+          </para>
+          <itemizedlist>
+            <listitem>
+              <para>
+                The absence of <replaceable>debian_revision</replaceable>,
+                and therefore of a hyphen in the version number, indicates
+                that the package is native.
+              </para>
+            </listitem>
+            <listitem>
+              <para>
+                <replaceable>debian_revision</replaceable> components
+                ending in <literal>.</literal> followed by a number
+                indicate this version of the non-native package was
+                uploaded by someone other than the maintainer (an NMU or
+                non-maintainer upload).  This is used for a source package
+                upload; for uploads of only binary packages without source
+                changes, see the binary NMU convention below.
+              </para>
+            </listitem>
+            <listitem>
+              <para>
+                <replaceable>upstream_version</replaceable> components in
+                native packages ending in <literal>+nmu</literal> followed
+                by a number indicate an NMU of a native package.  As with
+                the convention for non-native packages, this is used for a
+                source package upload, not for uploads of only binary
+                packages without source changes.
+              </para>
+            </listitem>
+            <listitem>
+              <para>
+                <replaceable>upstream_version</replaceable> components in
+                native packages or
+                <replaceable>debian_revision</replaceable> components in
+                non-native packages ending in <literal>+b</literal>
+                followed by a number indicate a binary NMU: an upload of a
+                binary package without any source changes and hence
+                without any corresponding source package upload or version
+                change.
+              </para>
+            </listitem>
+            <listitem>
+              <para>
+                <replaceable>upstream_version</replaceable> components in
+                native packages or
+                <replaceable>debian_revision</replaceable> components in
+                non-native packages ending in <literal>+debNuX</literal>
+                indicate a stable update.  This is a version of the
+                package uploaded directly to a stable release, and the
+                version is chosen to sort before any later version of the
+                package uploaded to Debian's unstable distribution.  The
+                <replaceable>N</replaceable> is the major version number
+                of the Debian stable release to which the package was
+                uploaded, and the <replaceable>X</replaceable> is a
+                number, starting at 1, that is increased for each stable
+                upload of this package.
+              </para>
+              <informalexample>
+                <para>
+                  Suppose Debian 9 released with a package with version
+                  <literal>1.4-5</literal>.  If that package later
+                  receives a stable update in Debian 9, the first update
+                  would have the version <literal>1.4-5+deb9u1</literal>.
+                  A subsequent update would have version
+                  <literal>1.4-5+deb9u2</literal>.  These numbers are
+                  designed to sort earlier than <literal>1.4-6</literal>,
+                  the version number that would be used for the next
+                  unstable upload.
+                </para>
+              </informalexample>
+            </listitem>
+            <listitem>
+              <para>
+                <replaceable>upstream_version</replaceable> components in
+                native packages or
+                <replaceable>debian_revision</replaceable> components in
+                non-native packages ending in <literal>~bpoNuX</literal>
+                indicate a backport of a version of the package to an
+                older stable release.  The part of the version before
+                <literal>~bpo</literal> is the version of the package
+                being backported, the <replaceable>N</replaceable> is the
+                major version number of the Debian stable release to which
+                the package was backported, and the
+                <replaceable>X</replaceable> is a number, starting at 1,
+                that is increased for each revision of the backport of
+                that package version.
+              </para>
+              <para>
+                This version convention was chosen to sort before the
+                original package release that is being backported so that
+                the backport will upgrade to the original package during a
+                later system upgrade to a newer Debian release.
+              </para>
+            </listitem>
+          </itemizedlist>
+        </section>
       </section>
 
       <section id="s-f-Description">

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


Reply to: