Git Product home page Git Product logo

unattended-upgrades's Introduction

Unattended upgrades

This script upgrades packages automatically and unattended.

If you would prefer to disable it from the command line, run "sudo dpkg-reconfigure -plow unattended-upgrades".

It will not install packages that require dependencies that can't be fetched from allowed origins, and it will check for conffile prompts before the install and holds back any package that requires them.

Setup

By default unattended-upgrades runs an update every day.

The main way to specify which packages will be auto-upgraded is by means of their "origin" and "archive". These are taken respectively from the Origin and Suite fields of the repository's Release file, or can be found in the output of:

$ apt-cache policy

in the "o" and "a" fields for the given repository.

The default setup auto-updates packages in the main and security archives, which means that only stable and security updates are applied.

This can be changed either with the "Unattended-Upgrade::Allowed-Origins" or the "Unattended-Upgrade::Origins-Pattern" apt configuration lists, which are listed in /etc/apt/apt.conf.d/50unattended-upgrades. Also in this file are a range of other options that can be configured.

To override the configuration it is recommended to create an other APT configuration file fragment which overrides the shipped default value because updates to to shipped configuration file may conflict with the local changes blocking updating unattended-upgrades itself. The new file should sort later than 50unattended-upgrades to be parsed later than the one shipping the default values, it can be e.g. 52unattended-upgrades-local.

Allowed-Origins is a simple list of patterns of the form "origin:archive".

Origins-Pattern allows you to give a list of (glob-style) patterns to match against. For example:

 Unattended-Upgrade::Origins-Pattern {
        "origin=Google\, Inc.,suite=contrib";
        "site=www.example.com,component=main";
 };

will upgrade a package if either the origin is "Google, Inc." and suite is "contrib" or if it comes from www.example.com and is in component "main". The apt-cache policy short identifiers (e.g. "o" for "origin") are also supported.

If you already configure what to install via apt pinning, you can simply use "origin=*", e.g.:

 Unattended-Upgrade::Origins-Pattern {
        "origin=*";
 };

All operations are logged in /var/log/unattended-upgrades/. This includes the dpkg output as well. The file /etc/logrotate.d/unattended-upgrades controls how long logfiles are kept, and how often they are rotated. See the logrotate manpage for details.

If you want mail support you need to have a mail-transport-agent (e.g postfix) or mailx installed.

Debugging

If something goes wrong, or if you want to report a bug about the way the script works, it's a good idea to run:

$ sudo unattended-upgrade --debug --dry-run

and look at the resulting logfile in: /var/log/unattended-upgrades/unattended-upgrades.log It will also contain additional debug information.

Manual Setup

To activate this script manually you need to ensure that the apt configuration contains the following lines (this can be done via the graphical "Software Source" program or via dpkg-reconfigure as well):

APT::Periodic::Update-Package-Lists "1";
APT::Periodic::Unattended-Upgrade "1";

This means that it will check for updates every day, and install them (if that is possible). If you have update-notifier installed, it will setup /etc/apt/apt.conf.d/10periodic. Just edit this file then to fit your needs. If you do not have this file, just create it or create/edit /etc/apt/apt.conf - you can check your configuration by running "apt-config dump".

Plugin support

Plugin support is available to integrate with webhooks or other custom tools that need to read u-u run results. Check the example plugin in the git repository for more details.

Supported Options Reference

  • Unattended-Upgrade::Allowed-Origins - list of (origin:archive) pairs

Only packages from this origin:archive pair will be installed. You can see all available origin:archive pairs by running apt-cache policy and checking the "o=" and "a=" fields. Variable substitution is supported for ${distro_id} that contains the output of lsb_release -i and ${distro_codename} that contains the output of lsb_release -c.

Example:

Unattended-Upgrade::Allowed-Origins {
   "${distro_id}:${distro_codename}-security";
  • Unattended-Upgrade::Package-Blacklist - list of regular expressions

No packages that match the regular expressions in this list will be marked for upgrade. If a package A has a blacklisted package B as a dependency then both packages A and B will not be upgraded. Note that it's a list of regular expressions, so you may need to escape special characters like "+" as "\+".

Example:

Unattended-Upgrade::Package-Blacklist {
    "libstdc\+\+6$";
};
  • Unattended-Upgrade::Package-Whitelist - list of regular expressions

Only packages that match the regular expressions in this list will be marked for upgrade. By default dependencies of whitelisted packages are allowed. This can be changed to only ever allow whitelisted packages with the Unattended-Upgrade::Package-Whitelist-Strict boolean option. Unattended-Upgrade::Package-Blacklist still applies, thus blacklisted packages covered by the whitelist will still not be upraded nor will be installed or upgraded as dependencies of whitelisted packages.

Example:

Unattended-Upgrade::Package-Whitelist {
    "bash";
};
  • Unattended-Upgrade::Package-Whitelist-Strict - boolean (default:False)

When set, allow only packages in Unattended-Upgrade::Package-Whitelist to be upgraded. This means that you also need to list all the dependencies of a whitelisted package, e.g. if A depends on B and only A is whitelisted, it will be held back.

Example:

Unattended-Upgrade::Package-Whitelist-Strict "true";
  • Unattended-Upgrade::AutoFixInterruptedDpkg - boolean (default:True)

Run dpkg --force-confold --configure -a if a unclean dpkg state is detected. This defaults to true to ensure that updates get installed even when the system got interrupted during a previous run.

  • Unattended-Upgrade::MinimalSteps - boolean (default:True)

Optimize for safety against e.g. power failure by performing the upgrade in minimal self-contained chunks. This also allows sending a SIGTERM to unattended-upgrades, and it will stop the upgrade when it finishes the current upgrade step.

  • Unattended-Upgrade::InstallOnShutdown - boolean (default:False)

Perform the upgrade when the machine is shutting down instead of doing it in the background while the machine is running.

  • Unattended-Upgrade::Mail - string (default:"")

Send an email to this address with information about the packages upgraded. If empty or unset no email is sent. This option requires a working local mail setup.

Example:

Unattended-Upgrade::Mail "[email protected]";
  • Unattended-Upgrade::Sender - string (default:"root")

Use the specified value in the "From" field of outgoing mails.

Example:

Unattended-Upgrade::Sender "[email protected]";
  • Unattended-Upgrade::MailReport - string (default: "on-change")

Possible values are "always", "only-on-error" or "on-change". If this value is not set then the value is set by using the legacy option Unattended-Upgrade::MailOnlyOnError (default:False) to choose between "only-on-error" and "on-change".

NOTE that "never" is achieved by not setting any Unattended-Upgrade::Mail

  • Unattended-Upgrade::Remove-Unused-Dependencies - boolean (default:False)

Remove all unused dependencies after the upgrade has finished.

  • Unattended-Upgrade::Remove-New-Unused-Dependencies - boolean (default:True)

Remove any new unused dependencies after the upgrade has finished.

  • Unattended-Upgrade::Automatic-Reboot - boolean (default:False)

Automatically reboot WITHOUT CONFIRMATION if the file /var/run/reboot-required is found after the upgrade.

  • Unattended-Upgrade::Automatic-Reboot-WithUsers - boolean (default:True)

Automatically reboot even if users are logged in.

  • Unattended-Upgrade::Keep-Debs-After-Install - boolean (default:False)

Keep the downloaded deb packages after successful installs. By default these are removed after successful installs.

  • Acquire::http::Dl-Limit - integer (default:0)

Use apt bandwidth limit feature when fetching the upgrades. The number is how many kb/sec apt is allowed to use.

Example - limit the download to 70kb/sec:

Acquire::http::Dl-Limit "70";
  • Dpkg::Options - list of strings

Set a dpkg command-line option. This is useful to e.g. force conffile handling in dpkg.

Example - force dpkg to keep the old configuration files:

Dpkg::Options {"--force-confold"};

Note that unattended-upgrades detects this option, and ensures that packages with configuration prompts will never be held back.

  • Unattended-Upgrade::Update-Days - list of strings (default:empty)

Set the days of the week that updates should be applied. The days can be specified as localized abbreviated or full names. Or as integers where "0" is Sunday, "1" is Monday etc.

Example - apply updates only on Monday and Friday:

Unattended-Upgrade::Update-Days {"Mon";"Fri"};

The default is an empty list which means updates are applied every day.

  • Unattended-Upgrade::SyslogEnable - boolean (default:False)

Write events to syslog, which is useful in environments where syslog messages are sent to a central store.

Example - Enable writing to syslog:

Unattended-Upgrade::SyslogEnable true;

The default is False - events will not be written to syslog.

  • Unattended-Upgrade::SyslogFacility - string (default:"daemon")

Write events to the specified syslog facility, or the daemon facility if not specified. Requires the Unattended-Upgrade::SyslogEnable option to be set to true.

Example - Use the syslog auth facility:

Unattended-Upgrade::SyslogFacility "auth";

The default is the daemon facility.

unattended-upgrades's People

Contributors

a-detiste avatar amitgurdasani avatar anarcat avatar baertierchen avatar cjwatson avatar debian-janitor avatar dravon5x avatar frans-spiesschaert avatar germar avatar ghostlyrics avatar harakka avatar jonatanwick avatar julian-klode avatar jvalleroy avatar lafrech avatar lool avatar mbearup avatar murraybd avatar mvo5 avatar nachoparker avatar nilstoedtmann avatar nomis avatar peterlewis avatar peternowee avatar rbalint avatar smcv avatar takluyver avatar to-ba avatar warsaw avatar zerkms avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

unattended-upgrades's Issues

Pre/post upgrade hooks

I would be interested in pre/post upgrade hooks.

My use case is as follows: on my VPS I employ tripwire as an intrusion detection system, which requires confirmation of all system changes, listed in a text file. As of now, I am forced to

  • check tripwire for changes (there should be none)
  • upgrade the system manually
  • run tripwire and confirm all changes done by the upgrade process

Ideally I would automate this process as follows:

  • before the update runs, my hook get called, and checks if there are any changes to the system
  • if there are changes, the hook fails, and the update is interrupted
  • if there are no changes (like it should be), the update proceeds
  • if the update is successful, another hook gets called which updates the tripwire database

Is there any way to approach the above?

whitelist feature breaks security upgrades

in the package selection process, you are validating [1] for

<not blacklisted> and <whitelisted> and <allowed origin> 

this works well, as long as there is no whitelist defined. because the whitelist validator always returns True in case of an empty whitelist [2].

now as i started to define a whitelist, all my security upgrades stop being installed automatically, which is exactly not what i want. even if there would be the policy: "once you start defining a whitelist, you have to maintain all of the upgrades", this would not make sense, as the whitelist ist purely regex based (e.g. lacking origin).

therefore i believe that the vadidator logic from [1] must be instead:

<not blacklisted> and ( <whitelisted> or <allowed origin> )

to make this continue to work in case a whitelist exists.

[1] https://github.com/mvo5/unattended-upgrades/blob/master/unattended-upgrade#L1203
[2] https://github.com/mvo5/unattended-upgrades/blob/master/unattended-upgrade#L609

Not only latest candidate should be checked but every newer than currently installed

I have accidentally spotted that one package is not unattendedly upgraded even though there is a candidate from security repository.

Then I found that unattended-upgrades only (? needs confirmation, haven't checked sources yet) checks the latest candidate origin.

Hence:

# apt-cache policy apport
apport:
  Installed: 2.20.9-0ubuntu7
  Candidate: 2.20.9-0ubuntu7.2
  Version table:
     2.20.9-0ubuntu7.2 500
        500 http://local.mirror/ubuntu bionic-updates/main amd64 Packages
     2.20.9-0ubuntu7.1 500
        500 http://ubuntu-security.local.mirror/ubuntu bionic-security/main amd64 Packages
 *** 2.20.9-0ubuntu7 500
        500 http://local.mirror/ubuntu bionic/main amd64 Packages
        100 /var/lib/dpkg/status

the package is not treated as a candidate to be upgraded

Here is a complete verbose debug log

# unattended-upgrades -d -v --dry-run
Initial blacklisted packages: haproxy linux-aws linux-virtual linux-generic mongodb nginx pgbouncer php.*fpm postgresql rabbitmq redis supervisor
Initial whitelisted packages: 
Starting unattended upgrades script
Allowed origins are: o=Ubuntu,a=bionic-security
Using (^linux-image|^linux-headers|^linux-image-extra|^linux-modules|^linux-modules-extra|^linux-signed-image|^kfreebsd-image|^kfreebsd-headers|^gnumach-image|^.*-modules|^.*-kernel|^linux-backports-modules-.*|^linux-modules-.*|^linux-tools|^linux-cloud-tools) regexp to find kernel packages
Using (^linux-image.*4.15.0-22-generic|^linux-headers.*4.15.0-22-generic|^linux-image-extra.*4.15.0-22-generic|^linux-modules.*4.15.0-22-generic|^linux-modules-extra.*4.15.0-22-generic|^linux-signed-image.*4.15.0-22-generic|^kfreebsd-image.*4.15.0-22-generic|^kfreebsd-headers.*4.15.0-22-generic|^gnumach-image.*4.15.0-22-generic|4.15.0-22-generic.*-modules|4.15.0-22-generic.*-kernel|^linux-backports-modules-.*.*4.15.0-22-generic|^linux-modules-.*.*4.15.0-22-generic|^linux-tools.*4.15.0-22-generic|^linux-cloud-tools.*4.15.0-22-generic) regexp to find running kernel packages
Checking: apport ([<Origin component:'main' archive:'bionic-updates' origin:'Ubuntu' label:'Ubuntu' site:'local.mirror' isTrusted:True>])
Checking: bsdutils ([<Origin component:'main' archive:'bionic-updates' origin:'Ubuntu' label:'Ubuntu' site:'local.mirror' isTrusted:True>])
Checking: ebtables ([<Origin component:'main' archive:'bionic-updates' origin:'Ubuntu' label:'Ubuntu' site:'local.mirror' isTrusted:True>])
Checking: fdisk ([<Origin component:'main' archive:'bionic-updates' origin:'Ubuntu' label:'Ubuntu' site:'local.mirror' isTrusted:True>])
Checking: language-selector-common ([<Origin component:'main' archive:'bionic-updates' origin:'Ubuntu' label:'Ubuntu' site:'local.mirror' isTrusted:True>])
Checking: libapache2-mod-tile ([<Origin component:'main' archive:'bionic' origin:'org-bionic bionic' label:'org-bionic bionic' site:'xxx' isTrusted:True>])
Checking: libblkid1 ([<Origin component:'main' archive:'bionic-updates' origin:'Ubuntu' label:'Ubuntu' site:'local.mirror' isTrusted:True>])
Checking: libfdisk1 ([<Origin component:'main' archive:'bionic-updates' origin:'Ubuntu' label:'Ubuntu' site:'local.mirror' isTrusted:True>])
Checking: libmount1 ([<Origin component:'main' archive:'bionic-updates' origin:'Ubuntu' label:'Ubuntu' site:'local.mirror' isTrusted:True>])
Checking: libncurses5 ([<Origin component:'main' archive:'bionic-updates' origin:'Ubuntu' label:'Ubuntu' site:'local.mirror' isTrusted:True>])
Checking: libncursesw5 ([<Origin component:'main' archive:'bionic-updates' origin:'Ubuntu' label:'Ubuntu' site:'local.mirror' isTrusted:True>])
Checking: libsmartcols1 ([<Origin component:'main' archive:'bionic-updates' origin:'Ubuntu' label:'Ubuntu' site:'local.mirror' isTrusted:True>])
Checking: libtinfo5 ([<Origin component:'main' archive:'bionic-updates' origin:'Ubuntu' label:'Ubuntu' site:'local.mirror' isTrusted:True>])
Checking: libuuid1 ([<Origin component:'main' archive:'bionic-updates' origin:'Ubuntu' label:'Ubuntu' site:'local.mirror' isTrusted:True>])
Checking: mdadm ([<Origin component:'main' archive:'bionic-updates' origin:'Ubuntu' label:'Ubuntu' site:'local.mirror' isTrusted:True>])
Checking: mount ([<Origin component:'main' archive:'bionic-updates' origin:'Ubuntu' label:'Ubuntu' site:'local.mirror' isTrusted:True>])
Checking: ncurses-base ([<Origin component:'main' archive:'bionic-updates' origin:'Ubuntu' label:'Ubuntu' site:'local.mirror' isTrusted:True>])
Checking: ncurses-bin ([<Origin component:'main' archive:'bionic-updates' origin:'Ubuntu' label:'Ubuntu' site:'local.mirror' isTrusted:True>])
Checking: ncurses-term ([<Origin component:'main' archive:'bionic-updates' origin:'Ubuntu' label:'Ubuntu' site:'local.mirror' isTrusted:True>])
Checking: netcat-openbsd ([<Origin component:'main' archive:'bionic-updates' origin:'Ubuntu' label:'Ubuntu' site:'local.mirror' isTrusted:True>])
Checking: netplan.io ([<Origin component:'main' archive:'bionic-updates' origin:'Ubuntu' label:'Ubuntu' site:'local.mirror' isTrusted:True>])
Checking: nplan ([<Origin component:'main' archive:'bionic-updates' origin:'Ubuntu' label:'Ubuntu' site:'local.mirror' isTrusted:True>])
Checking: python3-apport ([<Origin component:'main' archive:'bionic-updates' origin:'Ubuntu' label:'Ubuntu' site:'local.mirror' isTrusted:True>])
Checking: python3-distupgrade ([<Origin component:'main' archive:'bionic-updates' origin:'Ubuntu' label:'Ubuntu' site:'local.mirror' isTrusted:True>])
Checking: python3-problem-report ([<Origin component:'main' archive:'bionic-updates' origin:'Ubuntu' label:'Ubuntu' site:'local.mirror' isTrusted:True>])
Checking: python3-software-properties ([<Origin component:'main' archive:'bionic-updates' origin:'Ubuntu' label:'Ubuntu' site:'local.mirror' isTrusted:True>])
Checking: renderd ([<Origin component:'main' archive:'bionic' origin:'org-bionic bionic' label:'org-bionic bionic' site:'xxx' isTrusted:True>])
Checking: snapd ([<Origin component:'main' archive:'bionic-updates' origin:'Ubuntu' label:'Ubuntu' site:'local.mirror' isTrusted:True>])
Checking: software-properties-common ([<Origin component:'main' archive:'bionic-updates' origin:'Ubuntu' label:'Ubuntu' site:'local.mirror' isTrusted:True>])
Checking: ssh-import-id ([<Origin component:'main' archive:'bionic-updates' origin:'Ubuntu' label:'Ubuntu' site:'local.mirror' isTrusted:True>])
Checking: ubuntu-release-upgrader-core ([<Origin component:'main' archive:'bionic-updates' origin:'Ubuntu' label:'Ubuntu' site:'local.mirror' isTrusted:True>])
Checking: util-linux ([<Origin component:'main' archive:'bionic-updates' origin:'Ubuntu' label:'Ubuntu' site:'local.mirror' isTrusted:True>])
Checking: uuid-runtime ([<Origin component:'main' archive:'bionic-updates' origin:'Ubuntu' label:'Ubuntu' site:'local.mirror' isTrusted:True>])
Checking: org-osm-grey ([<Origin component:'main' archive:'bionic' origin:'org-bionic bionic' label:'org-bionic bionic' site:'xxx' isTrusted:True>])
pkgs that look like they should be upgraded: 
Fetched 0 B in 0s (0 B/s)                                                                                                                                                                                           
fetch.run() result: 0
blacklist: ['haproxy', 'linux-aws', 'linux-virtual', 'linux-generic', 'mongodb', 'nginx', 'pgbouncer', 'php.*fpm', 'postgresql', 'rabbitmq', 'redis', 'supervisor']
whitelist: []
No packages found that can be upgraded unattended and no pending auto-removals

Expected behaviour: either 2.20.9-0ubuntu7.2 or 2.20.9-0ubuntu7.1. I'm not sure whether it should pick the latest available in case if a security update is there or just the security update, but it must be updated regardless.

Blacklisted packages not upgraded but not in pkgs_kept_back

Hi.

I set a few package in blacklist:

Unattended-Upgrade::Package-Blacklist {
        "vim";
        "libc6";
        "libc6-dev";
        "libc6-i686";
        "dovecot";
        "roundcube";
        "postgresql";
        "mysql-server";
};

Some of these currently have upgrades available.

They are hold back as expected.

However, I expected them to appear in the "Packages with upgradable origin but kept back" part of the mail, and they don't.

The only package that appears in the mail is libc-dev-bin.

I can't tell whether this is an issue or I'm just misunderstanding something.

I thought the point of this section of the mail was to inform the user that some packages could be upgraded. This does not seem to be the case. If I don't launch apt-get/aptitude myself, I won't be notified.

I am indeed notified about the libc update (the mail mentions libc-dev-bin) but not about postgres and vim updates, for instance.

(I was using Debian's stable version (0.83.3.2+deb8u1). I upgraded to latest Debian package (0.93.1+nmu1) and the behavior is the same.)

Please add support for reporting available firmware updates and updating firmware

https://fwupd.org/ offers firmware updates to be installed under Linux and those updates contain security fixes fairly often. Unattended-upgrades should at least report available firmware updates and should also be able to install them when it is configured to do so.

My proposal is installing the firmware updates from .deb packages containing firmware snapshots from https://fwupd.org to avoid overloading their servers and also allow blocking firmware updates which cause regressions.

Run tests only against python3?

Hi,

While I was working on a patch and ran the tests I noticed that since de1d61a707a539 tests are run with both python2 and python3. As my intention was to use a python3 feature (subprocess.run()) in the patch, tests were actually failing.

Given that the two executables unattended-upgrade and unattended-upgrade-shutdown already feature a python3 shebang, would it be safe to assume that this is a python3 only project? Equally important: may we introduce code that strictly depends on python3?

If so, I would suggest to modify test/Makefile so as tests are only executed with python3. In fact I verified that tests are actually passing if python2 is removed. Shall I submit a relevant pull request?

Thanks for developing this software,

Configure origins via filenames in sources.list.d

Please consider providing an alternative way to configure allowed/blacklisted/whitelisted origins: by specifying a filename of the origin in sources.list.d.

Ubuntu typically configures additional origins by putting files in sources.list.d. Even figuring out a way to upgrade them automatically with unattended-upgrades is not a trivial task. Doing this is more complicated. There is even a dedicated piece of software built for this purpose..

I believe it would be very straightforward for the end users of unattended-upgrades to just provide a list of filenames in sources.list.d that describe the sources to be automatically upgraded. I guess that the actual implementation might be complicated, but the benefits far outweigh it in my opinion.

Blacklisted packages are included in the "upgradable origin", while they should not

I'm running the following config on bionic:

Unattended-Upgrade::Allowed-Origins {
        "${distro_id}:${distro_codename}-security";
};

Unattended-Upgrade::Package-Blacklist {
        "haproxy";
        "linux-aws";
        "linux-virtual";
        "linux-generic";
        "mongodb";
        "nginx";
        "pgbouncer";
        "php.*fpm";
        "postgresql";
        "rabbitmq";
        "redis";
        "supervisor";
};

So only bionic-security origin should be checked when unattended upgrades are considered.

Few days ago a new postgresql-10 package version was pushed to the bionic-updates yet when I run unattended-upgrades it is misleadingly included in the email:

Unattended upgrade returned: True

Packages that were upgraded:
 
Packages with upgradable origin but kept back:
 postgresql-10 postgresql-client-10 



Unattended-upgrades log:
Initial blacklisted packages: haproxy linux-aws linux-virtual linux-generic mongodb nginx pgbouncer php.*fpm postgresql rabbitmq redis supervisor
Initial whitelisted packages: 
Starting unattended upgrades script
Allowed origins are: o=Ubuntu,a=bionic-security
Using (^linux-image|^linux-headers|^linux-image-extra|^linux-modules|^linux-modules-extra|^linux-signed-image|^kfreebsd-image|^kfreebsd-headers|^gnumach-image|^.*-modules|^.*-kernel|^linux-backports-modules-.*|^linux-modules-.*|^linux-tools|^linux-cloud-tools) regexp to find kernel packages
Using (^linux-image.*4.15.0-22-generic|^linux-headers.*4.15.0-22-generic|^linux-image-extra.*4.15.0-22-generic|^linux-modules.*4.15.0-22-generic|^linux-modules-extra.*4.15.0-22-generic|^linux-signed-image.*4.15.0-22-generic|^kfreebsd-image.*4.15.0-22-generic|^kfreebsd-headers.*4.15.0-22-generic|^gnumach-image.*4.15.0-22-generic|4.15.0-22-generic.*-modules|4.15.0-22-generic.*-kernel|^linux-backports-modules-.*.*4.15.0-22-generic|^linux-modules-.*.*4.15.0-22-generic|^linux-tools.*4.15.0-22-generic|^linux-cloud-tools.*4.15.0-22-generic) regexp to find running kernel packages
Checking: bsdutils ([<Origin component:'main' archive:'bionic-updates' origin:'Ubuntu' label:'Ubuntu' site:'ubuntu.mirror.local' isTrusted:True>])
Checking: ebtables ([<Origin component:'main' archive:'bionic-updates' origin:'Ubuntu' label:'Ubuntu' site:'ubuntu.mirror.local' isTrusted:True>])
Checking: fdisk ([<Origin component:'main' archive:'bionic-updates' origin:'Ubuntu' label:'Ubuntu' site:'ubuntu.mirror.local' isTrusted:True>])
Checking: language-selector-common ([<Origin component:'main' archive:'bionic-updates' origin:'Ubuntu' label:'Ubuntu' site:'ubuntu.mirror.local' isTrusted:True>])
Checking: libblkid1 ([<Origin component:'main' archive:'bionic-updates' origin:'Ubuntu' label:'Ubuntu' site:'ubuntu.mirror.local' isTrusted:True>])
Checking: libfdisk1 ([<Origin component:'main' archive:'bionic-updates' origin:'Ubuntu' label:'Ubuntu' site:'ubuntu.mirror.local' isTrusted:True>])
Checking: libmount1 ([<Origin component:'main' archive:'bionic-updates' origin:'Ubuntu' label:'Ubuntu' site:'ubuntu.mirror.local' isTrusted:True>])
Checking: libncurses5 ([<Origin component:'main' archive:'bionic-updates' origin:'Ubuntu' label:'Ubuntu' site:'ubuntu.mirror.local' isTrusted:True>])
Checking: libncursesw5 ([<Origin component:'main' archive:'bionic-updates' origin:'Ubuntu' label:'Ubuntu' site:'ubuntu.mirror.local' isTrusted:True>])
Checking: libpq5 ([<Origin component:'main' archive:'bionic-updates' origin:'Ubuntu' label:'Ubuntu' site:'ubuntu.mirror.local' isTrusted:True>])
Checking: libsmartcols1 ([<Origin component:'main' archive:'bionic-updates' origin:'Ubuntu' label:'Ubuntu' site:'ubuntu.mirror.local' isTrusted:True>])
Checking: libtinfo5 ([<Origin component:'main' archive:'bionic-updates' origin:'Ubuntu' label:'Ubuntu' site:'ubuntu.mirror.local' isTrusted:True>])
Checking: libuuid1 ([<Origin component:'main' archive:'bionic-updates' origin:'Ubuntu' label:'Ubuntu' site:'ubuntu.mirror.local' isTrusted:True>])
Checking: mdadm ([<Origin component:'main' archive:'bionic-updates' origin:'Ubuntu' label:'Ubuntu' site:'ubuntu.mirror.local' isTrusted:True>])
Checking: mount ([<Origin component:'main' archive:'bionic-updates' origin:'Ubuntu' label:'Ubuntu' site:'ubuntu.mirror.local' isTrusted:True>])
Checking: ncurses-base ([<Origin component:'main' archive:'bionic-updates' origin:'Ubuntu' label:'Ubuntu' site:'ubuntu.mirror.local' isTrusted:True>])
Checking: ncurses-bin ([<Origin component:'main' archive:'bionic-updates' origin:'Ubuntu' label:'Ubuntu' site:'ubuntu.mirror.local' isTrusted:True>])
Checking: ncurses-term ([<Origin component:'main' archive:'bionic-updates' origin:'Ubuntu' label:'Ubuntu' site:'ubuntu.mirror.local' isTrusted:True>])
Checking: netcat-openbsd ([<Origin component:'main' archive:'bionic-updates' origin:'Ubuntu' label:'Ubuntu' site:'ubuntu.mirror.local' isTrusted:True>])
Checking: postgresql-10 ([<Origin component:'main' archive:'bionic-updates' origin:'Ubuntu' label:'Ubuntu' site:'ubuntu.mirror.local' isTrusted:True>])
skipping blacklisted package postgresql-10
Checking: postgresql-client-10 ([<Origin component:'main' archive:'bionic-updates' origin:'Ubuntu' label:'Ubuntu' site:'ubuntu.mirror.local' isTrusted:True>])
skipping blacklisted package postgresql-client-10
Checking: python3-distupgrade ([<Origin component:'main' archive:'bionic-updates' origin:'Ubuntu' label:'Ubuntu' site:'ubuntu.mirror.local' isTrusted:True>])
Checking: python3-software-properties ([<Origin component:'main' archive:'bionic-updates' origin:'Ubuntu' label:'Ubuntu' site:'ubuntu.mirror.local' isTrusted:True>])
Checking: snapd ([<Origin component:'main' archive:'bionic-updates' origin:'Ubuntu' label:'Ubuntu' site:'ubuntu.mirror.local' isTrusted:True>])
Checking: software-properties-common ([<Origin component:'main' archive:'bionic-updates' origin:'Ubuntu' label:'Ubuntu' site:'ubuntu.mirror.local' isTrusted:True>])
Checking: ssh-import-id ([<Origin component:'main' archive:'bionic-updates' origin:'Ubuntu' label:'Ubuntu' site:'ubuntu.mirror.local' isTrusted:True>])
Checking: ubuntu-release-upgrader-core ([<Origin component:'main' archive:'bionic-updates' origin:'Ubuntu' label:'Ubuntu' site:'ubuntu.mirror.local' isTrusted:True>])
Checking: util-linux ([<Origin component:'main' archive:'bionic-updates' origin:'Ubuntu' label:'Ubuntu' site:'ubuntu.mirror.local' isTrusted:True>])
Checking: uuid-runtime ([<Origin component:'main' archive:'bionic-updates' origin:'Ubuntu' label:'Ubuntu' site:'ubuntu.mirror.local' isTrusted:True>])
pkgs that look like they should be upgraded: 
fetch.run() result: 0
blacklist: ['haproxy', 'linux-aws', 'linux-virtual', 'linux-generic', 'mongodb', 'nginx', 'pgbouncer', 'php.*fpm', 'postgresql', 'rabbitmq', 'redis', 'supervisor']
whitelist: []
Packages that will be upgraded: 
InstCount=0 DelCount=0 BrokenCount=0
Extracting content from /var/log/unattended-upgrades/unattended-upgrades-dpkg.log since 2018-06-05 21:57:58

I think in this case "Packages with upgradable origin but kept back" section must be empty and no email should be generated.

I think it happens because in the following condition

        if (pkg.is_upgradable and
                not is_pkgname_in_blacklist(pkg.name, blacklisted_pkgs,
                                            pkgs_kept_back) and
                is_pkgname_in_whitelist(pkg.name, whitelisted_pkgs) and
                is_allowed_origin(pkg.candidate, allowed_origins)):

the is_pkgname_in_blacklist comes first. And I think that if the order is changed with the is_allowed_origin being first the problem would be resolved.

Udev package does not get reconfigured during shutdown install

There might be other packages with this same problem, but I have udev as a reproducible problem package.

Here is the unattended-upgrades-dpkg.log:

Instellen van udev (215-17+deb8u2) ...^M
Failed to restart udev.service: final.target is queued, ignoring restart request for unit systemd-udevd.service^M
invoke-rc.d: initscript udev, action "restart" failed.^M
dpkg: fout bij verwerken van pakket udev (--configure):^M
subproces post-installation script geïnstalleerd gaf een foutwaarde 1 terug^M
Bezig met afhandelen van triggers voor libc-bin (2.19-18+deb8u1) ...^M
Fouten gevonden tijdens verwerken van:^M
udev^M
Fout bij verbinden: Kon niet verbinden: Verbinding is geweigerd
Error in function:
Log ended: 2015-09-28 16:03:46

Sorry for the Dutch translation. Basically, the post-install script wants to restart udev using systemctl, but systemctl fails to do so because it's shutting down anyway (I presume that's the logic). This leaves a lot of the other packages unconfigured during a Debian 8.1 to 8.2 upgrade.

Any hints as to how I might be able to fix this?

Feature request : force blacklisted packages upgrade in command line

I use unattended-upgrades on my servers for security updates and it is just great.
However, on production servers, I do not want some services (let say apache, for instance) to restart randomly because of a security patch.
To avoid that, I have listed such services in the package blacklist and I schedule the upgrade to minimize or avoid any service interruption.
To perform the upgrade, I would like to rely on unattended-upgrades by lauching it on command-line or in a script. However, since my package is blacklisted, unattended-upgrades will not upgrade it. So I have to rely on other tools to list the package to upgrade and perform the upgrade without unattended-upgrades.
What I would like is some option, when launching unattended-upgrades to tell it to upgrade even blacklisted packages. May be something like that:

#> unattended-upgrades --ignore-blacklist

That way, I could rely on a single tool to apply my security patch, either automatically or during a scheduled operation.

Thanks,

raspbian configuration file fails and is not used anyways

Hi,

I am trying to work on bug LP#1375919 (Raspbian: unattended-upgrades does not work in default installation) and I noticed that the config file shipped here does not match the one shipped by raspbian.

Therefore, this creates problems when upgrading raspbian. Even if the files would match, neither file properly allows unattended-upgrades to actually work correctly. The LP bug report mentions the following line work:

"origin=Raspbian,codename=jessie,component=main";

I can confirm that works. However, it also says that removing the line should allow upgrades, but I wasn't able to confirm that.

It would be nice to have better consistency here, so I figured I would file an issue here as well to bring your attention to this more obscure platform.

Receiving e-mail reports when using Unattended-Upgrade::MailOnlyOnError "true";

This issue has been encountered in different unattended-upgrades versions and Ubuntu LTS distributions:

Ubuntu 12.04.5 LTS
unattended-upgrades 0.76ubuntu1.1

Ubuntu 14.04.3 LTS
unattended-upgrades 0.82.1ubuntu2.3

I have a bunch of packages in a blacklist, the Unattended-Upgrade::Package-Blacklist{} and UU is configured to apply security updates only. UU is also configured to send e-mail reports only on error. However, regardless of whether any updates were applied or not, or whether there was an error or not,I am e-mailed an "empty" report every day. The report states that no packages were upgraded, which ones are in the blacklist and that's it. It's basically "empty".

It is a pretty strange behavior as one would expect Unattended-Upgrade::MailOnlyOnError "true"; to cause UU to send e-mail reports ONLY on error. Which is clearly not the case.

please tag 1.0

@rbalint released unattended-upgrades 1.0 to Debian, but it isn't tagged here. I think the right place for the tag is commit fd761dc or (equivalently) merge commit c02ea0a (#100).

Since this is a "native" Debian package, ideally whoever does the upload to Debian would also push the tag here.

Feature Request: mail log levels

Hi, thanks for this great software!

Is there a way to make the output less verbose when sending notification emails, maybe by passing arguments to the install command? I couldn't find anything about that in the README. (Also, for the command-line, there seems to be only completely quiet (with the occasional systemd Shutdown[sic] scheduled notice if automatic reboot is enabled) and --verbose, with nothing in between.)

As a quick hack, it would be great to only receive the Packages that were upgraded: xor final Unattended-upgrades log: section.

Some other things that would be nice to filter:

  • In every mail, I get literally hundreds of lines containing (Reading database ... <n>%
  • It would be nice to have an option to completely suppress (or only log to syslog) additional package output, or only display error output.
  • Preparing to unpack […], Unpacking […] and Setting up […] pretty much contain redundant information (except maybe unpacking, which also lists the previous package version). Would be nice to reduce the output to one of the three.

Please start unattended-upgrades.service even when apt config is broken

The fix for https://bugs.launchpad.net/ubuntu/+source/unattended-upgrades/+bug/1737717 makes u-u-us exit with error when apt config is broken but u-u-s should rather start with a default config and stop running u-u if it finds any.
This would cover the case when the system boots up with a broken apt config thus u-u-s fails to start but the config is fixed in the meantime and when shutting down the system u-u does not get stopped bu u-u-s, just by systemd's shutdown logic.

Upgrade needs new packages to be installed

That's unclear after reading the docs if u-u will silently install new packages if they become an update's new dependency or the u-u will stop right at the moment a new package requirement is met.

If former, should it be a configurable behavior then?

For example:
My own environment suffers of lack of driver support (NVidia GF GTX 1050M). Either nouveau or proprietary newest driver set available ATM lead the system to become not operatable at all if installed. Neither helps bumblebee. So I have to stick to i915 device set thanks I'm don't need 3D at all.

I've just noticed such a thing:

Reading package lists... Done
Building dependency tree       
Reading state information... Done
Calculating upgrade... Done
The following NEW packages will be installed:
  libxnvctrl0

I've looked through the information on this new package and got it's NVidia related. So, to keep my system safe from any NVidia support at all I need to find out how to exclude this package from the to-be-installed list. That led to a package I don't consider of any use to me. So I've just removed the reverse-dependency to that libxnvctrl0

But if that upgrade were unattended. Would the new dependency then be installed silently? What if then a couple of updates later a new dependency to nvidia kernel/Xorg driver appears? Will it make my system a boot-to-a-hang again?

upgrade jessie point releases by default

It seems to me unattended-upgrades should, by default, upgrade not just security packages but also stable-updates.

This was reported in the Debian BTS as #787945. There, you said:

Fix is uploaded.

but I still see only -security in the default config file here. This seems incorrect - or is this a policy decision?

Not only latest candidate should be checked but every newer than currently installed, v0.90

I'm not sure this is the right place to post, but it's still better to post it somewhere :-)

@rbalint, I know you told

i'm backporting it to bionic and xenial is not affected. When bionic's u-u gets backported to xenial this patch will be carried, too.

but today I discovered that the latest available xenial package 0.90ubuntu0.9 is actually affected by the same problem.

Details:

# unattended-upgrade -d -v
Initial blacklisted packages: haproxy linux-aws linux-virtual linux-generic mongodb nginx pgbouncer php.*fpm postgresql rabbitmq redis supervisor
Initial whitelisted packages: 
Starting unattended upgrades script
Allowed origins are: ['o=Ubuntu,a=xenial-security']
adjusting candidate version: 'apparmor=2.10.95-0ubuntu2.6'
adjusting candidate version: 'apt=1.2.15ubuntu0.2'
adjusting candidate version: 'apt-transport-https=1.2.15ubuntu0.2'
adjusting candidate version: 'apt-utils=1.2.15ubuntu0.2'
adjusting candidate version: 'isc-dhcp-client=4.3.3-5ubuntu12.9'
adjusting candidate version: 'isc-dhcp-common=4.3.3-5ubuntu12.9'
adjusting candidate version: 'libapparmor-perl=2.10.95-0ubuntu2.6'
adjusting candidate version: 'libapparmor1=2.10.95-0ubuntu2.6'
adjusting candidate version: 'libapt-inst2.0=1.2.15ubuntu0.2'
adjusting candidate version: 'libapt-pkg5.0=1.2.15ubuntu0.2'
adjusting candidate version: 'libldap-2.4-2=2.4.42+dfsg-2ubuntu3.2'
adjusting candidate version: 'libpam-systemd=229-4ubuntu21.1'
adjusting candidate version: 'libpq5=9.5.12-0ubuntu0.16.04'
adjusting candidate version: 'libpython2.7-minimal=2.7.12-1ubuntu0~16.04.2'
adjusting candidate version: 'libpython2.7-stdlib=2.7.12-1ubuntu0~16.04.2'
adjusting candidate version: 'libsystemd0=229-4ubuntu21.1'
adjusting candidate version: 'libudev1=229-4ubuntu21.1'
adjusting candidate version: 'lxd=2.0.2-0ubuntu1~16.04.1'
adjusting candidate version: 'lxd-client=2.0.2-0ubuntu1~16.04.1'
adjusting candidate version: 'postgresql-9.5=9.5.12-0ubuntu0.16.04'
adjusting candidate version: 'postgresql-client-9.5=9.5.12-0ubuntu0.16.04'
adjusting candidate version: 'postgresql-contrib-9.5=9.5.12-0ubuntu0.16.04'
adjusting candidate version: 'python2.7=2.7.12-1ubuntu0~16.04.2'
adjusting candidate version: 'python2.7-minimal=2.7.12-1ubuntu0~16.04.2'
adjusting candidate version: 'python3-cryptography=1.2.3-1ubuntu0.1'
adjusting candidate version: 'python3-update-manager=1:16.04.12'
adjusting candidate version: 'systemd=229-4ubuntu21.1'
adjusting candidate version: 'systemd-sysv=229-4ubuntu21.1'
adjusting candidate version: 'ubuntu-core-launcher=1.0.27.1'
adjusting candidate version: 'udev=229-4ubuntu21.1'
adjusting candidate version: 'unattended-upgrades=0.90ubuntu0.1'
adjusting candidate version: 'update-manager-core=1:16.04.12'
adjusting candidate version: 'update-notifier-common=3.168.7'
Checking: base-files ([<Origin component:'main' archive:'xenial-updates' origin:'Ubuntu' label:'Ubuntu' site:'ubuntu.mirror.wialus.co.nz' isTrusted:True>])
Checking: bsdutils ([<Origin component:'main' archive:'xenial-updates' origin:'Ubuntu' label:'Ubuntu' site:'ubuntu.mirror.wialus.co.nz' isTrusted:True>])
Checking: certbot ([<Origin component:'main' archive:'xenial' origin:'LP-PPA-certbot-certbot' label:'Certbot PPA' site:'ppa.launchpad.net' isTrusted:True>])
Checking: cloud-guest-utils ([<Origin component:'main' archive:'xenial-updates' origin:'Ubuntu' label:'Ubuntu' site:'ubuntu.mirror.wialus.co.nz' isTrusted:True>])
Checking: cloud-init ([<Origin component:'main' archive:'xenial-updates' origin:'Ubuntu' label:'Ubuntu' site:'ubuntu.mirror.wialus.co.nz' isTrusted:True>])
Checking: cloud-initramfs-copymods ([<Origin component:'main' archive:'xenial-updates' origin:'Ubuntu' label:'Ubuntu' site:'ubuntu.mirror.wialus.co.nz' isTrusted:True>])
Checking: cloud-initramfs-dyn-netconf ([<Origin component:'main' archive:'xenial-updates' origin:'Ubuntu' label:'Ubuntu' site:'ubuntu.mirror.wialus.co.nz' isTrusted:True>])
Checking: console-setup ([<Origin component:'main' archive:'xenial-updates' origin:'Ubuntu' label:'Ubuntu' site:'ubuntu.mirror.wialus.co.nz' isTrusted:True>])
Checking: console-setup-linux ([<Origin component:'main' archive:'xenial-updates' origin:'Ubuntu' label:'Ubuntu' site:'ubuntu.mirror.wialus.co.nz' isTrusted:True>])
Checking: dpkg ([<Origin component:'main' archive:'xenial-updates' origin:'Ubuntu' label:'Ubuntu' site:'ubuntu.mirror.wialus.co.nz' isTrusted:True>])
Checking: friendly-recovery ([<Origin component:'main' archive:'xenial-updates' origin:'Ubuntu' label:'Ubuntu' site:'ubuntu.mirror.wialus.co.nz' isTrusted:True>])
Checking: hdparm ([<Origin component:'main' archive:'xenial-updates' origin:'Ubuntu' label:'Ubuntu' site:'ubuntu.mirror.wialus.co.nz' isTrusted:True>])
Checking: ifupdown ([<Origin component:'main' archive:'xenial-updates' origin:'Ubuntu' label:'Ubuntu' site:'ubuntu.mirror.wialus.co.nz' isTrusted:True>])
Checking: initramfs-tools ([<Origin component:'main' archive:'xenial-updates' origin:'Ubuntu' label:'Ubuntu' site:'ubuntu.mirror.wialus.co.nz' isTrusted:True>])
Checking: initramfs-tools-bin ([<Origin component:'main' archive:'xenial-updates' origin:'Ubuntu' label:'Ubuntu' site:'ubuntu.mirror.wialus.co.nz' isTrusted:True>])
Checking: initramfs-tools-core ([<Origin component:'main' archive:'xenial-updates' origin:'Ubuntu' label:'Ubuntu' site:'ubuntu.mirror.wialus.co.nz' isTrusted:True>])
Checking: iproute2 ([<Origin component:'main' archive:'xenial-updates' origin:'Ubuntu' label:'Ubuntu' site:'ubuntu.mirror.wialus.co.nz' isTrusted:True>])
Checking: keyboard-configuration ([<Origin component:'main' archive:'xenial-updates' origin:'Ubuntu' label:'Ubuntu' site:'ubuntu.mirror.wialus.co.nz' isTrusted:True>])
Checking: libaudit-common ([<Origin component:'main' archive:'xenial-updates' origin:'Ubuntu' label:'Ubuntu' site:'ubuntu.mirror.wialus.co.nz' isTrusted:True>])
Checking: libaudit1 ([<Origin component:'main' archive:'xenial-updates' origin:'Ubuntu' label:'Ubuntu' site:'ubuntu.mirror.wialus.co.nz' isTrusted:True>])
Checking: libblkid1 ([<Origin component:'main' archive:'xenial-updates' origin:'Ubuntu' label:'Ubuntu' site:'ubuntu.mirror.wialus.co.nz' isTrusted:True>])
Checking: libdrm2 ([<Origin component:'main' archive:'xenial-updates' origin:'Ubuntu' label:'Ubuntu' site:'ubuntu.mirror.wialus.co.nz' isTrusted:True>])
Checking: libfdisk1 ([<Origin component:'main' archive:'xenial-updates' origin:'Ubuntu' label:'Ubuntu' site:'ubuntu.mirror.wialus.co.nz' isTrusted:True>])
Checking: libmount1 ([<Origin component:'main' archive:'xenial-updates' origin:'Ubuntu' label:'Ubuntu' site:'ubuntu.mirror.wialus.co.nz' isTrusted:True>])
Checking: libpam-modules ([<Origin component:'main' archive:'xenial-updates' origin:'Ubuntu' label:'Ubuntu' site:'ubuntu.mirror.wialus.co.nz' isTrusted:True>])
Checking: libpam-modules-bin ([<Origin component:'main' archive:'xenial-updates' origin:'Ubuntu' label:'Ubuntu' site:'ubuntu.mirror.wialus.co.nz' isTrusted:True>])
Checking: libpam-runtime ([<Origin component:'main' archive:'xenial-updates' origin:'Ubuntu' label:'Ubuntu' site:'ubuntu.mirror.wialus.co.nz' isTrusted:True>])
Checking: libpam0g ([<Origin component:'main' archive:'xenial-updates' origin:'Ubuntu' label:'Ubuntu' site:'ubuntu.mirror.wialus.co.nz' isTrusted:True>])
Checking: libparted2 ([<Origin component:'main' archive:'xenial-updates' origin:'Ubuntu' label:'Ubuntu' site:'ubuntu.mirror.wialus.co.nz' isTrusted:True>])
Checking: libpci3 ([<Origin component:'main' archive:'xenial-updates' origin:'Ubuntu' label:'Ubuntu' site:'ubuntu.mirror.wialus.co.nz' isTrusted:True>])
Checking: libplymouth4 ([<Origin component:'main' archive:'xenial-updates' origin:'Ubuntu' label:'Ubuntu' site:'ubuntu.mirror.wialus.co.nz' isTrusted:True>])
Checking: libpython-stdlib ([<Origin component:'main' archive:'xenial-updates' origin:'Ubuntu' label:'Ubuntu' site:'ubuntu.mirror.wialus.co.nz' isTrusted:True>])
Checking: libseccomp2 ([<Origin component:'main' archive:'xenial-updates' origin:'Ubuntu' label:'Ubuntu' site:'ubuntu.mirror.wialus.co.nz' isTrusted:True>])
Checking: libsmartcols1 ([<Origin component:'main' archive:'xenial-updates' origin:'Ubuntu' label:'Ubuntu' site:'ubuntu.mirror.wialus.co.nz' isTrusted:True>])
Checking: libuuid1 ([<Origin component:'main' archive:'xenial-updates' origin:'Ubuntu' label:'Ubuntu' site:'ubuntu.mirror.wialus.co.nz' isTrusted:True>])
Checking: lshw ([<Origin component:'main' archive:'xenial-updates' origin:'Ubuntu' label:'Ubuntu' site:'ubuntu.mirror.wialus.co.nz' isTrusted:True>])
Checking: mount ([<Origin component:'main' archive:'xenial-updates' origin:'Ubuntu' label:'Ubuntu' site:'ubuntu.mirror.wialus.co.nz' isTrusted:True>])
Checking: overlayroot ([<Origin component:'main' archive:'xenial-updates' origin:'Ubuntu' label:'Ubuntu' site:'ubuntu.mirror.wialus.co.nz' isTrusted:True>])
Checking: parted ([<Origin component:'main' archive:'xenial-updates' origin:'Ubuntu' label:'Ubuntu' site:'ubuntu.mirror.wialus.co.nz' isTrusted:True>])
Checking: pciutils ([<Origin component:'main' archive:'xenial-updates' origin:'Ubuntu' label:'Ubuntu' site:'ubuntu.mirror.wialus.co.nz' isTrusted:True>])
Checking: plymouth ([<Origin component:'main' archive:'xenial-updates' origin:'Ubuntu' label:'Ubuntu' site:'ubuntu.mirror.wialus.co.nz' isTrusted:True>])
Checking: plymouth-theme-ubuntu-text ([<Origin component:'main' archive:'xenial-updates' origin:'Ubuntu' label:'Ubuntu' site:'ubuntu.mirror.wialus.co.nz' isTrusted:True>])
Checking: postfix ([<Origin component:'main' archive:'xenial-updates' origin:'Ubuntu' label:'Ubuntu' site:'ubuntu.mirror.wialus.co.nz' isTrusted:True>])
Checking: postgresql-9.5 ([<Origin component:'main' archive:'xenial-security' origin:'Ubuntu' label:'Ubuntu' site:'ubuntu-security.mirror.wialus.co.nz' isTrusted:True>])
skipping blacklisted package 'postgresql-9.5'
Checking: postgresql-client-9.5 ([<Origin component:'main' archive:'xenial-security' origin:'Ubuntu' label:'Ubuntu' site:'ubuntu-security.mirror.wialus.co.nz' isTrusted:True>])
skipping blacklisted package 'postgresql-client-9.5'
Checking: postgresql-contrib-9.5 ([<Origin component:'main' archive:'xenial-security' origin:'Ubuntu' label:'Ubuntu' site:'ubuntu-security.mirror.wialus.co.nz' isTrusted:True>])
skipping blacklisted package 'postgresql-contrib-9.5'
Checking: python ([<Origin component:'main' archive:'xenial-updates' origin:'Ubuntu' label:'Ubuntu' site:'ubuntu.mirror.wialus.co.nz' isTrusted:True>])
Checking: python-acme ([<Origin component:'main' archive:'xenial' origin:'LP-PPA-certbot-certbot' label:'Certbot PPA' site:'ppa.launchpad.net' isTrusted:True>])
Checking: python-apt ([<Origin component:'main' archive:'xenial-updates' origin:'Ubuntu' label:'Ubuntu' site:'ubuntu.mirror.wialus.co.nz' isTrusted:True>])
Checking: python-apt-common ([<Origin component:'main' archive:'xenial-updates' origin:'Ubuntu' label:'Ubuntu' site:'ubuntu.mirror.wialus.co.nz' isTrusted:True>])
Checking: python-configobj ([<Origin component:'main' archive:'xenial' origin:'LP-PPA-certbot-certbot' label:'Certbot PPA' site:'ppa.launchpad.net' isTrusted:True>])
Checking: python-minimal ([<Origin component:'main' archive:'xenial-updates' origin:'Ubuntu' label:'Ubuntu' site:'ubuntu.mirror.wialus.co.nz' isTrusted:True>])
Checking: python-parsedatetime ([<Origin component:'main' archive:'xenial' origin:'LP-PPA-certbot-certbot' label:'Certbot PPA' site:'ppa.launchpad.net' isTrusted:True>])
Checking: python-zope.component ([<Origin component:'main' archive:'xenial' origin:'LP-PPA-certbot-certbot' label:'Certbot PPA' site:'ppa.launchpad.net' isTrusted:True>])
Checking: python-zope.hookable ([<Origin component:'main' archive:'xenial' origin:'LP-PPA-certbot-certbot' label:'Certbot PPA' site:'ppa.launchpad.net' isTrusted:True>])
Checking: python-zope.interface ([<Origin component:'main' archive:'xenial' origin:'LP-PPA-certbot-certbot' label:'Certbot PPA' site:'ppa.launchpad.net' isTrusted:True>])
Checking: python3-apt ([<Origin component:'main' archive:'xenial-updates' origin:'Ubuntu' label:'Ubuntu' site:'ubuntu.mirror.wialus.co.nz' isTrusted:True>])
Checking: python3-cffi-backend ([<Origin component:'main' archive:'xenial' origin:'LP-PPA-certbot-certbot' label:'Certbot PPA' site:'ppa.launchpad.net' isTrusted:True>])
Checking: python3-chardet ([<Origin component:'main' archive:'xenial' origin:'LP-PPA-certbot-certbot' label:'Certbot PPA' site:'ppa.launchpad.net' isTrusted:True>])
Checking: python3-configobj ([<Origin component:'main' archive:'xenial' origin:'LP-PPA-certbot-certbot' label:'Certbot PPA' site:'ppa.launchpad.net' isTrusted:True>])
Checking: python3-idna ([<Origin component:'main' archive:'xenial' origin:'LP-PPA-certbot-certbot' label:'Certbot PPA' site:'ppa.launchpad.net' isTrusted:True>])
Checking: python3-pkg-resources ([<Origin component:'main' archive:'xenial' origin:'LP-PPA-certbot-certbot' label:'Certbot PPA' site:'ppa.launchpad.net' isTrusted:True>])
Checking: python3-pyasn1 ([<Origin component:'main' archive:'xenial' origin:'LP-PPA-certbot-certbot' label:'Certbot PPA' site:'ppa.launchpad.net' isTrusted:True>])
Checking: python3-requests ([<Origin component:'main' archive:'xenial' origin:'LP-PPA-certbot-certbot' label:'Certbot PPA' site:'ppa.launchpad.net' isTrusted:True>])
Checking: python3-six ([<Origin component:'main' archive:'xenial' origin:'LP-PPA-certbot-certbot' label:'Certbot PPA' site:'ppa.launchpad.net' isTrusted:True>])
Checking: python3-urllib3 ([<Origin component:'main' archive:'xenial' origin:'LP-PPA-certbot-certbot' label:'Certbot PPA' site:'ppa.launchpad.net' isTrusted:True>])
Checking: resolvconf ([<Origin component:'main' archive:'xenial-updates' origin:'Ubuntu' label:'Ubuntu' site:'ubuntu.mirror.wialus.co.nz' isTrusted:True>])
Checking: snapd ([<Origin component:'main' archive:'xenial-updates' origin:'Ubuntu' label:'Ubuntu' site:'ubuntu.mirror.wialus.co.nz' isTrusted:True>])
Checking: sosreport ([<Origin component:'main' archive:'xenial-updates' origin:'Ubuntu' label:'Ubuntu' site:'ubuntu.mirror.wialus.co.nz' isTrusted:True>])
Checking: squashfs-tools ([<Origin component:'main' archive:'xenial-updates' origin:'Ubuntu' label:'Ubuntu' site:'ubuntu.mirror.wialus.co.nz' isTrusted:True>])
Checking: sysstat ([<Origin component:'main' archive:'xenial-updates' origin:'Ubuntu' label:'Ubuntu' site:'ubuntu.mirror.wialus.co.nz' isTrusted:True>])
Checking: util-linux ([<Origin component:'main' archive:'xenial-updates' origin:'Ubuntu' label:'Ubuntu' site:'ubuntu.mirror.wialus.co.nz' isTrusted:True>])
Checking: uuid-runtime ([<Origin component:'main' archive:'xenial-updates' origin:'Ubuntu' label:'Ubuntu' site:'ubuntu.mirror.wialus.co.nz' isTrusted:True>])
Checking: vlan ([<Origin component:'main' archive:'xenial-updates' origin:'Ubuntu' label:'Ubuntu' site:'ubuntu.mirror.wialus.co.nz' isTrusted:True>])
Checking: xdg-user-dirs ([<Origin component:'main' archive:'xenial-updates' origin:'Ubuntu' label:'Ubuntu' site:'ubuntu.mirror.wialus.co.nz' isTrusted:True>])
pkgs that look like they should be upgraded: 
Fetched 0 B in 0s (0 B/s)                                                                                                                                                                                           
fetch.run() result: 0
blacklist: ['haproxy', 'linux-aws', 'linux-virtual', 'linux-generic', 'mongodb', 'nginx', 'pgbouncer', 'php.*fpm', 'postgresql', 'rabbitmq', 'redis', 'supervisor']
whitelist: []
adjusting candidate version: 'apparmor=2.10.95-0ubuntu2.6'
adjusting candidate version: 'apt=1.2.15ubuntu0.2'
adjusting candidate version: 'apt-transport-https=1.2.15ubuntu0.2'
adjusting candidate version: 'apt-utils=1.2.15ubuntu0.2'
adjusting candidate version: 'isc-dhcp-client=4.3.3-5ubuntu12.9'
adjusting candidate version: 'isc-dhcp-common=4.3.3-5ubuntu12.9'
adjusting candidate version: 'libapparmor-perl=2.10.95-0ubuntu2.6'
adjusting candidate version: 'libapparmor1=2.10.95-0ubuntu2.6'
adjusting candidate version: 'libapt-inst2.0=1.2.15ubuntu0.2'
adjusting candidate version: 'libapt-pkg5.0=1.2.15ubuntu0.2'
adjusting candidate version: 'libldap-2.4-2=2.4.42+dfsg-2ubuntu3.2'
adjusting candidate version: 'libpam-systemd=229-4ubuntu21.1'
adjusting candidate version: 'libpq5=9.5.12-0ubuntu0.16.04'
adjusting candidate version: 'libpython2.7-minimal=2.7.12-1ubuntu0~16.04.2'
adjusting candidate version: 'libpython2.7-stdlib=2.7.12-1ubuntu0~16.04.2'
adjusting candidate version: 'libsystemd0=229-4ubuntu21.1'
adjusting candidate version: 'libudev1=229-4ubuntu21.1'
adjusting candidate version: 'lxd=2.0.2-0ubuntu1~16.04.1'
adjusting candidate version: 'lxd-client=2.0.2-0ubuntu1~16.04.1'
adjusting candidate version: 'postgresql-9.5=9.5.12-0ubuntu0.16.04'
adjusting candidate version: 'postgresql-client-9.5=9.5.12-0ubuntu0.16.04'
adjusting candidate version: 'postgresql-contrib-9.5=9.5.12-0ubuntu0.16.04'
adjusting candidate version: 'python2.7=2.7.12-1ubuntu0~16.04.2'
adjusting candidate version: 'python2.7-minimal=2.7.12-1ubuntu0~16.04.2'
adjusting candidate version: 'python3-cryptography=1.2.3-1ubuntu0.1'
adjusting candidate version: 'python3-update-manager=1:16.04.12'
adjusting candidate version: 'systemd=229-4ubuntu21.1'
adjusting candidate version: 'systemd-sysv=229-4ubuntu21.1'
adjusting candidate version: 'ubuntu-core-launcher=1.0.27.1'
adjusting candidate version: 'udev=229-4ubuntu21.1'
adjusting candidate version: 'unattended-upgrades=0.90ubuntu0.1'
adjusting candidate version: 'update-manager-core=1:16.04.12'
adjusting candidate version: 'update-notifier-common=3.168.7'
No packages found that can be upgraded unattended and no pending auto-removals
# apt-cache policy postgresql-9.5
postgresql-9.5:
  Installed: 9.5.11-0ubuntu0.16.04
  Candidate: 9.5.13-0ubuntu0.16.04
  Version table:
     9.5.13-0ubuntu0.16.04 500
        500 http://ubuntu.mirror.wialus.co.nz/ubuntu xenial-updates/main amd64 Packages
     9.5.12-0ubuntu0.16.04 500
        500 http://ubuntu-security.mirror.wialus.co.nz/ubuntu xenial-security/main amd64 Packages
 *** 9.5.11-0ubuntu0.16.04 100
        100 /var/lib/dpkg/status
     9.5.2-1 500
        500 http://ubuntu.mirror.wialus.co.nz/ubuntu xenial/main amd64 Packages

I'm not sure whether it's installation bug or reporting bug - but when unattended-upgrade was run without arguments it exited with status code 0, and stderr & stdout completely empty.

While I would expect either a report that a package was blacklisted, or a package actually installed.

Please support Offline System Updates

Unattended-upgrades could prepare packages to be installed using systemd's offline-updates mechanism after reboot as an alternative to installing updates during shutdown.
https://www.freedesktop.org/wiki/Software/systemd/SystemUpdates/

The basic idea is collecting the packages during shutdown that can be installed as offline-updates, preparing them to be installed on reboot, then installing them with u-u in minimal steps when the system is booted into offline-updates mode.
U-u could also be configured to always reboot after packages are installed in offline-updates mode to ensure the the reboot takes place even when packages miss asking for reboot.

raspbian has no `reboot-required` file

  • Unattended-Upgrade::Automatic-Reboot - boolean (default:False)

Automatically reboot WITHOUT CONFIRMATION if the file /var/run/reboot-required is found after the upgrade.

Unfortunately, Raspbian (the Raspberry Pi default OS) does not generate the reboot-required file. Raspbian aliases /var/run to /run, and it's not created in either place.

Is there any other way to test for the necessity of a reboot?

Don't send mails when there was nothing to do

Since updating a few hosts to debian buster I'm getting daily unattended-upgrades mails from those hosts even when there was nothing to do:

Subject: unattended-upgrades result for [...]: SUCCESS

Unattended upgrade result: No packages found that can be upgraded 
 unattended and no pending auto-removals 

Unattended-upgrades log:
Checking if system is running on battery is skipped. Please install powermgmt-base package to check power status and skip installing updates when the system is running on battery.
Checking if connection is metered is skipped. Please install python3-gi package to detect metered connections and skip downloading updates.
Initial blacklist : 
Initial whitelist: 
Starting unattended upgrades script
Allowed origins are: [...]
No packages found that can be upgraded unattended and no pending auto-removals

I'm not looking forward to getting 150 of those each day. I think those mails should not be sent in a default configuration, so this is imho a separate issue from #104.

It would be appreciated if a fix would make it to buster.

(I guess c9c9dfe might be the one that broke it.)

TypeError

Mit
Ubuntu 14.04.3 LTS
und
lrwxrwxrwx 1 root root 9 Mär 23 2014 python3 -> python3.4
bekommen wir das folgende error-mail:

/etc/cron.daily/apt:
Exception: unsupported operand type(s) for %: 'bytes' and 'tuple'
Traceback (most recent call last):
File "/usr/bin/unattended-upgrade", line 1435, in
main(options)
File "/usr/bin/unattended-upgrade", line 1382, in main
pkgs, pkg_install_success, pkgs_kept_back, mem_log, log_content)
File "/usr/bin/unattended-upgrade", line 815, in send_summary_mail
host(), res)
TypeError: unsupported operand type(s) for %: 'bytes' and 'tuple'

Dpkg Lock at boot-up preventing installation of other packages while u-u is running

We've noticed that unattended-upgrades will launch during the boot-up sequence, which locks dpkg. This prevents other applications from installing, which is not ideal. The logical fix would be an option to delay unattended-upgrades from making any changes for the first X minutes after bootup. Curious if others have run into this and the optimal work around...

  1. I don't see a "delay at startup" feature in the docs. Glad to implement this if it doesn't exist.
  2. Alternatively, the right set of upstart/systemd options might delay the start of the service itself.

Just curious if others have run into this and how they handle it.
Thanks!

Conflicts should mark the run as unsuccessful

A few days ago initramfs-tools packages was upgraded with a security release.

The new version brings the following restriction: Breaks netplan.io (<< 0.36.2)

It is currently netplan.io version 0.36.1 installed on the system.

And it's not in the initramfs-tools dependencies.

The log:

2019-01-08 20:19:23,221 INFO Initial whitelisted packages:
2019-01-08 20:19:23,222 INFO Starting unattended upgrades script
2019-01-08 20:19:23,222 INFO Allowed origins are: o=Ubuntu,a=bionic-security
2019-01-08 20:19:53,530 WARNING package initramfs-tools-bin upgradable but fails to be marked for upgrade (E:Error, pkgProblemResolver::Resolve generated breaks, this may be caused by held packages.)
2019-01-08 20:19:54,034 WARNING package initramfs-tools-core upgradable but fails to be marked for upgrade (E:Error, pkgProblemResolver::Resolve generated breaks, this may be caused by held packages.)

And unattended-upgrades configured with Unattended-Upgrade::MailOnlyOnError "true"; yet I did not receive an email (while I do when a genuine error happens).

I think this warning should be promoted to errors and reported correspondingly.

shutdown instead of reboot since jessie

This is a forward of BTS #812070. It seems that unattended-upgrades has started to shutdown machines instead of rebooting them during automated security upgrades requiring a reboot.

I have not tried reproducing the issue myself, but I figured it was important it is documented here.

allowed_origins + whitelist behaviour

Hi, whats the correclty expected output from the config below ?

Unattended-Upgrade::Allowed-Origins {
"Ubuntu:xenial-security";
};
Unattended-Upgrade::Package-Whitelist {
"firefox";
};

From what i was expecting, this would allow all packages from xenial-security be upgraded PLUS firefox from any origin. But it appears to allow ONLY firefox AND if coming from xenial-security.
Is this the expected behavior ? Can this behavior be customized ?

Thanks !

Question / documentation about InstallOnShutdown

Hi,

I have just read the 1.7 changelog, where it is written:

  • Increase logind's InhibitDelayMaxSec to 30s.
    This allows more time for unattended-upgrades to shut down gracefully
    or even install a few packages in InstallOnShutdown mode, but is still a
    big step back from the 30 minutes allowed for InstallOnShutdown previously.
    Users enabling InstallOnShutdown node are advised to increase
    InhibitDelayMaxSec even further, possibly to 30 minutes.

If I understand well, the default systemd configuration is not adapted to InstallOnShutdown option. In this case, could this be written in data/50unattended-upgrades.* ? It think it would be really nice for system administrators…

Regards,
Yvan

Typo in message

"This should never be reached, if we are here we either "

Says:

This should never be reached, if we are here we either have sendmail or mailx. ...

But I think there should say:

This should never be reached, if we are here we neither have sendmail nor mailx. ...

Feature Request: Better mail debugging

Hi there,
I run into a problem that no mail (using a correct configured mailx) was send from my Ubuntu system. I spend some time debugging the script to find out where the problem resides. I found out that the script doesn't allow to configure sendmail or mailx as default mail tool. The script first checks for sendmail and if present it uses sendmail as default mail appliance. It would be nice if there was an option to toggle between both tools.

Further I found out that in dry-mode there will no mail be send. I can understand this behavior but an additional option to test the correct mailing would be nice. Also some more debugging information like "using sendmail/mailx for mailing", "I will send a mail to

" or "from would help understanding what's going on.

In my Ubuntu installation the parameter "Unattended-Upgrade::Sender" was not documented inside the etc-config file. It would be nice if this option will be available in the config too.

Thx and Bye,
aronadaal

Should populate debconf database with settings from disk, if they exist

I ran into this situation:

  1. Installed unattended-upgrades, using default debconf settings (enabled_auto_updates == false).
  2. Manually created /etc/apt/apt.conf.d/20auto-upgrades with Update-Package-Lists == "1" and Unattended-Upgrade == "1".
  3. Ran "apt upgrade" which happened to upgrade unattended-upgrades. This led to a ucf prompt asking me whether to keep my 20auto-upgrades file, or replace it with 20auto-upgrades-disabled.

This can be avoided by having config check if 20auto-upgrades exists, and reading the values to determine the current setting of enable_auto_updates. It should set this value in debconf before running db_input.

doesn't work with apt cache on tmpfs

This is a copy of https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=914865 as it has no update.

I have /var/cache/apt mounted on tmpfs and all apt utils works fine, except unattended-updates, which produces the following (and really wrong) error:

% sudo unattended-upgrade         
An error occurred: 'Could not open file /var/cache/apt/archives/partial/ghostscript_9.26~dfsg-0+deb9u1_amd64.deb - open (2: No such file or directory)'
The URI 'https://deb.debian.org/debian-security/pool/updates/main/g/ghostscript/ghostscript_9.26~dfsg-0+deb9u1_amd64.deb' failed to download, aborting

% ls -l /var/cache/apt
total 56M
-rw-r--r-- 1 root root 28M 2018-11-28 07:26 pkgcache.bin
-rw-r--r-- 1 root root 28M 2018-11-28 07:26 srcpkgcache.bin

dist-upgrade works fine:

% sudo apt dist-upgrade
Reading package lists... Done
Building dependency tree
Reading state information... Done
Calculating upgrade... Done
The following packages will be upgraded:
  ghostscript libgs9 libgs9-common
3 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Need to get 7446 kB of archives.
After this operation, 36.9 kB of additional disk space will be used.
Do you want to continue? [Y/n]
Get:1 https://cdn-aws.deb.debian.org/debian-security stretch/updates/main amd64 ghostscript amd64 9.26~dfsg-0+deb9u1 [98.6 kB]
...

Add the option to send to syslog on Ubuntu 16.04?

Pardon my ignorance as I can’t find the answer after hours of searching. I’ve noticed that my install of unattended upgrades on Ubuntu 18.04 has the option to send to syslog but that option doesn’t exist on 16.04.

Is my only option to upgrade Ubuntu?

missing documentation

I've just installed unattended-upgrades on my Raspberry Pi system (Raspbian OS). My first step was to preuse the documentation, but man unattended-upgrades yielded nothing.

Also, unattended-upgrade -h suggests there's no version number to report.

DId I get a flawed package?

Security updates eventually quit applying due to disk filling up with old kernel packages

If unattended-upgrades is left truly unattended, it will eventually fail due the disk space filling up. When that happens, no more security updates will be able to be applied and the system may be vulnerable to known exploits.

The issue happens because some security updates involve installing new kernels. However, kernels packages are special in a couple of ways. First, for safety old package versions of kernels are not automatically removed like most other packages. Second, kernel header packages in particular contain a huge number of files. On a smaller disk with ext4 created with default settings, this can lead to the inodes filling up before the disk space does. In one case, I saw "disk full" errors on an 8Gb ext4 volume with about 3Gb free. The inodes were 99% full due to kernel packages. After cleaning out old kernels manually, inode use on the volume dropped to 19%.

The recommended fix is to add an option that automatically cleans up old kernel packages. The currently running kernel should be kept, as should be the latest available kernel and perhaps one one more for good measure.

Incorrect documentation for Update-Days

This is referenced as an example in the README:

Unattended-Upgrade::Update-Days {"Mon","Fri"};

However the list separator in apt is semicolon, not comma. Pasting this into your configuration as-is would not work. Instead, you'd see something like this in your logs:

2016-12-27 13:01:27,723 INFO Enabled logging to syslog via auth facility
2016-12-27 13:01:27,724 INFO Skipping update check: today is '2,Tue,Tuesday' but patch days are '['Mon,Tue,Wed,Thu,Fri']'

Does not send email when package has conffile prompt and needs manual upgrade

Hi,

I am using version 0.93.1+nmu1 on Raspbian Stretch. My version is a bit old but if I am not wrong upstream changelog does not mention a fix for my issue.

I have unattended-upgrades configured to send an email only when an error occurs. However, it does not send an email when an update has a conffile prompt and thus needs manual upgrade. This seems to be an important bug to me, because the administrator believes his system is up to date while it is not.

This was working "before" (see for example 0.86 changelog). I reported this bug with details in Debian #852465. Do not hesitate to ask if I can provide more information or test things.

Thanks for your work,
Yvan

u-u says there is conffile prompt, but there is none during apt upgrade

  • Using unattended-upgrades v1.10.
  • /etc/apache2/conf-available/freedombox-tls-site-macro.conf is a conffile owned by freedombox package.
  • There are no manual modifications to this file. Just a new version to be installed by the package.
  • apt upgrade will upgrade the package without any conffile prompts.
$ sudo unattended-upgrades -d
Checking if system is running on battery is skipped. Please install powermgmt-base package to check power status and skip installing updates when the system is running on battery.
Initial blacklist : 
Initial whitelist: 
Starting unattended upgrades script
Allowed origins are: origin=Debian,codename=sid,label=Debian, origin=Debian,codename=sid,label=Debian-Security, o=Debian Backports,a=sid-backports,l=Debian Backports
Using (^linux-image|^linux-headers|^linux-image-extra|^linux-modules|^linux-modules-extra|^linux-signed-image|^kfreebsd-image|^kfreebsd-headers|^gnumach-image|^.*-modules|^.*-kernel|^linux-backports-modules-.*|^linux-modules-.*|^linux-tools|^linux-cloud-tools) regexp to find kernel packages
Using (^linux-image.*4.19.0-2-amd64|^linux-headers.*4.19.0-2-amd64|^linux-image-extra.*4.19.0-2-amd64|^linux-modules.*4.19.0-2-amd64|^linux-modules-extra.*4.19.0-2-amd64|^linux-signed-image.*4.19.0-2-amd64|^kfreebsd-image.*4.19.0-2-amd64|^kfreebsd-headers.*4.19.0-2-amd64|^gnumach-image.*4.19.0-2-amd64|4.19.0-2-amd64.*-modules|4.19.0-2-amd64.*-kernel|^linux-backports-modules-.*.*4.19.0-2-amd64|^linux-modules-.*.*4.19.0-2-amd64|^linux-tools.*4.19.0-2-amd64|^linux-cloud-tools.*4.19.0-2-amd64) regexp to find running kernel packages
Checking: freedombox ([<Origin component:'main' archive:'unstable' origin:'Debian' label:'Debian' site:'deb.debian.org' isTrusted:True>])
pkgs that look like they should be upgraded: freedombox
Get:1 http://deb.debian.org/debian unstable/main amd64 freedombox all 19.0 [27.0 MB]                     
Fetched 27.0 MB in 6s (3597 kB/s)                                                                        
fetch.run() result: 0
<apt_pkg.AcquireItem object:Status: 2 Complete: 1 Local: 0 IsTrusted: 1 FileSize: 26979392 DestFile:'/var/cache/apt/archives/freedombox_19.0_all.deb' DescURI: 'http://deb.debian.org/debian/pool/main/p/plinth/freedombox_19.0_all.deb' ID:1 ErrorText: ''>
check_conffile_prompt(/var/cache/apt/archives/freedombox_19.0_all.deb)
found pkg: freedombox
conffile line: /etc/NetworkManager/dispatcher.d/10-freedombox-batman 47f07b500795928fa2ff676ac7edbd8c
current md5: 47f07b500795928fa2ff676ac7edbd8c
conffile line: /etc/apache2/conf-available/cockpit-freedombox.conf 2afa9e1774a1ae5bae4d615e3018c6e2
current md5: 2afa9e1774a1ae5bae4d615e3018c6e2
conffile line: /etc/apache2/conf-available/coquelicot-freedombox.conf 7a3f133987f5a6bf3f8139318faa2645
current md5: 7a3f133987f5a6bf3f8139318faa2645
conffile line: /etc/apache2/conf-available/deluge-plinth.conf 485433a34caee314eb2d5453897eb302
current md5: 485433a34caee314eb2d5453897eb302
conffile line: /etc/apache2/conf-available/freedombox-tls-site-macro.conf 489654b1f4175073d774b8cb4602331f
current md5: 6391aac592f371eaf2c68baf502d5bdf
pkg_md5sum: 6391aac592f371eaf2c68baf502d5bdf
Package freedombox has conffile prompt and needs to be upgraded manually
Package freedombox has conffile prompt and needs to be upgraded manually
failed to read deb file freedombox (E:Could not open file freedombox - open (2: No such file or directory))
blacklist: ['freedombox$']
whitelist: []
Checking the black and whitelist: freedombox
skipping blacklisted package freedombox
pkg freedombox package has been blacklisted
package freedombox not upgraded
Packages that will be upgraded: 
InstCount=0 DelCount=0 BrokenCount=0
Extracting content from /var/log/unattended-upgrades/unattended-upgrades-dpkg.log since 2019-02-10 12:40:57

Please don't try to install packagages with changed ucf-handled configuration files

Unattended-upgrades checks if a package's configuration files present on the system are changed and if the package to be upgraded or installed also changes the configuration file u-u skips upgrading/installing the package.
This check is not performed yet for files managed by UCF thus changed ucf-managed configuration can break upgrades.

Allow mail subject personalization

When receiving mail from nodes which have the same host name but have different domain names (e.g. foo.example.com and foo.bar.example.net), the subject of the message only contains the host part of the FQDN (in this example Subject: unattended-upgrades result for 'foo') which makes it harder to distinguish these hosts.

While you can refer to the sender to find out which node has sent the message, it might be convenient for the user to have the FQDN in the mail title, or maybe even personalize this title with some configuration settings (i.e. when the config is generated by configuration management tools, the subject could include a customer ID).

Do you have an opinion about this?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.