<!DOCTYPE linuxdoc PUBLIC "-//XFree86//DTD linuxdoc//EN" [
<!ENTITY % defs SYSTEM "defs.ent"> %defs;
]>


<article>

<title>XFree86 Version Numbering Schemes
<author>The XFree86 Project, Inc
<date>16 January 2002

<ident>
$XFree86: xc/programs/Xserver/hw/xfree86/doc/sgml/Versions.sgml,v 1.2 2002/01/16 20:38:45 dawes Exp $
</ident>

<abstract>

The version numbering schemes used by XFree86 have changed from time to
time.  The schemes used since version 3.3 are explained here.

</abstract>

<toc>

<sect>Releases, Development Streams and Branches
<p>

As of the release of version 4.0.2 in December 2000, XFree86 has three
release branches.  First is trunk of the CVS repository.  This is the
main development stream, where all new work and work for future releases
is done.

Second is the stable bugfix branch for the latest full release
(&relvers;).  It is created around the time of the release.  The branch
for this one is called "<tt>&relbranchtag;</tt>".  Fixes for bugs found
in the release will be added to this branch (as well as the trunk), and
updates to this release (if any) will be cut from this branch.  Similar
stable branches are present for previous full releases.

Finally there is the 3.3.x legacy branch, which is called
"<tt>xf-3_3-branch</tt>".  While this branch is not actively being
maintained, it does include some important post-3.3.6 bug fixes and
security updates.  Relevant security updates in particular are usually
back-ported to this branch.

XFree86 is planning to make full releases from the main development
stream approximately every six months, in late May and November of each
year.  The feature freezes for these releases will be 1 April and 1
October respectively.  These are target dates, not a binding commitment.
How effectively these dates can be met will depend to a large degree on
the resource available to XFree86.  Full releases consist of full source
code tarballs, plus full binary distributions for a range of supported
platforms.  Update/bugfix releases will be made on an as-required basis,
depending also on the availability of resources.  Update/bugfix releases
will not be full releases, and will consist of source code patches, plus
binary updates to be layered on top of the previous full release.

The next full release will be version &nextfullrelvers;, tentatively scheduled for late &nextfullreldate;.
There is no scheduled update release.  If there is one, the version will be
&nextupdrelvers;.

<!--
The next release on the legacy branch will be 3.3.7.  There is currently
no schedule for that release.  The 3.3.7 release is likely to be the
final release on that branch.
-->

Aside from actual releases, snapshots of the active release branches
are tagged in the CVS repository from time to time.  Each such snapshot
has an identifiable version number.

<sect>Current (new) Version Numbering Scheme
<p>

Starting with the main development branch after 4.0.2, the XFree86
versions are numbered according to the scheme outlined here.
Both the 4.0.2 stable branch and the 3.3.x legacy branch continue
to use the previous scheme, which is outlined in the sections below.

The version numbering format is <tt>M.m.P.s</tt>, where <tt>M</tt> is
the major version number, <tt>m</tt> is the minor version number,
<tt>P</tt> is the patch level, and <tt>s</tt> is the snapshot number.
Full releases have <tt>P</tt> set to zero, and it is incremented for each
subsequent bug fix release on the post-release stable branch.  The
snapshot number <tt>s</tt> is present only for between-release snapshots
of the development and stable branches.

<sect1>Development Branch
<p>

Immediately after forming a release stable branch, the patch level number
for the main development branch is bumped to 99, and the snapshot number
is reset.  The snapshot number is incremented for each tagged development
snapshot.  The CVS tag for snapshots is "<tt>xf-M_m_P_s</tt>".  When
the development branch enters feature freeze, the snapshot number may be
bumped to 900, and a stable branch may be created for the next full release.
The branch is called "<tt>xf-M_m-branch</tt>".  The snapshot number is
incremented from there until the release is finalised.  Each of these
snapshots is a "release candidate".  When the release is finalised, the
minor version is incremented, the patch level is set to zero, and the
snapshot number removed.

Here's an example which shows the version number sequence for the
development leading up to version 4.1.0:

<descrip>
  <tag><tt>4.0.99.1</tt></tag>
	The first snapshot of the pre-4.1 development branch.
  <tag><tt>4.0.99.23</tt></tag>
	The twenty-third snapshot of the pre-4.1 development branch.
  <tag><tt>4.0.99.900</tt></tag>
	The start of the 4.1 feature freeze, which marks the creation of
	the "<tt>xf-4_1-branch</tt>" branch.  That branch is the "stable"
	branch for the 4.1.x releases.
  <tag><tt>4.0.99.903</tt></tag>
	The third 4.1.0 release candidate.
  <tag><tt>4.1.0</tt></tag>
	The 4.1.0 release.
  <tag><tt>4.1.99.1</tt></tag>
	The first pre-4.2 development snapshot, which  is the first main
	branch snapshot after creating the 4.1 stable branch.
</descrip>

<sect1>Stable Branch
<p>

After a full release, the stable branch for the release will be maintained
with bug fixes and important updates until the next full release.  All
snapshots on this branch are considered "release candidates", so the
first is indicated by setting <tt>s</tt> to 901.  The snapshot number
is then incremented for each subsequent release candidate until the
update release if finalised.  The patch level value (<tt>P</tt>) is
incremented for each update release.

Here's an example which shows the version number sequence for the
4.1.x stable branch.

<descrip>
  <tag><tt>4.0.99.900</tt></tag>
	The start of the 4.1 feature freeze, which marks the creation of
	the "<tt>xf-4_1-branch</tt>" branch.  That branch is the "stable"
	branch for the 4.1.x releases.
  <tag><tt>4.0.99.903</tt></tag>
	The third 4.1.0 release candidate.
  <tag><tt>4.1.0</tt></tag>
	The 4.1.0 release.
  <tag><tt>4.1.0.901</tt></tag>
	The first pre 4.1.1 snapshot.
  <tag><tt>4.1.0.903</tt></tag>
	The third pre 4.1.1 snapshot, also known as the third 4.1.1 release
	candidate.
  <tag><tt>4.1.1</tt></tag>
	The 4.1.1 release.
  <tag><tt>4.1.1.901</tt></tag>
	The first pre 4.1.2 snapshot.
  <tag><tt>4.1.2</tt></tag>
	The 4.1.2 release.
</descrip>

<sect>Version Numbering Scheme for XFree86 4.0.x.
<p>

The version numbering format for XFree86 4.0.x releases is <tt>M.m.nx</tt>,
where <tt>M</tt> is the major version number (4), <tt>m</tt> is the
minor version number (0), <tt>n</tt> is the sub-minor version number,
and <tt>x</tt> is a letter.  Full release versions up to and including
4.0.2 were 4.0, 4.0.1, and 4.0.2.  Between-release snapshots are
indicated by including <tt>x</tt>, a lower case letter.  For example,
the first post-4.0.1 snapshot was 4.0.1a.  Release candidates have
been indicated by setting <tt>x</tt> to a one or two letter combination
with the first letter being "Z".  For example, 4.0.1Z was the first
4.0.2 release candidate.

The next 4.0.x release will be an update release, not a full release.
These update releases will be indicated by incrementing the sub-minor
version number.  So, the first post-4.0.2 update release will be 4.0.3.
Between-release snapshots will continue to be indicated with a lower
case letter, so the first pre-4.0.3 snapshot will be 4.0.2a.

The following example illustrates the release sequence from 4.0 through
to the post-4.0.2 update releases.

<descrip>
  <tag><tt>4.0</tt></tag>
	The 4.0 release.
  <tag><tt>4.0a</tt></tag>
	The first post-4.0 development snapshot.
  <tag><tt>4.0f</tt></tag>
	The sixth post-4.0 development snapshot.
  <tag><tt>4.0Z</tt></tag>
	The 4.0.1 release candidate.
  <tag><tt>4.0.1</tt></tag>
	The 4.0.1 release.
  <tag><tt>4.0.1a</tt></tag>
	The first post-4.0.1 development snapshot.
  <tag><tt>4.0.1f</tt></tag>
	The sixth post-4.0.1 development snapshot.
  <tag><tt>4.0Z</tt></tag>
	The first 4.0.2 release candidate.
  <tag><tt>4.0Zb</tt></tag>
	The third 4.0.2 release candidate.
  <tag><tt>4.0.2</tt></tag>
	The 4.0.2 release.
  <tag><tt>4.0.2a</tt></tag>
	The first pre-4.0.3 snapshot/release candidate.
  <tag><tt>4.0.2c</tt></tag>
	The third pre-4.0.3 snapshot/release candidate.
  <tag><tt>4.0.3</tt></tag>
	The 4.0.3 update release.
  <tag><tt>4.0.3a</tt></tag>
	The first pre-4.0.4 snapshot/release candidate.
  <tag><tt>4.0.4</tt></tag>
	The 4.0.4 update release.
</descrip>
  
<sect>Pre-4.0 Development Versions
<p>

This section is included mostly for historical reasons.

The development leading up to 4.0 started from version 3.2A, but much of
it happened on a separate development branch.  The "new design" work on
that development branch was first folded into the main development branch
at version 3.9N.  Up until the XFree86 CVS was made publicly available,
all versions containing one or more letters were internal development
snapshots.  The internal development snapshots continued through the
following sequence: 3.9N, 3.9Na, ..., 3.9Nz, 3.9P, 3.9Pa, ..., 3.9Py,
3.9.15, 3.9.15a, ..., 3.9.16, 3.9.16a, ..., 3.9.17, 3.9.17a, ..., 3.9.18,
3.9.18a, ..., 4.0.  The 3.9.15, 3.9.16, etc versions were public pre-4.0
beta releases.

<sect>Version Numbering Scheme for XFree86 3.3.x.
<p>

The version numbering format for XFree86 3.3.x releases is <tt>M.m.nx</tt>,
where <tt>M</tt> is the major version number (3), <tt>m</tt> is the
minor version number (3), <tt>n</tt> is the sub-minor version number,
and <tt>x</tt> is a letter.  Between-release snapshots are indicated by
including <tt>x</tt>, a lower case letter.  An exception to this scheme
was the 3.3.3.1 release, which was an update to the 3.3.3 release.

<descrip>
  <tag><tt>3.3</tt></tag>
	The 3.3 release.
  <tag><tt>3.3a</tt></tag>
	The first post-3.3 development snapshot.
  <tag><tt>3.3.1</tt></tag>
	The 3.3.1 release.
  <tag><tt>3.3.1a</tt></tag>
	The first post-3.3.1 development snapshot.
  <tag><tt>3.3.2</tt></tag>
	The 3.3.2 release.
  <tag><tt>3.3.2a</tt></tag>
	The first post-3.3.2 development snapshot.
  <tag><tt>3.3.3</tt></tag>
	The 3.3.3 release.
  <tag><tt>3.3.3a</tt></tag>
	The first post-3.3.3 development snapshot.
  <tag><tt>3.3.3.1</tt></tag>
	The 3.3.3.1 release.
  <tag><tt>3.3.3.1a</tt></tag>
	The first post-3.3.3.1 development snapshot.
  <tag><tt>3.3.4</tt></tag>
	The 3.3.4 release.
  <tag><tt>3.3.4a</tt></tag>
	The first post-3.3.4 snapshot.
  <tag><tt>3.3.5</tt></tag>
	The 3.3.5 release.
  <tag><tt>3.3.5a</tt></tag>
	The first post-3.3.5 snapshot.
  <tag><tt>3.3.6</tt></tag>
	The 3.3.6 release.
  <tag><tt>3.3.6a</tt></tag>
	The first post-3.3.6 snapshot.
</descrip>
  
<sect>Finding the XFree86 X Server Version From a Client
<p>

The XFree86 X servers report a <tt>VendorRelease</tt> value that matches
the XFree86 version number.  There have been some cases of releases where
this value wasn't set correctly.  The rules for interpreting this value
as well as the known exceptions are outlined here.

For 3.3.x versions, the <tt>VendorRelease</tt> value is <tt>Mmnp</tt>.
That is, version <tt>M.m.n.p</tt> has <tt>VendorRelease</tt> set to
<tt>M&nbsp;*&nbsp;1000&nbsp;+&nbsp;m&nbsp;*&nbsp;100&nbsp;+&nbsp;n&nbsp;*&nbsp;10&nbsp;+&nbsp;p</tt>.
Exceptions to this are:  The value wasn't incremented for the 3.3.3.1
release, and for the 3.3.4 and 3.3.5 releases the value was incorrectly
set to <tt>Mmn</tt>
(<tt>M&nbsp;*&nbsp;100&nbsp;+&nbsp;m&nbsp;*&nbsp;10&nbsp;+&nbsp;n</tt>).
This was corrected for the 3.3.6 release.

For versions 3.9.15 to 4.0.x, the <tt>VendorRelease</tt> value is
<tt>Mmnn</tt>.  That is, version <tt>M.m.n</tt> has <tt>VendorRelease</tt>
set to
<tt>M&nbsp;*&nbsp;1000&nbsp;+&nbsp;m&nbsp;*&nbsp;100&nbsp;+&nbsp;n</tt>.
There have been no exceptions to this rule.

For post-4.0.2 development and release versions using the new numbering
scheme, the <tt>VendorRelease</tt> value is <tt>MMmmPPsss</tt>.  That
is, version <tt>M.m.P.s</tt> has <tt>VendorRelease</tt> set to
<tt>M&nbsp;*&nbsp;10000000&nbsp;+&nbsp;m&nbsp;*&nbsp;100000&nbsp;+&nbsp;P&nbsp;*&nbsp;1000&nbsp;+&nbsp;s</tt>.
Note: 4.0.3 and any other 4.0.x releases will continue with the
<tt>Mmnn</tt> scheme.

The following is a code fragment taken from <tt>xdpyinfo.c</tt> that shows
how the <tt>VendorRelease</tt> information can be interpreted.

<tscreen><verb>

    if (strstr(ServerVendor(dpy), "XFree86")) {
        int vendrel = VendorRelease(dpy);

        printf("XFree86 version: ");
        if (vendrel < 336) {
            /*
             * vendrel was set incorrectly for 3.3.4 and 3.3.5, so handle
             * those cases here.
             */
            printf("%d.%d.%d", vendrel / 100,
                              (vendrel / 10) % 10,
                               vendrel       % 10);
        } else if (vendrel < 3900) {
            /* 3.3.x versions, other than the exceptions handled above */
            printf("%d.%d", vendrel / 1000,
                           (vendrel /  100) % 10);
            if (((vendrel / 10) % 10) || (vendrel % 10)) {
                printf(".%d", (vendrel / 10) % 10);
                if (vendrel % 10) {
                    printf(".%d", vendrel % 10);
                }
            }
        } else if (vendrel < 40000000) {
            /* 4.0.x versions */
            printf("%d.%d", vendrel / 1000,
                           (vendrel /   10) % 10);
            if (vendrel % 10) {
                printf(".%d", vendrel % 10);
            }
        } else {
            /* post-4.0.x */
            printf("%d.%d.%d", vendrel / 10000000,
                              (vendrel /   100000) % 100,
                              (vendrel /     1000) % 100);
            if (vendrel % 1000) {
                printf(".%d", vendrel % 1000);
            }
        }
    }
</verb></tscreen>

</article>
