Official Ubuntu repository hard to add to unattended-upgrades
I'm trying to automatically upgrade my build-machine running gitlab-ci-multirunner. The systems are running Ubuntu 14.04 and Ubuntu 16.04. gitlab-ci-multi-runner is installed with the official repositories from gitlab.
In the file /etc/apt/apt.conf.d/50unattended-upgrades
I enabled the following origins
Unattended-Upgrade::Allowed-Origins {
"${distro_id}:${distro_codename}";
"${distro_id}:${distro_codename}-security";
"${distro_id}:${distro_codename}-updates";
"${distro_id}:${distro_codename}-backports";
};
With that my whole system updated, except gitlab-ci-multi-runner.
Using apt-cache policy
the gitlab-repo has the following entry
500 https://packages.gitlab.com/runner/gitlab-ci-multi-runner/ubuntu xenial/main i386 Packages
release v=1,o=https://packages.gitlab.com/runner/gitlab-ci-multi-runner,a=xenial,n=xenial,l=gitlab-ci-multi-runner,c=main,b=i386
origin packages.gitlab.com
500 https://packages.gitlab.com/runner/gitlab-ci-multi-runner/ubuntu xenial/main amd64 Packages
release v=1,o=https://packages.gitlab.com/runner/gitlab-ci-multi-runner,a=xenial,n=xenial,l=gitlab-ci-multi-runner,c=main,b=amd64
origin packages.gitlab.com
The official repos have entries like the following
500 http://at.archive.ubuntu.com/ubuntu xenial/main amd64 Packages
release v=16.04,o=Ubuntu,a=xenial,n=xenial,l=Ubuntu,c=main,b=amd64
origin at.archive.ubuntu.com
500 http://at.archive.ubuntu.com/ubuntu xenial-updates/main amd64 Packages
release v=16.04,o=Ubuntu,a=xenial-updates,n=xenial,l=Ubuntu,c=main,b=amd64
origin at.archive.ubuntu.com
The interesting fields are the o= and a= fields. The new entry should be
"https://packages.gitlab.com/runner/gitlab-ci-multi-runner:${distro_codename}";
But when I add the field to Allowed-Origins I get the following error
sudo unattended-upgrade -d -v
Traceback (most recent call last):
File "/usr/bin/unattended-upgrade", line 1468, in <module>
main(options)
File "/usr/bin/unattended-upgrade", line 1137, in main
allowed_origins = get_allowed_origins()
File "/usr/bin/unattended-upgrade", line 341, in get_allowed_origins
allowed_origins = get_allowed_origins_legacy()
File "/usr/bin/unattended-upgrade", line 324, in get_allowed_origins_legacy
(distro_id, distro_codename) = s.split(':')
ValueError: too many values to unpack (expected 2)
I also tried the following entries, which were accepted, but the package's origin did not match, so gitlab-ci-multi-runner was not updated
"packages.gitlab.com ${distro_codename}";
"packages.gitlab.com:${distro_codename}";
The only workaround I have found was to use a '*' wildcard
"*packages.gitlab.com/runner/gitlab-ci-multi-runner:${distro_codename}";
Is it possible to update the origin field of the gitlab-repo to be for example packages.gitlab.com
. This would have saved me some headaches and would (imho) make the gitlab-repo more standard-like