我们可以扩展启用了无人值守升级的存储库吗?

我们可以扩展启用了无人值守升级的存储库吗?

关于为某些存储库启用无人值守升级的通常建议是编辑/etc/apt/apt.conf.d/50unattended-upgrades并手动添加适当的Origin值。我想知道是否可以通过指定多个块来添加到此列表中Unattended-Upgrade::Allowed-Origins,或者任何后续块是否会覆盖先前的块?


用例是本地存储库,通过安装包将其添加到系统中。我想通过向99local_repo_conf包中添加文件来启用无人值守升级,其中的Unattended-Upgrade::Allowed-Origins块包含该存储库的 Origin 数据。这样的块会覆盖以前的条目并阻止 Ubuntu 存储库的无人值守升级吗?


显然,尽管我找不到任何相关文档,但这确实是行为。

$ cat /etc/apt/apt.conf.d/*upgrades*     
Unattended-Upgrade::Allowed-Origins {
    "CSE:trusty";
};

Unattended-Upgrade::Automatic-Reboot-Time "05:00";
APT::Periodic::Unattended-Upgrade "1";
APT::Periodic::Download-Upgradeable-Packages "1";
APT::Periodic::AutocleanInterval "7";

// Automatically upgrade packages from these (origin:archive) pairs
Unattended-Upgrade::Allowed-Origins {
    "${distro_id}:${distro_codename}-security";
};
...
$ sudo unattended-upgrade --dry-run --debug
Initial blacklisted packages: 
Starting unattended upgrades script
Allowed origins are: ['o=CSE,a=trusty', 'o=Ubuntu,a=trusty-security']
pkgs that look like they should be upgraded: 
...

当然,条目连接的事实可能是 APT 的配置语法的属性,相关文档unattended-upgrade不需要提及它。

有人可以提供文件来证实这一点吗?

相关内容