ungoogled-software / ungoogled-chromium-debian

Debian, Ubuntu, and others packaging for ungoogled-chromium
386 stars 49 forks source link

Incompatible with unattended-upgrades #177

Closed anoxi closed 4 years ago

anoxi commented 4 years ago

How can i automatically upgrade the ungoogled-chromium package on Ubuntu using unattended-upgrades? The following apt policy from the opensuse repository does not seem to be not compatible with the Unattended-Upgrade::Allowed-Origins pattern "<o>:<a>" (<origin>:<archive>)

$ apt-cache policy
 500 http://download.opensuse.org/repositories/home:/ungoogled_chromium/Ubuntu_Focal  Packages
     release o=obs://build.opensuse.org/home:ungoogled_chromium/Ubuntu_Focal,n=Ubuntu_Focal,l=home:ungoogled_chromium,c=
     origin download.opensuse.org

The policy is missing the archive tag and the origin tag format including ":"(obs://build.opensuse.org/home:ungoogled_chromium/Ubuntu_Focal) is incompatible.

If i try to set "obs://build.opensuse.org/home:ungoogled_chromium/Ubuntu_Focal" as origin in /etc/apt/apt.conf.d/50unattended-upgrades, unattended-upgrade fails:

$ sudo unattended-upgrade -d -v Starting unattended upgrades script Unable to parse Unattended-Upgrade::Allowed-Origins. An error occurred: too many values to unpack (expected 2) Traceback (most recent call last): File "/usr/bin/unattended-upgrade", line 1985, in main res = run(options, rootdir, mem_log, logfile_dpkg, File "/usr/bin/unattended-upgrade", line 2126, in run cache = UnattendedUpgradesCache(rootdir=rootdir) File "/usr/bin/unattended-upgrade", line 156, in init self.allowed_origins = get_allowed_origins() File "/usr/bin/unattended-upgrade", line 785, in get_allowed_origins allowed_origins = get_allowed_origins_legacy() File "/usr/bin/unattended-upgrade", line 762, in get_allowed_origins_legacy (distro_id, distro_codename) = re.split(r'(?<!\):', s)

ghost commented 4 years ago

It's not possible with unattended-upgrades. It isn't compatible with what unattended-upgrades is expecting and we cannot do anything to resolve it as the issue lies with how OBS formats the Origin line of their Release file short of switching to another provider and there are no alternatives to OBS that work with multiple distributions. As a workaround you can add your own cron job to update ungoogled-chromium or something similar.