Bug#1107137: Distinguish "native source packsge" from "native version number"
Control: tags -1 patch
Here is what I think needs to be done to policy to reflect the TC
decision in #1007717. That decision implies that source package
nativeness and version number nativeness are at least partially
decoupled, so we need to speak more precisely about which we mean.
I chose the terminology "[non-]native source package" and "native
version [number]". I think we can generally continue to use "native
package" when we are speaking loosely, or when it's not ambiguous.
I considered "[non-]native source package format" but that's
confusing, because while 1.0-native and 1.0-with-diff are in this
sense different formats, dpkg-soruce has debian/source/format which
conflates them.
I've explicitly stated that non-native source formats can't be used
with native versions. I don't think such a thing could function.
Ian.
>From cf66ee770fc633ff98035521946f7f6533d1d236 Mon Sep 17 00:00:00 2001
From: Ian Jackson <ijackson@chiark.greenend.org.uk>
Date: Tue, 3 Jun 2025 14:34:00 +0100
Subject: [PATCH 1/4] Add heading for version comparison
---
policy/ch-controlfields.rst | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/policy/ch-controlfields.rst b/policy/ch-controlfields.rst
index 3151816..c6b4944 100644
--- a/policy/ch-controlfields.rst
+++ b/policy/ch-controlfields.rst
@@ -596,6 +596,11 @@ The three components here are:
non-native package (see :ref:`s-source-packages`). Absence indicates
the package is a native package.
+.. _s-version-comparison:
+
+Comparing versions
+^^^^^^^^^^^^^^^^^^
+
When comparing two version numbers, first the epoch of each are
compared, then the ``upstream_version`` if epoch is equal, and then
``debian_revision`` if ``upstream_version`` is also equal. epoch is compared
--
2.47.2
>From c608069fc5daf66edd7d71ea8903f1471ec14952 Mon Sep 17 00:00:00 2001
From: Ian Jackson <ijackson@chiark.greenend.org.uk>
Date: Tue, 3 Jun 2025 14:40:31 +0100
Subject: [PATCH 2/4] Distinguish "native version" from "native source package"
"Non-native version" means a version with a hyphen.
"Non-native source package" means a source package that separates out
orig tarballs from Debian packaging and delta.
As per TC decision in #1007717, specifically
| 1. It is not a bug of any severity for a package with a non-native
| version number to use a native source package format.
which necessarily implies that these two concepts are separate.
---
policy/ch-controlfields.rst | 23 ++++++++++++++++++++---
policy/ch-source.rst | 25 +++++++++++--------------
2 files changed, 31 insertions(+), 17 deletions(-)
diff --git a/policy/ch-controlfields.rst b/policy/ch-controlfields.rst
index c6b4944..e0589f5 100644
--- a/policy/ch-controlfields.rst
+++ b/policy/ch-controlfields.rst
@@ -592,9 +592,26 @@ The three components here are:
``upstream_version`` and ``debian_revision``. The absence of a
``debian_revision`` is equivalent to a ``debian_revision`` of ``0``.
- Presence of the ``debian_revision`` part indicates this package is a
- non-native package (see :ref:`s-source-packages`). Absence indicates
- the package is a native package.
+.. _s-native-version:
+
+Native vs non-native version numbers
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+When the ``debian_revision`` is absent, the package's primary
+maintenance is within Debian. This is a **native version number**, or
+(informally) a "native version" or "native package".
+
+The ``debian_revision`` indicates that this package is derived by
+Debian from an upstream version which is maintained independently,
+outside Debian. Successive updates to the package within Debian,
+based on the same upstream version, have the same version number
+except for the ``debian_revision``. This is called a **non-native
+version number**, or (informally) a "native version" or "native
+package".
+
+Native version numbers and native source packages (see
+:ref:`s-source-packages`) often go together, but native source
+packages can have non-native version numbers.
.. _s-version-comparison:
diff --git a/policy/ch-source.rst b/policy/ch-source.rst
index a2aa4cc..73a7d52 100644
--- a/policy/ch-source.rst
+++ b/policy/ch-source.rst
@@ -11,28 +11,25 @@ format of source package. Binary packages are contructed from the source
package via a build process defined by ``debian/rules`` and other files in
the ``debian`` directory of the unpacked source package.
-Debian source packages are classified as *native* or *non-native*.
+Some Debian source package formats can represent, separately, the
+upstream source code, from the changes made in Debian:
-A native source package is one that does not distinguish between Debian
-packaging releases and upstream releases. A native source package contains a
-single tar file of source material, and the versioning does not have a
-Debian-specific component. Native packages are normally (but not
+A **native source package** contains a
+single tar file of source material. Native packages are normally (but not
exclusively) used for software that has no independent existence outside
-of Debian, such as software written specifically to be a Debian package.
+of Debian, such as software written specifically to be a Debian package -
+i.e., packages with native version numbers.
-A non-native source package separates the upstream release from the Debian
+A **non-native source package** separates the upstream release from the Debian
packaging and any Debian-specific changes. The source in a non-native
source package is divided into one or more upstream tar files plus a
collection of Debian-specific files. (Depending on the format of the
source package, those Debian-specific files may come in the form of
-another tar file or in the form of a compressed diff.) The version of a
-non-native package has an upstream component and a Debian component, and
-there may be multiple Debian package versions associated with a single
-upstream release version and sharing the same upstream source tar files.
+another tar file or in the form of a compressed diff.) Non-native source
+packages are only meaningful with, and can only be used with, non-native
+version numbers.
-Most source packages in Debian are non-native.
-
-.. _s-standardsversion:
+See also :ref:`s-native-version`.
Standards conformance
---------------------
--
2.47.2
>From 1cdbe35dd67bc08a75b295d6a72c9fc2830582fc Mon Sep 17 00:00:00 2001
From: Ian Jackson <ijackson@chiark.greenend.org.uk>
Date: Tue, 3 Jun 2025 14:39:28 +0100
Subject: [PATCH 3/4] Clarify paragraph about versions without hyphens
---
policy/ch-controlfields.rst | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/policy/ch-controlfields.rst b/policy/ch-controlfields.rst
index e0589f5..30aea8e 100644
--- a/policy/ch-controlfields.rst
+++ b/policy/ch-controlfields.rst
@@ -676,7 +676,9 @@ The following special version numbering conventions are used in the Debian
archive:
- The absence of ``debian_revision``, and therefore of a hyphen in the
- version number, indicates that the package is native.
+ version number, indicates that the package has no separate upstream
+ maintainers, and is simply maintained by Debian. See
+ :ref:`s-native-version`.
- The presence of ``+really`` in the ``upstream_version`` component
indicates that a newer upstream version has been rolled back to an older
--
2.47.2
>From 4f25e198195d887fd8ee33ddc29e491a79fd3daa Mon Sep 17 00:00:00 2001
From: Ian Jackson <ijackson@chiark.greenend.org.uk>
Date: Tue, 3 Jun 2025 14:39:56 +0100
Subject: [PATCH 4/4] Prefer "[non-]native versions" to "packages" where
appropriate
---
policy/ch-controlfields.rst | 18 +++++++++---------
1 file changed, 9 insertions(+), 9 deletions(-)
diff --git a/policy/ch-controlfields.rst b/policy/ch-controlfields.rst
index 30aea8e..b542951 100644
--- a/policy/ch-controlfields.rst
+++ b/policy/ch-controlfields.rst
@@ -694,28 +694,28 @@ Non-maintainer uploads:
for a upload including a source package; for uploads of only binary packages
without source changes, see the binary NMU convention below.
-- ``upstream_version`` components in native packages ending in ``+nmu``
+- ``upstream_version`` components in native versions ending in ``+nmu``
followed by a number indicate an NMU of a native package. As with the
convention for non-native packages, this is used for an upload including a
source package, not for uploads of only binary packages without source
changes.
-- ``upstream_version`` components in native packages or
- ``debian_revision`` components in non-native packages ending in ``+b``
+- ``upstream_version`` components in native version numbers or
+ ``debian_revision`` components in non-native versions ending in ``+b``
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.
Stable updates:
-- ``debian_revision`` components in non-native packages ending in ``debNuX``
+- ``debian_revision`` components in non-native versions ending in ``debNuX``
also indicate a stable update. Either ``~`` or ``+`` will be used before
this string depending on the details of the update. ``N`` is the major
version number of the Debian stable release to which the package was
uploaded, and ``X`` is a number, starting at 1, that is increased for each
stable upload of this package.
- There are three cases for non-native packages:
+ There are three cases for non-native versions:
#. For stable updates that use the same upstream version, the
``debian_revision`` component will end in ``+debNuX``. The portion
@@ -753,11 +753,11 @@ Stable updates:
update to an upstream 1.5 release, the first such stable update would
have the version ``1.5-0+deb10u1``.
-- ``upstream_version`` components in native packages ending in ``+debNuX``
+- ``upstream_version`` components in native versions ending in ``+debNuX``
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 or a later stable
- distribution. As with non-native packages, ``N`` is the major version
+ distribution. As with non-versons packages, ``N`` is the major version
number of the Debian stable release to which the package was uploaded, and
``X`` is a number, starting at 1, that is increased for each stable upload
of this package.
@@ -771,8 +771,8 @@ Stable updates:
Backports:
-- ``upstream_version`` components in native packages or
- ``debian_revision`` components in non-native packages ending in
+- ``upstream_version`` components in native versions or
+ ``debian_revision`` components in non-native versions ending in
``~bpoNuX`` indicate a backport of a version of the package to an older
stable release. The part of the version before ``~bpo`` is the version
of the package being backported, ``N`` is the major version number of
--
2.47.2
--
Ian Jackson <ijackson@chiark.greenend.org.uk> These opinions are my own.
Pronouns: they/he. If I emailed you from @fyvzl.net or @evade.org.uk,
that is a private address which bypasses my fierce spamfilter.
Reply to: