
我似乎unattended-upgrades
沒有遵循 中設定的優先順序/etc/apt/preferences
。
我正在維護一個 Debian 檔案伺服器,其中設定了無人值守升級。rclone
目前已安裝來自測試的版本。當使用apt
rclone 進行更新時,會從測試中進行更新。但是,unattended-upgrades
在測試存儲庫中運行更新時將被忽略。
無人值守升級是否會出現這種行為?我希望 rclone 能夠追蹤測試儲存庫中的更新。輸出和系統設定的詳細資訊總結如下。
運行的輸出unattended-upgrade --dry-run --debug
是:
Enabled logging to syslog via daemon facility
Initial blacklisted packages:
Initial whitelisted packages:
Starting unattended upgrades script
Allowed origins are: ['origin=Debian,codename=stretch,archive=stable',
'origin=Debian,codename=stretch,archive=testing',
'origin=Debian,codename=stretch,label=Debian-Security',
'origin=Debian Backports,codename=stretch-backports,label=Debian Backports',
'origin=Syncthing,archive=syncthing,codename=debian,label=Syncthing,component=stable',
'origin=www.geogebra.net,codename=stable,component=main']
ignoring ver 'rclone=1.45-2+b21' with priority < 0
adjusting candidate version: 'rclone=1.35-1+b3'
pkgs that look like they should be upgraded:
Fetched 0 B in 0s (0 B/s)
fetch.run() result: 0
blacklist: []
whitelist: []
No packages found that can be upgraded unattended and no pending auto-removals
首選項檔/etc/apt/preferences
是:
Package: *
Pin: release l=Debian-Security
Pin-Priority: 1000
Package: rclone
Pin: release a=testing
Pin-Priority: 950
Package: *
Pin: release a=stable
Pin-Priority: 900
Package: *
Pin: release a=stretch-backports
Pin-Priority: 800
Package: *
Pin: release a=testing
Pin-Priority: -1
該/etc/apt/sources.list
文件是:
deb http://ftp.uk.debian.org/debian/ stretch main non-free contrib
deb-src http://ftp.uk.debian.org/debian/ stretch main non-free contrib
deb http://security.debian.org/debian-security stretch/updates main contrib non-free
deb-src http://security.debian.org/debian-security stretch/updates main contrib non-free
# stretch-updates, previously known as 'volatile'
deb http://ftp.uk.debian.org/debian/ stretch-updates main contrib non-free
deb-src http://ftp.uk.debian.org/debian/ stretch-updates main contrib non-free
# stretch-backports, previously on backports.debian.org
deb http://ftp.uk.debian.org/debian/ stretch-backports main contrib non-free
deb-src http://ftp.uk.debian.org/debian/ stretch-backports main contrib non-free
# testing
deb http://ftp.uk.debian.org/debian/ testing main contrib non-free
deb-src http://ftp.uk.debian.org/debian/ testing main contrib non-free
中的起源/etc/apt/apt.conf.d/50unattended-upgrades
配置如下:
Unattended-Upgrade::Origins-Pattern {
"origin=${distro_id},codename=${distro_codename},archive=stable";
"origin=${distro_id},codename=${distro_codename},archive=testing";
"origin=${distro_id},codename=${distro_codename},label=Debian-Security";
"origin=${distro_id} Backports,codename=${distro_codename}-backports,label=Debian Backports";
"origin=Syncthing,archive=syncthing,codename=debian,label=Syncthing,component=stable";
"origin=www.geogebra.net,codename=stable,component=main";
};
答案1
您需要設定適當的代號進行測試:
Unattended-Upgrade::Origins-Pattern {
"origin=${distro_id},codename=${distro_codename},archive=stable";
"origin=${distro_id},codename=buster,archive=testing";
"origin=${distro_id},codename=${distro_codename},label=Debian-Security";
"origin=${distro_id} Backports,codename=${distro_codename}-backports,label=Debian Backports";
"origin=Syncthing,archive=syncthing,codename=debian,label=Syncthing,component=stable";
"origin=www.geogebra.net,codename=stable,component=main";
};