apache的版本命名规则

http://apr.apache.org/versioning.html



l

PR's Version Numbering

This document covers how the APR projects are versioned. Since the APR projects are libraries, it is very important to define a stable API for users of the libraries. However, we also need to move the libraries forward, technologically. To balance these two needs, a strict policy of versioning is required, which users can rely upon to understand the limitations, restrictions, and the changes that can occur from one release of APR to the next.

The Basics

Versions are denoted using a standard triplet of integers: MAJOR.MINOR.PATCH. The basic intent is that MAJOR versions are incompatible, large-scale upgrades of the API. MINOR versions retain source and binary compatibility with older minor versions, and changes in the PATCH level are perfectly compatible, forwards and backwards.

It is important to note that a library that has not reached 1.0.0 is not subject to the guidelines described in this document. Before a 1.0 release (version 0.x.y), the API can and will be changing freely, without regard to the restrictions detailed below.

Source Compatibility

We define "source compatible" to mean that an application will continue to build without error, and that the semantics will remain unchanged.

Applications that write against a particular version will remain source-compatible against later versions, until the major number changes. However, if an application uses an API which has become available in a particular minor version, it (obviously) will no longer build or operate against previous minor versions.

Binary Compatibility

We define "binary compatible" to mean that a compiled application can be linked (possibly dynamically) against the library and continue to function properly.

Similar to source compatibility, an application that has been compiled against a particular version will continue to be linkable against later versions (unless the major number changes). It is possible that an application will not be able to successfully link against a previous minor version.

Examples

Here are some examples to demonstrate the compatibility:

Original VersionNew VersionCompatible?
2.2.32.2.4Yes
Compatibility across patch versions is guaranteed.
2.2.32.2.1Yes
Compatibility across patch versions is guaranteed.

2.2.32.3.1Yes
Compatibility with later minor versions is guaranteed.
保证向后兼容
2.2.32.1.7No
Compatibility with prior minor versions is not guaranteed.
当用旧版本覆盖新版本的时候,不保证向前兼容。
2.2.33.0.0No
Compatibility with different major versions is not guaranteed.

2.2.31.4.7No
Compatibility with different major versions is not guaranteed.
不同的主版本号之间是不能保证兼容性的。

Note: while some of the cells say "no", it is possible that the versions may be compatible, depending very precisely upon the particular APIs used by the application.

Strategy

This section details how we will build the code to meet the above requirements and guidelines.

Patch Version

To retain perfect source and binary compatibility, a patch release can only change function implementations. Changes to the API, to the signatures of public functions, or to the interpretation of function parameters is not allowed. Effectively, these releases are pure bug fix releases.

Minor Versions

Minor releases can introduce new functions, new symbolic and enumerated constants, and deprecate existing functions.

New functions 增加了新的函数或者功能

An application coded against an older minor release will still have all of its functions available with their original signatures. Once an application begins to use a new function, however, they will be unable to work against older minor versions.

It is tempting to say that introducing new functions might create incompatibility across minor releases. If an application takes advantage of an API that was introduced in version 2.3 of a library, then it is not going to work against version 2.2. However, we have stated that an any application built against version 2.2 will continue to work for all 2.x releases. Thus, an application that states "requires 2.3 or later" is perfectly acceptable -- the user or administrator simply upgrades the installed library to 2.3. This is a safe operation and will not break any other application that was using the 2.2 library.

In other words, yes an incompatibility arises by mandating that a specific version needs to be installed. But in practice, this will not be a problem since upgrading to newer versions is always safe.

New constants 增加了新的常量
Similar to functions, all of the original (old) constants will be available to an application. An application can then choose to use new constants to pick up new semantics and features.
Replacing functions             (替换函数?,什么意思,请大神给解答一下)
This gets a bit trickier. The original function  must remain available at the link-level so that an application compiled against a minor version will continue to work with later minor versions. Further, if an application is designed to work with an earlier minor version, then we don't want to suddenly change the requirements for that application. This means that the headers cannot silently map an old function into a newer function, as that would turn an application, say, based on 1.2 into an application requiring the 1.4 or later release.

This means that functions cannot truly be replaced. The new, alternate function can be made available in the header and applications can choose to use it (and become dependent upon the minor release where the function appears).

It is possible to design a set of headers where a macro will always refer to the "latest" function available. Of course, if an application chooses to use this macro, then the resulting compiled-binary will be dependent upon whatever version it was compiled against. This strategy adds the new functionality for applications, yet retains the necessary source and binary compatibility for applications designed or built against previous minor releases.

Constants (enumerated values and preprocessor macros) are not allowed to change since an older application will still be using them. Similarly, function signatures at the link-level may not change, so that support for older, compiled applications is maintained.

Deprecating functions (准备取消对某些函数的支持,担不是撒谎函数,需要注意取消和删除的区别)
Since a function must remain available for applications coded against a previous minor release, it is only possible to "deprecate" a function. It cannot be removed from the headers (so that source compatibility is retained) and it cannot be removed from the library (so that binary compatibility is retained).
仅仅允许的是取消的意向,而为了保持向后兼容性,不能从头文件中删除,也不能从library中删除掉。

If you deprecate a function in APR, please mark it as such in the function documentation, using the doxygen "\deprecated" tag. Deprecated functions can only be removed in major releases.

取消掉(无用的函数)只允许在主版本变更的时候才能进行删除。

A deprecated function should remain available through the original header. The function prototype should remain in the same header, or if moved to a "deprecated functions" header, then the alternate header should be included by the original header. This requirement is to ensure that source compatibility is retained.

Finally, if you are deprecating a function so that you can change the name of the function, please use the method described above under "Replacing functions", so that projects which use APR can retain binary compatibility.

Note that all deprecated functions will be removed at the next major version bump.

Major Versions

Any kind of change can be made during a major version release. Particular types of changes that might occur:

  • remove or change constants
  • remove (deprecated) functions
  • fold together macro-ized function replacements
Version Checking

In many cases, the user of a library will need to check the version that they are compiling against, or that is being used at runtime. Because of the strict rules of source and binary compatibility, these checks can be simpler and more complicated depending on what is needed.

Compile-time Checks

Libraries should make their version number available as compile-time constants. For example:

#define FOO_MAJOR_VERSION 1 
#define FOO_MINOR_VERSION 4 
#define FOO_PATCH_VERSION 0

The above symbols are the minimum required for this specification.

An application that desires, at compile-time, to decide on whether and how to use a particular library feature needs to only check two values: the major and the minor version. Since, by definition, there are no API changes across patch versions, that symbol can be safely ignored. Note that any kind of a check for a minimum version will then pin that application to at least that version. The application's installation mechanism should then ensure that that minimal version has been installed (for example, using RPM dependency checks).

If the feature changes across minor versions are source compatible, but are (say) simply different choices of values to pass into the library, then an application can support a wider variety of installed libraries if it avoids compile-time checks.

Run-time Checks

A library meeting this specification should support a way for an application to determine the library's version at run-time. This will usually be emboded as a simple function which returns the MAJORMINOR, and PATCH triplet in some form.

Run-time checks are preferable in all cases. This type of check enables an application to run against a wider variety of minor releases of a library (the application is "less coupled" to a particular library release). Of course, if an application requires a function that was introduced in a later, minor release, then the application will require that, at least, that release is installed on the target system.

Run-time checks are particurly important if the application is trying to determine if the library has a particular bug that may need to be worked around, but has been fixed in a later release. If the bug is fixed in a patch release, then the only avenue for an application is to perform a runtime check. This is because an application cannot require a specific patch level of the library to be installed -- those libraries are perfectly forward and backwards compatible, and the administrator is free to choose any patch release, knowing that all applications will continue to function properly. If the bug was fixed in a minor release, then it is possible to use a compile-time check, but that would create a tighter coupling to the library.

Parallel Installation

Parallel installation refers to the ability to install multiple versions of a library simultaneously -- they exist in parallel. This document will not discuss the full rationale for why this is important, but will instead detail how this versioning specification maps onto those concepts. Please refer to Havoc Pennington's document for futher details and the rationale behind this form of parallel installation.

Library Naming

On Unix-ish platforms, the library name should include the MAJOR version number:

libFOO-MAJOR.so

This strategy allows an application to explicitly state which version of the library that it wants to link against. If the application was built for version 2 of the API, then it can link against libFOO-2.so. If another application was built against version 3 of the API, then it links against libFOO-3.so. Since both libraries can reside on the system at the same time, both applications' needs can be satisfied.

Typically, shared libraries on Unix-ish platforms will set up symlinks from the .so library to specific versions of that library. For example:

libFOO-MAJOR.so -> libFOO-MAJOR.so.0
libFOO-MAJOR.so.0 -> libFOO-MAJOR.so.0.MINOR.PATCH

In this configuration, applications will be bound to the .so.0 library. The minor version does not come into play here because we want applications to dynamically load and link to the new library when a new minor version is installed. Thus, the MINOR and the PATCH values are relegated to the library name after the .so.0 portion.

The implication here is that build systems for libraries should arrange to generate .so libraries matching the above pattern.

Include Directories

The default installation directory for a library's include files should specify the MAJOR version number, and should normally be installed as a subdirectory in some standard location. For example:

/usr/include/FOO-MAJOR/

An application can place the FOO-MAJOR directory on its include path and include the files normally:

#include <FOO-stuff.h>
#include <FOO-more.h>

Depending upon the API that the application is designed to work against, it can simply include different versions of the include directory.

Other Files

NOTE: There is no recommendation at this time for the best and proper handling of, say, FOO-config types of files. Or non-code types of files (e.g. things that typically get installed into areas like /usr/shared).

Further thought and exploration is needed here.

Other Notes

It is expected that other libraries, besides those in the APR project, will want to use the above definitions of versioning. This is quite fine, and those libraries can simply reference this document. Its canonical location is:

http://apr.apache.org/versioning.html

http://www.cnblogs.com/sdjxcolin/archive/2007/07/02/803376.html

版本控制比较普遍的 3 种命名格式 :

一、GNU 风格的版本号命名格式 :
主版本号 . 子版本号 [. 修正版本号 [. 编译版本号 ]]
Major_Version_Number.Minor_Version_Number[.Revision_Number[.Build_Number]]
示例 : 1.2.1, 2.0, 5.0.0 build-13124

二、Windows 风格的版本号命名格式 :
主版本号 . 子版本号 [ 修正版本号 [. 编译版本号 ]]
Major_Version_Number.Minor_Version_Number[Revision_Number[.Build_Number]]
示例: 1.21, 2.0

三、.Net Framework 风格的版本号命名格式:
主版本号.子版本号[.编译版本号[.修正版本号]]
Major_Version_Number.Minor_Version_Number[.Build_Number[.Revision_Number]]
版本号由二至四个部分组成:主版本号、次版本号、内部版本号和修订号。主版本号和次版本号是必选的;内部版本号和修订号是可选的,但是如果定义了修订号部分,则内部版本号就是必选的。所有定义的部分都必须是大于或等于 0 的整数。

应根据下面的约定使用这些部分:

Major :具有相同名称但不同主版本号的程序集不可互换。例如,这适用于对产品的大量重写,这些重写使得无法实现向后兼容性。

Minor :如果两个程序集的名称和主版本号相同,而次版本号不同,这指示显著增强,但照顾到了向后兼容性。例如,这适用于产品的修正版或完全向后兼容的新版本。

Build :内部版本号的不同表示对相同源所作的重新编译。这适合于更改处理器、平台或编译器的情况。

Revision :名称、主版本号和次版本号都相同但修订号不同的程序集应是完全可互换的。这适用于修复以前发布的程序集中的安全漏洞。

程序集的只有内部版本号或修订号不同的后续版本被认为是先前版本的修补程序 (Hotfix) 更新。

版本号管理策略

一、GNU 风格的版本号管理策略:

1.项目初版本时,版本号可以为 0.1 或 0.1.0, 也可以为 1.0 或 1.0.0,如果你为人很低调,我想你会选择那个主版本号为 0 的方式;
2.当项目在进行了局部修改或 bug 修正时,主版本号和子版本号都不变,修正版本号加 1;
3. 当项目在原有的基础上增加了部分功能时,主版本号不变,子版本号加 1,修正版本号复位为 0,因而可以被忽略掉;
4.当项目在进行了重大修改或局部修正累积较多,而导致项目整体发生全局变化时,主版本号加 1;
5.另外,编译版本号一般是编译器在编译过程中自动生成的,我们只定义其格式,并不进行人为控制。

二、Window 下的版本号管理策略:
1.项目初版时,版本号为 1.0 或 1.00;
2. 当项目在进行了局部修改或 bug 修正时,主版本号和子版本号都不变,修正版本号加 1;
3. 当项目在原有的基础上增加了部分功能时,主版本号不变,子版本号加 1,修正版本号复位为 0,因而可以被忽略掉;
4. 当项目在进行了重大修改或局部修正累积较多,而导致项目整体发生全局变化时,主版本号加 1;
5. 另外 , 编译版本号一般是编译器在编译过程中自动生成的,我们只定义其格式,并不进行人为控制。

另外,还可以在版本号后面加入 Alpha、Beta、Gamma、Current、RC (Release Candidate)、Release、Stable 等后缀,在这些后缀后面还可以加入 1 位数字的版本号。

对于用户来说,如果某个软件的主版本号进行了升级,用户还想继续那个软件,则发行软件的公司一般要对用户收取升级费用;而如果子版本号或修正版本号发生了升级,一般来说是免费的。

=====附录软件版本名称=====

α(alphal) 内部测试版
α版,此版本表示该软件仅仅是一个初步完成品,通常只在软件开发者内部交流,也有很少一部分发布给专业测试人员。一般而言,该版本软件的 bug 较多,普通用户最好不要安装。

β(beta)外部测试版
该版本相对于α版已有了很大的改进,消除了严重的错误,但还是存在着一些缺陷,需要经过大规模的发布测试来进一步消除。这一版本通常由软件公司免费发布,用户可从相关的站点下载。通过一些专业爱好者的测试,将结果反馈给开发者,开发者们再进行有针对性的修改。该版本也不适合一般用户安装。

γ(gamma)版
该版本已经相当成熟了,与即将发行的正式版相差无几,如果用户实在等不及了,尽可以装上一试。

trial(试用版)
试用版软件在最近的几年里颇为流行,主要是得益于互联网的迅速发展。该版本软件通常都有时间限制,过期之后用户如果希望继续使用,一般得交纳一定的费用进行注册或购买。有些试用版软件还在功能上做了一定的限制。

unregistered(未注册版)
未注册版与试用版极其类似,只是未注册版通常没有时间限制,在功能上相对于正式版做了一定的限制,例如绝大多数网络电话软件的注册版和未注册版,两者之间在通话质量上有很大差距。还有些虽然在使用上与正式版毫无二致,但是动不动就会弹出一个恼人的消息框来提醒你注册,如看图软件acdsee、智能陈桥汉字输入软件等。

demo 演示版
在非正式版软件中,该版本的知名度最大。demo版仅仅集成了正式版中的几个功能,颇有点像 unregistered。不同的是,demo版一般不能通过升级或注册的方法变为正式版。

以上是软件正式版本推出之前的几个版本,α、β、γ可以称为测试版,大凡成熟软件总会有多个测试版,如 windows 98 的β版,前前后后将近有10个。这么多的测试版一方面为了最终产品尽可能地满足用户的需要,另一方面也尽量减少了软件中的bug 。而 trial 、unregistered 、demo有时统称为演示版,这一类版本的广告色彩较浓,颇有点先尝后买的味道,对于普通用户而言自然是可以免费尝鲜了。

正式版,不同类型的软件的正式版本通常也有区别。

release 最终释放版
该版本意味“最终释放版”,在出了一系列的测试版之后,终归会有一个正式版本,对于用户而言,购买该版本的软件绝对不会错。该版本有时也称为标准版。一般情况下,release不会以单词形式出现在软件封面上,取而代之的是符号 (r) ,如 windows nt(r) 4.0、ms-dos(r) 6.22 等。

registered 注册版
很显然,该版本是与 unregistered 相对的注册版。注册版、release和下面所讲的standard版一样,都是软件的正式版本,只是注册版软件的前身有很大一部分是从网上下载的。

standard 标准版
这是最常见的标准版,不论是什么软件,标准版一定存在。标准版中包含了该软件的基本组件及一些常用功能,可以满足一般用户的需求。其价格相对高一级版本而言还是“平易近人”的。

deluxe 豪华版
顾名思义即为“豪华版”。豪华版通常是相对于标准版而言的,主要区别是多了几项功能,价格当然会高出一大块,不推荐一般用户购买。此版本通常是为那些追求“完美”的专业用户所准备的。

reference
该版本型号常见于百科全书中,比较有名的是微软的encarta系列。 reference是最高级别,其包含的主题、图像、影片剪辑等相对于standard和deluxe版均有大幅增加,容量由一张光盘猛增至三张光盘,并且加入了很强的交互功能,当然价格也不菲。可以这么说,这一版本的百科全书才能算是真正的百科全书,也是发烧友们收藏的首选。

professional(专业版)
专业版是针对某些特定的开发工具软件而言的。专业版中有许多内容是标准版中所没有的,这些内容对于一个专业的软件开发人员来说是极为重要的。如微软的visual foxpro标准版并不具备编译成可执行文件的功能,这对于一个完整的开发项目而言显然是无法忍受的,若客户机上没有foxpro将不能使用。如果用专业版就没有这个问题了。

enterprise(企业版)
企业版是开发类软件中的极品(相当于百科全书中的reference版)。拥有一套这种版本的软件可以毫无障碍地开发任何级别的应用软件。如著名的visual c++的企业版相对于专业版来说增加了几个附加的特性,如sql调试、扩展的存储过程向导、支持as/400对ole db的访问等。而这一版本的价格也是普通用户无法接受的。如微软的visual studios 6.0 enterprise 中文版的价格为 23000 元。

其他版本,除了以上介绍的一些版本外,还有一些专有版本名称。

update(升级版)
升级版的软件是不能独立使用的,该版本的软件在安装过程中会搜索原有的正式版,如果不存在,则拒绝执行下一步。如microsoft office 2000升级版、windows 9x升级版等等。

oem版
oem 版通常是捆绑在硬件中而不单独销售的版本。将自己的产品交给别的公司去卖,保留自己的著作权,双方互惠互利,一举两得。

单机(网络)版
网络版在功能、结构上远比单机版复杂,如果留心一下软件的报价,你就会发现某些软件单机版和网络版的价格相差非常大,有些网络版甚至多一个客户端口就要加不少钱。

普及版
该版本有时也会被称为共享版,其特点是价格便宜(有些甚至完全免费)、功能单一、针对性强(当然也有占领市场、打击盗版等因素)。与试用版不同的是,该版本的软件一般不会有时间上的限制。当然,如果用户想升级,最好还是去购买正式版。

Enhance 增强版或者加强版 属于正式版
Free 自由版
Full version 完全版 属于正式版
shareware 共享版
Release 发行版 有时间限制
Upgrade 升级版
Retail 零售版
Cardware 属共享软件的一种,只要给作者回复一封电邮或明信片即可。(有的作者并由此提供注册码等),目前这种形式已不多见。
Plus 属增强版,不过这种大部分是在程序界面及多媒体功能上增强。
Preview 预览版
Corporation & Enterprise 企业版
Standard 标准版
Mini 迷你版也叫精简版只有最基本的功能
Premium -- 贵价版
Professional -- 专业版
Express -- 特别版
Deluxe -- 豪华版
Regged -- 已注册版
CN -- 简体中文版
CHT -- 繁体中文版
EN -- 英文版
Multilanguage -- 多语言版


  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 1
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值