-
Notifications
You must be signed in to change notification settings - Fork 94
Add support for Allowed-Origins (used by default in Ubuntu 18.04) #53
Comments
Thanks for the report. According to the package's readme, both Origins-Pattern and Allowed-Origins should be still supported, but Allowed-Origins is used only in Ubuntu configuration file. I'll check if I can reproduce that in CI. |
@RogerSik I couldn't reproduce this issue on CI, could you please show me the role configuration and the contents of your |
@jnv strange.
unattended-upgrade runs in issue.
After changing Unattended-Upgrade::Origins-Pattern to Unattended-Upgrade::Allowed-Origins
unattended-upgrade is then working.
|
If its helping the used playbook of this host.
|
@RogerSik Thanks, I see that you use Allowed-Origins syntax in Origins-Pattern, which is unfortunately not compatible. However, Allowed-Origins can be easily rewritten to origin patterns, since it just a compact way to write I'm happy to add Allowed-Origins support as long it is backwards compatible (i.e. it won't be used with older versions of unattended-upgrades). |
Think this pull request solves this: #59 |
Okay, I will take a look at it during Holiday. |
Reproducing my comment from #59:
I'm not saying I disagree with having this option; I'm merely pointing out that this would be an enhancement to add further backwards compatibility rather than to future-proof. The already implemented option is viable for any version of unattended-upgrades since 2011. |
A README update might solve the confusion just as well. |
I am closing this issue since this role has been deprecated. Feel free to suggest alternatives in #98. |
With Ubuntu 18.04 the variable in /etc/apt/apt.conf.d/50unattended-upgrades
Unattended-Upgrade::Origins-Pattern
changed to
Unattended-Upgrade:Allowed-Origins
Otherwise this error appears:
Traceback (most recent call last): File "/usr/bin/unattended-upgrade", line 1993, in <module> sys.exit(main(options)) File "/usr/bin/unattended-upgrade", line 1649, in main cache, options, allowed_origins, blacklisted_pkgs, whitelisted_pkgs) File "/usr/bin/unattended-upgrade", line 1340, in calculate_upgradable_pkgs ver_in_allowed_origin(pkg, allowed_origins) File "/usr/bin/unattended-upgrade", line 685, in ver_in_allowed_origin if is_allowed_origin(ver, allowed_origins): File "/usr/bin/unattended-upgrade", line 669, in is_allowed_origin if match_whitelist_string(allowed, origin): File "/usr/bin/unattended-upgrade", line 490, in match_whitelist_string for s in token.split("=")] ValueError: not enough values to unpack (expected 2, got 1)
The text was updated successfully, but these errors were encountered: