Ubuntu 20.04 下的 apt-get upgrade 与 unattended-upgrades

Ubuntu 20.04 下的 apt-get upgrade 与 unattended-upgrades

无人值守升级似乎跳过了某些升级,例如谷歌浏览器升级。随后调用apt-get 升级然后找到并安装 ugrade。这是否意味着,如果我想让一切都自动化,除了无人值守升级配置外,我还必须安排 apt-get upgrade?

我已经配置了 /etc/apt/apt.conf.d/20auto-upgrades 如下:

APT::Periodic::Update-Package-Lists "1";
APT::Periodic::Download-Upgradeable-Packages "1";
APT::Periodic::AutocleanInterval "0";
APT::Periodic::Unattended-Upgrade "1";

这是我的 50unattended-upgrades 配置(为了便于阅读,我删除了所有注释行):

Unattended-Upgrade::Allowed-Origins {
    "${distro_id}:${distro_codename}";
    "${distro_id}:${distro_codename}-security";
    "${distro_id}ESMApps:${distro_codename}-apps-security";
    "${distro_id}ESM:${distro_codename}-infra-security";
    "${distro_id}:${distro_codename}-updates";
};
Unattended-Upgrade::Package-Blacklist {
};
Unattended-Upgrade::DevRelease "auto";
Unattended-Upgrade::Automatic-Reboot "true";
Unattended-Upgrade::Automatic-Reboot-WithUsers "true";
Unattended-Upgrade::Automatic-Reboot-Time "08:00";

原则上,我的无人值守升级运行正常。

无人值守升级和 apt-get 升级之间的时间滞后并不是原因,因为当我遇到此问题时,我也在 apt-get 升级之前手动启动了无人值守升级。

谢谢你的帮助

肺动脉

答案1

我在 askubuntu 上找到了答案:

https://askubuntu.com/questions/64318/how-can-i-enable-silent-automatic-updates-for-google-chrome

上述允许的来源不包括第三方来源。因此,我在 50unattended-upgrades 中的允许来源中添加了“Google LLC:stable”;

答案2

检查你的/etc/apt/apt.conf.d/50unattended-upgrades

它很可能看起来像这样:

Unattended-Upgrade::Allowed-Origins {
        "${distro_id}:${distro_codename}";
        "${distro_id}:${distro_codename}-security";
        // Extended Security Maintenance; doesn't necessarily exist for
        // every release and this system may not have it installed, but if
        // available, the policy for updates is such that unattended-upgrades
        // should also install from here by default.
        "${distro_id}ESMApps:${distro_codename}-apps-security";
        "${distro_id}ESM:${distro_codename}-infra-security";
//      "${distro_id}:${distro_codename}-updates";
//      "${distro_id}:${distro_codename}-proposed";
//      "${distro_id}:${distro_codename}-backports";
};

在此配置中,只有安全更新才会自动更新。如果您希望自动更新更多更新,可以删除这些行中的注释。

相关内容