Last rites for Gentoo's Chromium package
Last rites for Gentoo’s Chromium package
Gentoo Chromium 软件包的“临终仪式”
Chromium, the open-source upstream project for Google’s Chrome web browser, is the browser of choice for many Linux users. It has also gained a reputation as being difficult for Linux distributions to package and build: Chromium has a complex build system, the project bundles many of its dependencies, and it has frequent releases. All of that, plus user complaints, has led the maintainers of the Gentoo Chromium package to give up on trying to maintain the package.
Chromium 是 Google Chrome 网络浏览器的开源上游项目,也是许多 Linux 用户的首选浏览器。然而,它在 Linux 发行版打包和构建方面也以“困难”著称:Chromium 拥有复杂的构建系统,项目捆绑了许多依赖项,且发布频率极高。所有这些因素,加上用户的抱怨,导致 Gentoo Chromium 软件包的维护者决定放弃对该软件包的维护。
Gentoo focuses on allowing users to build their own software from source using the Portage software-management tool. Gentoo packagers create ebuild files, which are text files written in a Bash-like syntax that contain the information needed by Portage to build the software. Users then build packages themselves using emerge, which is the command-line interface for Portage. A recent ebuild for Chromium illustrates the complexity of the package.
Gentoo 专注于让用户使用 Portage 软件管理工具从源代码构建自己的软件。Gentoo 打包者会创建 ebuild 文件,这是一种以类似 Bash 语法编写的文本文件,其中包含了 Portage 构建软件所需的信息。随后,用户使用 Portage 的命令行界面 emerge 自行构建软件包。最近的一个 Chromium ebuild 文件就充分体现了该软件包的复杂性。
Gentoo does offer prebuilt binary packages for some software via its Binhost project. However, building from source gives users the flexibility to declare USE flags to set compile-time options or change a package’s configuration. For example, a user may wish to specify which optional libraries are linked with a package, or whether to install the accompanying documentation. With Chromium in particular, a user might employ the -bundled-toolchain USE flag (which tells Portage not to use the bundled toolchain) in order to use their system’s version of Clang to compile Chromium rather than the bundled version included by the upstream project.
Gentoo 确实通过其 Binhost 项目为部分软件提供预编译的二进制包。然而,从源代码构建赋予了用户灵活性,可以通过声明 USE 标志来设置编译时选项或更改软件包的配置。例如,用户可能希望指定哪些可选库与软件包链接,或者是否安装随附的文档。特别是在 Chromium 上,用户可能会使用 -bundled-toolchain USE 标志(告知 Portage 不要使用捆绑的工具链),以便使用系统自带的 Clang 版本来编译 Chromium,而不是使用上游项目包含的捆绑版本。
That is optional for Gentoo users on x86-64 systems, but -bundled-toolchain is required for users on other architectures, since Chromium’s bundled toolchain is only shipped for x86-64. It is worth noting that Chromium is currently not available as a binary package from Gentoo due to problems with building the package with proprietary codecs.
对于 x86-64 系统上的 Gentoo 用户来说,这是可选的,但对于其他架构的用户来说,-bundled-toolchain 是必需的,因为 Chromium 的捆绑工具链仅针对 x86-64 提供。值得注意的是,由于在构建过程中处理专有编解码器存在问题,Chromium 目前在 Gentoo 中无法作为二进制包提供。
Last rites / 临终仪式
Many distributions, including Arch Linux, Debian, and Fedora, use the term “orphan” to refer to packages that have been abandoned by their maintainer; the developer announces that a package has been orphaned, and other contributors have the opportunity to claim maintainership of it if they wish to do so. Gentoo’s terminology is a bit more dramatic: a package maintainer announces “last rites” for a package on the gentoo-dev-announce mailing list to notify the project that it will be unmaintained, and as an opportunity to allow other developers to claim maintainership.
包括 Arch Linux、Debian 和 Fedora 在内的许多发行版使用“孤儿(orphan)”一词来指代已被维护者放弃的软件包;开发者宣布软件包被“孤儿化”,其他贡献者如果有意愿,有机会认领其维护权。Gentoo 的术语则更为戏剧化:软件包维护者会在 gentoo-dev-announce 邮件列表中为软件包宣布“临终仪式(last rites)”,以通知项目该软件包将不再被维护,并借此机会让其他开发者认领维护权。
After a developer has declared last rites, the package’s ebuild is masked in Gentoo’s ebuild repository to ensure that users will not accidentally install a package that is no longer being maintained. Users who have the package installed and attempt an upgrade will receive a warning that it has been masked.
在开发者宣布“临终仪式”后,该软件包的 ebuild 文件会在 Gentoo 的 ebuild 仓库中被屏蔽(masked),以确保用户不会意外安装不再维护的软件包。如果用户已经安装了该软件包并尝试升级,将会收到该软件包已被屏蔽的警告。
Chromium package maintainer Sam James declared last rites for the Chromium package on September 24, after a lengthy conversation in a bug report filed by Roman Žilka. On September 9, Žilka had complained that the latest stable version of the Chromium ebuild was outdated: “The latest stable www-client/chromium (and google-chrome and possibly others) is 151.0.7922.169, which contains a catastrophic 602 known vulnerabilities of all severities. Measures need to be taken by somebody qualified that this doesn’t keep happening in packages as important as these.”
在 Roman Žilka 提交的一份错误报告引发了长时间的讨论后,Chromium 软件包维护者 Sam James 于 9 月 24 日宣布了 Chromium 软件包的“临终仪式”。9 月 9 日,Žilka 曾抱怨最新的稳定版 Chromium ebuild 已经过时:“最新的稳定版 www-client/chromium(以及 google-chrome 等)版本为 151.0.7922.169,其中包含 602 个各种严重程度的已知漏洞,情况非常严重。必须由具备资质的人员采取措施,防止此类重要软件包持续出现这种情况。”
He had attached an ebuild for a newer version of Chromium to the bug report, but noted that it would not work if a user tried to compile Chromium with the -bundled-toolchain USE flag. James replied, “Chromium is horrible to maintain as a source package. It is easily the package in Gentoo that burns through maintainers the most.”
他在错误报告中附上了一个较新版本 Chromium 的 ebuild 文件,但指出如果用户尝试使用 -bundled-toolchain USE 标志编译 Chromium,该文件将无法工作。James 回复道:“作为源代码包,Chromium 的维护简直是噩梦。它绝对是 Gentoo 中最消耗维护者的软件包。”
Complaining about its maintenance isn’t helpful, he said, and added that the maintainers have come close to giving Chromium last rites several times over the years due to the difficulty in keeping it up to date. He also noted that he had mentioned this to Žilka before, and said that it would be welcome if he wanted to assist with the package.
他表示,抱怨维护工作无济于事,并补充说,由于难以保持更新,多年来维护者们曾多次考虑对 Chromium 实施“临终仪式”。他还提到,他之前已经向 Žilka 说明过这一点,并表示如果他愿意协助维护该软件包,将非常欢迎。
Indeed, Žilka had filed a similar bug in August complaining about the number of vulnerabilities present in the Chromium ebuild; James had replied then that the package had always been difficult to maintain, “and now they’ve added Go” as a dependency as well. Prior to that, Žilka had shown up in a bug report filed by Matt Jolly about Chromium vulnerabilities to complain that “the update process needs fixing, so that events like these don’t happen again in packages as critical as these!”
事实上,Žilka 在 8 月份就曾提交过类似的错误报告,抱怨 Chromium ebuild 中存在的漏洞数量;当时 James 回复称该软件包一直难以维护,“而且现在他们还增加了 Go”作为依赖项。在此之前,Žilka 还曾在 Matt Jolly 提交的关于 Chromium 漏洞的错误报告中抱怨道:“更新流程需要修复,这样在如此关键的软件包中就不会再发生类似事件了!”
Jolly had replied that the maintainers are a team of volunteers who do their best, but “build failures, human factors (‘I messed up assigning the bug and automation didn’t pick it up’), and my own limited free time are the biggest causes of delays”. The best way to change the situation, he said, would be for Žilka to volunteer his help.
Jolly 回复称,维护者们是一个尽其所能的志愿者团队,但“构建失败、人为因素(‘我搞砸了错误分配,自动化系统没能抓取到’)以及我个人有限的空闲时间是导致延迟的最大原因”。他说,改变现状的最好方法是 Žilka 能志愿提供帮助。
Trial and error / 反复试验
There are various third-party repositories, called overlays, that provide additional and alternative ebuilds for Gentoo. On September 11, Nick Reale said that he had tried ebuilds for a newer version of Chromium from the Bentoo and Fireburn overlays, but he couldn’t get either one to work. A few days later he reported success with Bentoo’s ebuild and a specific set of USE flags. There was some follow-on discussion from Reale and François Valenduc about various incantations they were able to use to compile an updated version of Chromium on Gentoo from other ebuilds. On September 18, Valenduc commented that version 153.0.8010.47 of Chromium was out, and that version was already available in Arch Linux, openSUSE.
Gentoo 有各种被称为“overlays”的第三方仓库,提供额外或替代的 ebuild 文件。9 月 11 日,Nick Reale 表示他尝试了来自 Bentoo 和 Fireburn overlays 的较新版本 Chromium ebuild,但都无法成功。几天后,他报告称通过 Bentoo 的 ebuild 和一组特定的 USE 标志成功了。Reale 和 François Valenduc 随后讨论了他们如何使用各种“咒语(incantations,指复杂的编译指令)”从其他 ebuild 中在 Gentoo 上编译出更新版本的 Chromium。9 月 18 日,Valenduc 评论称 Chromium 153.0.8010.47 版本已经发布,并且该版本已经在 Arch Linux 和 openSUSE 中可用。