summaryrefslogtreecommitdiff
path: root/debian/apt.systemd.daily
Commit message (Collapse)AuthorAgeFilesLines
* apt.systemd.daily: Do not numerically check if intervals equal 0Julian Andres Klode2019-08-221-8/+8
| | | | | | | | Commit 1d9e29c9e2a5591b42a99a721b901fc003ed9149 added support for suffixes to to intervals, but did not adjust the code to actually support them by replacing -eq with =. LP: #1840995
* Set LC_ALL=C.UTF-8 for unattended-upgrades environment when parsing its --helpBalint Reczey2018-11-301-1/+1
| | | | | | | .UTF-8 sets stdio encoding to UTF-8 which may be ASCII on the system making unattended-upgrades crash. LP: #1806076
* apt.daily: fix several "shellcheck" annotationsChristian Göttsche2018-01-021-29/+29
| | | | | | | | | Various corrections, mostly quoting, which shouldn't be a problem for us as we tend to act in "sane" environments, but just to be sure. [commit message written by committer] References: Debian bugreport #849636
* apt.daily: remove unused dbus signal for apt updateDavid Kalnischkies2018-01-021-9/+0
| | | | | | | | | | | | | | | | | The signal was introduced with the introduction of the script itself, but seems to have never got any user as all references to it I can find are references to other code appearing in the cronjob. It is also the wrong place nowadays as the cronjob is just one place an update can be triggered by, so if notifications about an update being run are desired it is better to use a hook which will be called by all update calls (script, cron, user, …). Removing this code solves also the problem of improving the check to avoid running into problems with security systems like SELinux. References: 0c1326826fd23ce859db8e923c37b7199c6da2c8 Closes: 849636
* Fix some more crashes when APT::Periodic options are set to alwaysPaul Wise2017-07-121-7/+16
| | | | Gbp-Dch: ignore
* Support seconds, minutes, hours and days for APT::Periodic intervalsPaul Wise2017-07-121-2/+14
|
* Support zero delay for the various APT::Periodic activitiesPaul Wise2017-07-121-0/+6
| | | | | | | | | | [squashed:] apt.systemd.daily: check_stamp: check for 'always' before numerical values Prevents a crash when the configuration actually uses 'always': apt.systemd.daily: 402: [: Illegal number: always
* apt.systemd.daily: Use unattend-ugrade --download-only if availableJulian Andres Klode2017-06-011-2/+2
| | | | | | | | | | | Using dry-run as in the previous commit is not really correct, as it logs dpkg debugging output too. So, let's assume unattended-upgrade gets a --download-only option and use that if it is available. This lets us add the downloading part to unattended-upgrades later on, without requiring versioned dependencies between the two. Closes: #863859
* apt.systemd.daily: Pass --dry-run to unattended-upgrade, not -dJulian Andres Klode2017-06-011-1/+1
| | | | | | | | | | | We want to download stuff: --dry-run Simulation, download but do not install not debug: -d, --debug print debug messages Confusion everywhere! Closes: #863859
* apt.systemd.daily: Drop the LOCKFD variableJulian Andres Klode2017-05-161-6/+3
| | | | Gbp-Dch: ignore
* apt.systemd.daily: fix error from locking codeAlan Jenkins2017-05-161-10/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Error: pkgs that look like they should be upgraded: Error in function stop Traceback (most recent call last): File "/usr/lib/python3/dist-packages/apt/progress/text.py", line 240, in stop apt_pkg.size_to_str(self.current_cps))).rstrip("\n")) File "/usr/lib/python3/dist-packages/apt/progress/text.py", line 51, in _write self._file.write("\r") AttributeError: 'NoneType' object has no attribute 'write' fetch.run() result: 0 Caused by: LOCKFD=3 unattended_upgrades $LOCKFD>&- Unfortunately this code does not work, it is equivalent to unattended_upgrades 3 >&- I.e. it left fd 3 open, but closed stdout! Closes: #862567
* apt.systemd.daily: Add lockingJulian Andres Klode2017-05-041-4/+14
| | | | | Use a lock file to make sure only one instance of the script is running at the same time.
* Run unattended-upgrade -d in download partJulian Andres Klode2017-05-031-0/+11
| | | | | | | We want to download the upgrades first, if unattended-upgrades is configured. We don't want to use the normal dist-upgrade -d thing for it, though, as unattended-upgrades only upgrades a subset.
* Allow the daily script to be run in two phasesJulian Andres Klode2017-04-261-71/+75
| | | | | | | | This adds an argument to the script which may be update, install, or empty. In the update cases, downloads are performed. In the install case, installs are performed. If empty, both are run. Gbp-Dch: ignore
* show output as documented for APT::Periodic::Verbose 2Paul Wise2016-11-251-2/+2
| | | | | | | | The documentation of APT::Periodic::Verbose doesn't match the code, specifically level 2 should apply some things differently to level 1 but does not because it uses `-le 2` instead of `-lt 2` or `-le 1`. Closes: 845599
* CMake: debian: Switch packaging over to CMake and dh 9Julian Andres Klode2016-08-061-0/+0
| | | | | | | | | | | This new packaging is much easier to read, although the duplication in the install files is a bit annoying. We should probably also get rid of the movefiles for solvers, planners, and https method; but then we have to keep track of which methods exist in the apt package. Another disadvantage is that building only the documentation packages also requires building the code, as there's no way to turn off code building in the project.
* Use the ConditionACPower feature of systemd in the apt-daily serviceNicolas Le Cam2016-06-271-26/+0
| | | | | | | | | | .. instead of hardcoding the functionnality in the apt.systemd.daily script. Also make the compatibility cron job provide the same functionnality for systems that do not use systemd. Closes: #827930
* apt.systemd.daily: Put opening brace of check_power on extra lineJulian Andres Klode2016-05-151-1/+2
| | | | | | | The rest is also on the same line, so let's go consistent here now that we have a bug report about it. LP: #1581985
* Use systemd.timer instead of a cron jobMichael Vogt2016-04-011-0/+507
The rational is that we need to spread the load on the mirrors that apt update and unattended-upgrades cause. To do so, we leverage the RandomizeDelay feature of systemd. The other advantage is that the timer is not run at a fixed daily.daily time but instead every 24h. This also fixes the problem that the randomized deplay in the current apt.cron.daily causes other cron jobs to be deplayed. A compatibility cron job is also provided for systems that do not use systemd. Note that the time is fired two times a day, but the logic inside of apt.systemd.daily will ensure (via stamp files) that the servers are hit at most every 24h. Firing two times a day helps with the worst case update time and it also helps with systems that are not always on. LP: #246381, #727685 Closes: #600262, #709675, #663290