Debian

Unattended-Upgrade::Origins-Pattern for repository without Origin, label etc

  • May 29, 2021

我想用來unattendedupgrades在我的 Debian 10 Nextcloud 伺服器上更新 Collabora Office。

但是,儲存庫的 InRelease 文件不包含我在Unattended-Upgrade::Origins-Pattern一行中使用的任何元數據——它只有文件雜湊,所以所有這些都是apt-cache policy返回:

500 https://www.collaboraoffice.com/repos/CollaboraOnline/CODE-debian10 ./ Packages
    release c=

如何指定我希望自動更新此 repo 的包?

從內容中的評論/etc/apt/apt.conf.d/50unattended-upgrades

// Lines below have the format format is "keyword=value,...".  A
// package will be upgraded only if the values in its metadata match
// all the supplied keywords in a line.  (In other words, omitted
// keywords are wild cards.) The keywords originate from the Release
// file, but several aliases are accepted.  The accepted keywords are:
//   a,archive,suite (eg, "stable")
//   c,component     (eg, "main", "contrib", "non-free")
//   l,label         (eg, "Debian", "Debian-Security")
//   o,origin        (eg, "Debian", "Unofficial Multimedia Packages")
//   n,codename      (eg, "jessie", "jessie-updates")
//     site          (eg, "http.debian.net")

您仍然可以通過像這樣編輯和更改塊來使用相關設置中的關鍵字來區分站點:site``50unattended-upgrades``Unattended-Upgrade::Origins-Pattern

Unattended-Upgrade::Origins-Pattern {
       "origin=Debian,codename=${distro_codename},label=Debian";
       "origin=Debian,codename=${distro_codename},label=Debian-Security";
       "site=www.collaboraoffice.com";
}

引用自:https://unix.stackexchange.com/questions/651918