1.6. 发布周期

Debian 计划的每个程序同时有 6 个不同版本,实验、不稳定、测试、稳定、旧稳定、与 极旧稳定。每个版本都有自己的发展流程。为了了解起见,先看看程序的发展过程,由最初的包装至纳入 Debian 的稳定版。

术语 发布

「release」一词,在 Debian 项目中,系指发行版的特定发行版本 (如:「unstable release」代表的是「尚未稳定的版本」)。这个词语也用于代表软件新版本 (stable 稳定版) 的初次公开发表。

1.6.1. 实验状态

首先看看 实验 发行的特例:对应于还在发展中软件的 Debian 软件包,不必已做完,其名称已说明一切。还没有全部通过此阶段;部分开发者加入软件包为了得到有经验 (或勇敢) 用户的回馈。

否则,此发行版通常会将重大修改纳入基础软件软件包中,因为一旦集成进 Unstable 不稳定版中的软件有重大臭虫,可能导致后果不堪设想。因此,它是完全隔绝且独立的发行版,其软件软件包绝不会移入其他版本中 (除非有情况需要维护者或 ftp 管理者直接、快速干预)。它也不能自我纳入:仅既有软件软件包的部分子集具有 Experimental 实验版,通常不包括基础系统。此发行版因此会与其他能自我纳入的发行版一同搭配使用,例如 Ustable 版。

1.6.2. 不稳定状态

Let us turn back to the case of a typical package. The maintainer creates an initial package, which they compile for the Unstable version and place on the ftp-master.debian.org server. This first event involves inspection and validation from the ftpmasters. The software is then available in the Unstable distribution, which is the “cutting edge” distribution chosen by users who are more concerned with having up-to-date packages than worried about serious bugs. They discover the program and then test it.

碰到错误后,向软件包维护者报告。维护者会定期准备修正版,然后再上传至服务器。

Every newly updated package is updated on all Debian mirrors around the world within six hours. The users then test the corrections and search for other problems resulting from the modifications. Several updates may then occur rapidly. During these times, autobuilder robots come into action. Most frequently, the maintainer has only one traditional PC and has compiled their package on the amd64 (or i386) architecture (or they opted for a source-only upload, thus without any precompiled package); the autobuilders take over and automatically compile versions for all the other architectures. Some compilations may fail; the maintainer will then receive a bug report indicating the problem, which is then to be corrected in the next versions. When the bug is discovered by a specialist for the architecture in question, the bug report may come with a patch ready to use.

由自动创建者编译的软件包

图 1.2. 由自动创建者编译的软件包

快速查看 buildd,Debian 软件包再编译者

buildd是 “build daemon” 的缩写,意思是魔鬼创建器。在指定的架构自动编译Debian软件包的程序(尽量避免跨平台)。

因此,arm64 机器专门为 arm64 架构创建二进制文件。buildd 程序从 Debian 开发者的原始软件包里持续产生 arm64 架构的二进制软件包。

Debian所有的电脑都能使用此自动创建器。扩大而言,buildd 一词常用于这些机器,仅供此目的使用。

1.6.3. 迁移至测试

稍后,软件包略为成熟后;编译全部的架构,不再发生新的修订。才能成为测试版的候选 — 基于某些标准供不稳定软件包使用。根据以下的品管保证细目,每天都有程序被自动选入测试版:

  1. 没有严重错误,或,少于当前测试版;

  2. at least 5 days spent in Unstable, which is usually sufficient time to find and report any serious problems (successfully passing the package’s own test suite, if it has one, reduces that time);

  3. 在所有官方支持的架构里编绎成功;

  4. dependencies that can be satisfied in Testing, or that can at least be moved there together with the package in question;

  5. automatic quality tests of the package (autopkgtest) — if defined — don’t show any regression.

此系统不是万无一失;在测试版经常发现软件包的严重错误。不过,还是很有效果的,而且测试版的问题远远少于 不稳定版,对很多人来说,是稳定与新鲜之间的折衷选择。

说明被限制的测试版

很有趣的原则,测试版应没有实际的问题:软件包的跨平台相依性很难独立完成。软件包彼此相依,必须同时殖入大量的软件包,事实上很难同时殖入定期更新的软件包。另一方面,很难制作用于辨认相关软件包家族的脚本(这是 NP 完备的问题,还好我们知道若干方法)。以手动方式与脚本交互并指引若干可能的软件包,或纳入指定软件包于群组内,即使此方法打破若干相依性。这些功能由发布经理及其团队负责。

NP 完整性问题是复杂的指数算法,与数据量、代码长度(图表的量)与涉入的元素有关。唯一的解决方案是时时查看所有可能的配置,可能需要很多方法。尝试法是一种接近,但满意的,解决方案。

社区 发布经理

发布经理是个重要的职位,责任很重。担任此职的人,必须管理 Debian 新的、稳定版,并设置发展测试版的进程,直到进入稳定版的品质。同时设置暂行进度 (不见得遵守它)。

我们还有稳定版发布经理,简称为 SRM,管理与选择纳入 Debian 当前稳定版的更新软件包。以逐案方式,讨论由 Debian 开发者建议纳入的安全补丁与管理可能纳入的建议。

1.6.4. 从测试版至稳定版

Let us suppose that our package is now included in Testing. As long as it has room for improvement, its maintainer must continue to improve it and restart the process from Unstable (but its later inclusion in Testing is generally faster: unless it changed significantly, all of its dependencies are already available). When it reaches perfection, the maintainer has completed their work. The next step is the inclusion in the Stable distribution, which is, in reality, a simple copy of Testing at a moment chosen by the Release Manager. Ideally, this decision is made when the installer is ready, and when no program in Testing has any known critical bugs.

实际上,还没有真的进入稳定版,Debian 必须妥协:移除维护者无法更正错误的软件包、或容许在数千个程序中还有几个错误。发布经理曾声明冻结期间,想被纳入测试版更新必须通过认可的进程。其目标是避免新版本(及其新错误),与只有被认可的错误修订。

软件包通过多个 Debian 版本的途径

图 1.3. 软件包通过多个 Debian 版本的途径

术语 冻结:最后一哩路

在冷冻期,停止测试版的发展;不允许自动更新。只有发布经理授权的软件包,才能依照指示更新。其目的是避免新版本带新的错误;更正过的错误通过审查过的更新才能纳入。

After the release of a new stable version, the Stable Release Managers manage all further development (called “revisions”, ex: 7.1, 7.2, 7.3 for version 7). These updates systematically include all security patches. They will also include the most important corrections (the maintainer of a package must prove the gravity of the problem that they wish to correct in order to have their updates included).

At the end of the journey, our hypothetical package is now included in the stable distribution. This journey, not without its difficulties, explains the significant delays separating the Debian Stable releases. This contributes, over all, to its reputation for quality. Furthermore, the majority of users are satisfied using one of the three distributions simultaneously available. The system administrators, concerned above all about the stability of their servers, don’t need the latest and greatest version of GNOME; they can choose Debian Stable, and they will be satisfied. End users, more interested in the latest versions of GNOME or KDE Plasma than in rock-solid stability, will find Debian Testing to be a good compromise between a lack of serious problems and relatively up-to-date software. Finally, developers and more experienced users may blaze the trail, testing all the latest developments in Debian Unstable right out of the gate, at the risk of suffering the headaches and bugs inherent in any new version of a program. To each their own Debian!

CULTURE GNOME and KDE Plasma, graphical desktop environments

GNOME (GNU Network Object Model Environment) and Plasma by KDE (formerly known as K Desktop Environment) are the two most popular graphical desktop environments in the free software world, and will be presented in greater detail in 第 13.3 节 “图形桌面”.

A desktop environment is a set of programs grouped together to allow easy management of the most common operations through a graphical interface. They generally include a file manager, office suite, web browser, e-mail program, multimedia accessories, etc. The most visible difference resides in the choice of the graphical library used: GNOME has chosen GTK+ (free software licensed under the LGPL), and the KDE community has selected Qt (a company-backed project, available nowadays both under the GPL and a commercial license).

https://www.gnome.org/

https://www.kde.org/

Debian 包装程序的图径

图 1.4. Debian 包装程序的图径

1.6.5. 旧稳定版与更旧稳定版状态

每个稳定版预计有五年寿命每二年发行新的稳定版,同一时间最多可有三个支持的稳定版在流通。新的稳定版发布时,前个版本就变成旧稳定版而更早的就成为更旧稳定版。

Debian 的长期支持版 (This Long Term Support, LTS) 是新的成员:由独立的奉献者及公司联合的 Debian LTS 团队完成。Debian 安全团体不在维护旧的版本。

The Debian security team handles security support in the current Stable release and also in the Oldstable release (but only for as long as is needed to ensure one year of overlap with the current stable release). This amounts roughly to three years of support for each release. The Debian LTS team handles the last (two) years of security support so that each releases benefits from at least 5 years of support and so that users can upgrade from version N to N+2, for example from Debian 8 “Jessie” to Debian 10 “Buster”.

https://wiki.debian.org/LTS

社区支持 LTS 的公司

Debian 的长期支持承诺颇为困难因为志愿者意图规避无趣的工作。旧软件的五年安全维护是 — 对大部分奉献者而言 — 很无趣的工作,还不如发展上游软件的新功能。

长期支持版的问世,有赖于参与公司愿意分享安全维护的成本。

The project started in June 2014: some organizations allowed their employees to contribute part-time to Debian LTS while others preferred to sponsor the project with money so that Debian contributors get paid to do the work that they would not do for free. Most Debian contributors willing to be paid to work on LTS got together to create a clear sponsorship offer managed by Freexian (Raphaël Hertzog’s company):

https://www.freexian.com/services/debian-lts.html

In the Debian LTS team, the volunteers work on packages they care about while the paid contributors prioritize packages used by their sponsors.

The project is always looking for new sponsors: What about your company? Can you let an employee work part-time on long term support? Can you allocate a small budget for security support?

https://wiki.debian.org/LTS/Funding