Why Gentoo?
Why Gentoo?
为什么选择 Gentoo?
Multiple times in the past I’ve been thinking of how Gentoo is perceived by the wider public, the non-users. What probably stands out most is compiling. Almost everyone who heard of Gentoo knows it has something to do with compiling everything. And why are we doing that? Well, besides being hardcore, the common sentiment goes for performance. So yeah, Gentoo users must be some kind of hardcore ricers who try to squeeze every last bit of their system performance. 过去,我曾多次思考大众(非 Gentoo 用户)是如何看待 Gentoo 的。最显眼的标签大概就是“编译”。几乎每个听说过 Gentoo 的人都知道它与“编译一切”有关。我们为什么要这样做呢?除了显得硬核之外,普遍的观点是认为为了性能。所以,是的,Gentoo 用户一定是一群试图榨干系统每一滴性能的硬核“折腾党”。
To be honest, I don’t think that’s a good way to describe Gentoo. Yes, compiling is at the core of it. But performance? I don’t think so, at least not in the obvious, -O9999 -fzomg-fast way. The world has moved on, CPUs have gotten faster, optimizations have gotten smarter, and distributions have started optimizing more aggressively. Optimization-wise, I suspect your average Ubuntu package with generic optimizations may be no slower than the equivalent Gentoo package fine-tuned for your CPU. And if it’s not, then it probably won’t make a real difference anyway.
老实说,我不认为这是描述 Gentoo 的好方式。没错,编译确实是它的核心。但性能呢?我不这么认为,至少不是那种显而易见的、通过 -O9999 -fzomg-fast 这种方式带来的提升。世界在进步,CPU 变得更快了,优化技术也更智能了,各大发行版也开始进行更激进的优化。在优化层面,我怀疑 Ubuntu 的通用优化软件包与针对你 CPU 微调的 Gentoo 软件包相比,速度并不会慢。即便有差距,通常也不会带来实质性的区别。
There’s much more to Gentoo than that. Yes, some of it comes from building from source: the flexibility. But a lot of it comes from the wider Gentoo philosophy, the philosophy that brought us all together. The idea that Gentoo is the distribution we’re making for ourselves and people who enjoy Gentoo. So if I were to make a few arguments for Gentoo, I’d focus on that. And this is what I’d like to do here. Gentoo 的内涵远不止于此。是的,部分优势确实源于源码编译:即灵活性。但更多的是源于更广泛的 Gentoo 哲学,正是这种哲学将我们凝聚在一起。Gentoo 是我们为自己以及那些热爱 Gentoo 的人们所打造的发行版。因此,如果要为 Gentoo 辩护,我会侧重于这一点。这也是我在此想要表达的。
Gentoo aims to be independent
Gentoo 旨在保持独立
There is no company behind Gentoo. There is no business model. It’s all made and governed by people dedicated to the values behind Gentoo. A few of us may be working on the distribution as part of our dayjob, but the vast majority (myself included) are just volunteers. We are driven by passion, and not by profit incentive. And if that wasn’t enough, we’re good at making Gentoo as unprofitable as possible. The infrastructure behind Gentoo is partially donated, and partially paid for by donation money. We’re not putting all our eggs in one basket. No single donor can hold Gentoo hostage. In fact, we’re currently disbanding Gentoo Foundation in favor of SPI to reduce the risk of direct financial governance becoming a choke point. Gentoo 背面没有公司,也没有商业模式。它完全由致力于 Gentoo 价值观的人们所创造和管理。我们中或许有少数人将维护发行版作为日常工作,但绝大多数人(包括我)仅仅是志愿者。我们受热情驱动,而非利润动机。如果这还不够,我们还擅长让 Gentoo 尽可能地“无利可图”。Gentoo 的基础设施部分来自捐赠,部分由捐款支付。我们不会把鸡蛋放在同一个篮子里。没有任何单一捐赠者能挟持 Gentoo。事实上,我们目前正在解散 Gentoo 基金会,转而寻求 SPI 的支持,以降低直接财务管理成为瓶颈的风险。
Gentoo aims to be secure
Gentoo 旨在保持安全
Security is important to us. We are doing our best to keep Gentoo packages secure, often going ahead of upstream in backporting patches. We have a dedicated security team who helps everyone track the problems, resolve them and keeps our users informed. We are maintaining our own infrastructure to reduce the risk of being hijacked. We are securing our distribution channels and mirrors using OpenPGP (and yes, it’s the best tool for the job, backed by our own infrastructure). We are only using Codeberg (which we really appreciate) and GitHub as optional mirrors and contribution channels, and we aren’t making Gentoo dependent on either. Sure, abandoning them would be inconvenient for us, but we can do that if need arises. 安全对我们至关重要。我们尽最大努力保持 Gentoo 软件包的安全,在向后移植补丁方面往往领先于上游。我们拥有专门的安全团队,帮助大家追踪问题、解决问题并及时通知用户。我们维护自己的基础设施以降低被劫持的风险。我们使用 OpenPGP 来保护分发渠道和镜像(是的,这是最适合的工具,并由我们自己的基础设施支持)。我们仅将 Codeberg(我们非常感激它)和 GitHub 作为可选的镜像和贡献渠道,并没有让 Gentoo 依赖于它们中的任何一个。当然,放弃它们会带来不便,但如果有必要,我们完全可以做到。
We have very strong QA policies, often in discord with upstream decisions. Bundled dependencies? Not on my watch. Static linking? No, thank you. Pinned dependencies? Let me try removing these pins. Or well, at least we try. As the quality of software development is dwindling, we do our best to prevent the most obvious threats, such as severely outdated dependencies. 我们有非常严格的质量保证(QA)政策,这往往与上游的决定不一致。捆绑依赖?在我这儿行不通。静态链接?不用了,谢谢。锁定依赖版本?让我试着把这些锁去掉。好吧,至少我们尝试过。随着软件开发质量的下降,我们尽最大努力防止最明显的威胁,例如严重过时的依赖项。
Gentoo aims to be made by humans
Gentoo 旨在由人类创造
We banned LLM contributions two years ago, and never regretted it. We didn’t “wait and see”, we took decisive action, and if we got left behind, it’s only for the better. I can’t give you a 100% guarantee that no tainted code slipped through, but we’re doing our best to stay vigilant. In the end, it’s all about trust, and trusting one another is what builds our community. Unfortunately, in today’s LLM-ridden world we can’t stop slop software from being packaged in Gentoo. We have an important commitment to deliver up-to-date and secure software, and that often means accepting the fact that upstreams haven’t taken the stance we did. Nevertheless, we try to keep the worst offenders (like copywashed chardet or vibe-coded cryptography software) at bay. 我们在两年前就禁止了 LLM(大语言模型)生成的贡献,且从未后悔。我们没有“观望”,而是采取了果断行动;如果我们因此落后了,那也是件好事。我无法 100% 保证没有被污染的代码混入,但我们正尽最大努力保持警惕。归根结底,这一切关乎信任,而相互信任正是我们社区的基石。不幸的是,在当今充斥着 LLM 的世界里,我们无法阻止劣质软件进入 Gentoo 的打包范围。我们有提供最新且安全软件的重要承诺,这意味着我们往往不得不接受上游并未采取与我们相同立场的事实。尽管如此,我们仍努力将最糟糕的违规者(如洗稿的 chardet 或凭感觉编写的加密软件)拒之门外。
Gentoo aims to be stable
Gentoo 旨在保持稳定
Gentoo might not be the easiest distribution to start with, but once you set it up, it is surprisingly stable. Of course, mishaps do happen; but when they do, you can usually fix them without having to reinstall the system. One of the unique features of Gentoo is that the package tree isn’t bound to a single version of any given package. If you discover that a new version doesn’t work well for you, you have a good chance of being able to downgrade. Even if the version in question is gone from Gentoo, restoring it is relatively easy. Gentoo 可能不是最容易上手的发行版,但一旦你配置好,它会出奇地稳定。当然,意外确实会发生;但当它们发生时,你通常可以在不重装系统的情况下修复它们。Gentoo 的独特功能之一是软件包树并不绑定于任何给定软件包的单一版本。如果你发现新版本不适合你,你有很大机会可以降级。即使该版本已从 Gentoo 中移除,恢复它也相对容易。
Gentoo is a rolling release distribution. It’s not split into multiple versions, requiring you to periodically move to the next release. All package versions are at your disposal; you can choose to run a bleeding edge system and get new packages as soon as we add them, or you can choose to run stable, and upgrade once we confirm they’re ready. Or you can customize your system beyond that. Gentoo 是一个滚动更新发行版。它没有被拆分成多个版本,不需要你定期迁移到下一个发行版。所有软件包版本都任你支配;你可以选择运行最前沿的系统,在添加新包后立即获取,或者选择运行稳定版,在我们确认它们准备就绪后再升级。你甚至可以进行更深度的系统定制。
Honestly, whenever Gentoo comes up for me, I end up praising the stability. I run ACCEPT_KEYWORDS=“~amd64” in my make.conf, so I get pretty frequent updates. I run an LLVM profile with mold as my system linker and LTO enabled for everything. Even with all that, I have a more stable experience with Gentoo than I’ve had with basically any other desktop Linux. Sure, sometimes I find myself opening a cursed issue on b.g.o, but my system hasn’t ever broken! The work the Gentoo devs put in to make sure everything is stable and everything works well across many different setups is incredible, and the stability that comes with portage sure doesn’t hurt either.
老实说,每当提到 Gentoo,我最终都会称赞它的稳定性。我在 make.conf 中设置了 ACCEPT_KEYWORDS="~amd64",因此更新非常频繁。我运行着 LLVM 配置,使用 mold 作为系统链接器,并为所有内容启用了 LTO。即便如此,我在 Gentoo 上的体验比我使用过的任何其他桌面 Linux 都要稳定。当然,有时我确实会发现自己在 b.g.o(Gentoo Bugzilla)上提交一些棘手的问题,但我的系统从未崩溃过!Gentoo 开发者为确保一切稳定以及在各种不同配置下良好运行所付出的努力令人难以置信,而 Portage 带来的稳定性也功不可没。
Gentoo aims to be flexible
Gentoo 旨在保持灵活
Gentoo is a source-first distribution, which means the primary method of installing software is to build it from source. Of course, that doesn’t mean manually building stuff, following some kind of how-to: Gentoo 是一个以源码为先的发行版,这意味着安装软件的主要方式是从源码构建。当然,这并不意味着要按照某种教程手动构建: