我正在运行一个raspberry pi (Raspbian 10 - buster),无人值守的升级安装和配置。今天,我收到了一份邮件报告,内容如下:
Unattended upgrade result: All upgrades installed
Packages with upgradable origin but kept back:
linux-libc-dev目标:配置unattended-upgrades,使其不会因为延迟的包而向我发送通知(每天)。它可以自行安装,也可以不发送邮件报告。对我来说,将Unattended-Upgrade::MailOnlyOnError设置为true不是一种选择,因为我希望得到成功升级的通知。
我的配置如下:
/etc/apt/apt.conf.d/50unattended-upgrades
Unattended-Upgrade::Origins-Pattern {
"origin=Debian,codename=${distro_codename},label=Debian";
"origin=Debian,codename=${distro_codename},label=Debian-Security";
};
Unattended-Upgrade::Package-Blacklist {
};
Unattended-Upgrade::Mail "MYMAILADDRESS";
Unattended-Upgrade::Sender "SENDERADDRESS";
Unattended-Upgrade::Remove-Unused-Dependencies "true";
Unattended-Upgrade::Automatic-Reboot "true";编辑: apt-cache policy linux-libc-dev的输出
linux-libc-dev:
Installed: 4.18.20-2+rpi1
Candidate: 1:1.20210430-2
Version table:
1:1.20210430-2 500
500 http://archive.raspberrypi.org/debian buster/main armhf Packages
5.10.28-1+rpi1 -1
-1 http://raspbian.raspberrypi.org/raspbian bullseye/main armhf Packages
*** 4.18.20-2+rpi1 500
500 http://raspbian.raspberrypi.org/raspbian buster/main armhf Packages
100 /var/lib/dpkg/statusapt-get -d install linux-libc-dev输出
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages will be upgraded:
linux-libc-dev
1 upgraded, 0 newly installed, 0 to remove and 23 not upgraded.
Need to get 1.011 kB of archives.
After this operation, 54,3 kB disk space will be freed.
Get:1 http://archive.raspberrypi.org/debian buster/main armhf linux-libc-dev armhf 1:1.20210430-2 [1.011 kB]
Fetched 1.011 kB in 0s (3.006 kB/s)
Download complete and in download only mode到目前为止,我只找到了一些文章,解释了如何通过将包-黑名单字段中的包放在一起来防止包被更新。然而,这在我的配置中是空的。那么,为什么包不能升级呢?还有另一种我不知道的配置,它可能会导致这种情况吗?它与我配置的“起源-模式”有关吗?
谢谢您事先提出的建议!
发布于 2021-05-15 11:59:00
我想自动升级不能正常工作,因为发布文件http://archive.raspberrypi.org/debian/dists/buster/InRelease和http://raspbian.raspberrypi.org/raspbian/dists/buster/InRelease没有一个等于Debian或Debian-security的源文件。因此,这些存储库与Unattended-Upgrade::Origins-Pattern中的设置不匹配,并且没有为自动升级源候选程序选择。他们的相关资料分别是:
Origin: Raspberry Pi Foundation
Label: Raspberry Pi Foundation
Suite: testing
Codename: buster
Date: Fri, 14 May 2021 23:17:18 UTC
Architectures: armhf arm64 i386 amd64
Components: main ui untested这真的很奇怪:测试而不是稳定,同样,拉伸被标记为稳定而不是旧的稳定。我猜这是一个技巧,因为(根据这个论坛) archive.raspberrypi.org是为了添加比raspbian.rasberrypi.org中提供的Debian稳定版本更新的软件,所以buster的状态被“升级”到了那里的测试。这只是一个假设,并不影响答案。
以及:
Origin: Raspbian
Label: Raspbian
Suite: stable
Codename: buster
Date: Sat, 15 May 2021 04:52:10 UTC
Architectures: armhf
Components: main contrib non-free rpi firmware您应该编辑您的/etc/apt/apt.conf.d/50unattended-upgrades,以便条目匹配特定于Raspberry存储库的值。这应该是可行的:
Unattended-Upgrade::Origins-Pattern {
"origin=Raspbian,codename=${distro_codename},label=Raspbian";
"origin=Raspberry Pi Foundation,codename=${distro_codename},label=Raspberry Pi Foundation";
};检查周围没有任何其他隐藏的东西也应该被改变。
我删除了Debian存储库,因为它配置了真的不建议使用Debian存储库,特别是用于自动升级。
https://unix.stackexchange.com/questions/649702
复制相似问题