RFC: 现代无权限的 Guix 守护进程配置的危险
作者: hebasto创建于 2026年9月13日更新于 2026年9月17日
标签BrainstormingBuild system
根据 Guix 的 文档,配置 Guix 守护进程有两种方法:
=================================== FAILURES ===================================
_______________________ FileOpsTestCase.test_is_writable _______________________
self = <test_util.FileOpsTestCase testMethod=test_is_writable>
def test_is_writable(self):
sd = 'subdir'
ssd = 'subsubdir'
path = os.path.join(self.workdir, sd, ssd)
os.makedirs(path)
path = os.path.join(path, 'test')
self.assertTrue(self.fileop.is_writable(path))
if os.name == 'posix':
> self.assertFalse(self.fileop.is_writable('/etc'))
E AssertionError: True is not false
tests/test_util.py:721: AssertionError具有不具有特权的守护进程的用户在本地构建依赖项而不是替换它们时,无论是通过传递 --no-substitutes 还是因为他们的平台上不存在替换项(例如,在 RISC-V 系统上),都会遇到此类错误。在 x86_64 和 aarch64 上,问题被替换项掩盖了,这些替换项是在 Guix 的构建农场上使用具有特权的守护进程构建的。
尽管上游已知此类失败,但我们也应在 Bitcoin Core 项目层面上解决此问题。
以下是一些可能的方法:
- 提供一个 shell 脚本,检测 Guix 守护进程配置并警告关于不具有特权的守护进程。
- 文档一个从不具有特权的守护进程到具有特权的守护进程的迁移路径(请注意,Guix 文档 只记录了相反方向的迁移)。
内容来源: bitcoin/bitcoin