|
Packit |
1470ea |
|
|
Packit |
1470ea |
<page xmlns="http://projectmallard.org/1.0/" xmlns:its="http://www.w3.org/2005/11/its" type="topic" id="versioning" xml:lang="de">
|
|
Packit |
1470ea |
|
|
Packit |
1470ea |
<info>
|
|
Packit |
1470ea |
<link type="guide" xref="index#maintainer-guidelines"/>
|
|
Packit |
1470ea |
|
|
Packit |
1470ea |
<credit type="author copyright">
|
|
Packit |
1470ea |
<name>Philip Withnall</name>
|
|
Packit |
1470ea |
<email its:translate="no">philip.withnall@collabora.co.uk</email>
|
|
Packit |
1470ea |
<years>2015</years>
|
|
Packit |
1470ea |
</credit>
|
|
Packit |
1470ea |
|
|
Packit |
1470ea |
<include xmlns="http://www.w3.org/2001/XInclude" href="cc-by-sa-3-0.xml"/>
|
|
Packit |
1470ea |
|
|
Packit |
1470ea |
<desc>Versioning and releasing libraries and applications</desc>
|
|
Packit |
1470ea |
|
|
Packit |
1470ea |
<mal:credit xmlns:mal="http://projectmallard.org/1.0/" type="translator copyright">
|
|
Packit |
1470ea |
<mal:name>Mario Blättermann</mal:name>
|
|
Packit |
1470ea |
<mal:email>mario.blaettermann@gmail.com</mal:email>
|
|
Packit |
1470ea |
<mal:years>2016</mal:years>
|
|
Packit |
1470ea |
</mal:credit>
|
|
Packit |
1470ea |
|
|
Packit |
1470ea |
<mal:credit xmlns:mal="http://projectmallard.org/1.0/" type="translator copyright">
|
|
Packit |
1470ea |
<mal:name>Christian Kirbach</mal:name>
|
|
Packit |
1470ea |
<mal:email>christian.kirbach@gmail.com</mal:email>
|
|
Packit |
1470ea |
<mal:years>2016</mal:years>
|
|
Packit |
1470ea |
</mal:credit>
|
|
Packit |
1470ea |
</info>
|
|
Packit |
1470ea |
|
|
Packit |
1470ea |
<title>Versionierung</title>
|
|
Packit |
1470ea |
|
|
Packit |
1470ea |
<synopsis>
|
|
Packit |
1470ea |
<title>Zusammenfassung</title>
|
|
Packit |
1470ea |
|
|
Packit |
1470ea |
|
|
Packit |
1470ea |
Module versioning differs for libraries and applications: libraries need a
|
|
Packit |
1470ea |
libtool version specified in addition to their package version.
|
|
Packit |
1470ea |
Applications just have a package version.
|
|
Packit |
1470ea |
|
|
Packit |
1470ea |
|
|
Packit |
1470ea |
<list>
|
|
Packit |
1470ea |
<item>
|
|
Packit |
1470ea |
Libraries and applications have a package version of the form
|
|
Packit |
1470ea |
major.minor.micro. (<link xref="#package-versioning"/>)
|
|
Packit |
1470ea |
</item>
|
|
Packit |
1470ea |
<item>
|
|
Packit |
1470ea |
Libraries additionally have a libtool version of the form
|
|
Packit |
1470ea |
current:revision:age. (<link xref="#libtool-versioning"/>)
|
|
Packit |
1470ea |
</item>
|
|
Packit |
1470ea |
<item>
|
|
Packit |
1470ea |
Version numbers should be updated for each release (using release and
|
|
Packit |
1470ea |
post-release increments). (<link xref="#release-process"/>)
|
|
Packit |
1470ea |
</item>
|
|
Packit |
1470ea |
<item>
|
|
Packit |
1470ea |
Package versions should be incremented for feature changes or additions.
|
|
Packit |
1470ea |
(<link xref="#package-versioning"/>)
|
|
Packit |
1470ea |
</item>
|
|
Packit |
1470ea |
<item>
|
|
Packit |
1470ea |
Libtool versions should be updated for API changes or additions.
|
|
Packit |
1470ea |
(<link xref="#libtool-versioning"/>)
|
|
Packit |
1470ea |
</item>
|
|
Packit |
1470ea |
<item>
|
|
Packit |
1470ea |
Even/odd minor package versions can be used respectively for
|
|
Packit |
1470ea |
stable/unstable releases. (<link xref="#stable-unstable-versions"/>)
|
|
Packit |
1470ea |
</item>
|
|
Packit |
1470ea |
</list>
|
|
Packit |
1470ea |
</synopsis>
|
|
Packit |
1470ea |
|
|
Packit |
1470ea |
<section id="package-versioning">
|
|
Packit |
1470ea |
<title>Paket-Versionierung</title>
|
|
Packit |
1470ea |
|
|
Packit |
1470ea |
Sowohl Bibliotheken als auch Anwendungen haben eine Paketversion der Form major.minor.micro.
|
|
Packit |
1470ea |
|
|
Packit |
1470ea |
|
|
Packit |
1470ea |
The package version number is that passed to
|
|
Packit |
1470ea |
AC_INIT() , and the one which is typically known as the
|
|
Packit |
1470ea |
project’s version number. For example, the Debian package for a library
|
|
Packit |
1470ea |
will use the library’s package version (though may also include the major
|
|
Packit |
1470ea |
version number in the package name to allow for
|
|
Packit |
1470ea |
<link xref="parallel-installability">parallel installability</link>).
|
|
Packit |
1470ea |
Package versions are updated by the following rules:
|
|
Packit |
1470ea |
|
|
Packit |
1470ea |
<steps>
|
|
Packit |
1470ea |
<item>
|
|
Packit |
1470ea |
If breaking <link xref="api-stability">API compatibility</link> in a
|
|
Packit |
1470ea |
library, or making a large change to an application which affects
|
|
Packit |
1470ea |
everything (such as a UI redesign), increment major and set minor and
|
|
Packit |
1470ea |
micro to 0.
|
|
Packit |
1470ea |
</item>
|
|
Packit |
1470ea |
<item>
|
|
Packit |
1470ea |
Otherwise, if changing or adding a feature, or adding any API,
|
|
Packit |
1470ea |
increment minor and set micro to 0.
|
|
Packit |
1470ea |
</item>
|
|
Packit |
1470ea |
<item>
|
|
Packit |
1470ea |
Otherwise (if making a release containing only bug fixes and
|
|
Packit |
1470ea |
translation updates), increment micro.
|
|
Packit |
1470ea |
</item>
|
|
Packit |
1470ea |
</steps>
|
|
Packit |
1470ea |
|
|
Packit |
1470ea |
Beachten Sie, dass die Minor-Versionsnummer aktualisiert werden sollte, sobald eine API hinzugefügt wird.
|
|
Packit |
1470ea |
</section>
|
|
Packit |
1470ea |
|
|
Packit |
1470ea |
<section id="libtool-versioning">
|
|
Packit |
1470ea |
<title>Libtool-Versionierung</title>
|
|
Packit |
1470ea |
|
|
Packit |
1470ea |
|
|
Packit |
1470ea |
Libraries have two version numbers: a libtool version which tracks ABI
|
|
Packit |
1470ea |
backwards compatibility (see <link xref="api-stability"/>), and a package
|
|
Packit |
1470ea |
version which tracks feature
|
|
Packit |
1470ea |
changes. These are normally incremented in synchronization, but should be
|
|
Packit |
1470ea |
kept separate because ABI backwards compatibility is not necessarily
|
|
Packit |
1470ea |
related to feature changes or bug fixes. Furthermore, the two version
|
|
Packit |
1470ea |
numbers have different semantics, and cannot be automatically generated
|
|
Packit |
1470ea |
from each other.
|
|
Packit |
1470ea |
|
|
Packit |
1470ea |
|
|
Packit |
1470ea |
|
|
Packit |
1470ea |
A good overview of libtool versioning, and the differences from package
|
|
Packit |
1470ea |
versioning, is given in the
|
|
Packit |
1470ea |
<link href="https://autotools.io/libtool/version.html">Autotools
|
|
Packit |
1470ea |
Mythbuster</link>; another is in the
|
|
Packit |
1470ea |
<link href="http://www.gnu.org/s/libtool/manual/html_node/Updating-version-info.html">libtool
|
|
Packit |
1470ea |
manual</link>.
|
|
Packit |
1470ea |
|
|
Packit |
1470ea |
|
|
Packit |
1470ea |
|
|
Packit |
1470ea |
To update the libtool version, follow the algorithm given in the comments
|
|
Packit |
1470ea |
below. This is a typical <file>configure.ac</file> snippet for setting up
|
|
Packit |
1470ea |
libtool versioning:
|
|
Packit |
1470ea |
|
|
Packit |
1470ea |
|
|
Packit |
1470ea |
|
|
Packit |
1470ea |
# Before making a release, the LT_VERSION string should be modified. The
|
|
Packit |
1470ea |
# string is of the form c:r:a. Follow these instructions sequentially:
|
|
Packit |
1470ea |
# 1. If the library source code has changed at all since the last update, then
|
|
Packit |
1470ea |
# increment revision (‘c:r:a’ becomes ‘c:r+1:a’).
|
|
Packit |
1470ea |
# 2. If any interfaces have been added, removed, or changed since the last
|
|
Packit |
1470ea |
# update, increment current, and set revision to 0.
|
|
Packit |
1470ea |
# 3. If any interfaces have been added since the last public release, then
|
|
Packit |
1470ea |
# increment age.
|
|
Packit |
1470ea |
# 4. If any interfaces have been removed or changed since the last public
|
|
Packit |
1470ea |
# release, then set age to 0.
|
|
Packit |
1470ea |
AC_SUBST([LT_VERSION],[0:0:0])
|
|
Packit |
1470ea |
|
|
Packit |
1470ea |
Der folgende Code kann in <file>Makefile.am</file> verwendet werden, um die Versionsnummer an libtool zu übergeben:
|
|
Packit |
1470ea |
my_library_la_LDFLAGS = -version-info $(LT_VERSION)
|
|
Packit |
1470ea |
</section>
|
|
Packit |
1470ea |
|
|
Packit |
1470ea |
<section id="stable-unstable-versions">
|
|
Packit |
1470ea |
<title>Stabile und instabile Paketversionen</title>
|
|
Packit |
1470ea |
|
|
Packit |
1470ea |
|
|
Packit |
1470ea |
Most GNOME modules follow a convention for stable and unstable releases.
|
|
Packit |
1470ea |
The minor version is even for stable releases and is odd for unstable
|
|
Packit |
1470ea |
releases. For example, the 3.20.* versions are stable, but the 3.19.*
|
|
Packit |
1470ea |
versions are unstable. The 3.19.* versions can be seen as alpha and beta
|
|
Packit |
1470ea |
releases of the 3.20 version.
|
|
Packit |
1470ea |
|
|
Packit |
1470ea |
|
|
Packit |
1470ea |
|
|
Packit |
1470ea |
A new micro stable version (e.g. 3.20.0 → 3.20.1) doesn’t add
|
|
Packit |
1470ea |
new features, only translation updates and bug fixes. On the other hand,
|
|
Packit |
1470ea |
unstable micro releases (e.g. 3.19.1 → 3.19.2) can add API, or
|
|
Packit |
1470ea |
change or remove API which was added in a previous micro release in that
|
|
Packit |
1470ea |
minor series.
|
|
Packit |
1470ea |
|
|
Packit |
1470ea |
|
|
Packit |
1470ea |
Die libtool-Version sollte nur die stabile Paketversionen aktualisiert werden.
|
|
Packit |
1470ea |
</section>
|
|
Packit |
1470ea |
|
|
Packit |
1470ea |
<section id="release-process">
|
|
Packit |
1470ea |
<title>Veröffentlichungsprozess</title>
|
|
Packit |
1470ea |
|
|
Packit |
1470ea |
|
|
Packit |
1470ea |
The standard process for making a release of a module increments the
|
|
Packit |
1470ea |
libtool version (if the module is a library) at the time of release, then
|
|
Packit |
1470ea |
increments the package version number immediately afterwards (this is
|
|
Packit |
1470ea |
called a post-release increment).
|
|
Packit |
1470ea |
|
|
Packit |
1470ea |
|
|
Packit |
1470ea |
|
|
Packit |
1470ea |
Updating the libtool versions at the time of release means that they are
|
|
Packit |
1470ea |
only incremented once for all ABI changes in a release. The use of
|
|
Packit |
1470ea |
post-release increment for package versions means the package version
|
|
Packit |
1470ea |
number is not outdated (still equal to the previous release) during
|
|
Packit |
1470ea |
the development cycle.
|
|
Packit |
1470ea |
|
|
Packit |
1470ea |
|
|
Packit |
1470ea |
Der Release-Prozess (basierend auf dem <link href="https://wiki.gnome.org/MaintainersCorner/Releasing">GNOME Release-Prozess</link>):
|
|
Packit |
1470ea |
<steps>
|
|
Packit |
1470ea |
<item>Stellen Sie sicher, dass der Code aktuell ist: <cmd>git pull</cmd> </item>
|
|
Packit |
1470ea |
|
|
Packit |
1470ea |
<item>Stellen Sie sicher, dass es keine lokalen Änderungen gibt: <cmd>git status</cmd> </item>
|
|
Packit |
1470ea |
<item>Falls es sich um ein Release einer stabilen Paketversion handelt, erhöhen Sie die libtool-Versionsnummer in <file>configure.ac</file> (falls vorhanden) </item>
|
|
Packit |
1470ea |
<item>Fügen Sie einen Eintrag zur <file>NEWS</file>-Datei hinzu </item>
|
|
Packit |
1470ea |
<item>
|
|
Packit |
1470ea |
|
|
Packit |
1470ea |
Run
|
|
Packit |
1470ea |
<cmd>./autogen.sh && make && make install && make distcheck</cmd>
|
|
Packit |
1470ea |
and ensure it succeeds
|
|
Packit |
1470ea |
|
|
Packit |
1470ea |
<list>
|
|
Packit |
1470ea |
<item>
|
|
Packit |
1470ea |
Fix any issues which come up, commit those changes, and restart at
|
|
Packit |
1470ea |
step 3
|
|
Packit |
1470ea |
</item>
|
|
Packit |
1470ea |
</list>
|
|
Packit |
1470ea |
</item>
|
|
Packit |
1470ea |
<item>
|
|
Packit |
1470ea |
If <cmd>make distcheck</cmd> finishes with “[archive] is ready for
|
|
Packit |
1470ea |
distribution”, run <cmd>git commit -a -m "Release version x.y.z"</cmd>
|
|
Packit |
1470ea |
(where ‘x.y.z’ is the package version number)
|
|
Packit |
1470ea |
</item>
|
|
Packit |
1470ea |
<item>
|
|
Packit |
1470ea |
Führen Sie <cmd>git push</cmd> aus
|
|
Packit |
1470ea |
<list>
|
|
Packit |
1470ea |
<item>
|
|
Packit |
1470ea |
If that fails due to other commits having been pushed in the
|
|
Packit |
1470ea |
meantime, run <cmd>git pull</cmd> to merge your commit on the
|
|
Packit |
1470ea |
branch followed by a second <cmd>git push</cmd>. This is an
|
|
Packit |
1470ea |
exception to the GNOME guideline to have a linear Git history
|
|
Packit |
1470ea |
(<link xref="version-control#use-of-git"/>). If you prefer to have
|
|
Packit |
1470ea |
a linear history, you need to restart at step 1.
|
|
Packit |
1470ea |
</item>
|
|
Packit |
1470ea |
</list>
|
|
Packit |
1470ea |
</item>
|
|
Packit |
1470ea |
<item>
|
|
Packit |
1470ea |
Tag the release: <cmd>git tag -s x.y.z</cmd> (where ‘x.y.z’ is the
|
|
Packit |
1470ea |
package version number)
|
|
Packit |
1470ea |
</item>
|
|
Packit |
1470ea |
<item>
|
|
Packit |
1470ea |
Run <cmd>git push origin x.y.z</cmd> (where ‘x.y.z’ is the package
|
|
Packit |
1470ea |
version number)
|
|
Packit |
1470ea |
</item>
|
|
Packit |
1470ea |
</steps>
|
|
Packit |
1470ea |
|
|
Packit |
1470ea |
|
|
Packit |
1470ea |
The release is now complete, and the post-release version increment can be
|
|
Packit |
1470ea |
done:
|
|
Packit |
1470ea |
|
|
Packit |
1470ea |
<steps>
|
|
Packit |
1470ea |
<item>Erhöhen Sie die Paketversionsnummer in <file>configure.ac</file> </item>
|
|
Packit |
1470ea |
<item>Führen Sie <cmd>git commit -a -m "Post-release version increment"</cmd> aus </item>
|
|
Packit |
1470ea |
<item>Führen Sie <cmd>git push</cmd> aus </item>
|
|
Packit |
1470ea |
</steps>
|
|
Packit |
1470ea |
|
|
Packit |
1470ea |
Das von <cmd>make distcheck</cmd> erzeugte Paketarchiv kann nun zu download.gnome.org hochgeladen oder auf andere Weise verteilt werden.
|
|
Packit |
1470ea |
</section>
|
|
Packit |
1470ea |
</page>
|