unattended-upgrades-0.82.1ubuntu1/0000775000000000000000000000000012317031601013753 5ustar unattended-upgrades-0.82.1ubuntu1/debian/0000775000000000000000000000000012317031601015175 5ustar unattended-upgrades-0.82.1ubuntu1/debian/NEWS.Debian0000664000000000000000000000071312250412747017070 0ustar unattended-upgrades (0.50) unstable; urgency=low When running with the --debug switch, previous versions of unattended-upgrades would just print what they do, but not actually perform any dpkg actions like installing or upgrading. This behavior has *changed* in version 0.50 it will now install/upgrade. There is a new option called "--dry-run" to get this behavior back. -- Michael Vogt Fri, 03 Jul 2009 09:15:08 +0200 unattended-upgrades-0.82.1ubuntu1/debian/unattended-upgrades.init0000775000000000000000000000252112250412747022042 0ustar #! /bin/sh # ### BEGIN INIT INFO # Required-Start: $local_fs $remote_fs # Required-Stop: $local_fs $remote_fs # Provides: unattended-upgrade-shutdown-check # Default-Start: # Default-Stop: 0 6 # Short-Description: Check if unattended upgrades are being applied # Description: Check if unattended upgrades are being applied # and wait for them to finish ### END INIT INFO set -e PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin NAME="unattended-upgrades" DESC="unattended package upgrades" SCRIPTNAME="/etc/init.d/$NAME" SHUTDOWN_HELPER="/usr/share/unattended-upgrades/unattended-upgrade-shutdown" if [ -x /usr/bin/python3 ]; then PYTHON=python3 else PYTHON=python fi # Load the VERBOSE setting and other rcS variables . /lib/init/vars.sh # Define LSB log_* functions. # Depend on lsb-base (>= 3.2-14) to ensure that this file is present . /lib/lsb/init-functions case "$1" in start|restart|force-reload|status) # nothing, just to keep update-rc.d happy (see debian #630732) ;; stop) if [ -e $SHUTDOWN_HELPER ]; then [ "$VERBOSE" != "no" ] && log_action_begin_msg "Checking for running $DESC" $PYTHON $SHUTDOWN_HELPER [ "$VERBOSE" != "no" ] && log_action_end_msg $? "$NAME" fi ;; *) echo "Usage: $SCRIPTNAME {start|stop|status|restart|force-reload}" >&2 exit 3 ;; esac : unattended-upgrades-0.82.1ubuntu1/debian/dirs0000664000000000000000000000010712250412747016071 0ustar usr/bin var/log/unattended-upgrades etc/logrotate.d etc/apt/apt.conf.d unattended-upgrades-0.82.1ubuntu1/debian/compat0000664000000000000000000000000112250412747016404 0ustar 7unattended-upgrades-0.82.1ubuntu1/debian/config0000664000000000000000000000021712250412747016377 0ustar #!/bin/sh -e # Source debconf library. . /usr/share/debconf/confmodule db_input medium unattended-upgrades/enable_auto_updates || true db_go unattended-upgrades-0.82.1ubuntu1/debian/control0000664000000000000000000000216412303054267016613 0ustar Source: unattended-upgrades Section: admin Priority: optional Maintainer: Ubuntu Developers XSBC-Original-Maintainer: Michael Vogt Build-Depends: debhelper (>= 7.0.50~), po-debconf Build-Depends-Indep: python (>= 2.6.6-3~), python3-distutils-extra, python3-setuptools, python-dev, python3-dev, python-coverage, pep8, pyflakes, python-apt, python3-apt, lsb-release Standards-Version: 3.9.3 Vcs-Bzr: http://bzr.debian.org/bzr/apt/unattended-upgrades/debian-sid XS-Testsuite: autopkgtest Package: unattended-upgrades Architecture: all Depends: ${shlibs:Depends}, ${misc:Depends}, debconf, python3, python3-apt, apt-utils, apt, ucf, lsb-release, lsb-base (>= 3.2-14), xz-utils Suggests: bsd-mailx, mail-transport-agent Description: automatic installation of security upgrades This package can download and install security upgrades automatically and unattended, taking care to only install packages from the configured APT source, and checking for dpkg prompts about configuration file changes. . This script is the backend for the APT::Periodic::Unattended-Upgrade option. unattended-upgrades-0.82.1ubuntu1/debian/tests/0000775000000000000000000000000012303054034016337 5ustar unattended-upgrades-0.82.1ubuntu1/debian/tests/control0000664000000000000000000000015012303054033017735 0ustar Tests: run-tests Depends: @, make, python-dev, python3-dev, python-apt, python-coverage, pep8, pyflakes unattended-upgrades-0.82.1ubuntu1/debian/tests/run-tests0000775000000000000000000000003012250412747020234 0ustar #!/bin/sh cd test make unattended-upgrades-0.82.1ubuntu1/debian/prerm0000664000000000000000000000212512250412747016257 0ustar #!/bin/sh # prerm script for unattended-upgrades # # see: dh_installdeb(1) set -e # summary of how this script can be called: # * `remove' # * `upgrade' # * `failed-upgrade' # * `remove' `in-favour' # * `deconfigure' `in-favour' # `removing' # # for details, see http://www.debian.org/doc/debian-policy/ or # the debian-policy package case "$1" in remove|upgrade|deconfigure) ;; failed-upgrade) if dpkg --compare-versions "$2" lt 0.73.3; then cat >&2 <&2 exit 1 ;; esac # dh_installdeb will replace this with shell code automatically # generated by other debhelper scripts. #DEBHELPER# exit 0 unattended-upgrades-0.82.1ubuntu1/debian/changelog0000664000000000000000000012555312317031552017067 0ustar unattended-upgrades (0.82.1ubuntu2) trusty; urgency=low * cherry-pick pyflakes fix (thanks to Barry Warsaw) that fixes a test failure with the latest pyflakes -- Michael Vogt Wed, 02 Apr 2014 17:56:44 +0200 unattended-upgrades (0.82.1ubuntu1) trusty; urgency=medium * debian/tests/control: Add missing python-apt test dependency, so that tests also work with Python 2. -- Martin Pitt Tue, 25 Feb 2014 09:45:18 +0100 unattended-upgrades (0.82.1) unstable; urgency=medium [ Brian Murray ] * Do not reboot if run with --dry-run (LP: #1269177) * Continue if there are no changes, thanks to Ludovico Cavedon for the patch. (LP: #1265729) -- Michael Vogt Mon, 17 Feb 2014 14:23:17 +0100 unattended-upgrades (0.82) unstable; urgency=low [ Brian Murray ] * unattended-upgrade: specify charset when setting email payload for python3.4 (LP: #1272381) * change logging.warn calls to logging.warning * test/test_email.py: use with to open email in test_mail_quoted_printable -- Michael Vogt Thu, 06 Feb 2014 08:54:25 +0100 unattended-upgrades (0.81) unstable; urgency=low * add default template for SteamOS (symlink to Debian for now as the customization is done in their steamos-autoupdate package) * write /var/lib/apt/periodic/unattended-upgrades-stamp, thanks to John Vert for the suggestion * do the upgrade calculation with os.nice(19) * add --minimal-upgrade-steps commandline option but keep --minimal_upgrade_steps for compatiblity * fix reading DISTRO_ID/DISTRO_CODENAME from lsb_release -- Michael Vogt Sun, 29 Dec 2013 09:16:24 +0100 unattended-upgrades (0.80) unstable; urgency=low [ Michael Vogt ] * use dpkg-vendor --query Vendor instead of lsb_release -i -s to avoid build-dependency on lsb-release * data/50unattended-upgrades.Debian: - use ${distro_codename} instead of "stable" to avoid issues on release upgrades, thanks to Evgeny Kapun (closes: #707002) - document that the pkg blacklist can contain regular expressions, thanks to Thomas Reusch for the suggestion * unattended-upgrade: - make the mail sending more robust when facing unicode encoding errors * switch to python3 by default [ Loïc Minier ] * lp:~lool/unattended-upgrades/static-cherckers-fixes: - run the tests at build time instead of via auto-pkg-test -- Michael Vogt Sat, 14 Dec 2013 10:17:52 +0100 unattended-upgrades (0.80~sid2) unstable; urgency=low * fix crash when --dry-run --debug is given, thanks to Sephan Helas * debian/control: - update maintainer address - fix Vcs location * data/50unattended-upgrades.Debian: - updated for jessie * README.md: - switch to markdown -- Michael Vogt Thu, 16 May 2013 11:07:07 +0200 unattended-upgrades (0.80~sid1) unstable; urgency=low * merge fixes from the experimental uploads -- Michael Vogt Wed, 08 May 2013 19:12:36 +0200 unattended-upgrades (0.80~exp3) UNRELEASEDexperimental; urgency=low * merged lp:~mvo/unattended-upgrades/py3 - this merges the py3 compatibilty from debian * enable pep8/pyflakes by default * Add new Unattended-Upgrade::Automatic-Reboot-Time to control when machines that need reboot are rebooting * Fix crash when --dry-run and --verbose are used (thanks to Bernhard Schmidt), closes: #705615 -- Michael Vogt Thu, 11 Apr 2013 06:45:05 +0200 unattended-upgrades (0.80~exp2) experimental; urgency=low * add codename based matching * add support for "${distro_id}", "${distro_codename}" in the Unattended-Upgrade::Origins-Pattern based matching too * data/50unattended-upgrades.Debian: - improve documentation, thanks to Russell Stuart -- Michael Vogt Thu, 14 Mar 2013 09:19:22 +0100 unattended-upgrades (0.80~exp1) experimental; urgency=low [ Michael Vogt ] * lp:~mvo/unattended-upgrades/verbose: - add --verbose that shows output and terminal output * drop --with python2 as its just a single script * debian/control: - depend on latest python-apt in experimental for the "codename" based origin matching * data/50unattended-upgrades.Debian: - re-add the codename (n=) based matching example [ Brian Murray ] * unattended-upgrade: - log that sendmail works as an alternative to mailx - fix a issue with the tense of packages being upgraded Richard for the initial patch (LP: #1069809) -- Michael Vogt Thu, 14 Mar 2013 06:34:27 +0100 unattended-upgrades (0.79.5) unstable; urgency=low * data/50unattended-upgrades.{Debian,Ubuntu}: - add missing ";" in the example config, thanks to Tomas Pospisek closes: #684876 - remove codename based matching example as this needs a newer python-apt than available in wheezy, thanks to Russell Stuart * unattended-upgrade, test/test_origin_pattern.py: - if a unknown matcher token is found, raise a error instead of silently ignoring it, thanks to Russell Stuart * unattended-upgrade: - do not nice/ionice as this wil affect daemon restarts (closes: #701850) -- Michael Vogt Fri, 01 Mar 2013 10:07:30 +0100 unattended-upgrades (0.79.3ubuntu8) saucy; urgency=low * Fix two PEP-8 errors to fix autopkgtest. -- Martin Pitt Mon, 09 Sep 2013 11:39:12 -0400 unattended-upgrades (0.79.3ubuntu7) raring; urgency=low [ Michael Vogt ] * data/logrotate.d/unattended-upgrades: - only logrotate /var/log/unattended-upgrades/unattended-upgrades{,-shutdown}.log and not the dpkg logs (LP: #1081034) * tests/*.py: - updated pep8 tests, make pyflakes test "test" dir too * test/test_regression.py: - regression test for crash in normal_upgrade exception handler [ Thomas Kluyver ] * lp:~takluyver/unattended-upgrades/apt-lock-crash: - fix encoding bug when writing a error to stderr -- Michael Vogt Tue, 11 Dec 2012 18:52:24 +0100 unattended-upgrades (0.79.3ubuntu6) raring; urgency=low [ Brian Murray ] * unattended-upgrade: - fix a issue with the tense of packages being upgraded - log that sendmail works as an alternative to mailx - add the result of the upgrade to email subject, thanks to Yann 'Ze' Richard for the initial patch (LP: #1069809) [ Michael Vogt ] * unattended-upgrade: - fix debug output for origins checking in py3 [ Martin Pitt ] * Fix PEP-8 errors throughout the code to fix the autopkgtest failure. -- Martin Pitt Wed, 21 Nov 2012 07:48:55 +0100 unattended-upgrades (0.79.3ubuntu5) raring; urgency=low [ Colin Watson ] * Add pep8 as a dependency of the DEP-8 test suite. [ Martin Pitt ] * test/Makefile: Redirect unittest stderr to stdout, to avoid failure in autopkgtest. * debian/tests/control: Add missing pyflakes dependency. -- Martin Pitt Fri, 09 Nov 2012 14:22:51 +0100 unattended-upgrades (0.79.3ubuntu4) quantal; urgency=low * lp:~mvo/unattended-upgrades/minimal-step-paranonia-lp1020680: - ensure the blacklist/origin constrains are never violated for some corner cases in the minimal-upgrade mode (LP: #1020680) -- Michael Vogt Tue, 09 Oct 2012 10:08:01 +0200 unattended-upgrades (0.79.3ubuntu3) quantal; urgency=low * lp:~mvo/unattended-upgrades/lp1061498: - fix crash in dpkg_conffile_prompt() (LP: #1061498) * lp:~mvo/unattended-upgrades/create-logdir-in-shutdown-helper-lp1013363: - create logdir in the shutdown helper if needed (LP: #1013363) -- Michael Vogt Fri, 05 Oct 2012 17:57:38 +0200 unattended-upgrades (0.79.3ubuntu2) quantal; urgency=low [ Marc Tardif ] * Fixed debug output when a package has no candidates (LP: #1046438) [ Michael Vogt ] * debian/test/: - add dep8 tests -- Michael Vogt Fri, 14 Sep 2012 10:41:08 +0200 unattended-upgrades (0.79.3ubuntu1) quantal; urgency=low [ Thomas Kluyver ] * Port to Python 3 [ Brian Murray ] * unattended-upgrade: fix typo in debugging output -- Michael Vogt Mon, 10 Sep 2012 09:55:19 +0200 unattended-upgrades (0.79.4) unstable; urgency=low * lp:~mvo/unattended-upgrades/timed-reboot: - support auto rebooting at specific times instead of "now", thanks to Thomas Reusch for the suggestion * lp:~mvo/unattended-upgrades/support-glob-in-matchers: - support fnmatch style glob in the whitelist origin matching * data/logrotate.d/unattended-upgrades: - only logrotate /var/log/unattended-upgrades/unattended-upgrades{,-shutdown}.log and not the dpkg logs (LP: #1081034) * lp:~mvo/unattended-upgrades/lp1061498: - fix crash in dpkg_conffile_prompt() (LP: #1061498) * lp:~mvo/unattended-upgrades/xz-support: - add missing xz-utils dependency, thanks to Bastian Blank (closes: #698552) * unattended-upgrade, test/test_mail.py: -- Michael Vogt Mon, 21 Jan 2013 17:27:31 +0100 unattended-upgrades (0.79.3) unstable; urgency=low * unattended-upgrade: - fix assert text, thanks to Niels Thykier * really include the updated es.po, thanks to Niels Thykier -- Michael Vogt Tue, 07 Aug 2012 12:20:05 +0200 unattended-upgrades (0.79.2) unstable; urgency=low * use "mail -s" again to ensure there is a proper subject line when using mailx * do not attach headers when using mailx * use sendmail instead of mailx when available to get a proper mime mail with correct encoding etc (closes: #654851, #681442) Thanks to Bjørn Mork and Teodor MICU * po/es.po: - updated, thanks to Omar Campagne, closes: #681334 * debian/control: - add suggests for mail-transport-agent * only use ionice if available (closes: #681467) * make pyflakes clean and add test -- Michael Vogt Fri, 13 Jul 2012 20:54:05 +0200 unattended-upgrades (0.79.1) unstable; urgency=low * Set apt-listchanges frontend to "mail" if sendmail is available, the default behavior of apt-listchanges is to send a mail (if there is a email_address in apt-listchanges.conf) even with pager/gtk frontends so this will ensure the same behavior (closes: #579733) * Do not use "mail -a" as this is not POSIX, instead use the python email.Message package to construct a proper utf8 message (closes: #654851) -- Michael Vogt Wed, 11 Jul 2012 22:34:14 +0200 unattended-upgrades (0.79) unstable; urgency=low [ Translation updates ] * po/pt_BR.po: - updated, thanks to David Prévot, closes: #678423 * po/cs.po: - removed, was a debconf translation * po/ru.po: - updated, thanks to Yuri Kozlov, closes: #678427 * po/gl.po: - added, thanks to Jorge Barreiro, closes: #678634 * po/pt.po: - added, thanks to Pedro Ribeiro, closes: #678738 * po/sk.po: - added, thanks to helix84, closes: #677471 [ Teodor MICU ] * debian/unattended-upgrades.init: - fixes new style lsb-init output, closes: #678030 [ Michael Vogt ] * correctly detect conffile prompt for new conffiles that were normal files previously (like /etc/profile in base-files 6.8), closes: #673237 * code cleanup in conffile detection and tests * Set mail header to utf8 for the summary email (closes: #654851) * use stdout instead of stderr in --debug mode (closes: #674140) * data/50unattended-upgrades.{Debian,Ubuntu}: - change default mail recipient to "root" intead of "root@localhost" to help systems without a real mail setup (closes: #648149) * ignore packages in the blacklist early to avoid un-upgradable warning for mixed stable/testing systems (closes: #645382) -- Michael Vogt Fri, 29 Jun 2012 13:22:54 +0200 unattended-upgrades (0.78) unstable; urgency=low [ Michael Vogt ] * data/logrotate.d/unattended-upgrades: - simplify, thanks to Teodor MICU * refresh po/pot automatically on clean, closes: #670473 * po/da.po: - updated, thanks to Joe Dalton, closes: #677804 * po/de.po: - updated, thanks to Chris Leick (closes: #678204) [ Teodor MICU ] * debian/unattended-upgrades.init: - use new style lsb-init output, closes: #678030 -- Michael Vogt Thu, 21 Jun 2012 17:05:22 +0200 unattended-upgrades (0.77) unstable; urgency=low * unattended-upgrade: - ignore md5sum "newconffile" (LP: #936870) - simply ignore SIGHUP instead of the setsid() magic - redirect ionice stderr output to /dev/null to avoid showing a error in a OpenVZ env (closes: #675021) * unattended-upgrade-shutdown: - be robust about import apt_pkg failures (LP: #808449), e.g. during upgrades - log when install finished to help track down LP #434835 - do not log to syslog anymore as this *might* block and could cause LP #434835 and was not working in most cases as syslog was killed before it could log - log instead to /var/log/unattended-upgrades-shutdown.log to help track down LP #434835 * debian/unattended-upgrades.init: - add Required-{Start,Stop}: $local_fs to help track down LP #434835 * po/fr.po: - updated french translation (closes: #675916) -- Michael Vogt Mon, 11 Jun 2012 16:57:33 +0200 unattended-upgrades (0.76.3) unstable; urgency=low * unattended-upgrades: - check if "apt.package.Version" has "policy_priority" before using it (closes: #670131) -- Michael Vogt Tue, 24 Apr 2012 09:07:58 +0200 unattended-upgrades (0.76.2) unstable; urgency=low * unattended-upgrades: - its ok if setsid fails (closes: #669583) -- Michael Vogt Fri, 20 Apr 2012 09:21:38 +0200 unattended-upgrades (0.76.1) unstable; urgency=low * unattended-upgrade: - honor pin priority of < 0 when selecting new candidates - use os.setsid() to not get killed when the terminal goes away - only print to stdout if there is no summary mail configured -- Michael Vogt Thu, 19 Apr 2012 19:06:18 +0200 unattended-upgrades (0.76) unstable; urgency=low * add basic "Unattended-Upgrades::InstallOnShutdown" option to do the install step on shutdown (closes: #652982) instead of doing it in the backgroud while the machine is running * test improvements * fix mispelled "Unattended-Upgrade::MinimalSteps" (and add compat mode) * unattended-upgrade: - cleanup FDs to hopefully fix zombies (closes: #646620) -- Michael Vogt Fri, 09 Mar 2012 09:42:33 +0100 unattended-upgrades (0.75.1) unstable; urgency=low * print conffile hold-backs to stdout to ensure its part of the cron mail (LP: #773007), thanks to Jean-Baptiste Lallement * unattended-upgrade: - fix crash on automatic-reboot, thanks to Teodor (closes: #651822) * typo fixes, thanks to Lei Zhang -- Michael Vogt Mon, 12 Dec 2011 14:01:41 +0100 unattended-upgrades (0.75) unstable; urgency=low * add tests for compat mode and spaces in a origin * escape "," in the Allowed-Origins compat mode (LP: #824856) * merged lp:~mvo/unattended-upgrades/unshadow-versions, this will ensure that higher versions in a non-origin branch do not "shadow" the versions from a desired origin (LP: #891747) -- Michael Vogt Tue, 22 Nov 2011 15:27:56 +0100 unattended-upgrades (0.74.4) UNRELEASED; urgency=low * add tests for compat mode and spaces in a origin * escape "," in the Allowed-Origins compat mode (LP: #824856) * merged lp:~mvo/unattended-upgrades/unshadow-versions, this will ensure that higher versions in a non-origin branch do not "shadow" the versions from a desired origin (LP: #891747) -- Michael Vogt Mon, 21 Nov 2011 18:00:57 +0100 unattended-upgrades (0.74.3) unstable; urgency=low * add missing "." to dh_installinit (closes: #648216) -- Michael Vogt Wed, 09 Nov 2011 20:16:12 +0100 unattended-upgrades (0.74.2) unstable; urgency=low * add missing "." to dh_installinit (closes: #648216) -- Michael Vogt Wed, 09 Nov 2011 19:27:43 +0100 unattended-upgrades (0.74.1) unstable; urgency=low * debian/unattended-upgrades.init: - only run unattended-upgrades-shutdown if its actually installed (closes: #643607) * pm/sleep.d/10_unattended-upgrades-hibernate: - only run shutdown helper when its available * updated README and defaults based on the work from Reuben Thomas, many thanks (closes: #632336) * lintian fixes * debian/rules, debian/unattended-upgrades.init: - fix dh_initallinit arguments (closes: #630732) -- Michael Vogt Wed, 09 Nov 2011 09:26:56 +0100 unattended-upgrades (0.74) unstable; urgency=low * test improvements * fix crash when no packages are upgraded * only run dpkg if there are packages to upgrade (closes: #647476) * include "stable-updates" in the configuration example * debian/po/de.po: - updated, thanks to Helge Kreutzmann (closes: #647172) * debian/rules: - install initscripts but do not run them on install/upgrade (closes: #645919), thanks to Teodor MICU * data/50unattended-upgrades.Debian: - update default Debian config for squeeze, thanks to John Feuerstein for the example (closes: #609854) * debian/prerm: - ignore failures from versions where the initscript is run with "stop" even when not in shutdown mode (closes: #645919) * unattended-upgrade: - ensure to release shutdown-lock before shutting down (closes: #645919) * debian/postinst, data/20auto-upgrades-disabled: - allow disabling via debconf (closes: #645971) -- Michael Vogt Tue, 08 Nov 2011 17:37:31 +0100 unattended-upgrades (0.73.1) unstable; urgency=low [ Michael Vogt ] * unattended-upgrade: - re-eval pkgs_kept_back after a successful upgrade to ensure that its in sync with the cache (closes: #639840), thanks to Iain Nicol - do not write dpkg terminal log in --dry-run mode instead just output to stdout (closes: #640329) * test/test_origin_pattern.py: - test fixes [ Peter Eisentraut ] * debian/unattended-upgrade.init: - add support for "status" action [ Iain Nicol ] * unattended-upgrade: - ensure pkgs_to_upgrade stays sorted and fix crash -- Michael Vogt Wed, 19 Oct 2011 15:16:20 +0200 unattended-upgrades (0.73ubuntu1) oneiric; urgency=low * debian/po/de.po: - updated, closes: #631316 (thanks to Helge Kreutzmann) * merged lp:~brian-murray/unattended-upgrades/init-eol, this makes the shutdown message nicer, thanks to Brian Murray * unattended-upgrade: - write progress information /var/run/unattended-upgrades.progres so that the progress can be displayed on shutdown * unattended-upgrade-shutdown: - show install progress during shutdown * po/unattended-upgrades.pot: - refresh * unattended-upgrade: - Do not upgrade apps if "XB-Upgrade-Requires: app-restart" is set in the debian/control file. This can be override with the option: Unattended-Upgrade::IgnoreAppsRequireRestart=true -- Michael Vogt Tue, 19 Jul 2011 16:44:51 +0200 unattended-upgrades (0.72.3) unstable; urgency=low * debian/rules: - run the original targets after override_dh_ * test/create_debug_lock.py, unattended-upgrade: - fix two missing python-apt 0.8 transition issues (thanks to Reinhard Tartler, closes: #630192) -- Michael Vogt Thu, 16 Jun 2011 09:13:49 +0200 unattended-upgrades (0.72.2) unstable; urgency=low * po/fr.po: - updated, thanks to to Steve Petruzzello (closes: #622718) * debian/po/ca.po: - added, thanks to Innocent De Marchi (closes: #628368) * unattended-upgrade: - fix conffile prompt detection (closes: #624148) * debian/rules, debian/control: - move to dh7 * work with python-apt 0.8 (closes: #630192) * switch to dh_python2 -- Michael Vogt Wed, 15 Jun 2011 09:50:25 +0200 unattended-upgrades (0.72.1ubuntu1) natty; urgency=low * unattended-upgrade: - fix detection of unclean dpkg state if another package manager is working (LP: #754330) -- Michael Vogt Tue, 12 Apr 2011 10:34:42 +0200 unattended-upgrades (0.72ubuntu1) natty; urgency=low * unattended-upgrade, data/50unattended-upgrades.{Debian,Ubuntu}: - automatically fix a interrupted dpkg (e.g. from a powerfailure) (LP: #584817) - add Unattended-Upgrade::AutoFixInterruptedDpkg to allow the admin to configure this option -- Michael Vogt Thu, 07 Apr 2011 11:43:26 +0200 unattended-upgrades (0.71ubuntu1) natty; urgency=low * debian/po/da.po: - added, thanks toJoe Dalton (closes: #619320) * unattended-upgrade, test/test_conffile.py: - use apt_inst.DebFile.control.extractdata() instead of apt_inst.debExtractControl() to not hit the limit of the tag section parser (LP: #724994) - add regression test -- Michael Vogt Wed, 06 Apr 2011 11:44:48 +0200 unattended-upgrades (0.70ubuntu1) natty; urgency=low * merged lp:~mvo/unattended-upgrades/minimal-steps-upgrade - This allows performaing the upgrades in minimal chunks so that they can be interrupted (relatively) quickly with SIGUSR1 - This feature is not enabled by default yet, in order to use it, uncomment the line in 50unattended-upgrades: Unattended-Upgrades::MinimalSteps "true"; LP: #729214 -- Michael Vogt Mon, 14 Mar 2011 11:49:02 +0100 unattended-upgrades (0.70) unstable; urgency=low * pm/sleep.d/10_unattended-upgrades-hibernate: - remove some unneeded lines from the script, thanks to Seth Arnold (LP: #595792) * test/test_mail.py: - add tests for apt-listchanges.conf parser * unattended-upgrade: - add new Unattended-Upgrade::Origins-Pattern option that is much more flexible than the previous Allowed-Origins. It supports match patterns like: "origin=Debian,label=Debian-Security,component=main" "site=security.debian.org" - add support for escaping, so "origin=Google\, Inc,suite=stable" is possible (thanks to Alexander Reichle-Schmehl), closes: #609876 - do not send a summary mail in --dry-run mode (closes: #609516) * make Package-Blacklist a regexp (thanks to Raymond Lee) and add test * README: - fixed outdated ubuntu centric info (closes: #611675) * po/fr.po: - updated, thanks to Steve Petruzzello (closes: #597606) * data/50unattended-upgrades.Debian: - add oldstable example (closes: #515980) * test/test_against_real_archive.py, test/aptroot: - add regression test that talks against the real archive * unattended-upgrade: - remove MyCache, apt.Cache has all the features we need - add rootdir option to better support automatic testing * unattended-upgrade: - create logdir based on configuration, thanks to Arno Schuring (closes: #615486) - support Unattended-Upgrade::Log{Dir,File} as a config option, but keep APT::UnattendedUpgrades::Log{Dir,File} for compatiblity * test/test_logdir.py: - add test for _setup_logging -- Michael Vogt Fri, 04 Mar 2011 13:17:39 +0100 unattended-upgrades (0.65ubuntu2) natty; urgency=low * add missing lsb-release build-depends -- Michael Vogt Fri, 07 Jan 2011 19:00:05 +0100 unattended-upgrades (0.65ubuntu1) natty; urgency=low [ Michael Vogt ] * debian/po/pt_BR.po: - updated, thanks to Adriano Rafael Gomes (closes: #607403) * debian/rules: - use different template depending on the build host (ubuntu,debian) - remove obsolete arch-build target * data/50unattended-upgrades.Debian: - add debian specific template [ Nobuto MURATA ] * data/50unattended-upgrades.Ubuntu: - adapt repository format for Ubuntu, LP: #691886 -- Michael Vogt Fri, 07 Jan 2011 15:57:20 +0100 unattended-upgrades (0.64ubuntu1) natty; urgency=low * debian/postinst: - fixup incorrect LSB Default-Start and Stop values -- Michael Vogt Thu, 18 Nov 2010 09:35:39 +0100 unattended-upgrades (0.63ubuntu1) natty; urgency=low * debian/unattended-upgrades.init: - fix default stop value, thanks to Petter Reinholdtsen, closes: #593987 * unattended-upgrade: - add new Unattended-Upgrade::MailOnlyOnError option that will make the script only send a mail when a error occured (thanks to Steffen Kittel) * test/test_mail.py: - add test for Unattended-Upgrade::MailOnlyOnError feature * README: - improve description for the Allowed-Origins option * test/Makefile: - run test on bzr-buildpackage and fail if one of the tests fail -- Michael Vogt Wed, 10 Nov 2010 15:18:37 +0100 unattended-upgrades (0.62.2) unstable; urgency=low * debian/postinst: - add fixup code for installs with incorrect values from the stop value (really closes: #593987), thanks to Peter Reinholdtsen -- Michael Vogt Thu, 18 Nov 2010 09:00:44 +0100 unattended-upgrades (0.62.1) unstable; urgency=low * debian/unattended-upgrades.init: - fix default stop value, thanks to Petter Reinholdtsen, closes: #593987 -- Michael Vogt Wed, 17 Nov 2010 21:26:10 +0100 unattended-upgrades (0.62ubuntu1) maverick; urgency=low * merged fixes from debian/sid, notably allowing ":" as seperator for (origin, archive) -- Michael Vogt Thu, 26 Aug 2010 18:45:07 +0200 unattended-upgrades (0.62) unstable; urgency=low [ Michael Vogt ] * updated Russian program translation, thanks to Yuri Kozlov, closes: #592646 * updated pt_BR translations, thanks to Sergio Cipolla, closes: #593755 [ Alex Owen ] * allow ":" as seperator in Unattended-Upgrade::Allowed-Origins (closes: #536754) -- Michael Vogt Thu, 26 Aug 2010 18:41:06 +0200 unattended-upgrades (0.61) unstable; urgency=low * merged changes from the ubuntu branch -- Michael Vogt Mon, 02 Aug 2010 12:10:00 +0200 unattended-upgrades (0.60ubuntu3) maverick; urgency=low * merged changes from debian-sid * fix crash when the old package had a conffile but that disappears in the new pacakge -- Michael Vogt Mon, 02 Aug 2010 12:08:21 +0200 unattended-upgrades (0.60ubuntu2) maverick; urgency=low * debian/control: - add missing lsb-release dependency * debian/control: - depend on python-apt (>= 0.7.90) * unattended-upgrade: - port to python-apt 0.8 API -- Michael Vogt Mon, 02 Aug 2010 10:29:46 +0200 unattended-upgrades (0.60ubuntu1) maverick; urgency=low * Include reboot required notification in sent emails (LP: #415202) and add test for it (thanks to Paul Elliott for the initial patch) * allow ${distro_id} and ${distro_codename} in Unattended-Upgrade::Allowed-Origins and update conffile to it -- Michael Vogt Mon, 17 May 2010 15:19:21 +0200 unattended-upgrades (0.55ubuntu4) lucid-proposed; urgency=low * unattended-upgrade: - fix rewind_cache if a pkg fails to get marked for upgrade (LP: #571734) -- Michael Vogt Thu, 29 Apr 2010 16:39:45 +0200 unattended-upgrades (0.55ubuntu3) lucid; urgency=low [ Michael Vogt ] * add Vcs-Bzr header * unattended-upgrade-shutdown: - add information to plymouth shutdown screen if a unattended-upgrade is in progress (LP: #506709) [ Loïc Minier ] * Fix typo in README. -- Michael Vogt Wed, 17 Mar 2010 17:47:08 +0100 unattended-upgrades (0.55ubuntu2) lucid; urgency=low * Suggest bsd-mailx instead of mailx as mailx is a transitional package. -- Loïc Minier Thu, 21 Jan 2010 10:25:12 +0100 unattended-upgrades (0.55ubuntu1) lucid; urgency=low * updated for lucid * add new "Unattended-Upgrade::Remove-Unused-Dependencies" option that is off by default to allow removal of new unused dependencies * data/50unattended-upgrades: - add example setting for the apt bandwidth limit option (closes: #557258) * fix bug in conffile prompt check (LP: #336558) * lintian fixes -- Michael Vogt Fri, 15 Jan 2010 13:27:53 +0100 unattended-upgrades (0.52ubuntu1) karmic; urgency=low * Add new option "Unattended-Upgrade::Automatic-Reboot" that will automatically reboot without confirmation if the upgrade requires a reboot (off by default) LP: #400018 * fix typo in filename (LP: #397810) -- Michael Vogt Mon, 20 Jul 2009 13:36:14 +0200 unattended-upgrades (0.51ubuntu1) karmic; urgency=low * unattended-upgrade-shutdown: - deal with syslog not avaiable (LP: #396263) * pm/sleep.d/10_unatteded-upgrades-hibernate: - add script to ensure that installing is finished when hibernating (LP: #191514) -- Michael Vogt Fri, 10 Jul 2009 10:20:47 +0200 unattended-upgrades (0.50ubuntu2) karmic; urgency=low * Add sanity-check on clean to prevent uploads with Python syntax errors. * Fix syntax error in unattended-upgrades-shutdown (LP: #396134). -- Colin Watson Mon, 06 Jul 2009 17:34:25 +0100 unattended-upgrades (0.50ubuntu1) karmic; urgency=low * fix crash in ouput, thanks to Joerg Schuetter, closes: #535347 * when running in --debug mode, also print debug output to stderr * add --dry-run option to simulate a run, but not actually install something * when running with --debug, install packages instead of just simulating the install, --dry-run is avaialble for simulation * check for packages on hold and do not upgrade them (closes: #511677) * deal better with failures in pkgname_from_deb() (LP: #305046) * improved the README some more (LP: #311052) * fix locking problem (LP: #359010) * Contain unattended-upgrades log in the status mail as well (LP: #245422) * ensure that unattended-upgrade is finished on shutdown (LP: #191514) -- Michael Vogt Mon, 06 Jul 2009 09:26:48 +0200 unattended-upgrades (0.42ubuntu1) karmic; urgency=low * debian/po/sk.po: - new translation, thanks to helix84, closes: #532959 * debian/po/ru.po: - updated, thanks to Yuri Kozlov, closes: #527111 * debian/po/eu.po: - updated, thanks to Piarres Beobide, closes: #513436 * debian/links - add symlink to make binary name and package name match, closes: #428965 -- Michael Vogt Tue, 16 Jun 2009 11:52:32 +0200 unattended-upgrades (0.42debian2) UNRELEASED; urgency=low * apply patch by Julian Andres Klode to move to the new python-apt 0.8 API (closes: #572088) -- Michael Vogt Wed, 21 Apr 2010 10:19:05 +0200 unattended-upgrades (0.42debian1) unstable; urgency=low * debian/po/sk.po: - new translation, thanks to helix84, closes: #532959 * debian/po/ru.po: - updated, thanks to Yuri Kozlov, closes: #527111 * debian/po/eu.po: - updated, thanks to Piarres Beobide, closes: #513436 * debian/links - add symlink to make binary name and package name match, closes: #428965 -- Michael Vogt Thu, 25 Jun 2009 16:07:29 +0200 unattended-upgrades (0.41ubuntu1) karmic; urgency=low * fix lintian warnings * add man-page (closes: #394277) * debian/po/cs.po: - updated Czech translation (thanks to Vítězslav Kotrla) closes: #532136 * add kept back packages to the status email (thanks to Maximilian Gaukler, closes: #526505) -- Michael Vogt Mon, 15 Jun 2009 10:27:51 +0200 unattended-upgrades (0.41debian1) unstable; urgency=low * fix lintian warnings * add man-page (closes: #394277) * debian/po/cs.po: - updated Czech translation (thanks to Vítězslav Kotrla) closes: #532136 * add kept back packages to the status email (thanks to Maximilian Gaukler, closes: #526505) -- Michael Vogt Wed, 10 Jun 2009 20:36:39 +0200 unattended-upgrades (0.40ubuntu1) karmic; urgency=low * data/50unattended-upgrades: - updated for karmic * unattended-upgrade: - use the new python-apt API to avoid deprecation warnings * debian/control: - update depends on python-apt to (>= 0.7.9) -- Michael Vogt Wed, 06 May 2009 21:54:16 +0200 unattended-upgrades (0.40debian1) unstable; urgency=low * unattended-upgrade: - use the new python-apt apt.Package.Version class when checking for the candidate origin (closes: #526791) * data/50unattended-upgrades: - updated for squeeze -- Michael Vogt Wed, 06 May 2009 08:18:50 +0200 unattended-upgrades (0.39debian1) unstable; urgency=low * Merging new Ubuntu release -- Michael Vogt Tue, 03 Mar 2009 08:38:08 +0100 unattended-upgrades (0.39) jaunty; urgency=low * debian/po/fr.po: - updated french translation (closes: #511373) * debian/po/es.po: - added spanish translation (closes: #512213) * fix crash in rewind_packages (closes: #517510) * debian/rules: - add --install-layout=deb to avoid that the binaries and the locales get installed into /usr/local -- Michael Vogt Mon, 02 Mar 2009 10:51:23 +0100 unattended-upgrades (0.38) jaunty; urgency=low * debian/po: - add ru.po debian template (closes: #509032) - add eu.po debian template (closes: #508983) - add fr.po debian template (closes: #508389) - add ja.po debian template (closes: #509343) - add fi.po debian template (closes: #509370) * po/eu.po: - added eu.po translation (closes: #508984) - added ja.po translation (closes: #509748) -- Michael Vogt Sat, 05 Jan 2009 10:38:34 +0100 unattended-upgrades (0.37debian1) unstable; urgency=low * debian/po: - add ru.po debian template (closes: #509032) - add eu.po debian template (closes: #508983) - add fr.po debian template (closes: #508389) - add ja.po debian template (closes: #509343) - add fi.po debian template (closes: #509370) * po/eu.po: - added eu.po translation (closes: #508984) - added ja.po translation (closes: #509748) -- Michael Vogt Mon, 05 Jan 2009 10:34:14 +0100 unattended-upgrades (0.37) jaunty; urgency=low * better debconf template and description (thanks to the debian-l10 team (closes: #508136) * debian/po/sv.po: - add sv.po debian template (closes: #508225) * debian/po/it.po: - add it.po debian template (closes: #508193) * debian/po/ja.po: - add ja.po debian template (closes: #508564) * debian/po/de.po: - add de.po debian template (closes: #508481) * po/fr.po: - add fr.po translation (closes: #508390) * po/cs.po: - add cs.po translation (closes: #508702) * po/pt.po: - add pt.po translation (closes: #508705) * unattended-upgrade: - better default permissions of the install log (closes: #507638) - only disable apt-listchanges if it is not set to 'mail' (closes: #507639) -- Michael Vogt Mon, 15 Dec 2008 09:46:42 +0100 unattended-upgrades (0.36debian1) unstable; urgency=low * merge from ubuntu: * make cache calculations quicker (thanks to Ben Hutchings, closes #475610) * add hostname in mail header, thanks to Arthur de Jong (closes: #502171, LP: #245417) * better email summary of the performed actions (closes: #502351) * be more robust against failures to read the deb (LP: #227448) * better debconf template and description (thanks to the debian-l10 team (closes: #508136) * debian/po/sv.po: - add sv.po debian template (closes: #508225) * debian/po/it.po: - add it.po debian template (closes: #508193) * debian/po/ja.po: - add ja.po debian template (closes: #508564) * debian/po/de.po: - add de.po debian template (closes: #508481) * po/fr.po: - add fr.po translation (closes: #508390) * po/cs.po: - add cs.po translation (closes: #508702) * po/pt.po: - add pt.po translation (closes: #508705) * unattended-upgrade: - better default permissions of the install log (closes: #507638) - only disable apt-listchanges if it is not set to 'mail' (closes: #507639) -- Michael Vogt Tue, 09 Dec 2008 01:45:31 +0100 unattended-upgrades (0.36) jaunty; urgency=low * make cache calculations quicker (thanks to Ben Hutchings, closes #475610) * add hostname in mail header, thanks to Arthur de Jong (closes: #502171, LP: #245417) * better email summary of the performed actions (closes: #502351) * be more robust against failures to read the deb (LP: #227448) -- Michael Vogt Wed, 26 Nov 2008 21:31:42 +0100 unattended-upgrades (0.35debian1) unstable; urgency=low * merge from ubuntu (new upstream release) * add debconf prompt (priority medium) that asks if auto updates should be enabled -- Michael Vogt Wed, 26 Nov 2008 10:46:08 +0100 unattended-upgrades (0.35) jaunty; urgency=low * updated for jaunty * improved README to make it clerer where the values of (origin, archive) come from (thanks to -- Michael Vogt Wed, 26 Nov 2008 10:44:31 +0100 unattended-upgrades (0.32ubuntu2) intrepid; urgency=low * Updated for intrepid (and updated gutsy references too!) -- Sarah Hobbs Mon, 13 Oct 2008 22:40:21 +1100 unattended-upgrades (0.32ubuntu1) intrepid; urgency=low * Add debconf question to ask whether automatic updates should be configured by default: add debconf template, postinst and postrm scripts that uses ucf to manage /etc/apt/apt.conf.d/20auto-upgrades since we don't want to enable automatic updates by default. (LP: #84918) -- Mathias Gug Wed, 08 Oct 2008 21:01:52 -0400 unattended-upgrades (0.31ubuntu1) intrepid; urgency=low [ Michael Vogt ] * fix i18n and add build-dependency to python-distutils-extra [ Brian Murray ] * string fix for "Automatically" in 50unattended-upgrades (LP: #209049) -- Michael Vogt Wed, 23 Jul 2008 19:39:05 +0200 unattended-upgrades (0.30ubuntu1) hardy; urgency=low [ John Edwards ] * fix missing spaces in the log file (LP: #136452) * add better comments and examples to data/50unattended-upgrades [ Michael Vogt ] * README improved based on Johns suggestions (thanks!) * fix grammer and dated reference to dapper (LP: #140038), thanks to Christer Edwards for the suggestions * add "mailx" to suggests (LP: #137994) * show propper log output if mail is not available (LP: #137994) * show packages that are held back from the upgrade because of conffile prompt in the log as a warning (LP: #133551) * create logdir if it does not exist (LP: #87338) * fix error when installing from file:// uris (LP: #56832) -- Michael Vogt Mon, 10 Mar 2008 11:57:17 +0100 unattended-upgrades (0.26ubuntu1) hardy; urgency=low * updated for hardy -- Michael Vogt Tue, 05 Feb 2008 13:36:18 +0100 unattended-upgrades (0.25.3ubuntu1) gutsy; urgency=low * merged patch from Tuomas Jormola to detect if dpkg --force-conf(new|old) is set (LP: #135247) -- Michael Vogt Tue, 11 Sep 2007 21:37:13 +0200 unattended-upgrades (0.25.2ubuntu1) gutsy; urgency=low * do not run with broken cache * use ubuntu version number to keep auto-sync from coming for us -- Michael Vogt Wed, 11 Jul 2007 11:19:49 +0100 unattended-upgrades (0.25.1debian1-0.1) unstable; urgency=low * Non-Maintainter Update (BSP) * Add dependency on apt (>=0.7) (closes: #475611) -- Bas Zoetekouw Sat, 14 Jun 2008 14:55:51 +0200 unattended-upgrades (0.25.1debian1) unstable; urgency=low * documentation updated -- Michael Vogt Thu, 07 Jun 2007 13:36:47 +0200 unattended-upgrades (0.25.1) gutsy; urgency=low * documentation updated -- Michael Vogt Fri, 08 Jun 2007 14:50:10 +0200 unattended-upgrades (0.25ubuntu1) gutsy; urgency=low * updated for gutsy -- Michael Vogt Wed, 16 May 2007 15:21:11 +0200 unattended-upgrades (0.24debian1) unstable; urgency=low * new upstream version -- Michael Vogt Tue, 24 Apr 2007 23:34:15 +0200 unattended-upgrades (0.23ubuntu3) feisty-proposed; urgency=low * added missing README (thanks to siretart, LP#109564) -- Michael Vogt Tue, 24 Apr 2007 11:26:48 +0200 unattended-upgrades (0.22ubuntu2) feisty; urgency=low * fail if not runing as root (LP#72514) * do not crash if a archive can not be found (LP#72249) -- Michael Vogt Thu, 22 Mar 2007 17:14:47 +0100 unattended-upgrades (0.22ubuntu1) feisty; urgency=low * be more careful about checking if we actually have a candidateOrigin (lp: #81055) -- Michael Vogt Tue, 23 Jan 2007 11:38:44 +0100 unattended-upgrades (0.22ubuntu0) feisty; urgency=low * improved the description * added "Unattended-Upgrade::Mail" mail notification -- Michael Vogt Fri, 8 Dec 2006 22:40:42 +0100 unattended-upgrades (0.21ubuntu0) feisty; urgency=low * data/50unattended-upgrades: - updated for feisty -- Michael Vogt Fri, 3 Nov 2006 22:31:02 +0100 unattended-upgrades (0.2) unstable; urgency=low * initial debian upload -- Michael Vogt Mon, 2 Oct 2006 11:06:50 +0200 unattended-upgrades (0.1ubuntu6) edgy; urgency=low * debian/control: - only depend on python-apt -- Michael Vogt Thu, 27 Jul 2006 15:03:46 +0200 unattended-upgrades (0.1ubuntu5) edgy; urgency=low * data/apt-check.py: - fix in the clear() method * data/50unattended-upgrades: - updated to include edgy as default -- Michael Vogt Tue, 4 Jul 2006 11:23:09 +0200 unattended-upgrades (0.1ubuntu4) edgy; urgency=low * added misssing apt-utils dependency -- Michael Vogt Tue, 27 Jun 2006 09:36:43 +0200 unattended-upgrades (0.1ubuntu3) dapper; urgency=low * debian/dirs: /etc/apt.conf.d -> /etc/apt/apt.conf.d (Ubuntu: #44172) -- Michael Vogt Mon, 29 May 2006 08:34:08 +0200 unattended-upgrades (0.1ubuntu2) dapper; urgency=low * unattended-upgrade: - fix log output (ubuntu: #43773) - fix configuration by providing a example config (ubuntu: #43778) -- Michael Vogt Wed, 10 May 2006 20:20:54 +0200 unattended-upgrades (0.1ubuntu1) dapper; urgency=low * work with the latest python-apt api (ubuntu: #38958) -- Michael Vogt Mon, 8 May 2006 17:28:38 +0200 unattended-upgrades (0.0+bzr20051201) dapper; urgency=low * initial version -- Michael Vogt Mon, 28 Nov 2005 17:04:41 +0100 unattended-upgrades-0.82.1ubuntu1/debian/postinst0000664000000000000000000000401712250412747017017 0ustar #!/bin/sh # see: dh_installdeb(1) set -e # Do debconf stuff here . /usr/share/debconf/confmodule # summary of how this script can be called: # * `configure' # * `abort-upgrade' # * `abort-remove' `in-favour' # # * `abort-remove' # * `abort-deconfigure' `in-favour' # `removing' # # for details, see http://www.debian.org/doc/debian-policy/ or # the debian-policy package case "$1" in configure) # *sigh* typo in filename in version 0.51ubuntu1 if [ -e /etc/pm/sleep.d/10_unatteded-upgrades-hibernate ]; then rm -f /etc/pm/sleep.d/10_unatteded-upgrades-hibernate fi db_get unattended-upgrades/enable_auto_updates || true CONFIG="/etc/apt/apt.conf.d/20auto-upgrades" if [ "${RET}" = "true" ]; then NEWFILE="/usr/share/unattended-upgrades/20auto-upgrades" ucf --three-way --debconf-ok "$NEWFILE" "$CONFIG" ucfr unattended-upgrades "$CONFIG" elif [ "${RET}" = "false" ] && [ -e "$CONFIG" ]; then # disable again NEWFILE="/usr/share/unattended-upgrades/20auto-upgrades-disabled" ucf --three-way --debconf-ok "$NEWFILE" "$CONFIG" ucfr unattended-upgrades "$CONFIG" fi # Recover from incorrect init.d script header in versions < 0.64 if dpkg --compare-versions "$2" lt "0.64" \ && [ -f /etc/rc0.d/S[0-9][0-9]unattended-upgrades ] \ && [ -f /etc/rc6.d/S[0-9][0-9]unattended-upgrades ] ; then update-rc.d -f unattended-upgrades remove fi ;; abort-upgrade|abort-remove|abort-deconfigure) ;; *) echo "postinst called with unknown argument \`$1'" >&2 exit 1 ;; esac # dh_installdeb will replace this with shell code automatically # generated by other debhelper scripts. #DEBHELPER# exit 0 unattended-upgrades-0.82.1ubuntu1/debian/links0000664000000000000000000000006712250412747016255 0ustar usr/bin/unattended-upgrade usr/bin/unattended-upgrades unattended-upgrades-0.82.1ubuntu1/debian/templates0000664000000000000000000000133712250412747017134 0ustar # These templates have been reviewed by the debian-l10n-english # team # # If modifications/additions/rewording are needed, please ask # debian-l10n-english@lists.debian.org for advice. # # Even minor modifications require translation updates and such # changes should be coordinated with translators and reviewers. Template: unattended-upgrades/enable_auto_updates Type: boolean Default: false _Description: Automatically download and install stable updates? Applying updates on a frequent basis is an important part of keeping systems secure. By default, updates need to be applied manually using package management tools. Alternatively, you can choose to have this system automatically download and install security updates. unattended-upgrades-0.82.1ubuntu1/debian/po/0000775000000000000000000000000012301323623015614 5ustar unattended-upgrades-0.82.1ubuntu1/debian/po/cs.po0000664000000000000000000000303312250412747016571 0ustar # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER # This file is distributed under the same license as the unattended-upgrades package. # Vítězslav Kotrla , 2009. # msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: unattended-upgrades@packages.debian.org\n" "POT-Creation-Date: 2009-05-06 22:11+0200\n" "PO-Revision-Date: 2009-06-06 22:11+0200\n" "Last-Translator: Vítězslav Kotrla \n" "Language-Team: Czech \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "X-Generator: KBabel 1.11.4\n" #. Type: boolean #. Description #: ../templates:2001 msgid "Automatically download and install stable updates?" msgstr "Automaticky stahovat a instalovat aktualizace ze stabilní verze Debianu?" #. Type: boolean #. Description #: ../templates:2001 msgid "" "Applying updates on a frequent basis is an important part of keeping systems " "secure. By default, updates need to be applied manually using package " "management tools. Alternatively, you can choose to have this system " "automatically download and install security updates." msgstr "" "Pravidelné nasazování aktualizací je důležitou součástí udržování zabezpečení " "systému. Normálně je nutné aktualizace nasazovat ručně za použití příslušných " "nástrojů pro správu balíčků. Můžete ovšem zvolit, aby tento systém automaticky " "sám stahoval a instaloval bezpečnostní aktualizace." unattended-upgrades-0.82.1ubuntu1/debian/po/ja.po0000664000000000000000000000320612250412747016560 0ustar # Copyright (C) 2008 Michael Vogt # This file is distributed under the same license as the unattended-upgrades package. # Hideki Yamane (Debian-JP) , 2008. # msgid "" msgstr "" "Project-Id-Version: unattended-upgrades 0.36debian1\n" "Report-Msgid-Bugs-To: unattended-upgrades@packages.debian.org\n" "POT-Creation-Date: 2009-07-06 17:32+0100\n" "PO-Revision-Date: 2008-12-21 22:32+0900\n" "Last-Translator: Hideki Yamane (Debian-JP) \n" "Language-Team: Japanese \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #. Type: boolean #. Description #: ../templates:2001 msgid "Automatically download and install stable updates?" msgstr "自動的に安定版の更新をダウンロードしてインストールしますか?" #. Type: boolean #. Description #: ../templates:2001 msgid "" "Applying updates on a frequent basis is an important part of keeping systems " "secure. By default, updates need to be applied manually using package " "management tools. Alternatively, you can choose to have this system " "automatically download and install security updates." msgstr "" "更新の適用を頻繁に実施するのは、システムを安全に保つために重要なことです。標" "準の状態では、更新の適用はパッケージ管理ツールを使って手動で行う必要がありま" "す。別のやり方として、セキュリティ更新を自動的にダウンロードしてインストール" "するよう、このシステムを設定するようにもできます。" unattended-upgrades-0.82.1ubuntu1/debian/po/POTFILES.in0000664000000000000000000000004412250412747017400 0ustar [type: gettext/rfc822deb] templates unattended-upgrades-0.82.1ubuntu1/debian/po/fi.po0000664000000000000000000000313412250412747016564 0ustar msgid "" msgstr "" "Project-Id-Version: unattended-upgrades\n" "Report-Msgid-Bugs-To: unattended-upgrades@packages.debian.org\n" "POT-Creation-Date: 2009-07-06 17:32+0100\n" "PO-Revision-Date: \n" "Last-Translator: Esko Arajärvi \n" "Language-Team: Finnish \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "X-Poedit-Language: Finnish\n" "X-Poedit-Country: FINLAND\n" #. Type: boolean #. Description #: ../templates:2001 msgid "Automatically download and install stable updates?" msgstr "" "Ladataanko ja asennetaanko vakaan jakelun päivitykset automaattisesti? " #. Type: boolean #. Description #: ../templates:2001 #, fuzzy #| msgid "" #| "Applying updates on a frequent basis is an important part of keeping " #| "systems secure. By default, updates need to be applied manually using " #| "package management tools. Alternatively, you can choose to have this " #| "system automatically download and install security updates." msgid "" "Applying updates on a frequent basis is an important part of keeping systems " "secure. By default, updates need to be applied manually using package " "management tools. Alternatively, you can choose to have this system " "automatically download and install security updates." msgstr "" "Tietoturvan kannalta on tärkeää, että järjestelmää päivitetään " "säännöllisesti. Oletusarvoisesti päivitykset täytyy asentaa käsin käyttäen " "pakettienhallintatyökaluja. Tämän ohjelmiston avulla tietoturvapäivitykset " "voidaan ladata ja asentaa automaattisesti." unattended-upgrades-0.82.1ubuntu1/debian/po/templates.pot0000664000000000000000000000207312250412747020351 0ustar # SOME DESCRIPTIVE TITLE. # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER # This file is distributed under the same license as the PACKAGE package. # FIRST AUTHOR , YEAR. # #, fuzzy msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: unattended-upgrades@packages.debian.org\n" "POT-Creation-Date: 2009-07-06 17:32+0100\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=CHARSET\n" "Content-Transfer-Encoding: 8bit\n" #. Type: boolean #. Description #: ../templates:2001 msgid "Automatically download and install stable updates?" msgstr "" #. Type: boolean #. Description #: ../templates:2001 msgid "" "Applying updates on a frequent basis is an important part of keeping systems " "secure. By default, updates need to be applied manually using package " "management tools. Alternatively, you can choose to have this system " "automatically download and install security updates." msgstr "" unattended-upgrades-0.82.1ubuntu1/debian/po/de.po0000664000000000000000000001112312250412747016553 0ustar # Translation of unattended-upgrades templates to German # Copyright (C) Helge Kreutzmann , 2009, 2011. # This file is distributed under the same license as the unattended-upgrades package. # msgid "" msgstr "" "Project-Id-Version: unattended-upgrades 0.73.1\n" "Report-Msgid-Bugs-To: unattended-upgrades@packages.debian.org\n" "POT-Creation-Date: 2009-07-06 17:32+0100\n" "PO-Revision-Date: 2011-10-30 19:26+0100\n" "Last-Translator: Helge Kreutzmann \n" "Language-Team: de \n" "Language: \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #. Type: boolean #. Description #: ../templates:2001 msgid "Automatically download and install stable updates?" msgstr "Aktualisierungen für Stable automatisch herunterladen und installieren?" #. Type: boolean #. Description #: ../templates:2001 msgid "" "Applying updates on a frequent basis is an important part of keeping systems " "secure. By default, updates need to be applied manually using package " "management tools. Alternatively, you can choose to have this system " "automatically download and install security updates." msgstr "" "Das häufige Anwenden von Aktualisierungen ist ein wichtiger Aspekt beim " "Erhalt der Sicherheit von Systemen. Standardmäßig müssen Aktualisierungen " "manuell mit den Paketverwaltungswerkzeugen eingespielt werden. Alternativ " "können Sie wählen, dass das System automatisch die " "Sicherheitsaktualisierungen herunterlädt und installiert." #~ msgid "print debug messages" #~ msgstr "Debug-Meldungen ausgeben" #~ msgid "Initial blacklisted packages: %s" #~ msgstr "Anfänglich ausgeschlossene Pakete: %s" #~ msgid "Starting unattended upgrades script" #~ msgstr "Unattended-Upgrades-Skript wird gestartet" #~ msgid "Allowed origins are: %s" #~ msgstr "Erlaubte Quellen sind: %s" #~ msgid "Cache has broken packages, exiting" #~ msgstr "" #~ "Zwischenspeicher (Cache) enthält defekte Pakete, Programm wird beendet" #~ msgid "package '%s' upgradable but fails to be marked for upgrade (%s)" #~ msgstr "" #~ "Upgrade von »%s« möglich, aber Markierung für Upgrade konnte nicht " #~ "gesetzt werden (%s)" #~ msgid "GetArchives() failed: '%s'" #~ msgstr "GetArchives() fehlgeschlagen: »%s«" #~ msgid "An error ocured: '%s'" #~ msgstr "Ein Fehler ist aufgetreten: »%s«" #~ msgid "The URI '%s' failed to download, aborting" #~ msgstr "" #~ "Von der URI »%s« konnte nicht heruntergeladen werden, Programm wird " #~ "beendet" #~ msgid "Package '%s' has conffile prompt and needs to be upgraded manually" #~ msgstr "" #~ "Paket »%s« enthält eine Conffile-Eingabeaufforderung und das Upgrade muss " #~ "manuell durchgeführt werden" #~ msgid "package '%s' not upgraded" #~ msgstr "Upgrade von Paket »%s« nicht durchgeführt" #~ msgid "No packages found that can be upgraded unattended" #~ msgstr "" #~ "Keine Pakete gefunden, von denen ein unbeaufsichtigtes Upgrade " #~ "durchgeführt werden kann." #~ msgid "Packages that are upgraded: %s" #~ msgstr "Pakete, von denen ein Upgrade durchgeführt wird: %s" #~ msgid "Writing dpkg log to '%s'" #~ msgstr "Dpkg-Protokoll wird nach »%s« geschrieben" #~ msgid "pm.GetArchives() failed" #~ msgstr "pm.GetArchives() fehlgeschlagen" #~ msgid "Installing the upgrades failed!" #~ msgstr "Installation der Upgrades fehlgeschlagen!" #~ msgid "error message: '%s'" #~ msgstr "Fehlermeldung: »%s«" #~ msgid "dpkg returned a error! See '%s' for details" #~ msgstr "Dpkg meldete einen Fehler! Lesen Sie »%s« für Details" #~ msgid "All upgrades installed" #~ msgstr "Alle Upgrades installiert" #~ msgid "" #~ "No '/usr/bin/mail', can not send mail. You probably want to install the " #~ "'mailx' package." #~ msgstr "" #~ "»/usr/bin/mail« nicht vorhanden, es können keine E-Mails versendet " #~ "werden. Wahrscheinlich müssen Sie das Paket »mailx« installieren." #~ msgid "unattended-upgrades result for '%s'" #~ msgstr "Ergebnis von unattended-upgrades für »%s«" #~ msgid "" #~ "Unattended upgrade returned: %s\n" #~ "\n" #~ msgstr "" #~ "Unbeaufsichtiges Upgrade meldete zurück: %s\n" #~ "\n" #~ msgid "Packages that are upgraded:\n" #~ msgstr "Pakete, bei denen ein Upgrade durchgeführt wurde:\n" #~ msgid "Packages with upgradable origin but kept back:\n" #~ msgstr "" #~ "Pakete, bei denen die Quelle Upgrade-fähig war, die aber zurückgehalten " #~ "wurden:\n" #~ msgid "Package installation log:" #~ msgstr "Paketinstallationsprotokoll:" #~ msgid "You need to be root to run this application" #~ msgstr "Sie müssen »root« sein, um dieses Programm auszuführen." unattended-upgrades-0.82.1ubuntu1/debian/po/eu.po0000664000000000000000000000276112250412747016604 0ustar # translation of eu.po to Euskara # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER # This file is distributed under the same license as the PACKAGE package. # # Piarres Beobide , 2008, 2009. msgid "" msgstr "" "Project-Id-Version: eu\n" "Report-Msgid-Bugs-To: unattended-upgrades@packages.debian.org\n" "POT-Creation-Date: 2009-07-06 17:32+0100\n" "PO-Revision-Date: 2009-01-29 01:50+0100\n" "Last-Translator: Piarres Beobide \n" "Language-Team: Euskara \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "X-Generator: KBabel 1.11.4\n" #. Type: boolean #. Description #: ../templates:2001 msgid "Automatically download and install stable updates?" msgstr "Bertsio-berritze egonkorrak automatikoki deskargatu eta instalatu?" #. Type: boolean #. Description #: ../templates:2001 msgid "" "Applying updates on a frequent basis is an important part of keeping systems " "secure. By default, updates need to be applied manually using package " "management tools. Alternatively, you can choose to have this system " "automatically download and install security updates." msgstr "" "Maiztasunean oinarritutako bertsio-berritze ezarpenak sistema seguru " "mantentzearen zati garrantzitsu bat da. Lehenespenez bertsio-berritzeak " "eskuz pakete kudeaketa elementuak erabiliaz egin behar dira. Bestela " "segurtasun eguneraketak sistemak automatikoki deskargatu eta instalatzea " "hautatu dezakezu." unattended-upgrades-0.82.1ubuntu1/debian/po/es.po0000664000000000000000000000517612250412747016605 0ustar # unattended-upgrades po-debconf translation to Spanish. # Copyright (C) 2007 Software in the Public Interest, SPI Inc. # This file is distributed under the same license as the unattended-upgrades package. # # Changes: # - Initial translation # Fernando González de Requena , 2009. # -Reviewers: # Javier Fernandez-Sanguino # # Traductores, si no conoce el formato PO, merece la pena leer la # documentación de gettext, especialmente las secciones dedicadas a este # formato, por ejemplo ejecutando: # info -n '(gettext)PO Files' # info -n '(gettext)Header Entry' # # Equipo de traducción al español, por favor lean antes de traducir # los siguientes documentos: # # - El proyecto de traducción de Debian al español # http://www.debian.org/intl/spanish/ # especialmente las notas y normas de traducción en # http://www.debian.org/intl/spanish/notas # # - La guía de traducción de po's de debconf: # /usr/share/doc/po-debconf/README-trans # o http://www.debian.org/intl/l10n/po-debconf/README-trans # # Si tiene dudas o consultas sobre esta traducción consulte con el último # traductor (campo Last-Translator) y ponga en copia a la lista de # traducción de Debian al español () # msgid "" msgstr "" "Project-Id-Version: unattended-upgrades 0.37debian1\n" "Report-Msgid-Bugs-To: unattended-upgrades@packages.debian.org\n" "POT-Creation-Date: 2009-01-05 10:34+0100\n" "PO-Revision-Date: 2009-01-06 18:08+0200\n" "Last-Translator: Fernando González de Requena \n" "Language-Team: Debian Spanish \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #. Type: boolean #. Description #: ../templates:2001 msgid "Automatically download and install stable updates?" msgstr "" "¿Desea descargar e instalar automáticamente las actualizaciones " "de la versión estable?" #. Type: boolean #. Description #: ../templates:2001 msgid "" "Applying updates on a frequent basis is an important part of keeping systems " "secure. By default, updates need to be applied manually using package " "management tools. Alternatively, you can choose to have this system " "automatically download and install security updates." msgstr "" "Para mantener el sistema seguro es importante instalar las actualizaciones " "regularmente. Por omisión, para poder realizar una actualización tiene que utilizar " "una herramienta de gestión de paquetes. Como alternativa, puede elegir que el " "sistema descargue e instale automáticamente las actualizaciones de seguridad." unattended-upgrades-0.82.1ubuntu1/debian/po/pt.po0000664000000000000000000000311312250412747016606 0ustar # translation of unattended-upgrades debconf to Portuguese # Copyright (C) 2008 the unattended-upgrades's copyright holder # This file is distributed under the same license as the unattended-upgrades package. # # António Moreira , 2008. msgid "" msgstr "" "Project-Id-Version: unattended-upgrades 0.35debian2\n" "Report-Msgid-Bugs-To: unattended-upgrades@packages.debian.org\n" "POT-Creation-Date: 2008-12-08 18:38+0100\n" "PO-Revision-Date: 2008-12-14 11:49+0000\n" "Last-Translator: António Moreira \n" "Language-Team: Portuguese \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #. Type: boolean #. Description #: ../templates:2001 msgid "Automatically download and install stable updates?" msgstr "Transferir e instalar automaticamente actualizações estáveis?" #. Type: boolean #. Description #: ../templates:2001 msgid "" "Applying updates on a frequent basis is an important part of keeping systems " "secure. By default, updates need to be applied manually using package " "management tools. Alternatively, you can choose to have this system " "automatically download and install security updates." msgstr "" "Aplicar actualizações regularmente é uma parte importante para manter os " "sistemas seguros. Por regra, as actualizações precisam de ser aplicadas " "manualmente usando ferramentas de gestão de pacotes. Em alternativa, você pode " "escolher ter este sistema a descarregar e instalar automaticamente as " "actualizações de segurança." unattended-upgrades-0.82.1ubuntu1/debian/po/nl.po0000664000000000000000000000305312250412747016577 0ustar # Dutch translation of unattended-upgrades debconf templates. # Copyright (C) 2011 THE PACKAGE'S COPYRIGHT HOLDER # This file is distributed under the same license as the unattended-upgrades package. # Jeroen Schot , 2011. # msgid "" msgstr "" "Project-Id-Version: unattended-upgrades_0.70\n" "Report-Msgid-Bugs-To: unattended-upgrades@packages.debian.org\n" "POT-Creation-Date: 2009-07-06 17:32+0100\n" "PO-Revision-Date: 2011-05-09 11:21+0200\n" "Last-Translator: Jeroen Schot \n" "Language-Team: Debian l10n Dutch \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Language: nl\n" #. Type: boolean #. Description #: ../templates:2001 msgid "Automatically download and install stable updates?" msgstr "Updates van 'stable' automatisch binnenhalen en installeren?" #. Type: boolean #. Description #: ../templates:2001 msgid "" "Applying updates on a frequent basis is an important part of keeping systems " "secure. By default, updates need to be applied manually using package " "management tools. Alternatively, you can choose to have this system " "automatically download and install security updates." msgstr "" "Regelmatig updates installeren is een belangrijk onderdeel van de " "beveiliging van systemen. Standaard moeten updates handmatig worden " "toegepast met een van de hulpprogramma's voor pakketbeheer. U kunt er ook " "voor kiezen om op dit systeem beveilingingsupdates automatisch binnen te " "halen en te installeren." unattended-upgrades-0.82.1ubuntu1/debian/po/ca.po0000664000000000000000000000321312250412747016547 0ustar # unattended-upgrades po-debconf translation to Catalan # Copyright (C) 2007 Software in the Public Interest, SPI Inc. # This file is distributed under the same license as the PACKAGE package. # Innocent De Marchi , 2011. # msgid "" msgstr "" "Project-Id-Version: unattended-upgrades 0.70\n" "Report-Msgid-Bugs-To: unattended-upgrades@packages.debian.org\n" "POT-Creation-Date: 2009-07-06 17:32+0100\n" "PO-Revision-Date: 2011-06-01 18:28+0100\n" "Last-Translator: Innocent De Marchi \n" "Language-Team: Catalan <>\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=utf-8\n" "Content-Transfer-Encoding: 8bit\n" "X-Poedit-Language: Catalan\n" "X-Poedit-Country: SPAIN\n" #. Type: boolean #. Description #: ../templates:2001 msgid "Automatically download and install stable updates?" msgstr "Desitjau descarregar i instal·lar automàticament les actualitzacions de la versió estable?" #. Type: boolean #. Description #: ../templates:2001 msgid "Applying updates on a frequent basis is an important part of keeping systems secure. By default, updates need to be applied manually using package management tools. Alternatively, you can choose to have this system automatically download and install security updates." msgstr "La instal·lació de les actualitzacions amb freqüència és un aspecte important per a mantenir la seguretat del sistema. Per defecte, les actualitzacions s'han de fer manualment utilitzant les eines de gestió de paquets. Si ho preferiu, podeu optar per fer que el sistema descarregui i instal li automàticament les actualitzacions de seguretat." unattended-upgrades-0.82.1ubuntu1/debian/po/sv.po0000664000000000000000000000276212250412747016624 0ustar # translation of unattended-upgrades.po to swedish # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER # This file is distributed under the same license as the PACKAGE package. # # Martin Bagge , 2008. msgid "" msgstr "" "Project-Id-Version: unattended-upgrades\n" "Report-Msgid-Bugs-To: unattended-upgrades@packages.debian.org\n" "POT-Creation-Date: 2009-07-06 17:32+0100\n" "PO-Revision-Date: 2008-12-09 16:27+0100\n" "Last-Translator: Martin Bagge \n" "Language-Team: swedish \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "X-Generator: KBabel 1.11.4\n" #. Type: boolean #. Description #: ../templates:2001 msgid "Automatically download and install stable updates?" msgstr "Ska stabila uppdateringar laddas hem och installeras automatiskt?" #. Type: boolean #. Description #: ../templates:2001 msgid "" "Applying updates on a frequent basis is an important part of keeping systems " "secure. By default, updates need to be applied manually using package " "management tools. Alternatively, you can choose to have this system " "automatically download and install security updates." msgstr "" "Att installera uppdateringar är en viktig del i att hålla systemet säkert. " "Standardinställningen är att uppdateringar måste installeras manuellt via en " "pakethanterare. Alternativet är att du kan låta systemet automatiskt ladda " "hem och installera säkerhetsuppdateringar." unattended-upgrades-0.82.1ubuntu1/debian/po/fr.po0000664000000000000000000000275612250412747016606 0ustar # unattended-upgrades po-debconf file # Copyright (C) 2008 # This file is distributed under the same license as the unattended-upgrades package. # Michael Vogt , 2008 # msgid "" msgstr "" "Project-Id-Version: 0.35debian1\n" "Report-Msgid-Bugs-To: unattended-upgrades@packages.debian.org\n" "POT-Creation-Date: 2009-01-05 10:34+0100\n" "PO-Revision-Date: 2008-12-03 12:00+0200\n" "Last-Translator: Steve Petruzzello \n" "Language-Team: French \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=utf-8\n" "Content-Transfer-Encoding: 8bit\n" #. Type: boolean #. Description #: ../templates:2001 msgid "Automatically download and install stable updates?" msgstr "" "Faut-il automatiquement télécharger et installer les mises à jour de la " "version stable ?" #. Type: boolean #. Description #: ../templates:2001 msgid "" "Applying updates on a frequent basis is an important part of keeping systems " "secure. By default, updates need to be applied manually using package " "management tools. Alternatively, you can choose to have this system " "automatically download and install security updates." msgstr "" "Il est important de mettre régulièrement son système à jour pour maintenir " "un haut niveau de sécurité. Par défaut, les mises à jour doivent être " "appliquées manuellement à l'aide d'un outil de gestion de paquets. À " "l'inverse, vous pouvez choisir d'automatiser ce processus avec unattended-" "upgrades." unattended-upgrades-0.82.1ubuntu1/debian/po/pt_BR.po0000664000000000000000000000315012250412747017172 0ustar # Debconf translations for unattended-upgrades. # Copyright (C) 2009 THE unattended-upgrades'S COPYRIGHT HOLDER # This file is distributed under the same license as the unattended-upgrades package. # Adriano Rafael Gomes , 2009-2010. # msgid "" msgstr "" "Project-Id-Version: unattended-upgrades\n" "Report-Msgid-Bugs-To: unattended-upgrades@packages.debian.org\n" "POT-Creation-Date: 2009-07-06 17:32+0100\n" "PO-Revision-Date: 2010-12-17 21:58-0200\n" "Last-Translator: Adriano Rafael Gomes \n" "Language-Team: Brazilian Portuguese \n" "Language: pt_BR\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "pt_BR utf-8\n" #. Type: boolean #. Description #: ../templates:2001 msgid "Automatically download and install stable updates?" msgstr "Baixar e instalar atualizações estáveis automaticamente?" #. Type: boolean #. Description #: ../templates:2001 msgid "" "Applying updates on a frequent basis is an important part of keeping systems " "secure. By default, updates need to be applied manually using package " "management tools. Alternatively, you can choose to have this system " "automatically download and install security updates." msgstr "" "Aplicar atualizações com frequência é uma parte importante de manter os " "sistemas seguros. Por padrão, as atualizações precisam ser aplicadas " "manualmente usando ferramentas de gerenciamento de pacotes. " "Alternativamente, você pode escolher que esse sistema baixe e instale " "automaticamente as atualizações de segurança." unattended-upgrades-0.82.1ubuntu1/debian/po/ru.po0000664000000000000000000000374012250412747016617 0ustar # translation of ru.po to Russian # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER # This file is distributed under the same license as the PACKAGE package. # # Yuri Kozlov , 2008. # Yuri Kozlov , 2009. msgid "" msgstr "" "Project-Id-Version: unattended-upgrades 0.39debian1\n" "Report-Msgid-Bugs-To: unattended-upgrades@packages.debian.org\n" "POT-Creation-Date: 2009-07-06 17:32+0100\n" "PO-Revision-Date: 2009-04-19 10:58+0400\n" "Last-Translator: Yuri Kozlov \n" "Language-Team: Russian \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "X-Generator: KBabel 1.11.4\n" "Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%" "10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n" #. Type: boolean #. Description #: ../templates:2001 msgid "Automatically download and install stable updates?" msgstr "" "Скачивать и устанавливать обновления стабильного выпуска автоматически?" #. Type: boolean #. Description #: ../templates:2001 msgid "" "Applying updates on a frequent basis is an important part of keeping systems " "secure. By default, updates need to be applied manually using package " "management tools. Alternatively, you can choose to have this system " "automatically download and install security updates." msgstr "" "Регулярная установка обновлений является важной частью обеспечения " "безопасности системы. По умолчанию, обновления нужно устанавливать вручную с " "помощью инструментов управления пакетами. Но сейчас можно указать, чтобы " "обновления безопасности скачивались и устанавливались автоматически." unattended-upgrades-0.82.1ubuntu1/debian/po/da.po0000664000000000000000000000274012250412747016554 0ustar # Danish translation unattended-upgrades. # Copyright (C) 2011 unattended-upgrades og nedenstående oversættere. # This file is distributed under the same license as the unattended-upgrades package. # Joe Hansen (joedalton2@yahoo.dk), 2011. # msgid "" msgstr "" "Project-Id-Version: unattended-upgrades\n" "Report-Msgid-Bugs-To: unattended-upgrades@packages.debian.org\n" "POT-Creation-Date: 2009-07-06 17:32+0100\n" "PO-Revision-Date: 2011-03-22 19:25+0200\n" "Last-Translator: Joe Hansen \n" "Language-Team: Danish \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #. Type: boolean #. Description #: ../templates:2001 msgid "Automatically download and install stable updates?" msgstr "Hent og installer automatisk stabile opdateringer?" #. Type: boolean #. Description #: ../templates:2001 msgid "" "Applying updates on a frequent basis is an important part of keeping systems " "secure. By default, updates need to be applied manually using package " "management tools. Alternatively, you can choose to have this system " "automatically download and install security updates." msgstr "" "Løbende installation af opdateringer er en vigtig del af at holde et system " "sikkert. Som standard skal opdateringer installeres manuelt med " "pakkehåndteringsværktøjer. Alternativt kan du automatisk vælge at lade dette " "system hente og installere sikkerhedsmæssige opdateringer." unattended-upgrades-0.82.1ubuntu1/debian/po/it.po0000664000000000000000000000303712250412747016604 0ustar # Translation of unattended-upgrades debconf templates to Italian # This file is distributed under the same license as the unattended-upgrades package. # Luca Monducci , 2008. # msgid "" msgstr "" "Project-Id-Version: unattended-upgrades 0.35debian2 debconf\n" "Report-Msgid-Bugs-To: unattended-upgrades@packages.debian.org\n" "POT-Creation-Date: 2008-12-08 18:38+0100\n" "PO-Revision-Date: 2008-12-08 20:35+0100\n" "Last-Translator: Luca Monducci \n" "Language-Team: Italian \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #. Type: boolean #. Description #: ../templates:2001 msgid "Automatically download and install stable updates?" msgstr "Scaricare e installare automaticamente gli aggiornamenti?" #. Type: boolean #. Description #: ../templates:2001 msgid "" "Applying updates on a frequent basis is an important part of keeping systems " "secure. By default, updates need to be applied manually using package " "management tools. Alternatively, you can choose to have this system " "automatically download and install security updates." msgstr "" "L'applicazione a cadenza regolare degli aggiornamenti è una parte importante " "per la sicurezza del proprio sistema. Normalmente gli aggiornamenti devono " "essere applicati manualmente usando gli strumenti di gestione dei pacchetti; " "in alternativa è possibile utilizzare questo sistema per scaricare e " "installare automaticamente gli aggiornamenti di sicurezza." unattended-upgrades-0.82.1ubuntu1/debian/po/sk.po0000664000000000000000000000271612250412747016610 0ustar # Slovak translation of unattended-upgrades debconf template. # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER # This file is distributed under the same license as the udev package. # Ivan Masár , 2009. # msgid "" msgstr "" "Project-Id-Version: unattended-upgrades\n" "Report-Msgid-Bugs-To: unattended-upgrades@packages.debian.org\n" "POT-Creation-Date: 2009-06-10 21:24+0200\n" "PO-Revision-Date: 2009-06-13 10:28+0100\n" "Last-Translator: Ivan Masár \n" "Language-Team: Slovak \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=utf-8\n" "Content-Transfer-Encoding: 8bit\n" #. Type: boolean #. Description #: ../templates:2001 msgid "Automatically download and install stable updates?" msgstr "Automaticky sťahovať a inštalovať stabilné aktualizácie?" #. Type: boolean #. Description #: ../templates:2001 msgid "Applying updates on a frequent basis is an important part of keeping systems secure. By default, updates need to be applied manually using package management tools. Alternatively, you can choose to have this system automatically download and install security updates." msgstr "Častá aktualizácia je dôležitou súčasťou udrživania zabezpečeného systému. Štandardne je nutné aktualizácie spúšťať ručne pomocou nástrojov na správu balíkov. Namiesto toho môžete nechať tento systém aby za vás autoamticky sťahoval a inštaloval bezpečnostné aktualizácie." unattended-upgrades-0.82.1ubuntu1/debian/copyright0000664000000000000000000000053212250412747017142 0ustar This package was debianized by Michael Vogt on Mon, 28 Nov 2005 17:01:41 +0100. It was downloaded via bzr from http://code.launchpad.net/~ubuntu-core-dev/unattended-upgrades/ubuntu Copyright: 2005-2009 Canonical Ltd Upstream Author: Michael Vogt GPL, see /usr/share/common-licenses/GPL-2 unattended-upgrades-0.82.1ubuntu1/debian/postrm0000664000000000000000000000204512250412747016457 0ustar #!/bin/sh # # see: dh_installdeb(1) set -e # summary of how this script can be called: # * `remove' # * `purge' # * `upgrade' # * `failed-upgrade' # * `abort-install' # * `abort-install' # * `abort-upgrade' # * `disappear' # # for details, see http://www.debian.org/doc/debian-policy/ or # the debian-policy package case "$1" in purge) if [ -x "`which ucf 2>/dev/null`" ]; then ucf --purge /etc/apt/apt.conf.d/20auto-upgrades fi rm -f /etc/apt/apt.conf.d/20auto-upgrades ;; remove|upgrade|failed-upgrade|abort-install|abort-upgrade|disappear) ;; *) echo "postrm called with unknown argument \`$1'" >&2 exit 1 ;; esac # dh_installdeb will replace this with shell code automatically # generated by other debhelper scripts. #DEBHELPER# exit 0 unattended-upgrades-0.82.1ubuntu1/debian/docs0000664000000000000000000000001212250412747016053 0ustar README.md unattended-upgrades-0.82.1ubuntu1/debian/rules0000775000000000000000000000154312250412747016272 0ustar #!/usr/bin/make -f PYTHON=python3 DIST=$(shell dpkg-vendor --query Vendor) %: dh $@ override_dh_auto_build: # copy the right template into place cp data/50unattended-upgrades.$(DIST) data/50unattended-upgrades $(PYTHON) setup.py build override_dh_auto_test: $(MAKE) -C test override_dh_auto_install: $(PYTHON) setup.py install \ --root=$(CURDIR)/debian/unattended-upgrades \ --install-layout=deb override_dh_auto_clean: # Sanity-check before upload. set -e; for f in unattended-upgrade unattended-upgrade-shutdown; do \ ln -nsf $$f $$f.py; \ py3compile $$f.py; \ pycompile $$f.py; \ rm -f $$f.py; \ done $(PYTHON) setup.py clean -a override_dh_installinit: # we do not want to run the init script in the postinst/prerm, its # really only useful on shutdown, see Debian bug #645919 dh_installinit $@ --no-start -- stop 10 0 6 . unattended-upgrades-0.82.1ubuntu1/debian/pycompat0000664000000000000000000000000112250412747016755 0ustar 2unattended-upgrades-0.82.1ubuntu1/setup.cfg0000664000000000000000000000002112250412747015577 0ustar [build] i18n=Trueunattended-upgrades-0.82.1ubuntu1/setup.py0000775000000000000000000000174412250412747015510 0ustar #!/usr/bin/env python from setuptools import setup from DistUtilsExtra.command import ( build_extra, build_i18n, ) if __name__ == "__main__": setup( name='unattended-upgrades', version='0.1', scripts=['unattended-upgrade'], data_files=[ ('../etc/apt/apt.conf.d/', ["data/50unattended-upgrades"]), ('../etc/logrotate.d/', ["data/logrotate.d/unattended-upgrades"]), ('../usr/share/unattended-upgrades/', ["data/20auto-upgrades", "data/20auto-upgrades-disabled", "unattended-upgrade-shutdown"]), ('../usr/share/man/man8/', ["man/unattended-upgrade.8"]), ('../etc/pm/sleep.d/', ["pm/sleep.d/10_unattended-upgrades-hibernate"]) ], cmdclass={"build": build_extra.build_extra, "build_i18n": build_i18n.build_i18n}, test_suite="test", ) unattended-upgrades-0.82.1ubuntu1/data/0000775000000000000000000000000012301323623014665 5ustar unattended-upgrades-0.82.1ubuntu1/data/20auto-upgrades0000664000000000000000000000012012250412747017534 0ustar APT::Periodic::Update-Package-Lists "1"; APT::Periodic::Unattended-Upgrade "1"; unattended-upgrades-0.82.1ubuntu1/data/50unattended-upgrades.Ubuntu0000664000000000000000000000443312250412747022216 0ustar // Automatically upgrade packages from these (origin:archive) pairs Unattended-Upgrade::Allowed-Origins { "${distro_id}:${distro_codename}-security"; // "${distro_id}:${distro_codename}-updates"; // "${distro_id}:${distro_codename}-proposed"; // "${distro_id}:${distro_codename}-backports"; }; // List of packages to not update (regexp are supported) Unattended-Upgrade::Package-Blacklist { // "vim"; // "libc6"; // "libc6-dev"; // "libc6-i686"; }; // This option allows you to control if on a unclean dpkg exit // unattended-upgrades will automatically run // dpkg --force-confold --configure -a // The default is true, to ensure updates keep getting installed //Unattended-Upgrade::AutoFixInterruptedDpkg "false"; // Split the upgrade into the smallest possible chunks so that // they can be interrupted with SIGUSR1. This makes the upgrade // a bit slower but it has the benefit that shutdown while a upgrade // is running is possible (with a small delay) //Unattended-Upgrade::MinimalSteps "true"; // Install all unattended-upgrades when the machine is shuting down // instead of doing it in the background while the machine is running // This will (obviously) make shutdown slower //Unattended-Upgrade::InstallOnShutdown "true"; // Send email to this address for problems or packages upgrades // If empty or unset then no email is sent, make sure that you // have a working mail setup on your system. A package that provides // 'mailx' must be installed. E.g. "user@example.com" //Unattended-Upgrade::Mail "root"; // Set this value to "true" to get emails only on errors. Default // is to always send a mail if Unattended-Upgrade::Mail is set //Unattended-Upgrade::MailOnlyOnError "true"; // Do automatic removal of new unused dependencies after the upgrade // (equivalent to apt-get autoremove) //Unattended-Upgrade::Remove-Unused-Dependencies "false"; // Automatically reboot *WITHOUT CONFIRMATION* // if the file /var/run/reboot-required is found after the upgrade //Unattended-Upgrade::Automatic-Reboot "false"; // If automatic reboot is enabled and needed, reboot at the specific // time instead of immediately // Default: "now" //Unattended-Upgrade::Automatic-Reboot-Time "02:00"; // Use apt bandwidth limit feature, this example limits the download // speed to 70kb/sec //Acquire::http::Dl-Limit "70"; unattended-upgrades-0.82.1ubuntu1/data/logrotate.d/0000775000000000000000000000000012301323623017107 5ustar unattended-upgrades-0.82.1ubuntu1/data/logrotate.d/unattended-upgrades0000664000000000000000000000026112250412747023005 0ustar /var/log/unattended-upgrades/unattended-upgrades.log /var/log/unattended-upgrades/unattended-upgrades-shutdown.log { rotate 6 monthly compress missingok notifempty } unattended-upgrades-0.82.1ubuntu1/data/20auto-upgrades-disabled0000664000000000000000000000012012250412747021301 0ustar APT::Periodic::Update-Package-Lists "0"; APT::Periodic::Unattended-Upgrade "0"; unattended-upgrades-0.82.1ubuntu1/data/50unattended-upgrades.SteamOS0000777000000000000000000000000012301323623027441 250unattended-upgrades.Debianustar unattended-upgrades-0.82.1ubuntu1/data/50unattended-upgrades.Debian0000664000000000000000000000755012250412747022121 0ustar // Unattended-Upgrade::Origins-Pattern controls which packages are // upgraded. // // Lines below have the format format is "keyword=value,...". A // package will be upgraded only if the values in its metadata match // all the supplied keywords in a line. (In other words, omitted // keywords are wild cards.) The keywords originate from the Release // file, but several aliases are accepted. The accepted keywords are: // a,archive,suite (eg, "stable") // c,component (eg, "main", "crontrib", "non-free") // l,label (eg, "Debian", "Debian-Security") // o,origin (eg, "Debian", "Unofficial Multimedia Packages") // n,codename (eg, "jessie", "jessie-updates") // site (eg, "http.debian.net") // The available values on the system are printed by the command // "apt-cache policy", and can be debugged by running // "unattended-upgrades -d" and looking at the log file. // // Within lines unattended-upgrades allows 2 macros whose values are // derived from /etc/debian_version: // ${distro_id} Installed origin. // ${distro_codename} Installed codename (eg, "jessie") Unattended-Upgrade::Origins-Pattern { // Codename based matching: // This will follow the migration of a release through different // archives (e.g. from testing to stable and later oldstable). // "o=Debian,n=jessie"; // "o=Debian,n=jessie-updates"; // "o=Debian,n=jessie-proposed-updates"; // "o=Debian,n=jessie,l=Debian-Security"; // Archive or Suite based matching: // Note that this will silently match a different release after // migration to the specified archive (e.g. testing becomes the // new stable). // "o=Debian,a=stable"; // "o=Debian,a=stable-updates"; // "o=Debian,a=proposed-updates"; "origin=Debian,archive=${distro_codename},label=Debian-Security"; }; // List of packages to not update (regexp are supported) Unattended-Upgrade::Package-Blacklist { // "vim"; // "libc6"; // "libc6-dev"; // "libc6-i686"; }; // This option allows you to control if on a unclean dpkg exit // unattended-upgrades will automatically run // dpkg --force-confold --configure -a // The default is true, to ensure updates keep getting installed //Unattended-Upgrade::AutoFixInterruptedDpkg "false"; // Split the upgrade into the smallest possible chunks so that // they can be interrupted with SIGUSR1. This makes the upgrade // a bit slower but it has the benefit that shutdown while a upgrade // is running is possible (with a small delay) //Unattended-Upgrade::MinimalSteps "true"; // Install all unattended-upgrades when the machine is shuting down // instead of doing it in the background while the machine is running // This will (obviously) make shutdown slower //Unattended-Upgrade::InstallOnShutdown "true"; // Send email to this address for problems or packages upgrades // If empty or unset then no email is sent, make sure that you // have a working mail setup on your system. A package that provides // 'mailx' must be installed. E.g. "user@example.com" //Unattended-Upgrade::Mail "root"; // Set this value to "true" to get emails only on errors. Default // is to always send a mail if Unattended-Upgrade::Mail is set //Unattended-Upgrade::MailOnlyOnError "true"; // Do automatic removal of new unused dependencies after the upgrade // (equivalent to apt-get autoremove) //Unattended-Upgrade::Remove-Unused-Dependencies "false"; // Automatically reboot *WITHOUT CONFIRMATION* if // the file /var/run/reboot-required is found after the upgrade //Unattended-Upgrade::Automatic-Reboot "false"; // If automatic reboot is enabled and needed, reboot at the specific // time instead of immediately // Default: "now" //Unattended-Upgrade::Automatic-Reboot-Time "02:00"; // Use apt bandwidth limit feature, this example limits the download // speed to 70kb/sec //Acquire::http::Dl-Limit "70"; unattended-upgrades-0.82.1ubuntu1/README.md0000664000000000000000000000620512250412747015247 0ustar Unattended upgrades =================== This script can upgrade packages automatically and unattended. However, it is not enabled by default. Most users enable it via the Software Sources program (available in System/Administration). If you would prefer to enable 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 ----- The unattended-upgrades package is normally activated by software-properties or via debconf. By default this 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 respository'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 can be configured in /etc/apt/apt.conf.d/50unattended-upgrades. Also in this file are a range of other options that can be configured. Allowed-Origins is a simple list of patterns of the form "origin:archive". Origins-Pattern allows you to give a list of 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. All operations are be logged in /var/log/unattended-upgrades/. This includes the dpkg output as well. 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 its 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 then. It will 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 upates 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". unattended-upgrades-0.82.1ubuntu1/unattended-upgrade.pyc0000664000000000000000000010047312317031600020254 0ustar  {3d&Z?d'Z@d(ZAd"d)ZBd*ZCd+ZDd,ZEd-d"d.ZFd/d0ZGd1ZHd2ZId3ZJd4ZKd5ZLd6ZMd7ZNd8ZOd9d:ZPd;ZQd"d<ZReSd=krd>ZTd?ZUejVeTeUejWeTeZXeXjYd@dAdBdCdDe(dEedFeXjYd"dGdBdCdDe(dEedHeXjYdIdJdBdCdDe(dEedKeXjYd"dLdBdCdDe(dEedMeXjYd"dNdBdCdDe(dEedOeXjYd"dPdBdCdEedDe(eXjZ\Z[Z\e j]d9kredQGHej^dRne j e j_e j`eRe[ndS(SiN(tMessage(tgettext(tStringIO(t OptionParsert SUPPRESS_HELP(tPopentPIPEs/var/run/reboot-requireds /usr/bin/mails/usr/sbin/sendmailt lsb_releases-cs-stuniversal_newliness-is%/var/run/unattended-upgrades.progresss /var/run/unattended-upgrades.pidtUnknownMatcherErrorcBseZRS((t__name__t __module__(((sunattended-upgrade.pyR MstUnattendedUpgradesCachecBs#eZdZdZdZRS(cCs-tjj|d|||_|jdS(Ntrootdir(tapttCachet__init__tallowed_originstadjust_candidate_versions(tselfR R((sunattended-upgrade.pyRSs cCstjj||jdS(N(RRtclearR(R((sunattended-upgrade.pyRYscCsx|D]}|jsqnt|j|jr7qnd}xb|jD]W}t|dr|jdkrtj d|qGnt||jrG|}PqGqGW|r||jkrtj d|||_qqWdS(s Adjust candidate versions to match highest allowed origin This adjusts the origin even if the candidate has a higher version tpolicy_priorityis#ignoring ver '%s' with priority < 0s!adjusting candidate version: '%s'N( t is_upgradabletis_allowed_origint candidateRtNonetversionsthasattrRtloggingtdebug(Rtpkgtnew_candtver((sunattended-upgrade.pyR^s   (R R RRR(((sunattended-upgrade.pyR Qs  tLogInstallProgresscBs\eZdZeddZdZdZdZdZdZ dZ d Z RS( sr Install progress that writes to self.progress_log (/var/run/unattended-upgrades.progress by default) s$var/run/unattended-upgrades.progresscCsYtjjjj|||_tjjt j j d||_ ||_ d|_dS(NtDir(RtprogresstbasetInstallProgressRt logfile_dpkgtostpathtjointapt_pkgtconfigtfind_dirt progress_logtverboseRt output_logfd(RR&R.R-((sunattended-upgrade.pyRs    cCs<t|jd$}|jtd||fWdQXdS(NtwsProgress: %s %% (%s)(topenR-twritet_(RRtpercenttstatustf((sunattended-upgrade.pyt status_changescCsIddd|j|jj|j|jjg}xD|dD]8}tj|tj}tj|tj|tjBq>Wd}t j j |rEd}xt j |D]}yt |}Wntk r}d|GHnX||krqnyt j|Wqtk r=}|d7}|dkr>d||fGHq>qXqWndS(Niiiis /proc/self/fdsERROR: can not get fd for '%s'sERROR: os.close(%s): %s(twritefdt write_streamtfilenotstatusfdt status_streamtfcntltF_GETFDtF_SETFDt FD_CLOEXECR'R(texiststlistdirtintt ExceptiontclosetOSError(Rt required_fdstfdt old_flagstproc_fdt error_counttfdnamete((sunattended-upgrade.pyt _fixup_fdss0  !    cCs2tj}tj|tj}tj|ddS(Ni(R'tdevnullR1tO_RDWRtdup2(RtREDIRECT_INPUTRH((sunattended-upgrade.pyt_redirect_stdins cCs^tjjdtsZtj|jtjtjBd}tj |dtj |dndS(NsDebug::pkgDPkgPMiii( R*R+tfind_btFalseR'R1R&RPtO_CREATRQ(Rtlogfd((sunattended-upgrade.pyt_redirect_outputs"cCs$tjjjj||jdS(N(RR#R$R%tupdate_interfacet_do_verbose_output_if_needed(R((sunattended-upgrade.pyRYscCstjjdtrdS|jr|jdkrOtj|j tj |_ny t j |jgggdWn8t j k r}|j t jkrtjdqnXtjdtj|jdndS(NsDebug::pkgDPkgPMis select failedii(R*R+RTRUR.R/RR'R1R&tO_RDONLYtselectterrorterrnotEINTRRt exceptionR2tread(RRM((sunattended-upgrade.pyRZs  cCs=tj}|dkr9|j|j|jn|S(Ni(R'tforkRNRSRX(Rtpid((sunattended-upgrade.pyRbs      ( R R t__doc__RURR7RNRSRXRYRZRb(((sunattended-upgrade.pyR!~s   !    tUnlockedcBs eZdZdZdZRS(sP Context manager for unlocking the apt lock while cache.commit() is run cCsytjWnnXdS(N(R*tpkgsystem_unlock(R((sunattended-upgrade.pyt __enter__scCsytjWnnXdS(N(R*Rf(Rtexc_typet exc_valuetexc_tb((sunattended-upgrade.pyt__exit__s(R R RdRgRk(((sunattended-upgrade.pyRes cCsatjjtjjtjjdd}x-tj|D]}tj d|r=t Sq=Wt S(s[ Return True if the dpkg journal is dirty (similar to debSystem::CheckUpdates) sDir::State::statustupdatess[0-9]+( R'R(R)tdirnameR*R+t find_fileRBtretmatchtTrueRU(tdR6((sunattended-upgrade.pytis_dpkg_journal_dirtys  cCstjdtadS(NsSIGUSR1 received, will stop(RtwarningRqtSIGNAL_STOP_REQUEST(tsignaltframe((sunattended-upgrade.pytsignal_handlers cCs0itd6td6}tj|j|S(sb substitude known mappings and return a new string Currently supported ${distro-release} tdistro_codenamet distro_id(tget_distro_codenamet get_distro_idtstringtTemplatet substitute(tlinetmapping((sunattended-upgrade.pyRs  cCstS(N(tDISTRO_CODENAME(((sunattended-upgrade.pyR{ scCstS(N(t DISTRO_ID(((sunattended-upgrade.pyR|scCsg}xtjjdD]}d|krC|jd\}}n|j\}}tjdd|}tjdd|}|jdt|t|fqW|S(s, legacy support for old Allowed-Origins var s#Unattended-Upgrade::Allowed-Originst:s([^\\]),s\1\\,s o=%s,a=%s(R*R+t value_listtsplitRotsubtappendR(RtsRzRy((sunattended-upgrade.pytget_allowed_origins_legacys cCs=t}x-tjjdD]}|jt|qW|S(su return a list of allowed origins from apt.conf This will take substitutions (like distro_id) into account. s#Unattended-Upgrade::Origins-Pattern(RR*R+RRR(RR((sunattended-upgrade.pytget_allowed_origins%s cCs|j}|dkr)tjdtSt}|jdd}x}|jdD]l}g|jdD]}|jjdd^qg\}}t|}|dkr|tj|j |M}n|dkr|tj|j |M}n|dkr|tj|j |M}n|dkr=|tj|j |M}nf|dkre|tj|j |M}n>|dkr|tj|j|M}ntd||ftjd|||fqQW|S(s take a whitelist string in the form "origin=Debian,label=Debian-Security" and match against the given python-apt origin. A empty whitelist string never matches anything. ts"empty match string matches nothings\,s%2Ct,t=totorigintltlabeltatsuitetarchivetct componenttsitetntcodenames4Unknown whitelist entry for macher '%s' (token '%s')smatching '%s'='%s' against '%s'(Rsorigin(Rslabel(RRsarchive(Rs component(ssite(Rscodename(tstripRRtRURqtreplaceRRtfnmatchRRRRRRR R(t whitelistRtresttokenRtwhattvalue((sunattended-upgrade.pytmatch_whitelist_string0s8   7        cCsd}t}t||}y&t|jd|}WdQXWntk r\}|}nX|rytjtdnAtj tdtj td|tj td||S(Ntinstall_progresssAll upgrades installedsInstalling the upgrades failed!serror message: '%s's+dpkg returned a error! See '%s' for details( RRUR!Retcommitt SystemErrorRtinfoR3R](tcachetpkgs_to_upgradeR&R.R]Rt iprogressRM((sunattended-upgrade.pytupgrade_normal\s  RcCst||}|jd7_tjtjtt}t|}xtr|}x'|D]} tryt j dtS|| } | j r| j n| j s\| jnq\t|||st jdtSg|jD]} | j^q} | sq\nt| dkr3t jd| j| }Pnt| t|krqt jdt| | f| }n|jq\Wt|dkrt|t|tt|d} nd} |jd d j|d | d d t jd|t|g|D]}||^qyTt||}t,|jd|}|satdnWdQX|jWnUtk r}t jtdt jtd|t jtd|tSX|t|}t jd|t|dkrIt j tdPqIqIWtS(Ns.minimal-stepssSIGNAL received, stoppingsOInternal error while building a minimal partition.Cache has not allowed changesisfound leaf package %ssfound partition of size %s (%s)igY@RRR4R5Rsapplying set %sRscache.commit() returned falsesInstalling the upgrades failed!serror message: '%s's+dpkg returned a error! See '%s' for detailssleft to upgrade %ssAll upgrades installed(!R!R-RvtSIGUSR1RxRtsetRqRuRRtRt mark_upgradet is_installedt mark_installtcheck_changes_for_sanityR]RUt get_changestnametlenRRtfloatR7R)t rewind_cacheReRRDR1R3R(RRt blacklistR&R.t install_logRt to_upgradetsmallest_partitiontpkgnameRtptchangesR4RRRRM((sunattended-upgrade.pytupgrade_in_minimal_stepsosx          "  -$ cCsF|s tSx5|jD]*}x!|D]}t||r!tSq!WqWtS(N(RUtoriginsRRq(R RRtallowed((sunattended-upgrade.pyRs  cCs<x5|D]-}tj||rtjd|tSqWtS(Ns!skipping blacklisted package '%s'(RoRpRRRqRU(RRtblacklist_regexp((sunattended-upgrade.pytis_pkgname_in_blacklists  cCs*|jjdkrtSx |D]}|jrDtjd|jtS|jsV|jrt |j |stjd|jtSt |j|rtS|j j tjkrtjd|jtStjjdt}|j jjd}|jr"|tkr"|dkr"tjdtSqqWtS( Nispkg '%s' now marked deletespkg '%s' not in allowed originspkg '%s' is on holds,Unattended-Upgrade::IgnoreAppsRequireRestartsUpgrade-Requiress app-restarts=pkg '%s' requires app-restart, not safe to upgrade unattended(t _depcachet broken_countRUt marked_deleteRRRtmarked_installtmarked_upgradeRRRt_pkgtselected_stateR*t SELSTATE_HOLDR+RTtrecordtgetRq(RRRRtignore_require_restarttupgrade_requires((sunattended-upgrade.pyRs.       cCs{y6tj|jjd}tj|}|dSWn>ttfk rv}tj d||f|j ddSXdS(NtcontroltPackages!failed to read deb file '%s' (%s)R3i( tapt_insttDebFileRt extractdataR*t TagSectiontIOErrorRRR]R(tdebfileRtsectionsRM((sunattended-upgrade.pytpkgname_from_debs c Csdd|g}dddddd|g}d g}t|d t}t|d |jd td t}t|d |jd td t}|jd jd }|S(Nsdpkg-debs--fsys-tarfilettars-xs-Os-ft-t.tmd5sumtstdouttstdinRi(RRRRqt communicateR( tdeb_filet conf_filetdpkg_cmdttar_cmdtmd5_cmdtdpkg_pttar_ptmd5_pt pkg_md5sum((sunattended-upgrade.pytget_md5sum_for_file_in_debs   c Cs7tjd|t|}tjjd}tjt|d}d}xV|D]N}|jd|krTtjd|d|kr|jd}PqqTqTWd}t j |}y%|j j dj jd }Wn*tk r } tjd || fnXi} x|jD]r} | j } | s>q ntjd | | j} | d } | d }t| dkr| d}nd}|dks tjj||  rq n|dkrq n| s| |jdkrtjd| |fq n|| |          cCstjjdS(Ns%Unattended-Upgrade::Package-Blacklist(R*R+R(((sunattended-upgrade.pytget_blacklisted_pkgsSsicCstjjdtrtjjtrtjjdd}|dkrXtj |nt j dtt j dd|gndS(Ns$Unattended-Upgrade::Automatic-Reboots)Unattended-Upgrade::Automatic-Reboot-TimetnowisFound %s, rebootings/sbin/shutdowns-r(R*R+RTRUR'R(RAR1RRERRtRtcall(t shutdown_locktwhen((sunattended-upgrade.pytreboot_if_requested_and_neededWs     cCsJtjjtjjdd}ttjj|ddWdQXdS(Ns Dir::Statetperiodicsunattended-upgrades-stampR0(R'R(R)R*R+R,R1(tstatedir((sunattended-upgrade.pytwrite_stamp_filees!c! CsR |rt|nt|}t}t}tjtddj|tjtdtjtd|trt j j dt rt jjt j jd}t jt jj|dt}|dkrtjtd td GHtjt j}d |d tk r} tjtdtdGHtj dnXt!d|d|} | j"j#dkr?tdGHtjtdtj dnt j$dt j%| j"} | g} g} t&g| D]}|j'rx|j(^qx}xv| D]n}|jr|j)rtjd|j(t*|j+dgfn|j)rt,|j(| rt-|j+|ry|j.t/| ||r| j0|xv| D]A}| |j1se| |j2rE| j3|| j0| |qEqEWn*tjdt4| | | j0|j(Wqtk r } tjtd|j(| ft4| | | j0|j(qXqqW| j5ddd jg| D]}|j(^q2}tjd!|t j$d|jrt j6t7j8j9j:}n t j6}t j;}|j<| j=}t j>| j"}y|j?|||Wn*tk r} tjtd"| nX|j@}tjd#|tArx|jBD]}tjd$||jC|jDkrtd%|jEGHtjtd%|jEn|jFstd&|jGGHtjtd&|jGtj dnt jjH|jIs(td'|jIGHtjd'|jItj dn|jJsJ|j0tK|jIntL|jIr@t j jd(d)}|std*tK|jIGHntjtd*tK|jI|j0tK|jI| j0tK|jIq@q@Wtjd+|tM|dkr| jN| }g} x|D]}tjd,|j(|j.t/| ||ri| j0|q#|j(| kr| j0|j(ntjtd-|j(| jNx| D]}|j.qWq#Wqn tjd.t j j d/tr|t&g| D]}|j'r|j(^q}x1||D]%}tjd0|| |jOq,Wtjtd1dj||ntjd2| j"jP| j"jQ| j"j#ftM| dkrtM| dkrtjtd3tRdSd4t jkr+ t j j d5tr+ tjS}|jd6dS|jTrW tjd7t j j&d8d9ndjg| D]}|j(^qd }tjtd:|tUjUjV}t jjtWd;|jXd<}d}d=} tM| dkr t jd>} tZ| | |||}n|jTs1 t[||| ||ntR|jTsN t\| ndS(?Ns Initial blacklisted packages: %sR s#Starting unattended upgrades scriptsAllowed origins are: %ss*Unattended-Upgrade::AutoFixInterruptedDpkgsDir::State::Statustlockis.Unclean dpkg state detected, trying to correctR:R9tdpkgs--force-confolds --configures-atenvsdpkg --configure -a output: %ss@Unclean dpkg state, but locked, another package manager working?s=Lock could not be acquired (another package manager running?)s'Cache lock can not be acquired, exitingiR Rs"Cache has broken packages, exitingisChecking: %s (%s)Rssanity check faileds?package '%s' upgradable but fails to be marked for upgrade (%s)tkeycSs|jS(N(R(R((sunattended-upgrade.pytss s/pkgs that look like they should be upgraded: %ssGetArchives() failed: '%s'sfetch.run() result: %ss%ssAn error occurred: '%s's)The URI '%s' failed to download, abortings-Download finished, but file '%s' not there?!?sUnattended-Upgrade::MailRsBPackage '%s' has conffile prompt and needs to be upgraded manuallys blacklist: %ssChecking (blacklist): %sspackage '%s' not upgradeds0dpkg is configured not to cause conffile promptss.Unattended-Upgrade::Remove-Unused-Dependenciessmarking %s for removes$Packages that are auto removed: '%s's'InstCount=%i DelCount=%i BrokenCount=%is1No packages found that can be upgraded unattendedt-UNATTENDED_UPGRADES_FORCE_INSTALL_ON_SHUTDOWNs%Unattended-Upgrade::InstallOnShutdowns1Configured to install on shutdown, so exiting nows5Option --dry-run given, *not* performing real actionssDebug::pkgDPkgPMRMs"Packages that will be upgraded: %ssunattended-upgrades-dpkg_%s.logR3is!/var/run/unattended-upgrades.lock(]RGR_RR`RRR3R)RsR*R+RTRqR'R(RmRtget_lockRURttcopyRRERt check_outputtCalledProcessErrortoutputRtpkgsystem_lockRR]RYtexitR RRtnicet ActionGroupRtis_auto_removableRRtgetattrRRRRRRRRtremoveRtsorttAcquireRR#ttexttAcquireProgresst SourceListtread_main_listt_recordstPackageManagert get_archivesR<RtitemsR5t STAT_ERRORt error_texttcompletetdesc_uriRAtdestfilet is_trustedRRRRt mark_deletet inst_countt del_countRhRTRPtdatetimeRaRIt isoformatRRCR8Re(!RR R6RR@tadmindirtlockfdRkRsRMRt actiongroupRR5Rtpkgs_auto_removableRR4tfetchertlisttrecstpmRtitemR&told_pkgs_to_upgradeRtnow_auto_removableR\RaR&RARc((sunattended-upgrade.pytmainksf       !             #             %                            $      %   t__main__sunattended-upgradess/usr/share/locales-ds--debugtactiont store_truetdefaultthelpsprint debug messagess --apt-debugs,make apt/libapt print verbose debug messagess-vs --verbosesprint info messagess --dry-runs'Simulation, download but do not installs--minimal-upgrade-stepss<Upgrade in minimal steps (and allow interrupting with SIGINTs--minimal_upgrade_stepss+You need to be root to run this applicationi(aRpRR^t email.charsetR&R=RRRRRoR'R\RvR}RRYt email.messageRR3tioRtoptparseRRRRRRR*R1RRRqRqRRRt PROGRESS_LOGtPID_FILERURut ValueErrorR RR R#R$R%R!ReRsRxRR{R|RRRRRRRRRRRRRRRRR#R/R8RCRGRIR_R`ReRhRR t localesAppt localesDirtbindtextdomaint textdomaintparsert add_optiont parse_argsRtargstgetuidRutSIGHUPtSIG_IGN(((sunattended-upgrade.pyts                   -]      , Q    Z     : % )                  unattended-upgrades-0.82.1ubuntu1/man/0000775000000000000000000000000012301323623014527 5ustar unattended-upgrades-0.82.1ubuntu1/man/unattended-upgrade.80000664000000000000000000000406412250412747020415 0ustar .\" Hey, EMACS: -*- nroff -*- .\" First parameter, NAME, should be all caps .\" Second parameter, SECTION, should be 1-8, maybe w/ subsection .\" other parameters are allowed: see man(7), man(1) .TH unattended-upgrade 8 "May 4, 2009" .\" Please adjust this date whenever revising the manpage. .\" .\" Some roff macros, for reference: .\" .nh disable hyphenation .\" .hy enable hyphenation .\" .ad l left justify .\" .ad b justify to both left and right margins .\" .nf disable filling .\" .fi enable filling .\" .br insert line break .\" .sp insert n+1 empty lines .\" for manpage-specific macros, see man(7) .SH NAME unattended-upgrade \- automatic installation of security (and other) upgrades .SH SYNOPSIS \fBunattended-upgrade\fP [options] .br .SH DESCRIPTION This program can download and install security upgrades automatically and unattended, taking care to only install packages from the configured APT source, and checking for dpkg prompts about configuration file changes. All output is logged to /var/log/unattended-upgrades.log. .sp This script is the backend for the APT::Periodic::Unattended-Upgrade option and designed to be run from cron (e.g. via /etc/cron.daily/apt). .SH OPTIONS unattended-upgrade accepts the following options: .TP \fB-h\fR, \fB\-\-help\fR help output .TP \fB-d\fR, \fB\-\-debug\fR extra debug output into /var/log/unattended-upgrades.log .TP \fB--dry-run\fR Just simulate installing updates, do not actually do it .SH CONFIGURATION The configuration is done via the apt configuration mechanism. The default configuration file can be found at /etc/apt/apt.conf.d/50unattended-upgrades .SH AUTHORS unattended-upgrade is written by Michael Vogt .PP This manual page was originally written by Michael Vogt .SH COPYRIGHT Copyright (C) 2005-2009 Canonical .PP There is NO warranty. You may redistribute this software under the terms of the GNU General Public License. For more information about these matters, see the files named COPYING. unattended-upgrades-0.82.1ubuntu1/unattended-upgrade0000775000000000000000000013050412317031573017474 0ustar #!/usr/bin/python3 # Copyright (c) 2005-2012 Canonical Ltd # # AUTHOR: # Michael Vogt # # This file is part of unattended-upgrades # # unattended-upgrades is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License as published # by the Free Software Foundation; either version 2 of the License, or (at # your option) any later version. # # unattended-upgrades is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License # along with unattended-upgrades; if not, write to the Free Software # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA # import copy import datetime import errno import email.charset import fcntl import fnmatch import gettext import locale import logging import re import os import select import signal import string import subprocess import sys from email.message import Message from gettext import gettext as _ from io import StringIO from optparse import ( OptionParser, SUPPRESS_HELP, ) from subprocess import ( Popen, PIPE, ) import apt import apt_inst import apt_pkg # the reboot required flag file used by packages REBOOT_REQUIRED_FILE = "/var/run/reboot-required" MAIL_BINARY = "/usr/bin/mail" SENDMAIL_BINARY = "/usr/sbin/sendmail" # no py3 lsb_release in debian :/ DISTRO_CODENAME = subprocess.check_output( ["lsb_release", "-c", "-s"], universal_newlines=True).strip() DISTRO_ID = subprocess.check_output( ["lsb_release", "-i", "-s"], universal_newlines=True).strip() # progress information is written here PROGRESS_LOG = "/var/run/unattended-upgrades.progress" PID_FILE = "/var/run/unattended-upgrades.pid" # set from the sigint signal handler SIGNAL_STOP_REQUEST = False class UnknownMatcherError(ValueError): pass class UnattendedUpgradesCache(apt.Cache): def __init__(self, rootdir, allowed_origins): apt.Cache.__init__(self, rootdir=rootdir) self.allowed_origins = allowed_origins # ensure we update the candidate versions self.adjust_candidate_versions() def clear(self): apt.Cache.clear(self) # ensure we update the candidate versions self.adjust_candidate_versions() def adjust_candidate_versions(self): """ Adjust candidate versions to match highest allowed origin This adjusts the origin even if the candidate has a higher version """ for pkg in self: # important! this avoids downgrades below if not pkg.is_upgradable: continue # check if the candidate is already pointing to a allowed # origin and if so, do not mess with it if is_allowed_origin(pkg.candidate, self.allowed_origins): continue # check if we have a version in a allowed origin that is # not the candidate new_cand = None for ver in pkg.versions: # ignore versions that the user marked with priority < 0 # (and ensure we have a python-apt that supports this) if hasattr(ver, "policy_priority") and ver.policy_priority < 0: logging.debug("ignoring ver '%s' with priority < 0" % ver) continue if is_allowed_origin(ver, self.allowed_origins): # leave as soon as we have the highest new candidate new_cand = ver break if new_cand and new_cand != pkg.candidate: logging.debug("adjusting candidate version: '%s'" % new_cand) pkg.candidate = new_cand class LogInstallProgress(apt.progress.base.InstallProgress): """ Install progress that writes to self.progress_log (/var/run/unattended-upgrades.progress by default) """ def __init__(self, logfile_dpkg, verbose=False, progress_log="var/run/unattended-upgrades.progress"): apt.progress.base.InstallProgress.__init__(self) self.logfile_dpkg = logfile_dpkg self.progress_log = os.path.join(apt_pkg.config.find_dir("Dir"), progress_log) self.verbose = verbose self.output_logfd = None def status_change(self, pkg, percent, status): with open(self.progress_log, "w") as f: f.write(_("Progress: %s %% (%s)") % (percent, pkg)) def _fixup_fds(self): required_fds = [0, 1, 2, # stdin, stdout, stderr self.writefd, self.write_stream.fileno(), self.statusfd, self.status_stream.fileno() ] # ensure that our required fds close on exec for fd in required_fds[3:]: old_flags = fcntl.fcntl(fd, fcntl.F_GETFD) fcntl.fcntl(fd, fcntl.F_SETFD, old_flags | fcntl.FD_CLOEXEC) # close all fds proc_fd = "/proc/self/fd" if os.path.exists(proc_fd): error_count = 0 for fdname in os.listdir(proc_fd): try: fd = int(fdname) except Exception as e: print("ERROR: can not get fd for '%s'" % fdname) if fd in required_fds: continue try: os.close(fd) #print("closed: ", fd) except OSError as e: # there will be one fd that can not be closed # as its the fd from pythons internal diropen() # so its ok to ignore one close error error_count += 1 if error_count > 1: print("ERROR: os.close(%s): %s" % (fd, e)) def _redirect_stdin(self): REDIRECT_INPUT = os.devnull fd = os.open(REDIRECT_INPUT, os.O_RDWR) os.dup2(fd, 0) def _redirect_output(self): # do not create log in dry-run mode, just output to stdout/stderr if not apt_pkg.config.find_b("Debug::pkgDPkgPM", False): logfd = os.open(self.logfile_dpkg, os.O_RDWR | os.O_CREAT, 0o644) os.dup2(logfd, 1) os.dup2(logfd, 2) def update_interface(self): # call super class first apt.progress.base.InstallProgress.update_interface(self) self._do_verbose_output_if_needed() def _do_verbose_output_if_needed(self): # if we are in debug mode, nothing to be more verbose about if apt_pkg.config.find_b("Debug::pkgDPkgPM", False): return # handle verbose if self.verbose: if self.output_logfd is None: self.output_logfd = os.open(self.logfile_dpkg, os.O_RDONLY) try: select.select([self.output_logfd], [], [], 0) except select.error as e: if e.errno != errno.EINTR: logging.exception("select failed") # output to stdout in verbose mode only os.write(1, os.read(self.output_logfd, 1024)) def fork(self): pid = os.fork() if pid == 0: self._fixup_fds() self._redirect_stdin() self._redirect_output() return pid class Unlocked: """ Context manager for unlocking the apt lock while cache.commit() is run """ def __enter__(self): try: apt_pkg.pkgsystem_unlock() except: pass def __exit__(self, exc_type, exc_value, exc_tb): try: apt_pkg.pkgsystem_unlock() except: pass def is_dpkg_journal_dirty(): """ Return True if the dpkg journal is dirty (similar to debSystem::CheckUpdates) """ d = os.path.join( os.path.dirname(apt_pkg.config.find_file("Dir::State::status")), "updates") for f in os.listdir(d): if re.match("[0-9]+", f): return True return False def signal_handler(signal, frame): logging.warning("SIGUSR1 received, will stop") global SIGNAL_STOP_REQUEST SIGNAL_STOP_REQUEST = True def substitute(line): """ substitude known mappings and return a new string Currently supported ${distro-release} """ mapping = {"distro_codename": get_distro_codename(), "distro_id": get_distro_id()} return string.Template(line).substitute(mapping) def get_distro_codename(): return DISTRO_CODENAME def get_distro_id(): return DISTRO_ID def get_allowed_origins_legacy(): """ legacy support for old Allowed-Origins var """ allowed_origins = [] for s in apt_pkg.config.value_list("Unattended-Upgrade::Allowed-Origins"): # if there is a ":" use that as seperator, else use spaces if ":" in s: (distro_id, distro_codename) = s.split(':') else: (distro_id, distro_codename) = s.split() # escape "," (see LP: #824856) - i wonder if there is a simpler way? distro_id = re.sub(r'([^\\]),', r'\1\\,', distro_id) distro_codename = re.sub(r'([^\\]),', r'\1\\,', distro_codename) # convert to new format allowed_origins.append("o=%s,a=%s" % (substitute(distro_id), substitute(distro_codename))) return allowed_origins def get_allowed_origins(): """ return a list of allowed origins from apt.conf This will take substitutions (like distro_id) into account. """ allowed_origins = get_allowed_origins_legacy() for s in apt_pkg.config.value_list("Unattended-Upgrade::Origins-Pattern"): allowed_origins.append(substitute(s)) return allowed_origins def match_whitelist_string(whitelist, origin): """ take a whitelist string in the form "origin=Debian,label=Debian-Security" and match against the given python-apt origin. A empty whitelist string never matches anything. """ whitelist = whitelist.strip() if whitelist == "": logging.warning("empty match string matches nothing") return False res = True # make "\," the html quote equivalent whitelist = whitelist.replace("\,", "%2C") for token in whitelist.split(","): # strip and unquote the "," back (what, value) = [s.strip().replace("%2C", ",") for s in token.split("=")] #logging.debug("matching '%s'='%s' against '%s'" % ( # what, value, origin)) # support substitution here as well value = substitute(value) # first char is apt-cache policy output, send is the name # in the Release file if what in ("o", "origin"): res &= fnmatch.fnmatch(origin.origin, value) elif what in ("l", "label"): res &= fnmatch.fnmatch(origin.label, value) elif what in ("a", "suite", "archive"): res &= fnmatch.fnmatch(origin.archive, value) elif what in ("c", "component"): res &= fnmatch.fnmatch(origin.component, value) elif what in ("site",): res &= fnmatch.fnmatch(origin.site, value) elif what in ("n", "codename",): res &= fnmatch.fnmatch(origin.codename, value) else: raise UnknownMatcherError( "Unknown whitelist entry for macher '%s' (token '%s')" % ( what, token)) logging.debug("matching '%s'='%s' against '%s'" % ( what, value, origin)) return res def upgrade_normal(cache, pkgs_to_upgrade, logfile_dpkg, verbose): error = None res = False iprogress = LogInstallProgress(logfile_dpkg, verbose) try: with Unlocked(): res = cache.commit(install_progress=iprogress) except SystemError as e: error = e if res: logging.info(_("All upgrades installed")) else: logging.error(_("Installing the upgrades failed!")) logging.error(_("error message: '%s'") % error) logging.error(_("dpkg returned a error! See '%s' for details") % logfile_dpkg) return res def upgrade_in_minimal_steps(cache, pkgs_to_upgrade, blacklist, logfile_dpkg="", verbose=False): install_log = LogInstallProgress(logfile_dpkg, verbose) install_log.progress_log += ".minimal-steps" # setup signal handler signal.signal(signal.SIGUSR1, signal_handler) # double check any changes we do allowed_origins = get_allowed_origins() # to upgrade contains the package names to_upgrade = set(pkgs_to_upgrade) while True: # find smallest set smallest_partition = to_upgrade for pkgname in to_upgrade: if SIGNAL_STOP_REQUEST: logging.warning("SIGNAL received, stopping") return True pkg = cache[pkgname] if pkg.is_upgradable: pkg.mark_upgrade() elif not pkg.is_installed: pkg.mark_install() else: continue # double check that we are not running into side effects like # what could have been caused LP: #1020680 if not check_changes_for_sanity(cache, allowed_origins, blacklist): logging.error( "Internal error while building a minimal partition." "Cache has not allowed changes") return False changes = [p.name for p in cache.get_changes()] if not changes: continue if len(changes) == 1: logging.debug("found leaf package %s" % pkg.name) smallest_partition = changes break if len(changes) < len(smallest_partition): logging.debug("found partition of size %s (%s)" % ( len(changes), changes)) smallest_partition = changes cache.clear() # write progress log information if len(pkgs_to_upgrade) > 0: percent = ((len(pkgs_to_upgrade) - len(to_upgrade)) / float(len(pkgs_to_upgrade)) * 100.0) else: percent = 100.0 install_log.status_change(pkg=",".join(smallest_partition), percent=percent, status="") # apply changes logging.debug("applying set %s" % smallest_partition) rewind_cache(cache, [cache[name] for name in smallest_partition]) try: iprogress = LogInstallProgress(logfile_dpkg, verbose) with Unlocked(): res = cache.commit(install_progress=iprogress) if not res: raise Exception("cache.commit() returned false") cache.open() except Exception as e: logging.error(_("Installing the upgrades failed!")) logging.error(_("error message: '%s'") % e) logging.error(_("dpkg returned a error! See '%s' for details") % logfile_dpkg) return False to_upgrade = to_upgrade - set(smallest_partition) logging.debug("left to upgrade %s" % to_upgrade) if len(to_upgrade) == 0: logging.info(_("All upgrades installed")) break return True def is_allowed_origin(ver, allowed_origins): if not ver: return False for origin in ver.origins: for allowed in allowed_origins: if match_whitelist_string(allowed, origin): return True return False def is_pkgname_in_blacklist(pkgname, blacklist): for blacklist_regexp in blacklist: if re.match(blacklist_regexp, pkgname): logging.debug("skipping blacklisted package '%s'" % pkgname) return True return False def check_changes_for_sanity(cache, allowed_origins, blacklist): if cache._depcache.broken_count != 0: return False for pkg in cache: if pkg.marked_delete: logging.debug("pkg '%s' now marked delete" % pkg.name) return False if pkg.marked_install or pkg.marked_upgrade: if not is_allowed_origin(pkg.candidate, allowed_origins): logging.debug("pkg '%s' not in allowed origin" % pkg.name) return False if is_pkgname_in_blacklist(pkg.name, blacklist): return False if pkg._pkg.selected_state == apt_pkg.SELSTATE_HOLD: logging.debug("pkg '%s' is on hold" % pkg.name) return False # check if the package is unsafe to upgrade unattended ignore_require_restart = apt_pkg.config.find_b( "Unattended-Upgrade::IgnoreAppsRequireRestart", False) upgrade_requires = pkg.candidate.record.get("Upgrade-Requires") if (pkg.marked_upgrade and ignore_require_restart is False and upgrade_requires == "app-restart"): logging.debug("pkg '%s' requires app-restart, not safe to " "upgrade unattended") return False return True def pkgname_from_deb(debfile): # FIXME: add error checking here try: control = apt_inst.DebFile(debfile).control.extractdata("control") sections = apt_pkg.TagSection(control) return sections["Package"] except (IOError, SystemError) as e: logging.error("failed to read deb file '%s' (%s)" % (debfile, e)) # dumb fallback return debfile.split("_")[0] def get_md5sum_for_file_in_deb(deb_file, conf_file): dpkg_cmd = ["dpkg-deb", "--fsys-tarfile", deb_file] tar_cmd = ["tar", "-x", "-O", "-f", "-", "." + conf_file] md5_cmd = ["md5sum"] dpkg_p = Popen(dpkg_cmd, stdout=PIPE) tar_p = Popen(tar_cmd, stdin=dpkg_p.stdout, stdout=PIPE, universal_newlines=True) md5_p = Popen(md5_cmd, stdin=tar_p.stdout, stdout=PIPE, universal_newlines=True) pkg_md5sum = md5_p.communicate()[0].split()[0] return pkg_md5sum # prefix is *only* needed for the build-in tests def conffile_prompt(destFile, prefix=""): logging.debug("check_conffile_prompt('%s')" % destFile) pkgname = pkgname_from_deb(destFile) # get the conffiles for the /var/lib/dpkg/status file status_file = apt_pkg.config.find("Dir::State::status") tagfile = apt_pkg.TagFile(open(status_file, "r")) conffiles = "" for section in tagfile: if section.get("Package") == pkgname: logging.debug("found pkg: %s" % pkgname) if "Conffiles" in section: conffiles = section.get("Conffiles") break # get conffile value from pkg, its ok if the new version # does not have conffiles anymore pkg_conffiles = "" deb = apt_inst.DebFile(destFile) try: pkg_conffiles = deb.control.extractdata("conffiles").strip().decode( "utf-8") except LookupError as e: logging.debug("No conffiles in deb '%s' (%s)" % (destFile, e)) # Conffiles: # /etc/bash_completion.d/m-a c7780fab6b14d75ca54e11e992a6c11c dpkg_status_conffiles = {} for line in conffiles.splitlines(): # ignore empty lines line = line.strip() if not line: continue # show what we do logging.debug("conffile line: '%s'", line) l = line.split() conf_file = l[0] md5 = l[1] if len(l) > 2: obs = l[2] else: obs = None # ignore if conffile is obsolete or does not exist if obs == "obsolete" or not os.path.exists(prefix + conf_file): continue # ignore state "newconffile" until its clearer if there # might be a dpkg prompt (LP: #936870) if md5 == "newconffile": continue if not pkg_conffiles or not conf_file in pkg_conffiles.split("\n"): logging.debug("'%s' not in package conffiles '%s'" % ( conf_file, pkg_conffiles)) continue # record for later dpkg_status_conffiles[conf_file] = md5 # test against the installed file with open(prefix + conf_file, 'rb') as fb: current_md5 = apt_pkg.md5sum(fb) logging.debug("current md5: %s" % current_md5) # hashes are the same, no conffile prompt if current_md5 == md5: continue # calculate md5sum from the deb (may take a bit) pkg_md5sum = get_md5sum_for_file_in_deb(destFile, conf_file) logging.debug("pkg_md5sum: %s" % pkg_md5sum) # the md5sum in the deb is unchanged, this will not # trigger a conffile prompt if pkg_md5sum == md5: continue # if we made it to this point: # current_md5 != pkg_md5sum != md5 # and that will trigger a conffile prompt, we can # stop processing at this point and just return True return True # now check if there are conffiles in the pkg that where not there # in the previous version in the dpkg status file if pkg_conffiles: for conf_file in pkg_conffiles.split("\n"): if (not conf_file in dpkg_status_conffiles and os.path.exists(prefix + conf_file)): logging.debug("found conffile '%s' in new pkg but on dpkg " "status" % conf_file) pkg_md5sum = get_md5sum_for_file_in_deb(destFile, conf_file) with open(prefix + conf_file, 'rb') as fp: if pkg_md5sum != apt_pkg.md5sum(fp): return True return False def dpkg_conffile_prompt(): if not "DPkg::Options" in apt_pkg.config: return True options = apt_pkg.config.value_list("DPkg::Options") for option in options: option = option.strip() if option in ["--force-confold", "--force-confnew"]: return False return True def rewind_cache(cache, pkgs_to_upgrade): " set the cache back to the state with packages_to_upgrade " cache.clear() for pkg2 in pkgs_to_upgrade: pkg2.mark_upgrade() def host(): return os.uname()[1] # *sigh* textwrap is nice, but it breaks "linux-image" into two # seperate lines def wrap(t, width=70, subsequent_indent=""): out = "" for s in t.split(): if (len(out) - out.rfind("\n")) + len(s) > width: out += "\n" + subsequent_indent out += s + " " return out def setup_apt_listchanges(conf="/etc/apt/listchanges.conf"): """ deal with apt-listchanges """ # apt-listchanges will always send a mail if there is a mail address # set in the config regardless of the frontend used, so set it to # mail if we have a sendmail and to none if not (as it appears to # not check if sendmail is there or not), debian bug #579733 if os.path.exists(SENDMAIL_BINARY): os.environ["APT_LISTCHANGES_FRONTEND"] = "mail" else: os.environ["APT_LISTCHANGES_FRONTEND"] = "none" def _send_mail_using_mailx(to_address, subject, body): # ensure that the body is a byte stream and that we do not # break on encoding errors (the default error mode is "strict") encoded_body = body.encode( locale.getpreferredencoding(False), errors="replace") # we use a binary pipe to stdin to ensure we do not break on # unicode encoding errors (e.g. because the user is running a # ascii only system like the buildds) mail = subprocess.Popen( [MAIL_BINARY, "-s", subject, to_address], stdin=subprocess.PIPE, universal_newlines=False) mail.stdin.write(encoded_body) mail.stdin.close() ret = mail.wait() return ret def _send_mail_using_sendmail(to_address, subject, body): # format as a proper mail msg = Message() msg['Subject'] = subject msg['To'] = to_address # order is important here, Message() first, then Charset() # then msg.set_charset() charset = email.charset.Charset("utf-8") charset.body_encoding = email.charset.QP msg.set_payload(body, charset) # and send it away sendmail = subprocess.Popen( [SENDMAIL_BINARY, "-oi", "-t"], stdin=subprocess.PIPE, universal_newlines=True) sendmail.stdin.write(msg.as_string()) sendmail.stdin.close() ret = sendmail.wait() return ret def send_summary_mail(pkgs, res, pkgs_kept_back, mem_log, logfile_dpkg): " send mail (if configured in Unattended-Upgrade::Mail) " to_email = apt_pkg.config.find("Unattended-Upgrade::Mail", "") if not to_email: return if not os.path.exists(MAIL_BINARY) and not os.path.exists(SENDMAIL_BINARY): logging.error(_("No '/usr/bin/mail' or '/usr/sbin/sendmail'," "can not send mail. " "You probably want to install the 'mailx' package.")) return # if the operation was successful and the user has requested to get # mails on on errors, just exit here if (res and apt_pkg.config.find_b( "Unattended-Upgrade::MailOnlyOnError", False)): return # Check if reboot-required flag is present logging.debug("Sending mail with '%s' to '%s'" % (logfile_dpkg, to_email)) if os.path.isfile(REBOOT_REQUIRED_FILE): subject = _( "[reboot required] unattended-upgrades result for '%s': %s") % ( host(), res) else: subject = _("unattended-upgrades result for '%s': '%s'") % ( host(), res) body = _("Unattended upgrade returned: %s\n\n") % res if os.path.isfile(REBOOT_REQUIRED_FILE): body += _( "Warning: A reboot is required to complete this upgrade.\n\n") if res: body += _("Packages that were upgraded:\n") else: body += _("Packages that attempted to upgrade:\n") body += " " + wrap(pkgs, 70, " ") body += "\n" if pkgs_kept_back: body += _("Packages with upgradable origin but kept back:\n") body += " " + wrap(" ".join(pkgs_kept_back), 70, " ") body += "\n" body += "\n" if os.path.exists(logfile_dpkg): body += _("Package installation log:") + "\n" with open(logfile_dpkg) as fp: body += fp.read() body += "\n\n" body += _("Unattended-upgrades log:\n") body += mem_log.getvalue() if os.path.exists(SENDMAIL_BINARY): ret = _send_mail_using_sendmail(to_email, subject, body) elif os.path.exists(MAIL_BINARY): ret = _send_mail_using_mailx(to_email, subject, body) else: raise AssertionError( "This should never be reached, if we are here we either " "have sendmail or mailx. Please report this as a bug.") logging.debug("mail returned: %s" % ret) def do_install(cache, pkgs_to_upgrade, blacklisted_pkgs, options, logfile_dpkg): # set debconf to NON_INTERACTIVE, redirect output os.putenv("DEBIAN_FRONTEND", "noninteractive") setup_apt_listchanges() logging.info(_("Writing dpkg log to '%s'") % logfile_dpkg) pkg_install_success = False try: if (options.minimal_upgrade_steps or # COMPAT with the mispelling apt_pkg.config.find_b( "Unattended-Upgrades::MinimalSteps", False) or apt_pkg.config.find_b( "Unattended-Upgrade::MinimalSteps", False)): pidf = os.path.join(apt_pkg.config.find_dir("Dir"), "var", "run", "unattended-upgrades.pid") with open(pidf, "w") as fp: fp.write("%s" % os.getpid()) # try upgrade all "pkgs" in minimal steps pkg_install_success = upgrade_in_minimal_steps( cache, [pkg.name for pkg in pkgs_to_upgrade], blacklisted_pkgs, logfile_dpkg, options.verbose or options.debug) else: pkg_install_success = upgrade_normal( cache, [pkg.name for pkg in pkgs_to_upgrade], logfile_dpkg, options.verbose or options.debug) except Exception as e: # print unhandled exceptions here this way, while stderr is redirected os.write(2, ("Exception: %s\n" % e).encode('utf-8')) pkg_install_success = False return pkg_install_success def _setup_alternative_rootdir(rootdir): # clear system unattended-upgrade stuff apt_pkg.config.clear("Unattended-Upgrade") # read rootdir (taken from apt.Cache, but we need to run it # here before the cache gets initialized if os.path.exists(rootdir + "/etc/apt/apt.conf"): apt_pkg.read_config_file(apt_pkg.config, rootdir + "/etc/apt/apt.conf") if os.path.isdir(rootdir + "/etc/apt/apt.conf.d"): apt_pkg.read_config_dir(apt_pkg.config, rootdir + "/etc/apt/apt.conf.d") def _get_logdir(): logdir = apt_pkg.config.find_dir( "Unattended-Upgrade::LogDir", # COMPAT only apt_pkg.config.find_dir("APT::UnattendedUpgrades::LogDir", "/var/log/unattended-upgrades/")) return logdir def _setup_logging(options): # ensure this is run only once if len(logging.root.handlers) > 0: return # init the logging logdir = _get_logdir() logfile = os.path.join( logdir, apt_pkg.config.find( "Unattended-Upgrade::LogFile", # COMPAT only apt_pkg.config.find("APT::UnattendedUpgrades::LogFile", "unattended-upgrades.log"))) if not options.dry_run and not os.path.exists(logdir): os.makedirs(logdir) logging.basicConfig(level=logging.INFO, format='%(asctime)s %(levelname)s %(message)s', filename=logfile) # additional logging logger = logging.getLogger() mem_log = StringIO() if options.apt_debug: apt_pkg.config.set("Debug::pkgProblemResolver", "1") apt_pkg.config.set("Debug::pkgDepCache::AutoInstall", "1") if options.debug: logger.setLevel(logging.DEBUG) stdout_handler = logging.StreamHandler(sys.stdout) logger.addHandler(stdout_handler) elif options.verbose: logger.setLevel(logging.INFO) stdout_handler = logging.StreamHandler(sys.stdout) logger.addHandler(stdout_handler) if apt_pkg.config.find("Unattended-Upgrade::Mail", ""): mem_log_handler = logging.StreamHandler(mem_log) logger.addHandler(mem_log_handler) return mem_log def get_blacklisted_pkgs(): return apt_pkg.config.value_list("Unattended-Upgrade::Package-Blacklist") def reboot_if_requested_and_needed(shutdown_lock=0): # auto-reboot (if required and the config for this is set if (apt_pkg.config.find_b( "Unattended-Upgrade::Automatic-Reboot", False) and os.path.exists(REBOOT_REQUIRED_FILE)): when = apt_pkg.config.find( "Unattended-Upgrade::Automatic-Reboot-Time", "now") if shutdown_lock > 0: os.close(shutdown_lock) logging.warning("Found %s, rebooting" % REBOOT_REQUIRED_FILE) # XXX: add time option subprocess.call(["/sbin/shutdown", "-r", when]) def write_stamp_file(): statedir = os.path.join(apt_pkg.config.find_dir("Dir::State"), "periodic") with open(os.path.join(statedir, "unattended-upgrades-stamp"), "w"): pass def main(options, rootdir=""): # useful for testing if rootdir: _setup_alternative_rootdir(rootdir) # setup logging mem_log = _setup_logging(options) # format (origin, archive), e.g. ("Ubuntu","dapper-security") allowed_origins = get_allowed_origins() # pkgs that are (for some reason) not save to install blacklisted_pkgs = get_blacklisted_pkgs() logging.info(_("Initial blacklisted packages: %s"), " ".join(blacklisted_pkgs)) logging.info(_("Starting unattended upgrades script")) # display available origin logging.info(_("Allowed origins are: %s") % allowed_origins) # check if the journal is dirty and if so, take emergceny action # the alternative is to leave the system potentially unsecure until # the user comes in and fixes if (is_dpkg_journal_dirty() and apt_pkg.config.find_b( "Unattended-Upgrade::AutoFixInterruptedDpkg", True)): # ensure the dpkg database is not already locked (LP: #754330) admindir = os.path.dirname(apt_pkg.config.find("Dir::State::Status")) lockfd = apt_pkg.get_lock(os.path.join(admindir, "lock"), False) if lockfd > 0: logging.warning( _("Unclean dpkg state detected, trying to correct")) print(_("Unclean dpkg state detected, trying to correct")) env = copy.copy(os.environ) env["DEBIAN_FRONTEND"] = "noninteractive" try: os.close(lockfd) output = subprocess.check_output( ["dpkg", "--force-confold", "--configure", "-a"], env=env) except subprocess.CalledProcessError as e: output = e.output logging.warning(_("dpkg --configure -a output:\n%s" % output)) else: logging.debug("Unclean dpkg state, but locked, another package " "manager working?") # check and get lock try: apt_pkg.pkgsystem_lock() except SystemError as e: logging.error(_("Lock could not be acquired (another package " "manager running?)")) print(_("Cache lock can not be acquired, exiting")) sys.exit(1) # get a cache cache = UnattendedUpgradesCache(rootdir=rootdir, allowed_origins=allowed_origins) if cache._depcache.broken_count > 0: print(_("Cache has broken packages, exiting")) logging.error(_("Cache has broken packages, exiting")) sys.exit(1) # FIXME: make this into a ContextManager # be nice when calculating the upgrade as its pretty CPU intensive os.nice(19) # speed things up with latest apt actiongroup = apt_pkg.ActionGroup(cache._depcache) actiongroup # pyflakes # find out about the packages that are upgradable (in a allowed_origin) pkgs_to_upgrade = [] pkgs_kept_back = [] pkgs_auto_removable = set([pkg.name for pkg in cache if pkg.is_auto_removable]) # now do the actual upgrade for pkg in cache: if options.debug and pkg.is_upgradable: logging.debug("Checking: %s (%s)" % ( pkg.name, getattr(pkg.candidate, "origins", []))) if (pkg.is_upgradable and not is_pkgname_in_blacklist(pkg.name, blacklisted_pkgs) and is_allowed_origin(pkg.candidate, allowed_origins)): try: pkg.mark_upgrade() if check_changes_for_sanity(cache, allowed_origins, blacklisted_pkgs): # add to packages to upgrade pkgs_to_upgrade.append(pkg) # re-eval pkgs_kept_back as the resolver may fail to # directly upgrade a pkg, but that may work during # a subsequent operation, see debian bug #639840 for pkgname in pkgs_kept_back: if (cache[pkgname].marked_install or cache[pkgname].marked_upgrade): pkgs_kept_back.remove(pkgname) pkgs_to_upgrade.append(cache[pkgname]) else: logging.debug("sanity check failed") rewind_cache(cache, pkgs_to_upgrade) pkgs_kept_back.append(pkg.name) except SystemError as e: # can't upgrade logging.warning( _("package '%s' upgradable but fails to " "be marked for upgrade (%s)") % (pkg.name, e)) rewind_cache(cache, pkgs_to_upgrade) pkgs_kept_back.append(pkg.name) pkgs_to_upgrade.sort(key=lambda p: p.name) pkgs = "\n".join([pkg.name for pkg in pkgs_to_upgrade]) logging.debug("pkgs that look like they should be upgraded: %s" % pkgs) # FIXME: make this into a ContextManager # stop being nice os.nice(0) # download what looks good if options.debug: fetcher = apt_pkg.Acquire(apt.progress.text.AcquireProgress()) else: fetcher = apt_pkg.Acquire() list = apt_pkg.SourceList() list.read_main_list() recs = cache._records pm = apt_pkg.PackageManager(cache._depcache) try: pm.get_archives(fetcher, list, recs) except SystemError as e: logging.error(_("GetArchives() failed: '%s'") % e) res = fetcher.run() logging.debug("fetch.run() result: %s" % res) if dpkg_conffile_prompt(): # now check the downloaded debs for conffile conflicts and build # a blacklist for item in fetcher.items: logging.debug("%s" % item) if item.status == item.STAT_ERROR: print(_("An error occurred: '%s'") % item.error_text) logging.error(_("An error occurred: '%s'") % item.error_text) if not item.complete: print(_("The URI '%s' failed to download, aborting") % item.desc_uri) logging.error(_("The URI '%s' failed to download, aborting") % item.desc_uri) sys.exit(1) if not os.path.exists(item.destfile): print(_("Download finished, but file '%s' not there?!?" % item.destfile)) logging.error("Download finished, but file '%s' not " "there?!?" % item.destfile) sys.exit(1) if not item.is_trusted: blacklisted_pkgs.append(pkgname_from_deb(item.destfile)) if conffile_prompt(item.destfile): # skip package (means to re-run the whole marking again # and making sure that the package will not be pulled in by # some other package again!) # # print to stdout to ensure that this message is part of # the cron mail (only if no summary mail is requested) email = apt_pkg.config.find("Unattended-Upgrade::Mail", "") if not email: print(_("Package '%s' has conffile prompt and needs " "to be upgraded manually") % pkgname_from_deb(item.destfile)) # log to the logfile logging.warning(_("Package '%s' has conffile prompt and " "needs to be upgraded manually") % pkgname_from_deb(item.destfile)) blacklisted_pkgs.append(pkgname_from_deb(item.destfile)) pkgs_kept_back.append(pkgname_from_deb(item.destfile)) # redo the selection about the packages to upgrade based on the new # blacklist logging.debug("blacklist: %s" % blacklisted_pkgs) # find out about the packages that are upgradable (in a allowed_origin) if len(blacklisted_pkgs) > 0: cache.clear() old_pkgs_to_upgrade = pkgs_to_upgrade[:] pkgs_to_upgrade = [] for pkg in old_pkgs_to_upgrade: logging.debug("Checking (blacklist): %s" % (pkg.name)) pkg.mark_upgrade() if check_changes_for_sanity(cache, allowed_origins, blacklisted_pkgs): pkgs_to_upgrade.append(pkg) else: if not (pkg.name in pkgs_kept_back): pkgs_kept_back.append(pkg.name) logging.info(_("package '%s' not upgraded") % pkg.name) cache.clear() for pkg2 in pkgs_to_upgrade: pkg2.mark_upgrade() else: logging.debug("dpkg is configured not to cause conffile prompts") # do auto-remove if apt_pkg.config.find_b( "Unattended-Upgrade::Remove-Unused-Dependencies", False): now_auto_removable = set([pkg.name for pkg in cache if pkg.is_auto_removable]) for pkgname in now_auto_removable - pkgs_auto_removable: logging.debug("marking %s for remove" % pkgname) cache[pkgname].mark_delete() logging.info(_("Packages that are auto removed: '%s'") % " ".join(now_auto_removable - pkgs_auto_removable)) logging.debug("InstCount=%i DelCount=%i BrokenCount=%i" % ( cache._depcache.inst_count, cache._depcache.del_count, cache._depcache.broken_count)) # exit if there is nothing to do and nothing to report if (len(pkgs_to_upgrade) == 0) and (len(pkgs_kept_back) == 0): logging.info(_("No packages found that can be upgraded unattended")) # FIXME: DRY violation, write_stamp_file() is used below as well write_stamp_file() return # check if its configured for install on shutdown, if so, the # environment UNATTENDED_UPGRADES_FORCE_INSTALL_ON_SHUTDOWN will # be set by the unatteded-upgrades-shutdown script if (not "UNATTENDED_UPGRADES_FORCE_INSTALL_ON_SHUTDOWN" in os.environ and apt_pkg.config.find_b( "Unattended-Upgrade::InstallOnShutdown", False)): logger = logging.getLogger() logger.debug("Configured to install on shutdown, so exiting now") return # check if we are in dry-run mode if options.dry_run: logging.info("Option --dry-run given, *not* performing real actions") apt_pkg.config.set("Debug::pkgDPkgPM", "1") # do the install based on the new list of pkgs pkgs = " ".join([pkg.name for pkg in pkgs_to_upgrade]) logging.info(_("Packages that will be upgraded: %s" % pkgs)) # get log now = datetime.datetime.now() logfile_dpkg = os.path.join( _get_logdir(), 'unattended-upgrades-dpkg_%s.log' % now.isoformat('_')) # only perform install step if we actually have packages to install pkg_install_success = None shutdown_lock = -1 if len(pkgs_to_upgrade) > 0: # lock for the shutdown check - its fine if the system # is shutdown while downloading but not so much while installing shutdown_lock = apt_pkg.get_lock("/var/run/unattended-upgrades.lock") # do install pkg_install_success = do_install( cache, pkgs_to_upgrade, blacklisted_pkgs, options, logfile_dpkg) # send a mail (if needed) if not options.dry_run: send_summary_mail( pkgs, pkg_install_success, pkgs_kept_back, mem_log, logfile_dpkg) # FIXME: DRY violation, write_stamp_file() is used above as well # write timestamp file write_stamp_file() # check if the user wants a reboot if not options.dry_run: reboot_if_requested_and_needed(shutdown_lock) if __name__ == "__main__": localesApp = "unattended-upgrades" localesDir = "/usr/share/locale" gettext.bindtextdomain(localesApp, localesDir) gettext.textdomain(localesApp) # init the options parser = OptionParser() parser.add_option("-d", "--debug", action="store_true", default=False, help=_("print debug messages")) parser.add_option("", "--apt-debug", action="store_true", default=False, help=_("make apt/libapt print verbose debug messages")) parser.add_option("-v", "--verbose", action="store_true", default=False, help=_("print info messages")) parser.add_option("", "--dry-run", action="store_true", default=False, help=_("Simulation, download but do not install")) parser.add_option("", "--minimal-upgrade-steps", action="store_true", default=False, help=_("Upgrade in minimal steps (and allow " "interrupting with SIGINT")) parser.add_option("", "--minimal_upgrade_steps", action="store_true", help=SUPPRESS_HELP, default=False) (options, args) = parser.parse_args() if os.getuid() != 0: print(_("You need to be root to run this application")) sys.exit(1) # ensure that we are not killed when the terminal goes away e.g. on # shutdown signal.signal(signal.SIGHUP, signal.SIG_IGN) # run the main code main(options) unattended-upgrades-0.82.1ubuntu1/COPYING0000664000000000000000000004310312250412747015021 0ustar GNU GENERAL PUBLIC LICENSE Version 2, June 1991 Copyright (C) 1989, 1991 Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. This General Public License applies to most of the Free Software Foundation's software and to any other program whose authors commit to using it. (Some other Free Software Foundation software is covered by the GNU Lesser General Public License instead.) You can apply it to your programs, too. When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs; and that you know you can do these things. To protect your rights, we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights. These restrictions translate to certain responsibilities for you if you distribute copies of the software, or if you modify it. For example, if you distribute copies of such a program, whether gratis or for a fee, you must give the recipients all the rights that you have. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights. We protect your rights with two steps: (1) copyright the software, and (2) offer you this license which gives you legal permission to copy, distribute and/or modify the software. Also, for each author's protection and ours, we want to make certain that everyone understands that there is no warranty for this free software. If the software is modified by someone else and passed on, we want its recipients to know that what they have is not the original, so that any problems introduced by others will not reflect on the original authors' reputations. Finally, any free program is threatened constantly by software patents. We wish to avoid the danger that redistributors of a free program will individually obtain patent licenses, in effect making the program proprietary. To prevent this, we have made it clear that any patent must be licensed for everyone's free use or not licensed at all. The precise terms and conditions for copying, distribution and modification follow. GNU GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 0. This License applies to any program or other work which contains a notice placed by the copyright holder saying it may be distributed under the terms of this General Public License. The "Program", below, refers to any such program or work, and a "work based on the Program" means either the Program or any derivative work under copyright law: that is to say, a work containing the Program or a portion of it, either verbatim or with modifications and/or translated into another language. (Hereinafter, translation is included without limitation in the term "modification".) Each licensee is addressed as "you". Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running the Program is not restricted, and the output from the Program is covered only if its contents constitute a work based on the Program (independent of having been made by running the Program). Whether that is true depends on what the Program does. 1. You may copy and distribute verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and give any other recipients of the Program a copy of this License along with the Program. You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. 2. You may modify your copy or copies of the Program or any portion of it, thus forming a work based on the Program, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions: a) You must cause the modified files to carry prominent notices stating that you changed the files and the date of any change. b) You must cause any work that you distribute or publish, that in whole or in part contains or is derived from the Program or any part thereof, to be licensed as a whole at no charge to all third parties under the terms of this License. c) If the modified program normally reads commands interactively when run, you must cause it, when started running for such interactive use in the most ordinary way, to print or display an announcement including an appropriate copyright notice and a notice that there is no warranty (or else, saying that you provide a warranty) and that users may redistribute the program under these conditions, and telling the user how to view a copy of this License. (Exception: if the Program itself is interactive but does not normally print such an announcement, your work based on the Program is not required to print an announcement.) These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Program, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Program, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it. Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Program. In addition, mere aggregation of another work not based on the Program with the Program (or with a work based on the Program) on a volume of a storage or distribution medium does not bring the other work under the scope of this License. 3. You may copy and distribute the Program (or a work based on it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you also do one of the following: a) Accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, b) Accompany it with a written offer, valid for at least three years, to give any third party, for a charge no more than your cost of physically performing source distribution, a complete machine-readable copy of the corresponding source code, to be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, c) Accompany it with the information you received as to the offer to distribute corresponding source code. (This alternative is allowed only for noncommercial distribution and only if you received the program in object code or executable form with such an offer, in accord with Subsection b above.) The source code for a work means the preferred form of the work for making modifications to it. For an executable work, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the executable. However, as a special exception, the source code distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable. If distribution of executable or object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place counts as distribution of the source code, even though third parties are not compelled to copy the source along with the object code. 4. You may not copy, modify, sublicense, or distribute the Program except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense or distribute the Program is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance. 5. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Program or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Program (or any work based on the Program), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Program or works based on it. 6. Each time you redistribute the Program (or any work based on the Program), the recipient automatically receives a license from the original licensor to copy, distribute or modify the Program subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties to this License. 7. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Program at all. For example, if a patent license would not permit royalty-free redistribution of the Program by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Program. If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply and the section as a whole is intended to apply in other circumstances. It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system, which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice. This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License. 8. If the distribution and/or use of the Program is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Program under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License. 9. The Free Software Foundation may publish revised and/or new versions of the General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Program specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of this License, you may choose any version ever published by the Free Software Foundation. 10. If you wish to incorporate parts of the Program into other free programs whose distribution conditions are different, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. NO WARRANTY 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. END OF TERMS AND CONDITIONS How to Apply These Terms to Your New Programs If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms. To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively convey the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. Copyright (C) This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. Also add information on how to contact you by electronic and paper mail. If the program is interactive, make it output a short notice like this when it starts in an interactive mode: Gnomovision version 69, Copyright (C) year name of author Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, the commands you use may be called something other than `show w' and `show c'; they could even be mouse-clicks or menu items--whatever suits your program. You should also get your employer (if you work as a programmer) or your school, if any, to sign a "copyright disclaimer" for the program, if necessary. Here is a sample; alter the names: Yoyodyne, Inc., hereby disclaims all copyright interest in the program `Gnomovision' (which makes passes at compilers) written by James Hacker. , 1 April 1989 Ty Coon, President of Vice This General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Lesser General Public License instead of this License. unattended-upgrades-0.82.1ubuntu1/po/0000775000000000000000000000000012301324006014366 5ustar unattended-upgrades-0.82.1ubuntu1/po/ja.po0000664000000000000000000001574712301323624015343 0ustar # Copyright (C) 2008 Michael Vogt # This file is distributed under the same license as the unattended-upgrades package. # Hideki Yamane (Debian-JP) , 2008. # msgid "" msgstr "" "Project-Id-Version: unattended-upgrades 0.36debian1\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2013-09-13 08:12+0200\n" "PO-Revision-Date: 2008-12-21 22:32+0900\n" "Last-Translator: Hideki Yamane (Debian-JP) \n" "Language-Team: Japanese \n" "Language: ja\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: ../unattended-upgrade:136 #, c-format msgid "Progress: %s %% (%s)" msgstr "" #: ../unattended-upgrade:352 ../unattended-upgrade:436 #: ../unattended-upgrade-shutdown:161 msgid "All upgrades installed" msgstr "全てのアップグレードがインストールされました" #: ../unattended-upgrade:354 ../unattended-upgrade:428 msgid "Installing the upgrades failed!" msgstr "アップグレードのインストールが失敗しました!" #: ../unattended-upgrade:355 ../unattended-upgrade:429 #, c-format msgid "error message: '%s'" msgstr "エラーメッセージ: '%s'" #: ../unattended-upgrade:356 ../unattended-upgrade:430 #, c-format msgid "dpkg returned a error! See '%s' for details" msgstr "dpkg がエラーを返しました! 詳細は '%s' を参照してください" #: ../unattended-upgrade:685 msgid "" "No '/usr/bin/mail' or '/usr/sbin/sendmail',can not send mail. You probably " "want to install the 'mailx' package." msgstr "" #: ../unattended-upgrade:698 #, fuzzy, c-format msgid "[reboot required] unattended-upgrades result for '%s': %s" msgstr "" "自動アップグレードは以下を返しました: %s\n" "\n" #: ../unattended-upgrade:701 #, fuzzy, c-format msgid "unattended-upgrades result for '%s': '%s'" msgstr "" "自動アップグレードは以下を返しました: %s\n" "\n" #: ../unattended-upgrade:703 #, c-format msgid "" "Unattended upgrade returned: %s\n" "\n" msgstr "" "自動アップグレードは以下を返しました: %s\n" "\n" #: ../unattended-upgrade:706 msgid "" "Warning: A reboot is required to complete this upgrade.\n" "\n" msgstr "" #: ../unattended-upgrade:708 #, fuzzy msgid "Packages that were upgraded:\n" msgstr "アップグレードされたパッケージ: %s" #: ../unattended-upgrade:710 #, fuzzy msgid "Packages that attempted to upgrade:\n" msgstr "アップグレードされたパッケージ: %s" #: ../unattended-upgrade:714 msgid "Packages with upgradable origin but kept back:\n" msgstr "" #: ../unattended-upgrade:719 msgid "Package installation log:" msgstr "" #: ../unattended-upgrade:723 #, fuzzy msgid "Unattended-upgrades log:\n" msgstr "" "自動アップグレードは以下を返しました: %s\n" "\n" #: ../unattended-upgrade:747 #, c-format msgid "Writing dpkg log to '%s'" msgstr "dpkg のログを '%s' に書き込み中" #: ../unattended-upgrade:873 #, c-format msgid "Initial blacklisted packages: %s" msgstr "初期状態でブラックリストにあるパッケージ: %s" #: ../unattended-upgrade:875 msgid "Starting unattended upgrades script" msgstr "自動アップグレードスクリプトを開始" #: ../unattended-upgrade:878 #, c-format msgid "Allowed origins are: %s" msgstr "許可されているパッケージ導入元: %s" #: ../unattended-upgrade:891 ../unattended-upgrade:892 msgid "Unclean dpkg state detected, trying to correct" msgstr "" #: ../unattended-upgrade:901 #, c-format msgid "" "dpkg --configure -a output:\n" "%s" msgstr "" #: ../unattended-upgrade:910 msgid "Lock could not be acquired (another package manager running?)" msgstr "" #: ../unattended-upgrade:912 #, fuzzy #| msgid "Cache has broken packages, exiting" msgid "Cache lock can not be acquired, exiting" msgstr "キャッシュに壊れたパッケージがあるので終了します" #: ../unattended-upgrade:919 ../unattended-upgrade:920 msgid "Cache has broken packages, exiting" msgstr "キャッシュに壊れたパッケージがあるので終了します" #: ../unattended-upgrade:961 #, c-format msgid "package '%s' upgradable but fails to be marked for upgrade (%s)" msgstr "" #: ../unattended-upgrade:982 #, c-format msgid "GetArchives() failed: '%s'" msgstr "GetArchives() が失敗しました: '%s'" #: ../unattended-upgrade:992 ../unattended-upgrade:993 #, fuzzy, c-format #| msgid "An error ocured: '%s'" msgid "An error occurred: '%s'" msgstr "エラー発生: '%s'" #: ../unattended-upgrade:995 ../unattended-upgrade:997 #, c-format msgid "The URI '%s' failed to download, aborting" msgstr "URI '%s' からダウンロード出来ないので中断します" #: ../unattended-upgrade:1001 #, c-format msgid "Download finished, but file '%s' not there?!?" msgstr "" #: ../unattended-upgrade:1017 ../unattended-upgrade:1021 #, c-format msgid "Package '%s' has conffile prompt and needs to be upgraded manually" msgstr "" "パッケージ '%s' には手動で確認とアップグレードが必要な設定ファイルがあります" #: ../unattended-upgrade:1044 #, c-format msgid "package '%s' not upgraded" msgstr "パッケージ '%s' はアップグレードされませんでした" #: ../unattended-upgrade:1059 #, fuzzy, c-format #| msgid "Packages that are upgraded: %s" msgid "Packages that are auto removed: '%s'" msgstr "アップグレードされたパッケージ: %s" #: ../unattended-upgrade:1068 msgid "No packages found that can be upgraded unattended" msgstr "更新されていないパッケージは見つかりません" #: ../unattended-upgrade:1088 #, fuzzy, c-format #| msgid "Packages that are upgraded: %s" msgid "Packages that will be upgraded: %s" msgstr "アップグレードされたパッケージ: %s" #: ../unattended-upgrade:1125 msgid "print debug messages" msgstr "デバッグメッセージを出力" #: ../unattended-upgrade:1128 #, fuzzy #| msgid "print debug messages" msgid "make apt/libapt print verbose debug messages" msgstr "デバッグメッセージを出力" #: ../unattended-upgrade:1131 #, fuzzy #| msgid "print debug messages" msgid "print info messages" msgstr "デバッグメッセージを出力" #: ../unattended-upgrade:1134 msgid "Simulation, download but do not install" msgstr "" #: ../unattended-upgrade:1137 msgid "Upgrade in minimal steps (and allow interrupting with SIGINT" msgstr "" #: ../unattended-upgrade:1142 msgid "You need to be root to run this application" msgstr "このアプリケーションは管理者権限で実行する必要があります" #: ../unattended-upgrade-shutdown:72 msgid "Unattended-upgrade in progress during shutdown, sleeping for 5s" msgstr "" #: ../unattended-upgrade-shutdown:125 #, fuzzy msgid "Running unattended-upgrades in shutdown mode" msgstr "" "自動アップグレードは以下を返しました: %s\n" "\n" #: ../unattended-upgrade-shutdown:153 #, c-format msgid "Giving up on lockfile after %s delay" msgstr "" #~ msgid "pm.GetArchives() failed" #~ msgstr "pm.GetArchives() が失敗しました" unattended-upgrades-0.82.1ubuntu1/po/POTFILES.in0000664000000000000000000000010012250412747016147 0ustar [encoding: UTF-8] unattended-upgrade unattended-upgrade-shutdownunattended-upgrades-0.82.1ubuntu1/po/de.po0000664000000000000000000001774112301323623015334 0ustar # Translation of unattended-upgrades to German. # Copyright (C) . # This file is distributed under the same license as the # unattended-upgrades package. # Copyright (C) of this file 2012 Chris Leick. # msgid "" msgstr "" "Project-Id-Version: unattended-upgrades 0.77\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2013-09-13 08:12+0200\n" "PO-Revision-Date: 2012-06-14 21:28+0200\n" "Last-Translator: Chris Leick \n" "Language-Team: German \n" "Language: de\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" #: ../unattended-upgrade:136 #, c-format msgid "Progress: %s %% (%s)" msgstr "Fortschritt: %s %% (%s)" #: ../unattended-upgrade:352 ../unattended-upgrade:436 #: ../unattended-upgrade-shutdown:161 msgid "All upgrades installed" msgstr "alle Upgrades installiert" #: ../unattended-upgrade:354 ../unattended-upgrade:428 msgid "Installing the upgrades failed!" msgstr "Installation der Upgrades fehlgeschlagen!" #: ../unattended-upgrade:355 ../unattended-upgrade:429 #, c-format msgid "error message: '%s'" msgstr "Fehlermeldung: »%s«" #: ../unattended-upgrade:356 ../unattended-upgrade:430 #, c-format msgid "dpkg returned a error! See '%s' for details" msgstr "Dpkg gab einen Fehler zurück. Siehe »%s« für Einzelheiten" #: ../unattended-upgrade:685 #, fuzzy #| msgid "" #| "No '/usr/bin/mail', can not send mail. You probably want to install the " #| "'mailx' package." msgid "" "No '/usr/bin/mail' or '/usr/sbin/sendmail',can not send mail. You probably " "want to install the 'mailx' package." msgstr "" "kein »/usr/bin/mail«, Mail kann nicht gesandt werden. Möglicherweise möchten " "Sie das Paket »mailx« installieren." #: ../unattended-upgrade:698 #, fuzzy, c-format #| msgid "[reboot required] unattended-upgrades result for '%s'" msgid "[reboot required] unattended-upgrades result for '%s': %s" msgstr "[Neustart erforderlich] Unattended-Upgrades-Ergebnis für »%s«" #: ../unattended-upgrade:701 #, fuzzy, c-format #| msgid "unattended-upgrades result for '%s'" msgid "unattended-upgrades result for '%s': '%s'" msgstr "Unattended-Upgrades-Ergebnis für »%s«" #: ../unattended-upgrade:703 #, c-format msgid "" "Unattended upgrade returned: %s\n" "\n" msgstr "" "Das unbeaufsichtigte Upgrade gab %s zurück.\n" "\n" #: ../unattended-upgrade:706 msgid "" "Warning: A reboot is required to complete this upgrade.\n" "\n" msgstr "" "Warnung: Um dieses Upgrade zu komplettieren, ist ein Neustart erforderlich.\n" "\n" #: ../unattended-upgrade:708 #, fuzzy #| msgid "Packages that are upgraded:\n" msgid "Packages that were upgraded:\n" msgstr "Pakete, von denen ein Upgrade durchgeführt wurde:\n" #: ../unattended-upgrade:710 #, fuzzy #| msgid "Packages that are upgraded:\n" msgid "Packages that attempted to upgrade:\n" msgstr "Pakete, von denen ein Upgrade durchgeführt wurde:\n" #: ../unattended-upgrade:714 msgid "Packages with upgradable origin but kept back:\n" msgstr "" "Pakete, von deren Ursprung ein Upgrade durchgeführt werden kann, die aber\n" "zurückgehalten werden.\n" #: ../unattended-upgrade:719 msgid "Package installation log:" msgstr "Paketinstallationsprotokoll:" #: ../unattended-upgrade:723 msgid "Unattended-upgrades log:\n" msgstr "Unattended-Upgrades-Protokoll:\n" #: ../unattended-upgrade:747 #, c-format msgid "Writing dpkg log to '%s'" msgstr "Dpkg-Protokoll wird nach »%s« geschrieben" #: ../unattended-upgrade:873 #, c-format msgid "Initial blacklisted packages: %s" msgstr "Pakete, die anfangs auf die schwarzen Liste standen: %s" #: ../unattended-upgrade:875 msgid "Starting unattended upgrades script" msgstr "Skript für unbeaufsichtigte Upgrades wird gestartet." #: ../unattended-upgrade:878 #, c-format msgid "Allowed origins are: %s" msgstr "erlaubte Ursprünge sind: %s" #: ../unattended-upgrade:891 ../unattended-upgrade:892 msgid "Unclean dpkg state detected, trying to correct" msgstr "unsauberer Dpkg-Status entdeckt, es wird versucht dies zu korrigieren" #: ../unattended-upgrade:901 #, c-format msgid "" "dpkg --configure -a output:\n" "%s" msgstr "" "»dpkg --configure -a«-Ausgabe:\n" "%s" #: ../unattended-upgrade:910 msgid "Lock could not be acquired (another package manager running?)" msgstr "" "Sperrung konnte nicht erreicht werden (läuft eine weitere Paketverwaltung?)" #: ../unattended-upgrade:912 msgid "Cache lock can not be acquired, exiting" msgstr "Zwischenspeicher konnte nicht gesperrt werden, wird beendet" #: ../unattended-upgrade:919 ../unattended-upgrade:920 msgid "Cache has broken packages, exiting" msgstr "Zwischenspeicher enthält beschädigte Pakete, wird beendet" #: ../unattended-upgrade:961 #, c-format msgid "package '%s' upgradable but fails to be marked for upgrade (%s)" msgstr "" "Von Paket »%s« könnte ein Upgrade durchgeführt werden, es ist jedoch " "fehlgeschlagen, dies für das Upgrade zu markieren (%s)" #: ../unattended-upgrade:982 #, c-format msgid "GetArchives() failed: '%s'" msgstr "GetArchives() fehlgeschlagen: »%s«" #: ../unattended-upgrade:992 ../unattended-upgrade:993 #, fuzzy, c-format #| msgid "An error ocured: '%s'" msgid "An error occurred: '%s'" msgstr "Es ist ein Fehler aufgetreten: »%s«" #: ../unattended-upgrade:995 ../unattended-upgrade:997 #, c-format msgid "The URI '%s' failed to download, aborting" msgstr "Herunterladen von der URI »%s« fehlgeschlagen, wird abgebrochen" #: ../unattended-upgrade:1001 #, c-format msgid "Download finished, but file '%s' not there?!?" msgstr "Herunterladen beendet, aber Datei »%s« ist nicht dort!?" #: ../unattended-upgrade:1017 ../unattended-upgrade:1021 #, c-format msgid "Package '%s' has conffile prompt and needs to be upgraded manually" msgstr "" "Das Paket »%s« hat eine Conffile-Abfrage und muss einem manuellen Upgrade " "unterzogen werden." #: ../unattended-upgrade:1044 #, c-format msgid "package '%s' not upgraded" msgstr "Von Paket »%s« wurde kein Upgrade durchgeführt." #: ../unattended-upgrade:1059 #, c-format msgid "Packages that are auto removed: '%s'" msgstr "Pakete, die automatisch entfernt wurden: »%s«" #: ../unattended-upgrade:1068 msgid "No packages found that can be upgraded unattended" msgstr "" "Es wurden keine Pakete gefunden, von denen ein unbeaufsichtigtes Upgrade " "durchgeführt werden kann." #: ../unattended-upgrade:1088 #, fuzzy, c-format #| msgid "Packages that are upgraded: %s" msgid "Packages that will be upgraded: %s" msgstr "Pakete, von denen ein Upgrade durchgeführt wurde: %s" #: ../unattended-upgrade:1125 msgid "print debug messages" msgstr "Nachrichten zur Fehlersuche ausgeben" #: ../unattended-upgrade:1128 #, fuzzy #| msgid "print debug messages" msgid "make apt/libapt print verbose debug messages" msgstr "Nachrichten zur Fehlersuche ausgeben" #: ../unattended-upgrade:1131 #, fuzzy #| msgid "print debug messages" msgid "print info messages" msgstr "Nachrichten zur Fehlersuche ausgeben" #: ../unattended-upgrade:1134 msgid "Simulation, download but do not install" msgstr "Simulation, herunterladen, aber nicht installieren" #: ../unattended-upgrade:1137 msgid "Upgrade in minimal steps (and allow interrupting with SIGINT" msgstr "Upgrade in minimalen Schritten (Unterbrechung mit SIGINT erlaubt)" #: ../unattended-upgrade:1142 msgid "You need to be root to run this application" msgstr "Sie müssen Root sein, um diese Anwendung auszuführen." #: ../unattended-upgrade-shutdown:72 msgid "Unattended-upgrade in progress during shutdown, sleeping for 5s" msgstr "" "Unattended-Upgrade läuft während des Herunterfahrens weiter, es wird fünf " "Sekunden lang gewartet." #: ../unattended-upgrade-shutdown:125 #, fuzzy #| msgid "unattended-upgrades result for '%s'" msgid "Running unattended-upgrades in shutdown mode" msgstr "Unattended-Upgrades-Ergebnis für »%s«" #: ../unattended-upgrade-shutdown:153 #, c-format msgid "Giving up on lockfile after %s delay" msgstr "Sperrdatei, hier wird nach %s Verzögerung aufgegeben." #~ msgid "Progress: %s %%: (%s)" #~ msgstr "Fortschritt: %s %%: (%s)" unattended-upgrades-0.82.1ubuntu1/po/eu.po0000664000000000000000000001472312301323623015352 0ustar # translation of eu.po to Euskara # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER # This file is distributed under the same license as the PACKAGE package. # # Piarres Beobide , 2008. msgid "" msgstr "" "Project-Id-Version: eu\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2013-09-13 08:12+0200\n" "PO-Revision-Date: 2008-12-17 09:28+0100\n" "Last-Translator: Piarres Beobide \n" "Language-Team: Euskara \n" "Language: \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "X-Generator: KBabel 1.11.4\n" #: ../unattended-upgrade:136 #, c-format msgid "Progress: %s %% (%s)" msgstr "" #: ../unattended-upgrade:352 ../unattended-upgrade:436 #: ../unattended-upgrade-shutdown:161 msgid "All upgrades installed" msgstr "Bertsio-berritze guztiak instalatu dira" #: ../unattended-upgrade:354 ../unattended-upgrade:428 msgid "Installing the upgrades failed!" msgstr "Huts bertsio-berritzeak instalatzean!" #: ../unattended-upgrade:355 ../unattended-upgrade:429 #, c-format msgid "error message: '%s'" msgstr "errore mezua: '%s'" #: ../unattended-upgrade:356 ../unattended-upgrade:430 #, c-format msgid "dpkg returned a error! See '%s' for details" msgstr "dpkg-ek errore bat itzuli du! '%s' begiratu xehetasunetarako" #: ../unattended-upgrade:685 msgid "" "No '/usr/bin/mail' or '/usr/sbin/sendmail',can not send mail. You probably " "want to install the 'mailx' package." msgstr "" #: ../unattended-upgrade:698 #, fuzzy, c-format msgid "[reboot required] unattended-upgrades result for '%s': %s" msgstr "" "Zaindugabeko bertsio-berritze erantzuna: %s\n" "\n" #: ../unattended-upgrade:701 #, fuzzy, c-format msgid "unattended-upgrades result for '%s': '%s'" msgstr "" "Zaindugabeko bertsio-berritze erantzuna: %s\n" "\n" #: ../unattended-upgrade:703 #, c-format msgid "" "Unattended upgrade returned: %s\n" "\n" msgstr "" "Zaindugabeko bertsio-berritze erantzuna: %s\n" "\n" #: ../unattended-upgrade:706 msgid "" "Warning: A reboot is required to complete this upgrade.\n" "\n" msgstr "" #: ../unattended-upgrade:708 #, fuzzy msgid "Packages that were upgraded:\n" msgstr "Bertsio-berritu diren paketeak: %s" #: ../unattended-upgrade:710 #, fuzzy msgid "Packages that attempted to upgrade:\n" msgstr "Bertsio-berritu diren paketeak: %s" #: ../unattended-upgrade:714 msgid "Packages with upgradable origin but kept back:\n" msgstr "" #: ../unattended-upgrade:719 msgid "Package installation log:" msgstr "" #: ../unattended-upgrade:723 #, fuzzy msgid "Unattended-upgrades log:\n" msgstr "" "Zaindugabeko bertsio-berritze erantzuna: %s\n" "\n" #: ../unattended-upgrade:747 #, c-format msgid "Writing dpkg log to '%s'" msgstr "Dpkg erregistroa '%s'-en idazten" #: ../unattended-upgrade:873 #, c-format msgid "Initial blacklisted packages: %s" msgstr "Hasierako zerrenda-beltz paketeak: %s" #: ../unattended-upgrade:875 msgid "Starting unattended upgrades script" msgstr "Zaindugabeko bertsio-berritze script-a abiarazten" #: ../unattended-upgrade:878 #, c-format msgid "Allowed origins are: %s" msgstr "Onartzen diren jatorriak: %s" #: ../unattended-upgrade:891 ../unattended-upgrade:892 msgid "Unclean dpkg state detected, trying to correct" msgstr "" #: ../unattended-upgrade:901 #, c-format msgid "" "dpkg --configure -a output:\n" "%s" msgstr "" #: ../unattended-upgrade:910 msgid "Lock could not be acquired (another package manager running?)" msgstr "" #: ../unattended-upgrade:912 #, fuzzy #| msgid "Cache has broken packages, exiting" msgid "Cache lock can not be acquired, exiting" msgstr "Katxeak hondaturiko paketeak ditu, uzten" #: ../unattended-upgrade:919 ../unattended-upgrade:920 msgid "Cache has broken packages, exiting" msgstr "Katxeak hondaturiko paketeak ditu, uzten" #: ../unattended-upgrade:961 #, c-format msgid "package '%s' upgradable but fails to be marked for upgrade (%s)" msgstr "" #: ../unattended-upgrade:982 #, c-format msgid "GetArchives() failed: '%s'" msgstr "GetArchives()-ek huts egin du: '%s'" #: ../unattended-upgrade:992 ../unattended-upgrade:993 #, fuzzy, c-format #| msgid "An error ocured: '%s'" msgid "An error occurred: '%s'" msgstr "Errore bat gertatu da: '%s'" #: ../unattended-upgrade:995 ../unattended-upgrade:997 #, c-format msgid "The URI '%s' failed to download, aborting" msgstr "Huts '%s' URIa deskargatzerakoan, uzten" #: ../unattended-upgrade:1001 #, c-format msgid "Download finished, but file '%s' not there?!?" msgstr "" #: ../unattended-upgrade:1017 ../unattended-upgrade:1021 #, c-format msgid "Package '%s' has conffile prompt and needs to be upgraded manually" msgstr "" "'%s' paketeak konfigurazio galderaren bat du eta eskuz bertsio-berritu behar " "da" #: ../unattended-upgrade:1044 #, c-format msgid "package '%s' not upgraded" msgstr "'%s' paketea ez da bertsio-berritu" #: ../unattended-upgrade:1059 #, fuzzy, c-format #| msgid "Packages that are upgraded: %s" msgid "Packages that are auto removed: '%s'" msgstr "Bertsio-berritu diren paketeak: %s" #: ../unattended-upgrade:1068 msgid "No packages found that can be upgraded unattended" msgstr "Ez da zaindugabe instalatu daitekeen paketerik aurkitu" #: ../unattended-upgrade:1088 #, fuzzy, c-format #| msgid "Packages that are upgraded: %s" msgid "Packages that will be upgraded: %s" msgstr "Bertsio-berritu diren paketeak: %s" #: ../unattended-upgrade:1125 msgid "print debug messages" msgstr "inprimatu arazpen mezuak" #: ../unattended-upgrade:1128 #, fuzzy #| msgid "print debug messages" msgid "make apt/libapt print verbose debug messages" msgstr "inprimatu arazpen mezuak" #: ../unattended-upgrade:1131 #, fuzzy #| msgid "print debug messages" msgid "print info messages" msgstr "inprimatu arazpen mezuak" #: ../unattended-upgrade:1134 msgid "Simulation, download but do not install" msgstr "" #: ../unattended-upgrade:1137 msgid "Upgrade in minimal steps (and allow interrupting with SIGINT" msgstr "" #: ../unattended-upgrade:1142 msgid "You need to be root to run this application" msgstr "Root izan behar zara aplikazioa hau exekutatu ahal izateko" #: ../unattended-upgrade-shutdown:72 msgid "Unattended-upgrade in progress during shutdown, sleeping for 5s" msgstr "" #: ../unattended-upgrade-shutdown:125 #, fuzzy msgid "Running unattended-upgrades in shutdown mode" msgstr "" "Zaindugabeko bertsio-berritze erantzuna: %s\n" "\n" #: ../unattended-upgrade-shutdown:153 #, c-format msgid "Giving up on lockfile after %s delay" msgstr "" #~ msgid "pm.GetArchives() failed" #~ msgstr "pm.GetArchives()-ek huts egin du" unattended-upgrades-0.82.1ubuntu1/po/es.po0000664000000000000000000002112012301323623015335 0ustar # unattended-upgrades po translation to Spanish # Copyright (C) 2012 Software in the Public Interest # This file is distributed under the same license as the unattended-upgrades package. # # Changes: # - Initial translation # Omar Campagne , 2012 # # - Updates # TRANSLATOR # # Traductores, si no conocen el formato PO, merece la pena leer la # documentación de gettext, especialmente las secciones dedicadas a este # formato, por ejemplo ejecutando: # info -n '(gettext)PO Files' # info -n '(gettext)Header Entry' # # Equipo de traducción al español, por favor lean antes de traducir # los siguientes documentos: # # - El proyecto de traducción de Debian al español # http://www.debian.org/intl/spanish/ # especialmente las notas y normas de traducción en # http://www.debian.org/intl/spanish/notas # # - La guía de traducción de po's de debconf: # /usr/share/doc/po-debconf/README-trans # o http://www.debian.org/intl/l10n/po-debconf/README-trans # msgid "" msgstr "" "Project-Id-Version: unattended-upgrades 0.79\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2013-09-13 08:12+0200\n" "PO-Revision-Date: 2012-07-12 14:04+0200\n" "Last-Translator: Omar Campagne \n" "Language-Team: Debian l10n Spanish \n" "Language: es\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" "X-Generator: Virtaal 0.7.1\n" #: ../unattended-upgrade:136 #, c-format msgid "Progress: %s %% (%s)" msgstr "Progreso: %s %% (%s)" #: ../unattended-upgrade:352 ../unattended-upgrade:436 #: ../unattended-upgrade-shutdown:161 msgid "All upgrades installed" msgstr "Se han instalado todas las actualizaciones" #: ../unattended-upgrade:354 ../unattended-upgrade:428 msgid "Installing the upgrades failed!" msgstr "Fallo al instalar actualizaciones" #: ../unattended-upgrade:355 ../unattended-upgrade:429 #, c-format msgid "error message: '%s'" msgstr "Mensaje de fallo: «%s»" #: ../unattended-upgrade:356 ../unattended-upgrade:430 #, c-format msgid "dpkg returned a error! See '%s' for details" msgstr "Se ha detectado un fallo de dpkg. Para más detalles, consulte «%s»" #: ../unattended-upgrade:685 #, fuzzy #| msgid "" #| "No '/usr/bin/mail', can not send mail. You probably want to install the " #| "'mailx' package." msgid "" "No '/usr/bin/mail' or '/usr/sbin/sendmail',can not send mail. You probably " "want to install the 'mailx' package." msgstr "" "No se ha detectado «/usr/bin/mail», no se puede enviar correo. Considere " "instalar el paquete «mailx»." #: ../unattended-upgrade:698 #, fuzzy, c-format #| msgid "[reboot required] unattended-upgrades result for '%s'" msgid "[reboot required] unattended-upgrades result for '%s': %s" msgstr "[Se requiere un reinicio] Resultado de unattended-upgrades para «%s»" #: ../unattended-upgrade:701 #, fuzzy, c-format #| msgid "unattended-upgrades result for '%s'" msgid "unattended-upgrades result for '%s': '%s'" msgstr "Resultado de unattended-upgrades para «%s»" #: ../unattended-upgrade:703 #, c-format msgid "" "Unattended upgrade returned: %s\n" "\n" msgstr "" "Valor devuelto por unattended-upgrade: %s\n" "\n" #: ../unattended-upgrade:706 msgid "" "Warning: A reboot is required to complete this upgrade.\n" "\n" msgstr "" "Advertencia: Se requiere reinciar para completar la actualización.\n" "\n" #: ../unattended-upgrade:708 #, fuzzy #| msgid "Packages that are upgraded:\n" msgid "Packages that were upgraded:\n" msgstr "Paquetes que actualizar:\n" #: ../unattended-upgrade:710 #, fuzzy #| msgid "Packages that are upgraded:\n" msgid "Packages that attempted to upgrade:\n" msgstr "Paquetes que actualizar:\n" #: ../unattended-upgrade:714 msgid "Packages with upgradable origin but kept back:\n" msgstr "" "Paquetes con una actualización disponible en la fuente pero que no se " "actualizarán:\n" #: ../unattended-upgrade:719 msgid "Package installation log:" msgstr "Registro de instalación de paquete:" #: ../unattended-upgrade:723 msgid "Unattended-upgrades log:\n" msgstr "Registro de unattended-upgrades:\n" #: ../unattended-upgrade:747 #, c-format msgid "Writing dpkg log to '%s'" msgstr "Escribiendo el registro de dpkg en «%s»" #: ../unattended-upgrade:873 #, c-format msgid "Initial blacklisted packages: %s" msgstr "Paquetes inicialmente bloqueados: %s" #: ../unattended-upgrade:875 msgid "Starting unattended upgrades script" msgstr "Iniciando script de unattended-upgrades" #: ../unattended-upgrade:878 #, c-format msgid "Allowed origins are: %s" msgstr "Fuentes permitidas: %s" #: ../unattended-upgrade:891 ../unattended-upgrade:892 msgid "Unclean dpkg state detected, trying to correct" msgstr "Se ha detectado un estado no limpio de dpkg, intentando corregir" #: ../unattended-upgrade:901 #, c-format msgid "" "dpkg --configure -a output:\n" "%s" msgstr "" "dpkg --configure -a output:\n" "%s" #: ../unattended-upgrade:910 msgid "Lock could not be acquired (another package manager running?)" msgstr "" "No se puede establecer el bloqueo (¿otro gestor de paquetes ejecutándose?)" #: ../unattended-upgrade:912 msgid "Cache lock can not be acquired, exiting" msgstr "No se puede establecer el bloqueo de la caché, saliendo" #: ../unattended-upgrade:919 ../unattended-upgrade:920 msgid "Cache has broken packages, exiting" msgstr "La caché tiene paquetes rotos, saliendo" #: ../unattended-upgrade:961 #, c-format msgid "package '%s' upgradable but fails to be marked for upgrade (%s)" msgstr "" "El paquete «%s» es actualizable, pero no se puede marcar para la " "actualización (%s)" #: ../unattended-upgrade:982 #, c-format msgid "GetArchives() failed: '%s'" msgstr "Fallo de GetArchives(): «%s»" #: ../unattended-upgrade:992 ../unattended-upgrade:993 #, fuzzy, c-format #| msgid "An error ocured: '%s'" msgid "An error occurred: '%s'" msgstr "Se ha detectado un fallo: «%s»" #: ../unattended-upgrade:995 ../unattended-upgrade:997 #, c-format msgid "The URI '%s' failed to download, aborting" msgstr "Fallo al descargar desde el URI «%s», interrumpiendo" #: ../unattended-upgrade:1001 #, c-format msgid "Download finished, but file '%s' not there?!?" msgstr "La descarga ha finalizado, pero no se encuentra el fichero «%s»" #: ../unattended-upgrade:1017 ../unattended-upgrade:1021 #, c-format msgid "Package '%s' has conffile prompt and needs to be upgraded manually" msgstr "" "El paquete «%s» solicita confirmación a través de un conffile, y se debe " "actualizar de forma manual" #: ../unattended-upgrade:1044 #, c-format msgid "package '%s' not upgraded" msgstr "No se ha actualizado el paquete «%s»" #: ../unattended-upgrade:1059 #, c-format msgid "Packages that are auto removed: '%s'" msgstr "Paquetes eliminados de forma automática: «%s»" #: ../unattended-upgrade:1068 msgid "No packages found that can be upgraded unattended" msgstr "No se han encontrado paquetes actualizables sin supervisión" #: ../unattended-upgrade:1088 #, fuzzy, c-format #| msgid "Packages that are upgraded: %s" msgid "Packages that will be upgraded: %s" msgstr "Paquetes que se han actualizado: %s" #: ../unattended-upgrade:1125 msgid "print debug messages" msgstr "Mostrar mensajes de depuración de fallos" #: ../unattended-upgrade:1128 #, fuzzy #| msgid "print debug messages" msgid "make apt/libapt print verbose debug messages" msgstr "Mostrar mensajes de depuración de fallos" #: ../unattended-upgrade:1131 #, fuzzy #| msgid "print debug messages" msgid "print info messages" msgstr "Mostrar mensajes de depuración de fallos" #: ../unattended-upgrade:1134 msgid "Simulation, download but do not install" msgstr "Simulacro, descarga pero no instala" #: ../unattended-upgrade:1137 msgid "Upgrade in minimal steps (and allow interrupting with SIGINT" msgstr "Actualizar en pequeños pasos (y permitir la interrupción con SIGINT)" #: ../unattended-upgrade:1142 msgid "You need to be root to run this application" msgstr "" "Necesita tener privilegios de administrador para ejecutar esta aplicación" #: ../unattended-upgrade-shutdown:72 msgid "Unattended-upgrade in progress during shutdown, sleeping for 5s" msgstr "Unattended-upgrade en proceso durante el apagado, esperando 5s" #: ../unattended-upgrade-shutdown:125 #, fuzzy #| msgid "unattended-upgrades result for '%s'" msgid "Running unattended-upgrades in shutdown mode" msgstr "Resultado de unattended-upgrades para «%s»" #: ../unattended-upgrade-shutdown:153 #, c-format msgid "Giving up on lockfile after %s delay" msgstr "Finalizando el bloqueo del fichero después de un retraso de %s" #~ msgid "Progress: %s %%: (%s)" #~ msgstr "Progreso: %s %%: (%s)" unattended-upgrades-0.82.1ubuntu1/po/pt.po0000664000000000000000000001676412301323624015374 0ustar # unattended-upgrades portuguese debconf messages # Copyright (C) 2012 THE PACKAGE'S COPYRIGHT HOLDER # This file is distributed under the same license as the unattended-upgrades package. # Pedro Ribeiro , 2012. # msgid "" msgstr "" "Project-Id-Version: unattended-upgrades\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2013-09-13 08:12+0200\n" "PO-Revision-Date: 2012-06-24 09:04+0100\n" "Last-Translator: Pedro Ribeiro \n" "Language-Team: Portuguese \n" "Language: pt\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: ../unattended-upgrade:136 #, c-format msgid "Progress: %s %% (%s)" msgstr "Progresso: %s %% (%s)" #: ../unattended-upgrade:352 ../unattended-upgrade:436 #: ../unattended-upgrade-shutdown:161 msgid "All upgrades installed" msgstr "Todas as atualizações instaladas" #: ../unattended-upgrade:354 ../unattended-upgrade:428 msgid "Installing the upgrades failed!" msgstr "Falhou a instalação das atualizações!" #: ../unattended-upgrade:355 ../unattended-upgrade:429 #, c-format msgid "error message: '%s'" msgstr "mensagem de erro: '%s'" #: ../unattended-upgrade:356 ../unattended-upgrade:430 #, c-format msgid "dpkg returned a error! See '%s' for details" msgstr "dpkg retornou um erro! Veja '%s' para mais informação" #: ../unattended-upgrade:685 #, fuzzy #| msgid "" #| "No '/usr/bin/mail', can not send mail. You probably want to install the " #| "'mailx' package." msgid "" "No '/usr/bin/mail' or '/usr/sbin/sendmail',can not send mail. You probably " "want to install the 'mailx' package." msgstr "" "Não existe '/usr/bin/mail', impossível enviar mail. Provavelmente quer " "instalar o pacote 'mailx'." #: ../unattended-upgrade:698 #, fuzzy, c-format #| msgid "[reboot required] unattended-upgrades result for '%s'" msgid "[reboot required] unattended-upgrades result for '%s': %s" msgstr "[reinício necessário] resultado do unattended-upgrades para '%s'" #: ../unattended-upgrade:701 #, fuzzy, c-format #| msgid "unattended-upgrades result for '%s'" msgid "unattended-upgrades result for '%s': '%s'" msgstr "resultado do unattended-upgrades para '%s'" #: ../unattended-upgrade:703 #, c-format msgid "" "Unattended upgrade returned: %s\n" "\n" msgstr "" "Actualização automática retornou: %s\n" "\n" #: ../unattended-upgrade:706 msgid "" "Warning: A reboot is required to complete this upgrade.\n" "\n" msgstr "" "Atenção: É necessário reiniciar o computador para completar esta " "atualização.\n" "\n" #: ../unattended-upgrade:708 #, fuzzy #| msgid "Packages that are upgraded:\n" msgid "Packages that were upgraded:\n" msgstr "Pacotes atualizados:\n" #: ../unattended-upgrade:710 #, fuzzy #| msgid "Packages that are upgraded:\n" msgid "Packages that attempted to upgrade:\n" msgstr "Pacotes atualizados:\n" #: ../unattended-upgrade:714 msgid "Packages with upgradable origin but kept back:\n" msgstr "Pacotes com possibilidade de actualização mas mantidos:\n" #: ../unattended-upgrade:719 msgid "Package installation log:" msgstr "Registo de instalação de pacotes:" #: ../unattended-upgrade:723 msgid "Unattended-upgrades log:\n" msgstr "Registo do Unattended-upgrades:\n" #: ../unattended-upgrade:747 #, c-format msgid "Writing dpkg log to '%s'" msgstr "A escrever registo do dpkg para '%s'" #: ../unattended-upgrade:873 #, c-format msgid "Initial blacklisted packages: %s" msgstr "Lista negra inicial de pacotes: %s" #: ../unattended-upgrade:875 msgid "Starting unattended upgrades script" msgstr "A iniciar o script de atualização automática" #: ../unattended-upgrade:878 #, c-format msgid "Allowed origins are: %s" msgstr "Origens permitidas: %s" #: ../unattended-upgrade:891 ../unattended-upgrade:892 msgid "Unclean dpkg state detected, trying to correct" msgstr "Detetado estado \"unclean\" de dpkg, a tentar correção" #: ../unattended-upgrade:901 #, c-format msgid "" "dpkg --configure -a output:\n" "%s" msgstr "" "dpkg --configure -a output:\n" "%s" #: ../unattended-upgrade:910 msgid "Lock could not be acquired (another package manager running?)" msgstr "Não foi possível bloquear (outro gestor de pacotes ativo?)" #: ../unattended-upgrade:912 msgid "Cache lock can not be acquired, exiting" msgstr "Não foi possível bloquear cache, a sair" #: ../unattended-upgrade:919 ../unattended-upgrade:920 msgid "Cache has broken packages, exiting" msgstr "A cache tem pacotes corrompidos, a sair" #: ../unattended-upgrade:961 #, c-format msgid "package '%s' upgradable but fails to be marked for upgrade (%s)" msgstr "o pacote '%s' é atualizável mas não está marcado para atualização (%s)" #: ../unattended-upgrade:982 #, c-format msgid "GetArchives() failed: '%s'" msgstr "Falhou GetArchives(): '%s'" #: ../unattended-upgrade:992 ../unattended-upgrade:993 #, fuzzy, c-format #| msgid "An error ocured: '%s'" msgid "An error occurred: '%s'" msgstr "Ocorreu um erro: '%s'" #: ../unattended-upgrade:995 ../unattended-upgrade:997 #, c-format msgid "The URI '%s' failed to download, aborting" msgstr "Falhou o download do URI '%s', a terminar" #: ../unattended-upgrade:1001 #, c-format msgid "Download finished, but file '%s' not there?!?" msgstr "Acabou o download, mas o ficheiro '%s' não existe?!?" #: ../unattended-upgrade:1017 ../unattended-upgrade:1021 #, c-format msgid "Package '%s' has conffile prompt and needs to be upgraded manually" msgstr "" "O pacote '%s' tem uma questão de ficheiro de configuração e necessita de ser " "atualizado manualmente" #: ../unattended-upgrade:1044 #, c-format msgid "package '%s' not upgraded" msgstr "o pacote '%s' não foi atualizado" #: ../unattended-upgrade:1059 #, c-format msgid "Packages that are auto removed: '%s'" msgstr "Pacotes automaticamente removidos: '%s'" #: ../unattended-upgrade:1068 msgid "No packages found that can be upgraded unattended" msgstr "" "Não foram encontrados pacotes com possibilidade de atualização automatica" #: ../unattended-upgrade:1088 #, fuzzy, c-format #| msgid "Packages that are upgraded: %s" msgid "Packages that will be upgraded: %s" msgstr "Pacotes atualizados: %s" #: ../unattended-upgrade:1125 msgid "print debug messages" msgstr "mostrar mensagens de debug" #: ../unattended-upgrade:1128 #, fuzzy #| msgid "print debug messages" msgid "make apt/libapt print verbose debug messages" msgstr "mostrar mensagens de debug" #: ../unattended-upgrade:1131 #, fuzzy #| msgid "print debug messages" msgid "print info messages" msgstr "mostrar mensagens de debug" #: ../unattended-upgrade:1134 msgid "Simulation, download but do not install" msgstr "Simulação, fazer o download mas não instalar" #: ../unattended-upgrade:1137 msgid "Upgrade in minimal steps (and allow interrupting with SIGINT" msgstr "Atualizar em pequenos passos (e permitir interrupções com o SIGINT" #: ../unattended-upgrade:1142 msgid "You need to be root to run this application" msgstr "Necessita de acesso de root para executar esta aplicação" #: ../unattended-upgrade-shutdown:72 msgid "Unattended-upgrade in progress during shutdown, sleeping for 5s" msgstr "Unattended-upgrade em progresso durante o fecho, a dormir por 5s" #: ../unattended-upgrade-shutdown:125 #, fuzzy #| msgid "unattended-upgrades result for '%s'" msgid "Running unattended-upgrades in shutdown mode" msgstr "resultado do unattended-upgrades para '%s'" #: ../unattended-upgrade-shutdown:153 #, c-format msgid "Giving up on lockfile after %s delay" msgstr "A desistir do ficheiro de lock após um atraso de %s" #~ msgid "Progress: %s %%: (%s)" #~ msgstr "Progresso: %s %%: (%s)" unattended-upgrades-0.82.1ubuntu1/po/unattended-upgrades.pot0000664000000000000000000001155112250412747021075 0ustar # SOME DESCRIPTIVE TITLE. # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER # This file is distributed under the same license as the PACKAGE package. # FIRST AUTHOR , YEAR. # #, fuzzy msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2013-09-13 08:12+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" "Language: \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=CHARSET\n" "Content-Transfer-Encoding: 8bit\n" #: ../unattended-upgrade:136 #, c-format msgid "Progress: %s %% (%s)" msgstr "" #: ../unattended-upgrade:352 ../unattended-upgrade:436 #: ../unattended-upgrade-shutdown:161 msgid "All upgrades installed" msgstr "" #: ../unattended-upgrade:354 ../unattended-upgrade:428 msgid "Installing the upgrades failed!" msgstr "" #: ../unattended-upgrade:355 ../unattended-upgrade:429 #, c-format msgid "error message: '%s'" msgstr "" #: ../unattended-upgrade:356 ../unattended-upgrade:430 #, c-format msgid "dpkg returned a error! See '%s' for details" msgstr "" #: ../unattended-upgrade:685 msgid "" "No '/usr/bin/mail' or '/usr/sbin/sendmail',can not send mail. You probably " "want to install the 'mailx' package." msgstr "" #: ../unattended-upgrade:698 #, c-format msgid "[reboot required] unattended-upgrades result for '%s': %s" msgstr "" #: ../unattended-upgrade:701 #, c-format msgid "unattended-upgrades result for '%s': '%s'" msgstr "" #: ../unattended-upgrade:703 #, c-format msgid "" "Unattended upgrade returned: %s\n" "\n" msgstr "" #: ../unattended-upgrade:706 msgid "" "Warning: A reboot is required to complete this upgrade.\n" "\n" msgstr "" #: ../unattended-upgrade:708 msgid "Packages that were upgraded:\n" msgstr "" #: ../unattended-upgrade:710 msgid "Packages that attempted to upgrade:\n" msgstr "" #: ../unattended-upgrade:714 msgid "Packages with upgradable origin but kept back:\n" msgstr "" #: ../unattended-upgrade:719 msgid "Package installation log:" msgstr "" #: ../unattended-upgrade:723 msgid "Unattended-upgrades log:\n" msgstr "" #: ../unattended-upgrade:747 #, c-format msgid "Writing dpkg log to '%s'" msgstr "" #: ../unattended-upgrade:873 #, c-format msgid "Initial blacklisted packages: %s" msgstr "" #: ../unattended-upgrade:875 msgid "Starting unattended upgrades script" msgstr "" #: ../unattended-upgrade:878 #, c-format msgid "Allowed origins are: %s" msgstr "" #: ../unattended-upgrade:891 ../unattended-upgrade:892 msgid "Unclean dpkg state detected, trying to correct" msgstr "" #: ../unattended-upgrade:901 #, c-format msgid "" "dpkg --configure -a output:\n" "%s" msgstr "" #: ../unattended-upgrade:910 msgid "Lock could not be acquired (another package manager running?)" msgstr "" #: ../unattended-upgrade:912 msgid "Cache lock can not be acquired, exiting" msgstr "" #: ../unattended-upgrade:919 ../unattended-upgrade:920 msgid "Cache has broken packages, exiting" msgstr "" #: ../unattended-upgrade:961 #, c-format msgid "package '%s' upgradable but fails to be marked for upgrade (%s)" msgstr "" #: ../unattended-upgrade:982 #, c-format msgid "GetArchives() failed: '%s'" msgstr "" #: ../unattended-upgrade:992 ../unattended-upgrade:993 #, c-format msgid "An error occurred: '%s'" msgstr "" #: ../unattended-upgrade:995 ../unattended-upgrade:997 #, c-format msgid "The URI '%s' failed to download, aborting" msgstr "" #: ../unattended-upgrade:1001 #, c-format msgid "Download finished, but file '%s' not there?!?" msgstr "" #: ../unattended-upgrade:1017 ../unattended-upgrade:1021 #, c-format msgid "Package '%s' has conffile prompt and needs to be upgraded manually" msgstr "" #: ../unattended-upgrade:1044 #, c-format msgid "package '%s' not upgraded" msgstr "" #: ../unattended-upgrade:1059 #, c-format msgid "Packages that are auto removed: '%s'" msgstr "" #: ../unattended-upgrade:1068 msgid "No packages found that can be upgraded unattended" msgstr "" #: ../unattended-upgrade:1088 #, c-format msgid "Packages that will be upgraded: %s" msgstr "" #: ../unattended-upgrade:1125 msgid "print debug messages" msgstr "" #: ../unattended-upgrade:1128 msgid "make apt/libapt print verbose debug messages" msgstr "" #: ../unattended-upgrade:1131 msgid "print info messages" msgstr "" #: ../unattended-upgrade:1134 msgid "Simulation, download but do not install" msgstr "" #: ../unattended-upgrade:1137 msgid "Upgrade in minimal steps (and allow interrupting with SIGINT" msgstr "" #: ../unattended-upgrade:1142 msgid "You need to be root to run this application" msgstr "" #: ../unattended-upgrade-shutdown:72 msgid "Unattended-upgrade in progress during shutdown, sleeping for 5s" msgstr "" #: ../unattended-upgrade-shutdown:125 msgid "Running unattended-upgrades in shutdown mode" msgstr "" #: ../unattended-upgrade-shutdown:153 #, c-format msgid "Giving up on lockfile after %s delay" msgstr "" unattended-upgrades-0.82.1ubuntu1/po/fr.po0000664000000000000000000001741212301323623015346 0ustar # Paquet unattended-upgrades # Copyright (C) 2008 # This file is distributed under the same license as the unattended-upgrades package. # Michael Vogt , 2008. # msgid "" msgstr "" "Project-Id-Version: 0.35\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2013-09-13 08:12+0200\n" "PO-Revision-Date: 2012-05-21 14:40+0200\n" "Last-Translator: Steve Petruzzello \n" "Language-Team: French \n" "Language: fr\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: ../unattended-upgrade:136 #, c-format msgid "Progress: %s %% (%s)" msgstr "Progression : %s %% (%s)" #: ../unattended-upgrade:352 ../unattended-upgrade:436 #: ../unattended-upgrade-shutdown:161 msgid "All upgrades installed" msgstr "Toutes les mises à niveau ont été installées" #: ../unattended-upgrade:354 ../unattended-upgrade:428 msgid "Installing the upgrades failed!" msgstr "Échec de l'installation des mises à niveau" #: ../unattended-upgrade:355 ../unattended-upgrade:429 #, c-format msgid "error message: '%s'" msgstr "Message d'erreur : %s" #: ../unattended-upgrade:356 ../unattended-upgrade:430 #, c-format msgid "dpkg returned a error! See '%s' for details" msgstr "dpkg a renvoyé une erreur. Voir « %s » pour les détails" #: ../unattended-upgrade:685 #, fuzzy #| msgid "" #| "No '/usr/bin/mail', can not send mail. You probably want to install the " #| "'mailx' package." msgid "" "No '/usr/bin/mail' or '/usr/sbin/sendmail',can not send mail. You probably " "want to install the 'mailx' package." msgstr "" "L'exécutable « /usr/bin/mail » est introuvable, impossible d'envoyer un " "courrier électronique. Veuillez installer le paquet « mailx »." #: ../unattended-upgrade:698 #, fuzzy, c-format #| msgid "[reboot required] unattended-upgrades result for '%s'" msgid "[reboot required] unattended-upgrades result for '%s': %s" msgstr "[Redémarrage requis] unattended-upgrades a renvoyé : %s" #: ../unattended-upgrade:701 #, fuzzy, c-format #| msgid "unattended-upgrades result for '%s'" msgid "unattended-upgrades result for '%s': '%s'" msgstr "unattended-upgrades a renvoyé : %s" #: ../unattended-upgrade:703 #, c-format msgid "" "Unattended upgrade returned: %s\n" "\n" msgstr "" "La mise à niveau automatique a renvoyé : %s\n" "\n" #: ../unattended-upgrade:706 msgid "" "Warning: A reboot is required to complete this upgrade.\n" "\n" msgstr "" "Avertissement : un redémarrage est requis afin de compléter cette mise à " "niveau.\n" #: ../unattended-upgrade:708 #, fuzzy #| msgid "Packages that are upgraded:\n" msgid "Packages that were upgraded:\n" msgstr "Paquets mis à niveau :\n" #: ../unattended-upgrade:710 #, fuzzy #| msgid "Packages that are upgraded:\n" msgid "Packages that attempted to upgrade:\n" msgstr "Paquets mis à niveau :\n" #: ../unattended-upgrade:714 msgid "Packages with upgradable origin but kept back:\n" msgstr "" "Paquets susceptibles d'une mise à niveau mais maintenus dans leur état " "actuel :\n" #: ../unattended-upgrade:719 msgid "Package installation log:" msgstr "Journal d'installation du paquet :" #: ../unattended-upgrade:723 msgid "Unattended-upgrades log:\n" msgstr "Journal de unattended-upgrades :\n" #: ../unattended-upgrade:747 #, c-format msgid "Writing dpkg log to '%s'" msgstr "Écriture du journal de dpkg dans « %s »" #: ../unattended-upgrade:873 #, c-format msgid "Initial blacklisted packages: %s" msgstr "Paquets initialement sur la liste noire : %s" #: ../unattended-upgrade:875 msgid "Starting unattended upgrades script" msgstr "Démarrage du script de mise à niveau automatique" #: ../unattended-upgrade:878 #, c-format msgid "Allowed origins are: %s" msgstr "Les origines permises sont : %s" #: ../unattended-upgrade:891 ../unattended-upgrade:892 msgid "Unclean dpkg state detected, trying to correct" msgstr "détection d'un état de dpkg impropre, tentative de correction" #: ../unattended-upgrade:901 #, c-format msgid "" "dpkg --configure -a output:\n" "%s" msgstr "" "sortie de « dpkg --configure -a output » :\n" "%s" #: ../unattended-upgrade:910 msgid "Lock could not be acquired (another package manager running?)" msgstr "" "Verrouillage impossible (y a-t-il un autre gestionnaire de paquets en cours " "d'exécution ?)" #: ../unattended-upgrade:912 msgid "Cache lock can not be acquired, exiting" msgstr "Le verrouillage du cache est impossible, abandon" #: ../unattended-upgrade:919 ../unattended-upgrade:920 msgid "Cache has broken packages, exiting" msgstr "Le cache contient des paquets cassés, abandon" #: ../unattended-upgrade:961 #, c-format msgid "package '%s' upgradable but fails to be marked for upgrade (%s)" msgstr "" "Le paquet « %s » peut être mis à niveau mais échoue à être marqué comme tel " "(%s)" #: ../unattended-upgrade:982 #, c-format msgid "GetArchives() failed: '%s'" msgstr "Échec de GetArchives() : %s" #: ../unattended-upgrade:992 ../unattended-upgrade:993 #, fuzzy, c-format #| msgid "An error ocured: '%s'" msgid "An error occurred: '%s'" msgstr "Une erreur s'est produite : %s" #: ../unattended-upgrade:995 ../unattended-upgrade:997 #, c-format msgid "The URI '%s' failed to download, aborting" msgstr "Échec du téléchargement à l'URI « %s », abandon" #: ../unattended-upgrade:1001 #, c-format msgid "Download finished, but file '%s' not there?!?" msgstr "Téléchargement terminé mais le fichier « %s » est absent !" #: ../unattended-upgrade:1017 ../unattended-upgrade:1021 #, c-format msgid "Package '%s' has conffile prompt and needs to be upgraded manually" msgstr "" "Le paquet « %s » provoque un conflit de fichiers de configuration et " "nécessite une mise à niveau manuelle" #: ../unattended-upgrade:1044 #, c-format msgid "package '%s' not upgraded" msgstr "Le paquet « %s » n'a pas été mis à niveau" #: ../unattended-upgrade:1059 #, c-format msgid "Packages that are auto removed: '%s'" msgstr "Suppression automatique des paquets : %s" #: ../unattended-upgrade:1068 msgid "No packages found that can be upgraded unattended" msgstr "Aucun paquet à mettre à niveau automatiquement" #: ../unattended-upgrade:1088 #, fuzzy, c-format #| msgid "Packages that are upgraded: %s" msgid "Packages that will be upgraded: %s" msgstr "Paquets mis à niveau : %s" #: ../unattended-upgrade:1125 msgid "print debug messages" msgstr "Afficher les messages de débogage" #: ../unattended-upgrade:1128 #, fuzzy #| msgid "print debug messages" msgid "make apt/libapt print verbose debug messages" msgstr "Afficher les messages de débogage" #: ../unattended-upgrade:1131 #, fuzzy #| msgid "print debug messages" msgid "print info messages" msgstr "Afficher les messages de débogage" #: ../unattended-upgrade:1134 msgid "Simulation, download but do not install" msgstr "Simulation, télécharge mais n'installe pas" #: ../unattended-upgrade:1137 msgid "Upgrade in minimal steps (and allow interrupting with SIGINT" msgstr "" "Mise à niveau par étapes minimales (et autoriser l'interruption avec SIGINT)" #: ../unattended-upgrade:1142 msgid "You need to be root to run this application" msgstr "" "Vous devez posséder les privilèges du superutilisateur pour exécuter cette " "application" #: ../unattended-upgrade-shutdown:72 msgid "Unattended-upgrade in progress during shutdown, sleeping for 5s" msgstr "Unattended-upgrade en cours durant l'extinction, en pause pour 5 s" #: ../unattended-upgrade-shutdown:125 #, fuzzy #| msgid "unattended-upgrades result for '%s'" msgid "Running unattended-upgrades in shutdown mode" msgstr "unattended-upgrades a renvoyé : %s" #: ../unattended-upgrade-shutdown:153 #, c-format msgid "Giving up on lockfile after %s delay" msgstr "Renonciation sur un fichier verrou après un délai de %s." #~ msgid "Progress: %s %%: (%s)" #~ msgstr "Progression : %s %% : (%s)" unattended-upgrades-0.82.1ubuntu1/po/pt_BR.po0000664000000000000000000001675112301323624015753 0ustar msgid "" msgstr "" "Project-Id-Version: unattended-upgrades-0.61\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2013-09-13 08:12+0200\n" "PO-Revision-Date: 2012-06-14 08:25-0300\n" "Last-Translator: Sérgio Cipolla \n" "Language-Team: \n" "Language: \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "X-Poedit-Language: Portuguese\n" "X-Poedit-Country: BRAZIL\n" #: ../unattended-upgrade:136 #, c-format msgid "Progress: %s %% (%s)" msgstr "Progresso: %s %% (%s)" #: ../unattended-upgrade:352 ../unattended-upgrade:436 #: ../unattended-upgrade-shutdown:161 msgid "All upgrades installed" msgstr "Todas as atualizações instaladas" #: ../unattended-upgrade:354 ../unattended-upgrade:428 msgid "Installing the upgrades failed!" msgstr "A instalação das atualizações falhou!" #: ../unattended-upgrade:355 ../unattended-upgrade:429 #, c-format msgid "error message: '%s'" msgstr "mensagem de erro: '%s'" #: ../unattended-upgrade:356 ../unattended-upgrade:430 #, c-format msgid "dpkg returned a error! See '%s' for details" msgstr "O dpkg retornou um erro! Veja '%s' para mais detalhes" #: ../unattended-upgrade:685 #, fuzzy #| msgid "" #| "No '/usr/bin/mail', can not send mail. You probably want to install the " #| "'mailx' package." msgid "" "No '/usr/bin/mail' or '/usr/sbin/sendmail',can not send mail. You probably " "want to install the 'mailx' package." msgstr "" "'/usr/bin/mail' não encontrado. Incapaz de enviar email. Você provavelmente " "gostaria de instalar o pacote 'mailx'." #: ../unattended-upgrade:698 #, fuzzy, c-format #| msgid "[reboot required] unattended-upgrades result for '%s'" msgid "[reboot required] unattended-upgrades result for '%s': %s" msgstr "" "[É necessário reiniciar o computador] Resultado da atualização " "desacompanhada para '%s'" #: ../unattended-upgrade:701 #, fuzzy, c-format #| msgid "unattended-upgrades result for '%s'" msgid "unattended-upgrades result for '%s': '%s'" msgstr "Resultado da atualização desacompanhada para '%s'" #: ../unattended-upgrade:703 #, c-format msgid "" "Unattended upgrade returned: %s\n" "\n" msgstr "" "A atualização desacompanhada retornou: %s\n" "\n" #: ../unattended-upgrade:706 msgid "" "Warning: A reboot is required to complete this upgrade.\n" "\n" msgstr "" "Atenção: é necessário reiniciar o computador para completar esta " "atualização.\n" "\n" #: ../unattended-upgrade:708 #, fuzzy #| msgid "Packages that are upgraded:\n" msgid "Packages that were upgraded:\n" msgstr "Pacotes atualizados:\n" #: ../unattended-upgrade:710 #, fuzzy #| msgid "Packages that are upgraded:\n" msgid "Packages that attempted to upgrade:\n" msgstr "Pacotes atualizados:\n" #: ../unattended-upgrade:714 msgid "Packages with upgradable origin but kept back:\n" msgstr "Pacotes atualizáveis na origem mas mantidos na versão atual:\n" #: ../unattended-upgrade:719 msgid "Package installation log:" msgstr "Relatório de instalação de pacotes:" #: ../unattended-upgrade:723 msgid "Unattended-upgrades log:\n" msgstr "Relatório da atualização desacompanhada:\n" #: ../unattended-upgrade:747 #, c-format msgid "Writing dpkg log to '%s'" msgstr "Escrevendo o relatório do dpkg em '%s'" #: ../unattended-upgrade:873 #, c-format msgid "Initial blacklisted packages: %s" msgstr "Pacotes inicialmente na lista negra: %s" #: ../unattended-upgrade:875 msgid "Starting unattended upgrades script" msgstr "Iniciando o script da atualização desacompanhada" #: ../unattended-upgrade:878 #, c-format msgid "Allowed origins are: %s" msgstr "São origens permitidas: %s" #: ../unattended-upgrade:891 ../unattended-upgrade:892 msgid "Unclean dpkg state detected, trying to correct" msgstr "Tentando corrigir estado não-íntegro no dpkg" #: ../unattended-upgrade:901 #, c-format msgid "" "dpkg --configure -a output:\n" "%s" msgstr "" "Saída de dpkg --configure -a:\n" "%s" #: ../unattended-upgrade:910 msgid "Lock could not be acquired (another package manager running?)" msgstr "" "O lock não pôde ser obtido (outro gerenciador de pacotes em funcionamento?)" #: ../unattended-upgrade:912 msgid "Cache lock can not be acquired, exiting" msgstr "O lock do cache não pode ser obtido, encerrando" #: ../unattended-upgrade:919 ../unattended-upgrade:920 msgid "Cache has broken packages, exiting" msgstr "O cache tem pacotes quebrados, encerrando" #: ../unattended-upgrade:961 #, c-format msgid "package '%s' upgradable but fails to be marked for upgrade (%s)" msgstr "" "o pacote '%s' é atualizável mas não é possível marcá-lo para atualização (%s)" #: ../unattended-upgrade:982 #, c-format msgid "GetArchives() failed: '%s'" msgstr "GetArchives() falhou: '%s'" #: ../unattended-upgrade:992 ../unattended-upgrade:993 #, fuzzy, c-format #| msgid "An error ocured: '%s'" msgid "An error occurred: '%s'" msgstr "Ocorreu um erro; '%s'" #: ../unattended-upgrade:995 ../unattended-upgrade:997 #, c-format msgid "The URI '%s' failed to download, aborting" msgstr "O URI '%s' falhou no download, abortando" #: ../unattended-upgrade:1001 #, c-format msgid "Download finished, but file '%s' not there?!?" msgstr "Download terminado, mas o arquivo '%s' não está lá?!?" #: ../unattended-upgrade:1017 ../unattended-upgrade:1021 #, c-format msgid "Package '%s' has conffile prompt and needs to be upgraded manually" msgstr "" "O pacote '%s' possui um diálogo conffile e necessita ser atualizado " "manualmente" #: ../unattended-upgrade:1044 #, c-format msgid "package '%s' not upgraded" msgstr "o pacote '%s' não foi atualizado" #: ../unattended-upgrade:1059 #, c-format msgid "Packages that are auto removed: '%s'" msgstr "Pacotes autorremovidos: '%s'" #: ../unattended-upgrade:1068 msgid "No packages found that can be upgraded unattended" msgstr "" "Não foi encontrado nenhum pacote que possa ser atualizado desacompanhadamente" #: ../unattended-upgrade:1088 #, fuzzy, c-format #| msgid "Packages that are upgraded: %s" msgid "Packages that will be upgraded: %s" msgstr "Pacotes atualizados: %s" #: ../unattended-upgrade:1125 msgid "print debug messages" msgstr "imprimir mensagens de depuração" #: ../unattended-upgrade:1128 #, fuzzy #| msgid "print debug messages" msgid "make apt/libapt print verbose debug messages" msgstr "imprimir mensagens de depuração" #: ../unattended-upgrade:1131 #, fuzzy #| msgid "print debug messages" msgid "print info messages" msgstr "imprimir mensagens de depuração" #: ../unattended-upgrade:1134 msgid "Simulation, download but do not install" msgstr "Simulação, baixar mas não instalar" #: ../unattended-upgrade:1137 msgid "Upgrade in minimal steps (and allow interrupting with SIGINT" msgstr "Atualizar em passos mínimos (e permitir interrupção com SIGINT)" #: ../unattended-upgrade:1142 msgid "You need to be root to run this application" msgstr "Você precisa ser root para executar este aplicativo" #: ../unattended-upgrade-shutdown:72 msgid "Unattended-upgrade in progress during shutdown, sleeping for 5s" msgstr "" "Atualização desacompanhada em execução durante o encerramento do sistema, " "atrasando 5s" #: ../unattended-upgrade-shutdown:125 #, fuzzy #| msgid "unattended-upgrades result for '%s'" msgid "Running unattended-upgrades in shutdown mode" msgstr "Resultado da atualização desacompanhada para '%s'" #: ../unattended-upgrade-shutdown:153 #, c-format msgid "Giving up on lockfile after %s delay" msgstr "Desistindo do arquivo de lock após %s" #~ msgid "Progress: %s %%: (%s)" #~ msgstr "Progresso: %s %%: (%s)" #~ msgid "pm.GetArchives() failed" #~ msgstr "pm.GetArchives() falhou" unattended-upgrades-0.82.1ubuntu1/po/ru.po0000664000000000000000000002176612301323624015375 0ustar # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER # This file is distributed under the same license as the unattended-upgrades package. # # Yuri Kozlov , 2010, 2012. msgid "" msgstr "" "Project-Id-Version: unattended-upgrades 0.77\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2013-09-13 08:12+0200\n" "PO-Revision-Date: 2012-06-21 20:53+0400\n" "Last-Translator: Yuri Kozlov \n" "Language-Team: Russian \n" "Language: ru\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "X-Generator: Lokalize 1.2\n" "Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n" "%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n" #: ../unattended-upgrade:136 #, c-format msgid "Progress: %s %% (%s)" msgstr "Ход выполнения: %s %% (%s)" #: ../unattended-upgrade:352 ../unattended-upgrade:436 #: ../unattended-upgrade-shutdown:161 msgid "All upgrades installed" msgstr "Все обновления установлены" #: ../unattended-upgrade:354 ../unattended-upgrade:428 msgid "Installing the upgrades failed!" msgstr "Установка обновлений завершилась с ошибкой!" #: ../unattended-upgrade:355 ../unattended-upgrade:429 #, c-format msgid "error message: '%s'" msgstr "сообщение об ошибке: %s" #: ../unattended-upgrade:356 ../unattended-upgrade:430 #, c-format msgid "dpkg returned a error! See '%s' for details" msgstr "dpkg завершилась с ошибкой! Подробности смотрите в %s" #: ../unattended-upgrade:685 #, fuzzy #| msgid "" #| "No '/usr/bin/mail', can not send mail. You probably want to install the " #| "'mailx' package." msgid "" "No '/usr/bin/mail' or '/usr/sbin/sendmail',can not send mail. You probably " "want to install the 'mailx' package." msgstr "" "Нет программы /usr/bin/mail, невозможно послать почту. Вероятно, лучше " "установить пакет mailx." #: ../unattended-upgrade:698 #, fuzzy, c-format #| msgid "[reboot required] unattended-upgrades result for '%s'" msgid "[reboot required] unattended-upgrades result for '%s': %s" msgstr "[требуется перезагрузка] Результат unattended-upgrades для «%s»" #: ../unattended-upgrade:701 #, fuzzy, c-format #| msgid "unattended-upgrades result for '%s'" msgid "unattended-upgrades result for '%s': '%s'" msgstr "Результат unattended-upgrades для «%s»" #: ../unattended-upgrade:703 #, c-format msgid "" "Unattended upgrade returned: %s\n" "\n" msgstr "" "Результат необслуживаемой установки: %s\n" "\n" #: ../unattended-upgrade:706 msgid "" "Warning: A reboot is required to complete this upgrade.\n" "\n" msgstr "" "Предупреждение: для завершения обновления требуется перезагрузка.\n" "\n" #: ../unattended-upgrade:708 #, fuzzy #| msgid "Packages that are upgraded:\n" msgid "Packages that were upgraded:\n" msgstr "Обновлённые пакеты:\n" #: ../unattended-upgrade:710 #, fuzzy #| msgid "Packages that are upgraded:\n" msgid "Packages that attempted to upgrade:\n" msgstr "Обновлённые пакеты:\n" #: ../unattended-upgrade:714 msgid "Packages with upgradable origin but kept back:\n" msgstr "Пакеты, обновлённые в источнике, но оставленные теми же в системе:\n" #: ../unattended-upgrade:719 msgid "Package installation log:" msgstr "Журнал установки пакетов:" #: ../unattended-upgrade:723 msgid "Unattended-upgrades log:\n" msgstr "Журнал unattended-upgrades:\n" #: ../unattended-upgrade:747 #, c-format msgid "Writing dpkg log to '%s'" msgstr "Журнал dpkg записывается в %s" #: ../unattended-upgrade:873 #, c-format msgid "Initial blacklisted packages: %s" msgstr "Пакеты в чёрном списке изначально: %s" #: ../unattended-upgrade:875 msgid "Starting unattended upgrades script" msgstr "Запускаются сценарии необслуживаемой установки" #: ../unattended-upgrade:878 #, c-format msgid "Allowed origins are: %s" msgstr "Разрешённые источники: %s" #: ../unattended-upgrade:891 ../unattended-upgrade:892 msgid "Unclean dpkg state detected, trying to correct" msgstr "Обнаружено состояние незавершённости работы dpkg, попытаемся исправить" #: ../unattended-upgrade:901 #, c-format msgid "" "dpkg --configure -a output:\n" "%s" msgstr "" "Результат dpkg --configure -a:\n" "%s" #: ../unattended-upgrade:910 msgid "Lock could not be acquired (another package manager running?)" msgstr "Не удалось выполнить блокировку (запущен ещё один менеджер пакетов?)" #: ../unattended-upgrade:912 msgid "Cache lock can not be acquired, exiting" msgstr "Не удалось выполнить блокировку кэша, завершение работы" #: ../unattended-upgrade:919 ../unattended-upgrade:920 msgid "Cache has broken packages, exiting" msgstr "В кэше сломанные пакеты, завершение работы" #: ../unattended-upgrade:961 #, c-format msgid "package '%s' upgradable but fails to be marked for upgrade (%s)" msgstr "" "пакет %s можно обновить, но его не удалось пометить как обновляемый (%s)" #: ../unattended-upgrade:982 #, c-format msgid "GetArchives() failed: '%s'" msgstr "GetArchives() завершилась с ошибкой: '%s'" #: ../unattended-upgrade:992 ../unattended-upgrade:993 #, fuzzy, c-format #| msgid "An error ocured: '%s'" msgid "An error occurred: '%s'" msgstr "Произошла ошибка: %s" #: ../unattended-upgrade:995 ../unattended-upgrade:997 #, c-format msgid "The URI '%s' failed to download, aborting" msgstr "Невозможно скачать URI '%s', останов" #: ../unattended-upgrade:1001 #, c-format msgid "Download finished, but file '%s' not there?!?" msgstr "Скачивание завершено, но файла %s нет?!?" #: ../unattended-upgrade:1017 ../unattended-upgrade:1021 #, c-format msgid "Package '%s' has conffile prompt and needs to be upgraded manually" msgstr "" "В пакете %s есть conffile с вводом от пользователя и его нужно обновлять " "вручную" #: ../unattended-upgrade:1044 #, c-format msgid "package '%s' not upgraded" msgstr "пакет %s не обновлён" #: ../unattended-upgrade:1059 #, c-format msgid "Packages that are auto removed: '%s'" msgstr "Автоматически удаляемые пакеты: «%s»" #: ../unattended-upgrade:1068 msgid "No packages found that can be upgraded unattended" msgstr "" "Пакеты, для которых можно выполнить необслуживаемое обновление, не найдены" #: ../unattended-upgrade:1088 #, fuzzy, c-format #| msgid "Packages that are upgraded: %s" msgid "Packages that will be upgraded: %s" msgstr "Обновлённые пакеты: %s" #: ../unattended-upgrade:1125 msgid "print debug messages" msgstr "выводить отладочные сообщения" #: ../unattended-upgrade:1128 #, fuzzy #| msgid "print debug messages" msgid "make apt/libapt print verbose debug messages" msgstr "выводить отладочные сообщения" #: ../unattended-upgrade:1131 #, fuzzy #| msgid "print debug messages" msgid "print info messages" msgstr "выводить отладочные сообщения" #: ../unattended-upgrade:1134 msgid "Simulation, download but do not install" msgstr "Имитация, скачивать но не устанавливать" #: ../unattended-upgrade:1137 msgid "Upgrade in minimal steps (and allow interrupting with SIGINT" msgstr "" "Обновление с минимальным количеством этапов (можно прервать с помощью SIGINT" #: ../unattended-upgrade:1142 msgid "You need to be root to run this application" msgstr "Вы должны быть root для запуска этого приложения" #: ../unattended-upgrade-shutdown:72 msgid "Unattended-upgrade in progress during shutdown, sleeping for 5s" msgstr "Выполнение unattended-upgrade во время выключения, пауза на 5с" #: ../unattended-upgrade-shutdown:125 #, fuzzy #| msgid "unattended-upgrades result for '%s'" msgid "Running unattended-upgrades in shutdown mode" msgstr "Результат unattended-upgrades для «%s»" #: ../unattended-upgrade-shutdown:153 #, c-format msgid "Giving up on lockfile after %s delay" msgstr "Отказ по lockfile после %s задержки" #~ msgid "Progress: %s %%: (%s)" #~ msgstr "Ход выполнения: %s %%: (%s)" #~ msgid "pm.GetArchives() failed" #~ msgstr "pm.GetArchives() завершилась с ошибкой" unattended-upgrades-0.82.1ubuntu1/po/da.po0000664000000000000000000001656112301323623015327 0ustar # Danish translation unattended-upgrades. # Copyright (C) 2012 unattended-upgrades & nedenstående oversættere. # This file is distributed under the same license as the unattended-upgrades package. # Joe Hansen , 2012. # msgid "" msgstr "" "Project-Id-Version: unattended-upgrades\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2013-09-13 08:12+0200\n" "PO-Revision-Date: 2012-06-16 23:51+0200\n" "Last-Translator: Joe Hansen \n" "Language-Team: Danish \n" "Language: da\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: ../unattended-upgrade:136 #, c-format msgid "Progress: %s %% (%s)" msgstr "Status: %s %% (%s)" #: ../unattended-upgrade:352 ../unattended-upgrade:436 #: ../unattended-upgrade-shutdown:161 msgid "All upgrades installed" msgstr "Alle opgraderinger er installeret" #: ../unattended-upgrade:354 ../unattended-upgrade:428 msgid "Installing the upgrades failed!" msgstr "Installation af opgraderingerne mislykkedes!" #: ../unattended-upgrade:355 ../unattended-upgrade:429 #, c-format msgid "error message: '%s'" msgstr "fejlbesked: »%s«" #: ../unattended-upgrade:356 ../unattended-upgrade:430 #, c-format msgid "dpkg returned a error! See '%s' for details" msgstr "dpkg returnerede en fejl! Se »%s« for detaljer" #: ../unattended-upgrade:685 #, fuzzy #| msgid "" #| "No '/usr/bin/mail', can not send mail. You probably want to install the " #| "'mailx' package." msgid "" "No '/usr/bin/mail' or '/usr/sbin/sendmail',can not send mail. You probably " "want to install the 'mailx' package." msgstr "" "Ingen »/usr/bin/mail«, kan ikke sende post. Du skal sikkert installere " "pakken »mailx«." #: ../unattended-upgrade:698 #, fuzzy, c-format #| msgid "[reboot required] unattended-upgrades result for '%s'" msgid "[reboot required] unattended-upgrades result for '%s': %s" msgstr "[genstart krævet] unattended-upgrades resultat for »%s«" #: ../unattended-upgrade:701 #, fuzzy, c-format #| msgid "unattended-upgrades result for '%s'" msgid "unattended-upgrades result for '%s': '%s'" msgstr "unattended-upgrades resultat for »%s«" #: ../unattended-upgrade:703 #, c-format msgid "" "Unattended upgrade returned: %s\n" "\n" msgstr "" "Unattended upgrade returnerede: %s\n" "\n" #: ../unattended-upgrade:706 msgid "" "Warning: A reboot is required to complete this upgrade.\n" "\n" msgstr "" "Advarsel: En genstart er krævet for at færdiggøre denne opgradering.\n" "\n" #: ../unattended-upgrade:708 #, fuzzy #| msgid "Packages that are upgraded:\n" msgid "Packages that were upgraded:\n" msgstr "Pakker som opgraderes:\n" #: ../unattended-upgrade:710 #, fuzzy #| msgid "Packages that are upgraded:\n" msgid "Packages that attempted to upgrade:\n" msgstr "Pakker som opgraderes:\n" #: ../unattended-upgrade:714 msgid "Packages with upgradable origin but kept back:\n" msgstr "Pakker med opgraderbar oprindelse men holdt tilbage:\n" #: ../unattended-upgrade:719 msgid "Package installation log:" msgstr "Log for pakkeinstallation:" #: ../unattended-upgrade:723 msgid "Unattended-upgrades log:\n" msgstr "Log for unattended-upgrades:\n" #: ../unattended-upgrade:747 #, c-format msgid "Writing dpkg log to '%s'" msgstr "Skriver dpkg-log til »%s«" #: ../unattended-upgrade:873 #, c-format msgid "Initial blacklisted packages: %s" msgstr "Oprindelig sortlistede pakker: %s" #: ../unattended-upgrade:875 msgid "Starting unattended upgrades script" msgstr "Starter skript for unattended upgrades" #: ../unattended-upgrade:878 #, c-format msgid "Allowed origins are: %s" msgstr "Tilladte oprindelser er: %s" #: ../unattended-upgrade:891 ../unattended-upgrade:892 msgid "Unclean dpkg state detected, trying to correct" msgstr "Uklar dpkg-tilstand detekteret, forsøger at rette" #: ../unattended-upgrade:901 #, c-format msgid "" "dpkg --configure -a output:\n" "%s" msgstr "" "dpkg --configure -a output:\n" "%s" #: ../unattended-upgrade:910 msgid "Lock could not be acquired (another package manager running?)" msgstr "Lås kunne ikke indhentes (kører en anden pakkehåndtering?)" #: ../unattended-upgrade:912 msgid "Cache lock can not be acquired, exiting" msgstr "Lås for mellemlager kan ikke indhentes, afslutter" #: ../unattended-upgrade:919 ../unattended-upgrade:920 msgid "Cache has broken packages, exiting" msgstr "Mellemlager har ødelagte pakker, afslutter" #: ../unattended-upgrade:961 #, c-format msgid "package '%s' upgradable but fails to be marked for upgrade (%s)" msgstr "pakke »%s« kan opgraderes men fejler i markering for opgradering (%s)" #: ../unattended-upgrade:982 #, c-format msgid "GetArchives() failed: '%s'" msgstr "GetArchives() mislykkedes: »%s«" #: ../unattended-upgrade:992 ../unattended-upgrade:993 #, fuzzy, c-format #| msgid "An error ocured: '%s'" msgid "An error occurred: '%s'" msgstr "Der opstod en fejl: »%s«" #: ../unattended-upgrade:995 ../unattended-upgrade:997 #, c-format msgid "The URI '%s' failed to download, aborting" msgstr "Der kunne ikke hentes fra adressen »%s«, afbryder" #: ../unattended-upgrade:1001 #, c-format msgid "Download finished, but file '%s' not there?!?" msgstr "Hentning færdig, men filen »%s« var der ikke?!?" #: ../unattended-upgrade:1017 ../unattended-upgrade:1021 #, c-format msgid "Package '%s' has conffile prompt and needs to be upgraded manually" msgstr "" "Pakke »%s« bliver spurgt om oplysninger fra konfigurationsfilen og skal " "opgraderes manuelt" #: ../unattended-upgrade:1044 #, c-format msgid "package '%s' not upgraded" msgstr "pakke »%s« blev ikke opgraderet" #: ../unattended-upgrade:1059 #, c-format msgid "Packages that are auto removed: '%s'" msgstr "Pakker som automatisk fjernes: »%s«" #: ../unattended-upgrade:1068 msgid "No packages found that can be upgraded unattended" msgstr "Ingen pakker fundet som kan opgraderes uden ledsager" #: ../unattended-upgrade:1088 #, fuzzy, c-format #| msgid "Packages that are upgraded: %s" msgid "Packages that will be upgraded: %s" msgstr "Pakker som blev opgraderet: %s" #: ../unattended-upgrade:1125 msgid "print debug messages" msgstr "vis fejlsøgningsbeskeder" #: ../unattended-upgrade:1128 #, fuzzy #| msgid "print debug messages" msgid "make apt/libapt print verbose debug messages" msgstr "vis fejlsøgningsbeskeder" #: ../unattended-upgrade:1131 #, fuzzy #| msgid "print debug messages" msgid "print info messages" msgstr "vis fejlsøgningsbeskeder" #: ../unattended-upgrade:1134 msgid "Simulation, download but do not install" msgstr "Simulation, hent men installer ikke" #: ../unattended-upgrade:1137 msgid "Upgrade in minimal steps (and allow interrupting with SIGINT" msgstr "Opgrader i små trin (og tillad afbrydelse med SIGINT)" #: ../unattended-upgrade:1142 msgid "You need to be root to run this application" msgstr "Du skal være administrator (root) for at køre dette program" #: ../unattended-upgrade-shutdown:72 msgid "Unattended-upgrade in progress during shutdown, sleeping for 5s" msgstr "Unattended-upgrade i gang under nedlukning, sover for 5 sekunder" #: ../unattended-upgrade-shutdown:125 #, fuzzy #| msgid "unattended-upgrades result for '%s'" msgid "Running unattended-upgrades in shutdown mode" msgstr "unattended-upgrades resultat for »%s«" #: ../unattended-upgrade-shutdown:153 #, c-format msgid "Giving up on lockfile after %s delay" msgstr "Opgiver låsefilen efter %s forsinkelse" #~ msgid "Progress: %s %%: (%s)" #~ msgstr "Status: %s %%: (%s)" unattended-upgrades-0.82.1ubuntu1/po/sk.po0000664000000000000000000001721612301323624015357 0ustar # Slovak translation for unattended-upgrades # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER # This file is distributed under the same license as the unattended-upgrades package. # Ivan Masár , 2012. # msgid "" msgstr "" "Project-Id-Version: unattended-upgrades\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2013-09-13 08:12+0200\n" "PO-Revision-Date: 2012-06-14 10:05+0100\n" "Last-Translator: Ivan Masár \n" "Language-Team: Slovak \n" "Language: sk\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=3; plural= (n==1) ? 0 : (n>=2 && n<=4) ? 1 : 2;\n" #: ../unattended-upgrade:136 #, c-format msgid "Progress: %s %% (%s)" msgstr "Priebeh: %s %% (%s)" #: ../unattended-upgrade:352 ../unattended-upgrade:436 #: ../unattended-upgrade-shutdown:161 msgid "All upgrades installed" msgstr "Všetky aktualizácie sú nainštalované" #: ../unattended-upgrade:354 ../unattended-upgrade:428 msgid "Installing the upgrades failed!" msgstr "Inštalácia aktualizácií zlyhala!" #: ../unattended-upgrade:355 ../unattended-upgrade:429 #, c-format msgid "error message: '%s'" msgstr "chybová správa: „%s“" #: ../unattended-upgrade:356 ../unattended-upgrade:430 #, c-format msgid "dpkg returned a error! See '%s' for details" msgstr "dpkg vrátil chybu! Podrobnosti nájdete v „%s“" #: ../unattended-upgrade:685 #, fuzzy #| msgid "" #| "No '/usr/bin/mail', can not send mail. You probably want to install the " #| "'mailx' package." msgid "" "No '/usr/bin/mail' or '/usr/sbin/sendmail',can not send mail. You probably " "want to install the 'mailx' package." msgstr "" "Chýba „/usr/bin/mail“ nie je možné poslať poštu. Pravdepodobne chcete " "nainštalovať balík „mailx“." #: ../unattended-upgrade:698 #, fuzzy, c-format #| msgid "[reboot required] unattended-upgrades result for '%s'" msgid "[reboot required] unattended-upgrades result for '%s': %s" msgstr "[vyžaduje reštart] výsledok unattended-upgrades pre „%s“" #: ../unattended-upgrade:701 #, fuzzy, c-format #| msgid "unattended-upgrades result for '%s'" msgid "unattended-upgrades result for '%s': '%s'" msgstr "výsledok unattended-upgrades pre „%s“" #: ../unattended-upgrade:703 #, c-format msgid "" "Unattended upgrade returned: %s\n" "\n" msgstr "" "Bezobslužná aktualizácia vrátila: %s\n" "\n" #: ../unattended-upgrade:706 msgid "" "Warning: A reboot is required to complete this upgrade.\n" "\n" msgstr "" "Upozornenie: Na dokončenie tejto aktualizácie sa vyžaduje reštart.\n" "\n" #: ../unattended-upgrade:708 #, fuzzy #| msgid "Packages that are upgraded:\n" msgid "Packages that were upgraded:\n" msgstr "Aktualizavané balíky:\n" #: ../unattended-upgrade:710 #, fuzzy #| msgid "Packages that are upgraded:\n" msgid "Packages that attempted to upgrade:\n" msgstr "Aktualizavané balíky:\n" #: ../unattended-upgrade:714 msgid "Packages with upgradable origin but kept back:\n" msgstr "Aktualizovateľné, ale podržané balíky:\n" #: ../unattended-upgrade:719 msgid "Package installation log:" msgstr "Záznam inštalácií balíkov:" #: ../unattended-upgrade:723 msgid "Unattended-upgrades log:\n" msgstr "Záznam bezobslužných aktualizácií:\n" #: ../unattended-upgrade:747 #, c-format msgid "Writing dpkg log to '%s'" msgstr "Zapisuje sa záznam dpkg do „%s“" #: ../unattended-upgrade:873 #, c-format msgid "Initial blacklisted packages: %s" msgstr "Prvotná čierna listina balíkov: %s" #: ../unattended-upgrade:875 msgid "Starting unattended upgrades script" msgstr "Spúšťa sa skript bezobslužných aktualizácií" #: ../unattended-upgrade:878 #, c-format msgid "Allowed origins are: %s" msgstr "Povolené pôvody sú: %s" #: ../unattended-upgrade:891 ../unattended-upgrade:892 msgid "Unclean dpkg state detected, trying to correct" msgstr "Bol zistený nečistý stav dpkg, prebieha pokus o nápravu" #: ../unattended-upgrade:901 #, c-format msgid "" "dpkg --configure -a output:\n" "%s" msgstr "" "výstup dpkg --configure -a:\n" "%s" #: ../unattended-upgrade:910 msgid "Lock could not be acquired (another package manager running?)" msgstr "Zámok sa nepodarilo získať (beží iný správca balíkov?)" #: ../unattended-upgrade:912 msgid "Cache lock can not be acquired, exiting" msgstr "Nepodarilo sa získať zámok vyrovnávacej pamäte, program končí" #: ../unattended-upgrade:919 ../unattended-upgrade:920 msgid "Cache has broken packages, exiting" msgstr "Vyrovnávacia pamäť obsahuje poškodené balíky, program končí" #: ../unattended-upgrade:961 #, c-format msgid "package '%s' upgradable but fails to be marked for upgrade (%s)" msgstr "" "balík „%s“ je aktualizovateľný, ale nedarí sa označiť na aktualizáciu (%s)" #: ../unattended-upgrade:982 #, c-format msgid "GetArchives() failed: '%s'" msgstr "GetArchives() zlyhalo: „%s“" #: ../unattended-upgrade:992 ../unattended-upgrade:993 #, fuzzy, c-format #| msgid "An error ocured: '%s'" msgid "An error occurred: '%s'" msgstr "Vyskytla sa chyba: „%s“" #: ../unattended-upgrade:995 ../unattended-upgrade:997 #, c-format msgid "The URI '%s' failed to download, aborting" msgstr "URI „%s“ sa nepodarilo stiahnuť, program končí" #: ../unattended-upgrade:1001 #, c-format msgid "Download finished, but file '%s' not there?!?" msgstr "Sťahovanie dokončené, ale súbor „%s“ nie je na mieste?!?" #: ../unattended-upgrade:1017 ../unattended-upgrade:1021 #, c-format msgid "Package '%s' has conffile prompt and needs to be upgraded manually" msgstr "" "Balík „%s“ obsahuje výzvu konfiguračného súboru a musí sa aktualizovať ručne" #: ../unattended-upgrade:1044 #, c-format msgid "package '%s' not upgraded" msgstr "balík „%s“ nebol aktualizovaný" #: ../unattended-upgrade:1059 #, c-format msgid "Packages that are auto removed: '%s'" msgstr "Automaticky odstránené balíky: „%s“" #: ../unattended-upgrade:1068 msgid "No packages found that can be upgraded unattended" msgstr "Neboli nájdené žiadne balíky, ktoré možno aktualizovať bezobslužne" #: ../unattended-upgrade:1088 #, fuzzy, c-format #| msgid "Packages that are upgraded: %s" msgid "Packages that will be upgraded: %s" msgstr "Aktualizované balíky: %s" #: ../unattended-upgrade:1125 msgid "print debug messages" msgstr "vypisovať ladiace správy" #: ../unattended-upgrade:1128 #, fuzzy #| msgid "print debug messages" msgid "make apt/libapt print verbose debug messages" msgstr "vypisovať ladiace správy" #: ../unattended-upgrade:1131 #, fuzzy #| msgid "print debug messages" msgid "print info messages" msgstr "vypisovať ladiace správy" #: ../unattended-upgrade:1134 msgid "Simulation, download but do not install" msgstr "Simulácia - sťahovať, ale neinštalovať" #: ../unattended-upgrade:1137 msgid "Upgrade in minimal steps (and allow interrupting with SIGINT" msgstr "" "Aktualizovať po minimálnych krokoch (a umožniť prerušenie pomocou SIGINT" #: ../unattended-upgrade:1142 msgid "You need to be root to run this application" msgstr "Aby ste mohli spustiť túto aplikáciu, musíte byť root" #: ../unattended-upgrade-shutdown:72 msgid "Unattended-upgrade in progress during shutdown, sleeping for 5s" msgstr "Unattended-upgrade prebieha počas vypínania, čaká sa 5 sekúnd" #: ../unattended-upgrade-shutdown:125 #, fuzzy #| msgid "unattended-upgrades result for '%s'" msgid "Running unattended-upgrades in shutdown mode" msgstr "výsledok unattended-upgrades pre „%s“" #: ../unattended-upgrade-shutdown:153 #, c-format msgid "Giving up on lockfile after %s delay" msgstr "Vzdáva sa pokus o získanie zámku po %s" #~ msgid "Progress: %s %%: (%s)" #~ msgstr "Priebeh: %s %%: (%s)" unattended-upgrades-0.82.1ubuntu1/po/gl.po0000664000000000000000000001737012301323623015344 0ustar # Galician translations for PACKAGE package. # Copyright (C) 2012 THE PACKAGE'S COPYRIGHT HOLDER # This file is distributed under the same license as the PACKAGE package. # # Jorge Barreiro Gonzalez , 2012. msgid "" msgstr "" "Project-Id-Version: \n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2013-09-13 08:12+0200\n" "PO-Revision-Date: 2012-06-23 12:55+0200\n" "Last-Translator: Jorge Barreiro \n" "Language-Team: Galician \n" "Language: gl\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "X-Generator: Lokalize 1.0\n" "Plural-Forms: nplurals=2; plural=n != 1;\n" #: ../unattended-upgrade:136 #, c-format msgid "Progress: %s %% (%s)" msgstr "Progreso: %s %% (%s)" #: ../unattended-upgrade:352 ../unattended-upgrade:436 #: ../unattended-upgrade-shutdown:161 msgid "All upgrades installed" msgstr "Todas as actualizacións foron instaladas" #: ../unattended-upgrade:354 ../unattended-upgrade:428 msgid "Installing the upgrades failed!" msgstr "Produciuse un erro ao instalar as actualizacións." #: ../unattended-upgrade:355 ../unattended-upgrade:429 #, c-format msgid "error message: '%s'" msgstr "mensaxe de erro: «%s»" #: ../unattended-upgrade:356 ../unattended-upgrade:430 #, c-format msgid "dpkg returned a error! See '%s' for details" msgstr "«dpkg» devolveu un erro! Consulte «%s» para obter máis detalles." #: ../unattended-upgrade:685 #, fuzzy #| msgid "" #| "No '/usr/bin/mail', can not send mail. You probably want to install the " #| "'mailx' package." msgid "" "No '/usr/bin/mail' or '/usr/sbin/sendmail',can not send mail. You probably " "want to install the 'mailx' package." msgstr "" "Non existe «/usr/bin/mail», non pode enviar correos. Probablemente queira " "instalar o paquete «mailx»." #: ../unattended-upgrade:698 #, fuzzy, c-format #| msgid "[reboot required] unattended-upgrades result for '%s'" msgid "[reboot required] unattended-upgrades result for '%s': %s" msgstr "[precísase reiniciar] resultado da actualización desatendida para «%s»" #: ../unattended-upgrade:701 #, fuzzy, c-format #| msgid "unattended-upgrades result for '%s'" msgid "unattended-upgrades result for '%s': '%s'" msgstr "resultado da actualización desatendida para «%s»" #: ../unattended-upgrade:703 #, c-format msgid "" "Unattended upgrade returned: %s\n" "\n" msgstr "" "A actualización desatendida devolveu: %s\n" "\n" #: ../unattended-upgrade:706 msgid "" "Warning: A reboot is required to complete this upgrade.\n" "\n" msgstr "" "Aviso: Precísase reiniciar para completar esta actualización.\n" "\n" #: ../unattended-upgrade:708 #, fuzzy #| msgid "Packages that are upgraded:\n" msgid "Packages that were upgraded:\n" msgstr "Paquetes que se actualizan:\n" #: ../unattended-upgrade:710 #, fuzzy #| msgid "Packages that are upgraded:\n" msgid "Packages that attempted to upgrade:\n" msgstr "Paquetes que se actualizan:\n" #: ../unattended-upgrade:714 msgid "Packages with upgradable origin but kept back:\n" msgstr "Paquetes co un orixe actualizábel, pero que se manteñen:\n" #: ../unattended-upgrade:719 msgid "Package installation log:" msgstr "Rexistro de instalación de paquetes:" #: ../unattended-upgrade:723 msgid "Unattended-upgrades log:\n" msgstr "Rexistro de «unattended-upgrades»:\n" #: ../unattended-upgrade:747 #, c-format msgid "Writing dpkg log to '%s'" msgstr "Escribindo o rexistro «dpkg» a «%s»" #: ../unattended-upgrade:873 #, c-format msgid "Initial blacklisted packages: %s" msgstr "Lista negra de paquetes inicial: %s" #: ../unattended-upgrade:875 msgid "Starting unattended upgrades script" msgstr "Estase a comezar o script de actualizacións desatendidas" #: ../unattended-upgrade:878 #, c-format msgid "Allowed origins are: %s" msgstr "Os orixes permitidos son: %s" #: ../unattended-upgrade:891 ../unattended-upgrade:892 msgid "Unclean dpkg state detected, trying to correct" msgstr "Detectouse un estado «dpkg» sucio, estase a tratar de corrixir" #: ../unattended-upgrade:901 #, c-format msgid "" "dpkg --configure -a output:\n" "%s" msgstr "" "Saída de «dpkg --configure -a»:\n" "%s" #: ../unattended-upgrade:910 msgid "Lock could not be acquired (another package manager running?)" msgstr "Non se puido bloquear (estase a executar outro xestor de paquetes?)" #: ../unattended-upgrade:912 msgid "Cache lock can not be acquired, exiting" msgstr "Non se puido bloquear a caché, sáese" #: ../unattended-upgrade:919 ../unattended-upgrade:920 msgid "Cache has broken packages, exiting" msgstr "A caché contén paquetes rotos, sáese" #: ../unattended-upgrade:961 #, c-format msgid "package '%s' upgradable but fails to be marked for upgrade (%s)" msgstr "" "O paquete «%s» é actualizábel, pero non foi posíbel marcalo para actualizar " "(%s)" #: ../unattended-upgrade:982 #, c-format msgid "GetArchives() failed: '%s'" msgstr "Produciuse un erro en GetArchives(): «%s»" #: ../unattended-upgrade:992 ../unattended-upgrade:993 #, fuzzy, c-format #| msgid "An error ocured: '%s'" msgid "An error occurred: '%s'" msgstr "Produciuse un erro: «%s»" #: ../unattended-upgrade:995 ../unattended-upgrade:997 #, c-format msgid "The URI '%s' failed to download, aborting" msgstr "Produciuse un erro ao descargar a URI «%s», interrómpese" #: ../unattended-upgrade:1001 #, c-format msgid "Download finished, but file '%s' not there?!?" msgstr "A descarga finalizou, pero o ficheiro «%s» non está aí." #: ../unattended-upgrade:1017 ../unattended-upgrade:1021 #, c-format msgid "Package '%s' has conffile prompt and needs to be upgraded manually" msgstr "" "O paquete «%s» ten unha petición acerca dos ficheiros de configuración e " "precisa ser actualizado manualmente" #: ../unattended-upgrade:1044 #, c-format msgid "package '%s' not upgraded" msgstr "O paquete «%s» non foi actualizado" #: ../unattended-upgrade:1059 #, c-format msgid "Packages that are auto removed: '%s'" msgstr "Paquetes que se eliminan automaticamente: «%s»" #: ../unattended-upgrade:1068 msgid "No packages found that can be upgraded unattended" msgstr "Non se atoparon paquetes que se poidan actualizar de forma desatendida" #: ../unattended-upgrade:1088 #, fuzzy, c-format #| msgid "Packages that are upgraded: %s" msgid "Packages that will be upgraded: %s" msgstr "Paquetes que se actualizan: %s" #: ../unattended-upgrade:1125 msgid "print debug messages" msgstr "escribir as menxases de depuración" #: ../unattended-upgrade:1128 #, fuzzy #| msgid "print debug messages" msgid "make apt/libapt print verbose debug messages" msgstr "escribir as menxases de depuración" #: ../unattended-upgrade:1131 #, fuzzy #| msgid "print debug messages" msgid "print info messages" msgstr "escribir as menxases de depuración" #: ../unattended-upgrade:1134 msgid "Simulation, download but do not install" msgstr "Simulación, descargar pero non instalar" #: ../unattended-upgrade:1137 msgid "Upgrade in minimal steps (and allow interrupting with SIGINT" msgstr "Actualización en pasos mínimos (e permitir interromper con SIGINT)" #: ../unattended-upgrade:1142 msgid "You need to be root to run this application" msgstr "Precisa reiniciar para executar este aplicativo" #: ../unattended-upgrade-shutdown:72 msgid "Unattended-upgrade in progress during shutdown, sleeping for 5s" msgstr "" "A actualización desatendida está en progreso durante o apagado, durmindo " "durante 5s" #: ../unattended-upgrade-shutdown:125 #, fuzzy #| msgid "unattended-upgrades result for '%s'" msgid "Running unattended-upgrades in shutdown mode" msgstr "resultado da actualización desatendida para «%s»" #: ../unattended-upgrade-shutdown:153 #, c-format msgid "Giving up on lockfile after %s delay" msgstr "Renunciase ao ficheiro de bloqueo tras un retardo de %s" #~ msgid "Progress: %s %%: (%s)" #~ msgstr "Progreso: %s %%: (%s)" unattended-upgrades-0.82.1ubuntu1/pm/0000775000000000000000000000000012301323623014370 5ustar unattended-upgrades-0.82.1ubuntu1/pm/sleep.d/0000775000000000000000000000000012301323623015722 5ustar unattended-upgrades-0.82.1ubuntu1/pm/sleep.d/10_unattended-upgrades-hibernate0000775000000000000000000000122412250412747024062 0ustar #!/bin/sh # Action script ensure that unattended-upgrades is finished # before a hibernate # # Copyright: Copyright (c) 2009 Michael Vogt # License: GPL-2 # PATH=/sbin:/usr/sbin:/bin:/usr/bin SHUTDOWN_HELPER=/usr/share/unattended-upgrades/unattended-upgrade-shutdown if [ -x /usr/bin/python3 ]; then PYTHON=python3 else PYTHON=python fi if [ ! -x /usr/share/unattended-upgrades/unattended-upgrade-shutdown ]; then exit 0 fi case "${1}" in hibernate) if [ -e $SHUTDOWN_HELPER ]; then $PYTHON $SHUTDOWN_HELPER fi ;; resume|thaw) # nothing ;; esac unattended-upgrades-0.82.1ubuntu1/pre-build.sh0000775000000000000000000000014512250412747016207 0ustar #!/bin/sh # update po files for i in po/*.po; do msgmerge --previous --update $i po/*.pot; done unattended-upgrades-0.82.1ubuntu1/test/0000775000000000000000000000000012301324003014724 5ustar unattended-upgrades-0.82.1ubuntu1/test/test_mail.py0000775000000000000000000001525412274640116017310 0ustar #!/usr/bin/python3 # -*- coding: utf-8 -*- from __future__ import unicode_literals import apt_pkg import os import sys import unittest from io import StringIO from email.parser import Parser import unattended_upgrade from unattended_upgrade import send_summary_mail, setup_apt_listchanges # note this is not a unittest.TestCase as it needs to be parameterized class CommonTestsForMailxAndSendmail(object): EXPECTED_MAIL_CONTENT_STRINGS = [ "logfile_dpkg text", "mem_log text", ] def common_setup(self): # monkey patch to make it testable unattended_upgrade.REBOOT_REQUIRED_FILE = "./reboot-required" unattended_upgrade.MAIL_BINARY = "./no-mailx-binary-here" unattended_upgrade.SENDMAIL_BINARY = "./no-sendmail-binary-here" # setup mail apt_pkg.config.set("Unattended-Upgrade::Mail", "root") apt_pkg.config.set("Unattended-Upgrade::MailOnlyOnError", "false") def tearDown(self): for f in ["mail.txt", "reboot-required", "apt-term.log"]: if os.path.exists(f): os.unlink(f) def _return_mock_data(self, successful=True): """ return input tuple for send_summary_mail """ pkgs = "\n".join(["2vcard"]) res = successful pkgs_kept_back = [] # include some unicode chars here for good measure mem_log = StringIO("""mem_log text üöä Allowed origins are: ['o=Debian,n=wheezy', 'o=Debian,n=wheezy-updates',\ 'o=Debian,n=wheezy,l=Debian-Security', 'origin=Debian,archive=stable,label=\ Debian-Security'] """) logfile_dpkg = "./apt-term.log" with open("./apt-term.log", "w") as fp: fp.write("logfile_dpkg text") return (pkgs, res, pkgs_kept_back, mem_log, logfile_dpkg) def _verify_common_mail_content(self, mail_txt): for expected_string in self.EXPECTED_MAIL_CONTENT_STRINGS: self.assertTrue(expected_string in mail_txt) def test_summary_mail_reboot(self): with open("./reboot-required", "w") as fp: fp.write("") send_summary_mail(*self._return_mock_data()) os.unlink("./reboot-required") # this is used for py2 compat for py3 only we can do # remove the "rb" and the subsequent '.decode("utf-8")' with open("mail.txt", "rb") as fp: mail_txt = fp.read().decode("utf-8") self.assertTrue("[reboot required]" in mail_txt) self._verify_common_mail_content(mail_txt) self.assertTrue("Packages that were upgraded:\n 2vcard" in mail_txt) def test_summary_mail_no_reboot(self): send_summary_mail(*self._return_mock_data()) with open("mail.txt", "rb") as fp: mail_txt = fp.read().decode("utf-8") self.assertFalse("[reboot required]" in mail_txt) self._verify_common_mail_content(mail_txt) self.assertTrue("Packages that were upgraded:\n 2vcard" in mail_txt) def test_summary_mail_only_on_error(self): # default is to always send mail, ensure this is correct # for both success and failure apt_pkg.config.set("Unattended-Upgrade::MailOnlyOnError", "false") send_summary_mail(*self._return_mock_data(successful=True)) with open("mail.txt", "rb") as fp: self._verify_common_mail_content(fp.read().decode("utf-8")) os.remove("mail.txt") # now with a simulated failure send_summary_mail(*self._return_mock_data(successful=False)) with open("mail.txt", "rb") as fp: self._verify_common_mail_content(fp.read().decode("utf-8")) os.remove("mail.txt") # now test with "MailOnlyOnError" apt_pkg.config.set("Unattended-Upgrade::MailOnlyOnError", "true") send_summary_mail(*self._return_mock_data(successful=True)) self.assertFalse(os.path.exists("mail.txt")) send_summary_mail(*self._return_mock_data(successful=False)) with open("mail.txt", "rb") as fp: mail_txt = fp.read().decode("utf-8") self._verify_common_mail_content(mail_txt) self.assertTrue("Unattended upgrade returned: False" in mail_txt) self.assertTrue(os.path.exists("mail.txt")) self.assertTrue( "Packages that attempted to upgrade:\n 2vcard" in mail_txt) def test_apt_listchanges(self): # test with sendmail available unattended_upgrade.SENDMAIL_BINARY = "/bin/true" setup_apt_listchanges("./data/listchanges.conf.mail") self.assertEqual(os.environ["APT_LISTCHANGES_FRONTEND"], "mail") # test without sendmail unattended_upgrade.SENDMAIL_BINARY = "/bin/not-here-xxxxxxxxx" setup_apt_listchanges("./data/listchanges.conf.pager") self.assertEqual(os.environ["APT_LISTCHANGES_FRONTEND"], "none") class MailxTestCase(CommonTestsForMailxAndSendmail, unittest.TestCase): def setUp(self): self.common_setup() unattended_upgrade.MAIL_BINARY = "./mock-mail" def _verify_common_mail_content(self, mail_txt): CommonTestsForMailxAndSendmail._verify_common_mail_content( self, mail_txt) # setting this header with mailx is not possible so ensure # we don't accidently try self.assertFalse('text/plain; charset="utf-8"' in mail_txt) class SendmailTestCase(CommonTestsForMailxAndSendmail, unittest.TestCase): def setUp(self): self.common_setup() unattended_upgrade.SENDMAIL_BINARY = "./mock-sendmail" def _verify_common_mail_content(self, mail_txt): CommonTestsForMailxAndSendmail._verify_common_mail_content( self, mail_txt) # python2 needs this as utf8 encoded string (not unicode) if sys.version < '3': mail_txt = mail_txt.encode("utf-8") msg = Parser().parsestr(mail_txt) content_type = msg["Content-Type"] self.assertEqual(content_type, 'text/plain; charset="utf-8"') def test_mail_quoted_printable(self): """Regression test for debian bug #700178""" send_summary_mail(*self._return_mock_data()) with open("mail.txt", "rb") as fp: log_data = fp.read().decode("utf-8") needle = "Allowed origins are: ['o=3DDebian,n=3Dwheezy', "\ "'o=3DDebian,n=3Dwheezy-updat=\n"\ "es', 'o=3DDebian,n=3Dwheezy,l=3DDebian-Security', "\ "'origin=3DDebian,archive=\n"\ "=3Dstable,label=3DDebian-Security']" self.assertTrue(needle in log_data) class SendmailAndMailxTestCase(SendmailTestCase): def setUp(self): self.common_setup() unattended_upgrade.MAIL_BINARY = "./mock-mail" unattended_upgrade.SENDMAIL_BINARY = "./mock-sendmail" if __name__ == "__main__": #logging.basicConfig(level=logging.DEBUG) unittest.main() unattended-upgrades-0.82.1ubuntu1/test/__init__.py0000664000000000000000000000000012250412747017043 0ustar unattended-upgrades-0.82.1ubuntu1/test/test_minimal_partitions.py0000775000000000000000000000343612250412747022270 0ustar #!/usr/bin/python3 import apt import apt_pkg import os import unittest import unattended_upgrade class LogInstallProgressMock(unattended_upgrade.LogInstallProgress): # klass data so that we can veriy in the test as the actual # object is destroyed DATA = [] # overwrite to log the data def status_change(self, pkg, percent, status): print(pkg, percent) self.DATA.append([pkg, percent]) class TestMinimalPartitions(unittest.TestCase): def setUp(self): # setup dry-run mode for apt apt_pkg.config.set("Dir::Cache", "/tmp") apt_pkg.config.set("Debug::NoLocking", "1") apt_pkg.config.set("Debug::pkgDPkgPM", "1") apt_pkg.config.set("Dir::State::extended_states", "./extended_states") apt_pkg.config.clear("Dpkg::Post-Invoke") apt_pkg.config.clear("Dpkg::Pre-Install-Pkgs") self.cache = apt.Cache() def tearDown(self): if os.path.exists("./extended_states"): os.remove("./extended_states") def test_upgrade_in_minimal_steps(self): self.cache.upgrade(True) pkgs_to_upgrade = [pkg.name for pkg in self.cache.get_changes()] unattended_upgrade.PROGRESS_LOG = \ "./aptroot/var/run/unatteded-upgrades.progress" unattended_upgrade.LogInstallProgress = LogInstallProgressMock unattended_upgrade.upgrade_in_minimal_steps( self.cache, pkgs_to_upgrade, "", []) # ensure we count upwarts last_percent = -1 for (pkg, percent) in LogInstallProgressMock.DATA: self.assertTrue(last_percent < percent) last_percent = percent # cleanup class data LogInstallProgressMock.DATA = [] if __name__ == "__main__": #logging.basicConfig(level=logging.DEBUG) unittest.main() unattended-upgrades-0.82.1ubuntu1/test/Makefile0000664000000000000000000000107512250412747016407 0ustar #!/usr/bin/make all: check check: # test with both py2 and py3 for now and also use coverage for the py2 set -e; \ find . -name 'test_*.py' | \ while read file; do \ if [ -x $$file ]; then \ echo "Running $$file with python3"; \ python3 $$file 2>&1; \ echo "Running $$file with python"; \ python-coverage run -a $$file 2>&1; \ fi \ done clean: rm -rf ./aptroot/var/cache/ rm -rf ./aptroot/var/lib/apt rm -rf ./aptroot/var/run find .. -type d -name __pycache__ | xargs rm -rf coverage-html: echo "output in htmlcov/ python-coverage html unattended-upgrades-0.82.1ubuntu1/test/test_regression.py0000664000000000000000000000231412250412747020535 0ustar #!/usr/bin/python3 # -*- coding: utf-8 -*- import io import os import tempfile import unittest from mock import ( Mock, patch, ) from unattended_upgrade import do_install class TestRegression(unittest.TestCase): @patch("unattended_upgrade.upgrade_normal") def test_do_install_fail_unicode_write(self, mock_upgrade_normal): """ test if the substitute function works """ def _raise(*args): raise Exception("meepä") tmp = tempfile.TemporaryFile() old_stderr = os.dup(2) os.dup2(tmp.fileno(), 2) mock_upgrade_normal.side_effect = _raise logfile_dpkg = io.StringIO() # mock pkg pkg = Mock() pkg.name = "meep" # mock options options = Mock() options.minimal_upgrade_steps = False do_install(cache=Mock(), pkgs_to_upgrade=[pkg], blacklisted_pkgs=[], options=options, logfile_dpkg=logfile_dpkg) # if there is no exception here, we are good os.dup2(old_stderr, 2) tmp.seek(0) self.assertEqual(tmp.read().decode("utf-8"), "Exception: meepä\n") if __name__ == "__main__": #logging.basicConfig(level=logging.DEBUG) unittest.main() unattended-upgrades-0.82.1ubuntu1/test/test_origin_pattern.py0000775000000000000000000001220012250412747021377 0ustar #!/usr/bin/python3 import apt_pkg import logging import unittest import unattended_upgrade from unattended_upgrade import ( check_changes_for_sanity, is_allowed_origin, get_distro_codename, match_whitelist_string, UnknownMatcherError, ) class MockOrigin(): pass class MockCandidate(): pass class MockPackage(): pass class MockCache(list): pass class MockDepCache(): pass class TestOriginPatern(unittest.TestCase): def setUp(self): pass def tearDown(self): pass def test_match_whitelist_string(self): origin = self._get_mock_origin( "OriginUbuntu", "LabelUbuntu", "ArchiveUbuntu", "archive.ubuntu.com", "main") # good s = "o=OriginUbuntu" self.assertTrue(match_whitelist_string(s, origin)) s = "o=OriginUbuntu,l=LabelUbuntu,a=ArchiveUbuntu," \ "site=archive.ubuntu.com" self.assertTrue(match_whitelist_string(s, origin)) # bad s = "" self.assertFalse(match_whitelist_string(s, origin)) s = "o=something" self.assertFalse(match_whitelist_string(s, origin)) s = "o=LabelUbuntu,a=no-match" self.assertFalse(match_whitelist_string(s, origin)) # with escaping origin = self._get_mock_origin("Google, Inc.", archive="stable") # good s = "o=Google\, Inc.,a=stable" self.assertTrue(match_whitelist_string(s, origin)) def test_match_whitelist_from_conffile(self): # read some apt_pkg.config.clear("Unattended-Upgrade") apt_pkg.read_config_file( apt_pkg.config, "./data/50unattended-upgrades.Test") allowed_origins = unattended_upgrade.get_allowed_origins() #print allowed_origins self.assertTrue("o=aOrigin,a=aArchive" in allowed_origins) self.assertTrue("s=aSite,l=aLabel" in allowed_origins) self.assertTrue("o=Google\, Inc.,suite=stable" in allowed_origins) def test_macro(self): codename = get_distro_codename() s = "a=${distro_codename}" origin = self._get_mock_origin("Foo", archive=codename) self.assertTrue(match_whitelist_string(s, origin)) def test_compatiblity(self): apt_pkg.config.clear("Unattended-Upgrade") apt_pkg.read_config_file( apt_pkg.config, "./data/50unattended-upgrades.compat") allowed_origins = unattended_upgrade.get_allowed_origins() #print allowed_origins self.assertTrue("o=Google\, Inc.,a=stable" in allowed_origins) self.assertTrue("o=MoreCorp\, eink,a=stable" in allowed_origins) # test whitelist pkg = self._get_mock_package() self.assertTrue(is_allowed_origin(pkg.candidate, allowed_origins)) def test_unkown_matcher(self): apt_pkg.config.clear("Unattended-Upgrade") s = "xxx=OriginUbuntu" with self.assertRaises(UnknownMatcherError): self.assertTrue(match_whitelist_string(s, None)) def test_blacklist(self): # mock pkg (yeah, complicated) pkg = self._get_mock_package() # mock cache cache = MockCache() cache._depcache = MockDepCache() cache._depcache.broken_count = 0 cache.append(pkg) # origins and blacklist allowed_origins = ["o=Ubuntu"] blacklist = ["linux-.*"] # with blacklist pkg self.assertFalse( check_changes_for_sanity(cache, allowed_origins, blacklist)) # with "normal" pkg pkg.name = "apt" self.assertTrue( check_changes_for_sanity(cache, allowed_origins, blacklist)) def _get_mock_origin(self, aorigin="", label="", archive="", site="", component=""): origin = MockOrigin() origin.origin = aorigin origin.label = label origin.archive = archive origin.site = site origin.compoent = component return origin def _get_mock_package(self): pkg = MockPackage() pkg._pkg = MockPackage() pkg._pkg.selected_state = 0 pkg.name = "linux-image" pkg.marked_install = True pkg.marked_upgrade = True pkg.marked_delete = False pkg.candidate = MockCandidate() pkg.candidate.origins = [self._get_mock_origin("Ubuntu"), self._get_mock_origin(aorigin="Google, Inc.", archive="stable")] pkg.candidate.record = {} return pkg def test_match_whitelist_wildcard(self): origin = self._get_mock_origin( "OriginUbuntu", "LabelUbuntu", "ArchiveUbuntu", "archive.ubuntu.com", "main") # good s = "o=OriginU*" self.assertTrue(match_whitelist_string(s, origin)) # bad s = "o=X*" self.assertFalse(match_whitelist_string(s, origin)) # good s = "o=?riginUbunt?" self.assertTrue(match_whitelist_string(s, origin)) # good s = "o=*Ubunt?" self.assertTrue(match_whitelist_string(s, origin)) if __name__ == "__main__": logging.basicConfig(level=logging.DEBUG) unittest.main() unattended-upgrades-0.82.1ubuntu1/test/mock-mail0000775000000000000000000000006312250412747016542 0ustar #!/bin/sh echo $2 > mail.txt cat - -- >> mail.txt unattended-upgrades-0.82.1ubuntu1/test/unattended_upgrade.pyc0000664000000000000000000011045312301323636021322 0ustar  t Sc @sddlZddlZddlZddlZddlZddlZddlZddlZddl Z ddl Z ddl Z ddl Z ddl Z ddlZddlZddlZddlmZddlmZddlmZddlmZmZddlmZmZddlZddlZddlZdZdZd Z ej!d d d gd e"j#Z$ej!d dd gd e"j#Z%dZ&dZ'e(a)de*fdYZ+dej,fdYZ-dej.j/j0fdYZ1dfdYZ2dZ3dZ4dZ5dZ6dZ7dZ8dZ9d Z:d!Z;d"e(d#Z<d$Z=d%Z>d&Z?d'Z@d(ZAd"d)ZBd*ZCd+ZDd,ZEd-d"d.ZFd/d0ZGd1ZHd2ZId3ZJd4ZKd5ZLd6ZMd7ZNd8ZOd9d:ZPd;ZQd"d<ZReSd=krd>ZTd?ZUejVeTeUejWeTeZXeXjYd@dAdBdCdDe(dEedFeXjYd"dGdBdCdDe(dEedHeXjYdIdJdBdCdDe(dEedKeXjYd"dLdBdCdDe(dEedMeXjYd"dNdBdCdDe(dEedOeXjYd"dPdBdCdEedDe(eXjZ\Z[Z\e j]d9kredQGHej^dRne j e j_e j`eRe[ndS(SiN(tMessage(tgettext(tStringIO(t OptionParsert SUPPRESS_HELP(tPopentPIPEs/var/run/reboot-requireds /usr/bin/mails/usr/sbin/sendmailt lsb_releases-cs-stuniversal_newliness-is%/var/run/unattended-upgrades.progresss /var/run/unattended-upgrades.pidtUnknownMatcherErrorcBseZRS((t__name__t __module__(((se/home/egon/devel/unattended-upgrades/build-area/unattended-upgrades-0.82.1/test/unattended_upgrade.pyR MstUnattendedUpgradesCachecBs#eZdZdZdZRS(cCs-tjj|d|||_|jdS(Ntrootdir(tapttCachet__init__tallowed_originstadjust_candidate_versions(tselfR R((se/home/egon/devel/unattended-upgrades/build-area/unattended-upgrades-0.82.1/test/unattended_upgrade.pyRSs cCstjj||jdS(N(RRtclearR(R((se/home/egon/devel/unattended-upgrades/build-area/unattended-upgrades-0.82.1/test/unattended_upgrade.pyRYscCsx|D]}|jsqnt|j|jr7qnd}xb|jD]W}t|dr|jdkrtj d|qGnt||jrG|}PqGqGW|r||jkrtj d|||_qqWdS(s Adjust candidate versions to match highest allowed origin This adjusts the origin even if the candidate has a higher version tpolicy_priorityis#ignoring ver '%s' with priority < 0s!adjusting candidate version: '%s'N( t is_upgradabletis_allowed_origint candidateRtNonetversionsthasattrRtloggingtdebug(Rtpkgtnew_candtver((se/home/egon/devel/unattended-upgrades/build-area/unattended-upgrades-0.82.1/test/unattended_upgrade.pyR^s   (R R RRR(((se/home/egon/devel/unattended-upgrades/build-area/unattended-upgrades-0.82.1/test/unattended_upgrade.pyR Qs  tLogInstallProgresscBs\eZdZeddZdZdZdZdZdZ dZ d Z RS( sr Install progress that writes to self.progress_log (/var/run/unattended-upgrades.progress by default) s$var/run/unattended-upgrades.progresscCsYtjjjj|||_tjjt j j d||_ ||_ d|_dS(NtDir(RtprogresstbasetInstallProgressRt logfile_dpkgtostpathtjointapt_pkgtconfigtfind_dirt progress_logtverboseRt output_logfd(RR&R.R-((se/home/egon/devel/unattended-upgrades/build-area/unattended-upgrades-0.82.1/test/unattended_upgrade.pyRs    cCs<t|jd$}|jtd||fWdQXdS(NtwsProgress: %s %% (%s)(topenR-twritet_(RRtpercenttstatustf((se/home/egon/devel/unattended-upgrades/build-area/unattended-upgrades-0.82.1/test/unattended_upgrade.pyt status_changescCsIddd|j|jj|j|jjg}xD|dD]8}tj|tj}tj|tj|tjBq>Wd}t j j |rEd}xt j |D]}yt |}Wntk r}d|GHnX||krqnyt j|Wqtk r=}|d7}|dkr>d||fGHq>qXqWndS(Niiiis /proc/self/fdsERROR: can not get fd for '%s'sERROR: os.close(%s): %s(twritefdt write_streamtfilenotstatusfdt status_streamtfcntltF_GETFDtF_SETFDt FD_CLOEXECR'R(texiststlistdirtintt ExceptiontclosetOSError(Rt required_fdstfdt old_flagstproc_fdt error_counttfdnamete((se/home/egon/devel/unattended-upgrades/build-area/unattended-upgrades-0.82.1/test/unattended_upgrade.pyt _fixup_fdss0  !    cCs2tj}tj|tj}tj|ddS(Ni(R'tdevnullR1tO_RDWRtdup2(RtREDIRECT_INPUTRH((se/home/egon/devel/unattended-upgrades/build-area/unattended-upgrades-0.82.1/test/unattended_upgrade.pyt_redirect_stdins cCs^tjjdtsZtj|jtjtjBd}tj |dtj |dndS(NsDebug::pkgDPkgPMiii( R*R+tfind_btFalseR'R1R&RPtO_CREATRQ(Rtlogfd((se/home/egon/devel/unattended-upgrades/build-area/unattended-upgrades-0.82.1/test/unattended_upgrade.pyt_redirect_outputs"cCs$tjjjj||jdS(N(RR#R$R%tupdate_interfacet_do_verbose_output_if_needed(R((se/home/egon/devel/unattended-upgrades/build-area/unattended-upgrades-0.82.1/test/unattended_upgrade.pyRYscCstjjdtrdS|jr|jdkrOtj|j tj |_ny t j |jgggdWn8t j k r}|j t jkrtjdqnXtjdtj|jdndS(NsDebug::pkgDPkgPMis select failedii(R*R+RTRUR.R/RR'R1R&tO_RDONLYtselectterrorterrnotEINTRRt exceptionR2tread(RRM((se/home/egon/devel/unattended-upgrades/build-area/unattended-upgrades-0.82.1/test/unattended_upgrade.pyRZs  cCs=tj}|dkr9|j|j|jn|S(Ni(R'tforkRNRSRX(Rtpid((se/home/egon/devel/unattended-upgrades/build-area/unattended-upgrades-0.82.1/test/unattended_upgrade.pyRbs      ( R R t__doc__RURR7RNRSRXRYRZRb(((se/home/egon/devel/unattended-upgrades/build-area/unattended-upgrades-0.82.1/test/unattended_upgrade.pyR!~s   !    tUnlockedcBs eZdZdZdZRS(sP Context manager for unlocking the apt lock while cache.commit() is run cCsytjWnnXdS(N(R*tpkgsystem_unlock(R((se/home/egon/devel/unattended-upgrades/build-area/unattended-upgrades-0.82.1/test/unattended_upgrade.pyt __enter__scCsytjWnnXdS(N(R*Rf(Rtexc_typet exc_valuetexc_tb((se/home/egon/devel/unattended-upgrades/build-area/unattended-upgrades-0.82.1/test/unattended_upgrade.pyt__exit__s(R R RdRgRk(((se/home/egon/devel/unattended-upgrades/build-area/unattended-upgrades-0.82.1/test/unattended_upgrade.pyRes cCsatjjtjjtjjdd}x-tj|D]}tj d|r=t Sq=Wt S(s[ Return True if the dpkg journal is dirty (similar to debSystem::CheckUpdates) sDir::State::statustupdatess[0-9]+( R'R(R)tdirnameR*R+t find_fileRBtretmatchtTrueRU(tdR6((se/home/egon/devel/unattended-upgrades/build-area/unattended-upgrades-0.82.1/test/unattended_upgrade.pytis_dpkg_journal_dirtys  cCstjdtadS(NsSIGUSR1 received, will stop(RtwarningRqtSIGNAL_STOP_REQUEST(tsignaltframe((se/home/egon/devel/unattended-upgrades/build-area/unattended-upgrades-0.82.1/test/unattended_upgrade.pytsignal_handlers cCs0itd6td6}tj|j|S(sb substitude known mappings and return a new string Currently supported ${distro-release} tdistro_codenamet distro_id(tget_distro_codenamet get_distro_idtstringtTemplatet substitute(tlinetmapping((se/home/egon/devel/unattended-upgrades/build-area/unattended-upgrades-0.82.1/test/unattended_upgrade.pyRs  cCstS(N(tDISTRO_CODENAME(((se/home/egon/devel/unattended-upgrades/build-area/unattended-upgrades-0.82.1/test/unattended_upgrade.pyR{ scCstS(N(t DISTRO_ID(((se/home/egon/devel/unattended-upgrades/build-area/unattended-upgrades-0.82.1/test/unattended_upgrade.pyR|scCsg}xtjjdD]}d|krC|jd\}}n|j\}}tjdd|}tjdd|}|jdt|t|fqW|S(s, legacy support for old Allowed-Origins var s#Unattended-Upgrade::Allowed-Originst:s([^\\]),s\1\\,s o=%s,a=%s(R*R+t value_listtsplitRotsubtappendR(RtsRzRy((se/home/egon/devel/unattended-upgrades/build-area/unattended-upgrades-0.82.1/test/unattended_upgrade.pytget_allowed_origins_legacys cCs=t}x-tjjdD]}|jt|qW|S(su return a list of allowed origins from apt.conf This will take substitutions (like distro_id) into account. s#Unattended-Upgrade::Origins-Pattern(RR*R+RRR(RR((se/home/egon/devel/unattended-upgrades/build-area/unattended-upgrades-0.82.1/test/unattended_upgrade.pytget_allowed_origins%s cCs|j}|dkr)tjdtSt}|jdd}x}|jdD]l}g|jdD]}|jjdd^qg\}}t|}|dkr|tj|j |M}n|dkr|tj|j |M}n|dkr|tj|j |M}n|dkr=|tj|j |M}nf|dkre|tj|j |M}n>|dkr|tj|j|M}ntd||ftjd|||fqQW|S(s take a whitelist string in the form "origin=Debian,label=Debian-Security" and match against the given python-apt origin. A empty whitelist string never matches anything. ts"empty match string matches nothings\,s%2Ct,t=totorigintltlabeltatsuitetarchivetct componenttsitetntcodenames4Unknown whitelist entry for macher '%s' (token '%s')smatching '%s'='%s' against '%s'(Rsorigin(Rslabel(Rssuitesarchive(Rs component(ssite(Rscodename(tstripRRtRURqtreplaceRRtfnmatchRRRRRRR R(t whitelistRtresttokenRtwhattvalue((se/home/egon/devel/unattended-upgrades/build-area/unattended-upgrades-0.82.1/test/unattended_upgrade.pytmatch_whitelist_string0s8   7        cCsd}t}t||}y&t|jd|}WdQXWntk r\}|}nX|rytjtdnAtj tdtj td|tj td||S(Ntinstall_progresssAll upgrades installedsInstalling the upgrades failed!serror message: '%s's+dpkg returned a error! See '%s' for details( RRUR!Retcommitt SystemErrorRtinfoR3R](tcachetpkgs_to_upgradeR&R.R]Rt iprogressRM((se/home/egon/devel/unattended-upgrades/build-area/unattended-upgrades-0.82.1/test/unattended_upgrade.pytupgrade_normal\s  RcCst||}|jd7_tjtjtt}t|}xtr|}x'|D]} tryt j dtS|| } | j r| j n| j s\| jnq\t|||st jdtSg|jD]} | j^q} | sq\nt| dkr3t jd| j| }Pnt| t|krqt jdt| | f| }n|jq\Wt|dkrt|t|tt|d} nd} |jd d j|d | d d t jd|t|g|D]} || ^qyTt||}t,|jd|}|satdnWdQX|jWnUtk r}t jtdt jtd|t jtd|tSX|t|}t jd|t|dkrIt j tdPqIqIWtS(Ns.minimal-stepssSIGNAL received, stoppingsOInternal error while building a minimal partition.Cache has not allowed changesisfound leaf package %ssfound partition of size %s (%s)igY@RRR4R5Rsapplying set %sRscache.commit() returned falsesInstalling the upgrades failed!serror message: '%s's+dpkg returned a error! See '%s' for detailssleft to upgrade %ssAll upgrades installed(!R!R-RvtSIGUSR1RxRtsetRqRuRRtRt mark_upgradet is_installedt mark_installtcheck_changes_for_sanityR]RUt get_changestnametlenRRtfloatR7R)t rewind_cacheReRRDR1R3R(RRt blacklistR&R.t install_logRt to_upgradetsmallest_partitiontpkgnameRtchangesR4RRRRM((se/home/egon/devel/unattended-upgrades/build-area/unattended-upgrades-0.82.1/test/unattended_upgrade.pytupgrade_in_minimal_stepsosx          "  -$ cCsF|s tSx5|jD]*}x!|D]}t||r!tSq!WqWtS(N(RUtoriginsRRq(R RRtallowed((se/home/egon/devel/unattended-upgrades/build-area/unattended-upgrades-0.82.1/test/unattended_upgrade.pyRs  cCs<x5|D]-}tj||rtjd|tSqWtS(Ns!skipping blacklisted package '%s'(RoRpRRRqRU(RRtblacklist_regexp((se/home/egon/devel/unattended-upgrades/build-area/unattended-upgrades-0.82.1/test/unattended_upgrade.pytis_pkgname_in_blacklists  cCs*|jjdkrtSx |D]}|jrDtjd|jtS|jsV|jrt |j |stjd|jtSt |j|rtS|j j tjkrtjd|jtStjjdt}|j jjd}|jr"|tkr"|dkr"tjdtSqqWtS( Nispkg '%s' now marked deletespkg '%s' not in allowed originspkg '%s' is on holds,Unattended-Upgrade::IgnoreAppsRequireRestartsUpgrade-Requiress app-restarts=pkg '%s' requires app-restart, not safe to upgrade unattended(t _depcachet broken_countRUt marked_deleteRRRtmarked_installtmarked_upgradeRRRt_pkgtselected_stateR*t SELSTATE_HOLDR+RTtrecordtgetRq(RRRRtignore_require_restarttupgrade_requires((se/home/egon/devel/unattended-upgrades/build-area/unattended-upgrades-0.82.1/test/unattended_upgrade.pyRs.       cCs{y6tj|jjd}tj|}|dSWn>ttfk rv}tj d||f|j ddSXdS(NtcontroltPackages!failed to read deb file '%s' (%s)R3i( tapt_insttDebFileRt extractdataR*t TagSectiontIOErrorRRR]R(tdebfileRtsectionsRM((se/home/egon/devel/unattended-upgrades/build-area/unattended-upgrades-0.82.1/test/unattended_upgrade.pytpkgname_from_debs c Csdd|g}dddddd|g}d g}t|d t}t|d |jd td t}t|d |jd td t}|jd jd }|S(Nsdpkg-debs--fsys-tarfilettars-xs-Os-ft-t.tmd5sumtstdouttstdinRi(RRRRqt communicateR( tdeb_filet conf_filetdpkg_cmdttar_cmdtmd5_cmdtdpkg_pttar_ptmd5_pt pkg_md5sum((se/home/egon/devel/unattended-upgrades/build-area/unattended-upgrades-0.82.1/test/unattended_upgrade.pytget_md5sum_for_file_in_debs   c Cs7tjd|t|}tjjd}tjt|d}d}xV|D]N}|jd|krTtjd|d|kr|jd}PqqTqTWd}t j |}y%|j j dj jd }Wn*tk r } tjd || fnXi} x|jD]r} | j } | s>q ntjd | | j} | d } | d }t| dkr| d}nd}|dks tjj||  rq n|dkrq n| s| |jdkrtjd| |fq n|| |          cCstjjdS(Ns%Unattended-Upgrade::Package-Blacklist(R*R+R(((se/home/egon/devel/unattended-upgrades/build-area/unattended-upgrades-0.82.1/test/unattended_upgrade.pytget_blacklisted_pkgsSsicCstjjdtrtjjtrtjjdd}|dkrXtj |nt j dtt j dd|gndS(Ns$Unattended-Upgrade::Automatic-Reboots)Unattended-Upgrade::Automatic-Reboot-TimetnowisFound %s, rebootings/sbin/shutdowns-r(R*R+RTRUR'R(RAR0RRERRtRtcall(t shutdown_locktwhen((se/home/egon/devel/unattended-upgrades/build-area/unattended-upgrades-0.82.1/test/unattended_upgrade.pytreboot_if_requested_and_neededWs     cCsJtjjtjjdd}ttjj|ddWdQXdS(Ns Dir::Statetperiodicsunattended-upgrades-stampR0(R'R(R)R*R+R,R1(tstatedir((se/home/egon/devel/unattended-upgrades/build-area/unattended-upgrades-0.82.1/test/unattended_upgrade.pytwrite_stamp_filees!c! CsR |rt|nt|}t}t}tjtddj|tjtdtjtd|trt j j dt rt jjt j jd}t jt jj|dt}|dkrtjtd td GHtjt j}d |d tk r} tjtdtdGHtj dnXt!d|d|} | j"j#dkr?tdGHtjtdtj dnt j$dt j%| j"} | g} g} t&g| D]}|j'rx|j(^qx}xv| D]n}|jr|j)rtjd|j(t*|j+dgfn|j)rt,|j(| rt-|j+|ry|j.t/| ||r| j0|xv| D]A}| |j1se| |j2rE| j3|| j0| |qEqEWn*tjdt4| | | j0|j(Wqtk r } tjtd|j(| ft4| | | j0|j(qXqqW| j5ddd jg| D]}|j(^q2}tjd!|t j$d|jrt j6t7j8j9j:}n t j6}t j;}|j<| j=}t j>| j"}y|j?|||Wn*tk r} tjtd"| nX|j@}tjd#|tArx|jBD]}tjd$||jC|jDkrtd%|jEGHtjtd%|jEn|jFstd&|jGGHtjtd&|jGtj dnt jjH|jIs(td'|jIGHtjd'|jItj dn|jJsJ|j0tK|jIntL|jIr@t j jd(d)}|std*tK|jIGHntjtd*tK|jI|j0tK|jI| j0tK|jIq@q@Wtjd+|tM|dkr| jN| }g} x|D]}tjd,|j(|j.t/| ||ri| j0|q#|j(| kr| j0|j(ntjtd-|j(| jNx| D]}|j.qWq#Wqn tjd.t j j d/tr|t&g| D]}|j'r|j(^q}x1||D]%}tjd0|| |jOq,Wtjtd1dj||ntjd2| j"jP| j"jQ| j"j#ftM| dkrtM| dkrtjtd3tRdSd4t jkr+ t j j d5tr+ tjS}|jd6dS|jTrW tjd7t j j&d8d9ndjg| D]}|j(^qd }tjtd:|tUjUjV}t jjtWd;|jXd<}d}d=} tM| dkr t jd>} tZ| | |||}n|jTs1 t[||| ||ntR|jTsN t\| ndS(?Ns Initial blacklisted packages: %sRs#Starting unattended upgrades scriptsAllowed origins are: %ss*Unattended-Upgrade::AutoFixInterruptedDpkgsDir::State::Statustlockis.Unclean dpkg state detected, trying to correctR9R8tdpkgs--force-confolds --configures-atenvsdpkg --configure -a output: %ss@Unclean dpkg state, but locked, another package manager working?s=Lock could not be acquired (another package manager running?)s'Cache lock can not be acquired, exitingiR Rs"Cache has broken packages, exitingisChecking: %s (%s)Rssanity check faileds?package '%s' upgradable but fails to be marked for upgrade (%s)tkeycSs|jS(N(R(tp((se/home/egon/devel/unattended-upgrades/build-area/unattended-upgrades-0.82.1/test/unattended_upgrade.pytss s/pkgs that look like they should be upgraded: %ssGetArchives() failed: '%s'sfetch.run() result: %ss%ssAn error occurred: '%s's)The URI '%s' failed to download, abortings-Download finished, but file '%s' not there?!?sUnattended-Upgrade::MailRsBPackage '%s' has conffile prompt and needs to be upgraded manuallys blacklist: %ssChecking (blacklist): %sspackage '%s' not upgradeds0dpkg is configured not to cause conffile promptss.Unattended-Upgrade::Remove-Unused-Dependenciessmarking %s for removes$Packages that are auto removed: '%s's'InstCount=%i DelCount=%i BrokenCount=%is1No packages found that can be upgraded unattendedt-UNATTENDED_UPGRADES_FORCE_INSTALL_ON_SHUTDOWNs%Unattended-Upgrade::InstallOnShutdowns1Configured to install on shutdown, so exiting nows5Option --dry-run given, *not* performing real actionssDebug::pkgDPkgPMRLs"Packages that will be upgraded: %ssunattended-upgrades-dpkg_%s.logR3is!/var/run/unattended-upgrades.lock(]RFR^RR_RRR3R)RsR*R+RTRqR'R(RmRtget_lockRURttcopyRRERt check_outputtCalledProcessErrortoutputRtpkgsystem_lockRR]RXtexitR RRtnicet ActionGroupRtis_auto_removableRRtgetattrRRRRRRRRtremoveRtsorttAcquireRR#ttexttAcquireProgresst SourceListtread_main_listt_recordstPackageManagert get_archivesR;RtitemsR5t STAT_ERRORt error_texttcompletetdesc_uriRAtdestfilet is_trustedRRRRt mark_deletet inst_countt del_countRgRSROtdatetimeR`RHt isoformatRRBR7Rd(!RR R5RR?tadmindirtlockfdRjRsRMRt actiongroupRR4Rtpkgs_auto_removableRR3tfetchertlisttrecstpmRtitemR%told_pkgs_to_upgradeRtnow_auto_removableR[R`R&R@Rb((se/home/egon/devel/unattended-upgrades/build-area/unattended-upgrades-0.82.1/test/unattended_upgrade.pytmainksf       !             #             %                            $      %   t__main__sunattended-upgradess/usr/share/locales-ds--debugtactiont store_truetdefaultthelpsprint debug messagess --apt-debugs,make apt/libapt print verbose debug messagess-vs --verbosesprint info messagess --dry-runs'Simulation, download but do not installs--minimal-upgrade-stepss<Upgrade in minimal steps (and allow interrupting with SIGINTs--minimal_upgrade_stepss+You need to be root to run this applicationi(aRpRR^t email.charsetR%R=RRRRRoR'R\RvR}RRXt email.messageRR3tioRtoptparseRRRRRRR*R0RRRqRqRRRt PROGRESS_LOGtPID_FILERURut ValueErrorR RR R#R$R%R!ReRsRxRR{R|RRRRRRRRRRRRRRRRR"R.R7RBRFRHR^R_RdRgRR t localesAppt localesDirtbindtextdomaint textdomaintparsert add_optiont parse_argsRtargstgetuidRutSIGHUPtSIG_IGN(((se/home/egon/devel/unattended-upgrades/build-area/unattended-upgrades-0.82.1/test/unattended_upgrade.pyts                   -]      , Q    Z     : % )                  unattended-upgrades-0.82.1ubuntu1/test/test_conffile.py0000775000000000000000000000635512250412747020156 0ustar #!/usr/bin/python3 import apt_pkg import logging import unittest from unattended_upgrade import ( conffile_prompt, dpkg_conffile_prompt, ) class ConffilePromptTestCase(unittest.TestCase): def setUp(self): apt_pkg.config.set("Dir::State::status", "./root.conffile/var/lib/dpkg/status") def test_will_prompt(self): # conf-test 0.9 is installed, 1.1 gets installed # they both have different config files test_pkg = "./packages/conf-test-package_1.1.deb" self.assertTrue(conffile_prompt(test_pkg, prefix="./root.conffile"), "conffile prompt detection incorrect") def test_will_not_prompt(self): # conf-test 0.9 is installed, 1.0 gets installed # they both have the same config files test_pkg = "./packages/conf-test-package_1.0.deb" self.assertFalse(conffile_prompt(test_pkg, prefix="./root.conffile"), "conffile prompt detection incorrect") def test_with_many_entries(self): # ensure we don't crash when encountering a conffile with overly # many entries test_pkg = "./packages/conf-test-package-257-conffiles_1.deb" self.assertFalse(conffile_prompt(test_pkg, prefix="./root.conffile"), "conffile prompt detection incorrect") def test_will_not_prompt_because_of_conffile_removal(self): # no conffiles anymore in the pkg test_pkg = "./packages/conf-test-package-no-conffiles-anymore_2.deb" self.assertFalse(conffile_prompt(test_pkg, prefix="./root.conffile"), "conffile prompt detection incorrect") def test_will_prompt_multiple(self): # multiple conffiles test_pkg = "./packages/multiple-conffiles_2_all.deb" self.assertTrue(conffile_prompt(test_pkg, prefix="./root.conffile"), "conffile prompt detection incorrect") def test_will_prompt_for_new_conffile(self): # debian bug #673237, a package that was not a conffile now # becomes a conffile test_pkg = "./packages/conf-test-package-new-conffile_1.deb" self.assertTrue(conffile_prompt(test_pkg, prefix="./root.conffile"), "conffile prompt detection incorrect") def test_xz_compression(self): test_pkg = "./packages/conf-test-xz_1.0_all.deb" self.assertFalse( conffile_prompt(test_pkg, prefix="./root.conffile"), "conffile prompt detection incorrect") class DpkgConffileTestCase(unittest.TestCase): """ This tests that the detection if dpkg will prompt at all works, i.e. if the user has decided to use a --force-conf{old,new} option """ def setUp(self): apt_pkg.config.clear("DPkg::Options") def test_no_dpkg_prompt_option(self): self.assertTrue(dpkg_conffile_prompt()) def test_regression_lp1061498(self): apt_pkg.config.set("DPkg::Options::", "muup") self.assertTrue(dpkg_conffile_prompt()) def test_dpkg_will_never_prompt(self): apt_pkg.config.set("DPkg::Options::", "--force-confold") self.assertFalse(dpkg_conffile_prompt()) if __name__ == "__main__": logging.basicConfig(level=logging.DEBUG) unittest.main() unattended-upgrades-0.82.1ubuntu1/test/unattended_upgrade.py0000777000000000000000000000000012301323623025060 2../unattended-upgradeustar unattended-upgrades-0.82.1ubuntu1/test/test_logdir.py0000775000000000000000000000262512250412747017645 0ustar #!/usr/bin/python3 import apt_pkg import logging import os import sys import tempfile import unittest sys.path.insert(0, "..") from unattended_upgrade import _setup_logging class MockOptions: dry_run = False debug = False verbose = False apt_debug = False class TestLogdir(unittest.TestCase): def setUp(self): self.tempdir = tempfile.mkdtemp() apt_pkg.init() self.mock_options = MockOptions() def test_logdir(self): # test log logdir = os.path.join(self.tempdir, "mylog") apt_pkg.config.set("Unattended-Upgrade::LogDir", logdir) logging.root.handlers = [] _setup_logging(self.mock_options) self.assertTrue(os.path.exists(logdir)) def test_logdir_depreated(self): # test if the deprecated APT::UnattendedUpgrades dir is not used # if the new UnaUnattendedUpgrades::LogDir is given logdir = os.path.join(self.tempdir, "mylog-use") logdir2 = os.path.join(self.tempdir, "mylog-dontuse") apt_pkg.config.set("Unattended-Upgrade::LogDir", logdir) apt_pkg.config.set("APT::UnattendedUpgrades::LogDir", logdir2) logging.root.handlers = [] _setup_logging(self.mock_options) self.assertTrue(os.path.exists(logdir)) self.assertFalse(os.path.exists(logdir2)) if __name__ == "__main__": logging.basicConfig(level=logging.DEBUG) unittest.main() unattended-upgrades-0.82.1ubuntu1/test/data/0000775000000000000000000000000012301323623015644 5ustar unattended-upgrades-0.82.1ubuntu1/test/data/listchanges.conf.pager0000664000000000000000000000014312250412747022123 0ustar [apt] frontend=pager email_address=root confirm=0 save_seen=/var/lib/apt/listchanges.db which=both unattended-upgrades-0.82.1ubuntu1/test/data/listchanges.conf.mail0000664000000000000000000000014212250412747021746 0ustar [apt] frontend=mail email_address=root confirm=0 save_seen=/var/lib/apt/listchanges.db which=both unattended-upgrades-0.82.1ubuntu1/test/data/50unattended-upgrades.compat0000664000000000000000000000033312250412747023171 0ustar // Automatically upgrade packages from these (origin:archive) pairs Unattended-Upgrade::Allowed-Origins { "Google, Inc.:stable"; "MoreCorp\, eink:stable"; "${distro_id}:${distro_codename}-security"; }; unattended-upgrades-0.82.1ubuntu1/test/data/50unattended-upgrades.Test0000664000000000000000000000032212250412747022623 0ustar // Automatically upgrade packages from these (origin, archive) pairs Unattended-Upgrade::Origins-Pattern { "o=aOrigin,a=aArchive"; "s=aSite,l=aLabel"; "o=Google\, Inc.,suite=stable"; }; unattended-upgrades-0.82.1ubuntu1/test/mock-sendmail0000775000000000000000000000003712250412747017415 0ustar #!/bin/sh cat - -- > mail.txt unattended-upgrades-0.82.1ubuntu1/test/test_against_real_archive.py0000664000000000000000000000623012250412747022510 0ustar #!/usr/bin/python3 """Test unattended_upgrades against the real archive in a chroot. Note that this test is not run by the makefile in this folder, as it requires network access, and it fails in some situations (unclear which). """ import apt import apt_pkg import glob import logging import os import re import unittest import unattended_upgrade apt_pkg.config.set("APT::Architecture", "amd64") class MockOptions(): def __init__(self, debug=True, dry_run=False): self.debug = debug self.dry_run = dry_run self.minimal_upgrade_steps = False self.verbose = False class TestAgainstRealArchive(unittest.TestCase): def setUp(self): for g in ["./aptroot/var/log/apt/*", "./aptroot/var/log/*"]: for f in glob.glob(g): if os.path.isfile(f): os.remove(f) # get a lucid based cache (test good until 04/2015) cache = apt.Cache(rootdir="./aptroot") cache.update() del cache # ensure apt does not do any post-invoke stuff that fails # (because we are not root) apt_pkg.config.clear("DPkg::Post-Invoke") apt_pkg.config.clear("DPkg::Pre-Invoke") unattended_upgrade.DISTRO_CODENAME = "lucid" def test_against_real_archive(self): # create mock options options = MockOptions(dry_run=False, debug=True) # run unattended-upgrades against fake system logdir = os.path.abspath("./aptroot/var/log/") logfile = os.path.join(logdir, "unattended-upgrades.log") apt_pkg.config.set("APT::UnattendedUpgrades::LogDir", logdir) # main res = unattended_upgrade.main(options, os.path.abspath("./aptroot")) logging.debug(res) # check if the log file exists self.assertTrue(os.path.exists(logfile)) with open(logfile) as fp: log = fp.read() # check that stuff worked self.assertFalse(" ERROR " in log, log) # check if we actually have the expected ugprade in it self.assertTrue( re.search("INFO Packages that will be upgraded:.*awstats", log)) # apt-doc has a higher version in -updates than in -security # and no other dependencies so its a perfect test self.assertTrue( re.search("INFO Packages that will be upgraded:.*apt-doc", log)) self.assertFalse( re.search("INFO Packages that will be upgraded:.*ant-doc", log)) self.assertTrue( re.search("DEBUG skipping blacklisted package 'ant-doc'", log)) # test dpkg install log #term_log = open("aptroot/var/log/apt/term.log").read() # FIXME: when we redirect STDIN the below test will break - however # we need to redirect it as otherwise we may hang forever # - this is actually a bug in apt that uses "tcgetattr(0, &tt)" # on FD=0 instead of FD=1 #print term_log #self.assertTrue( # re.search( # "fake-dpkg: --status-fd .* --configure.*awstats", term_log)) if __name__ == "__main__": import locale locale.setlocale(locale.LC_ALL, "C") unittest.main() unattended-upgrades-0.82.1ubuntu1/test/aptroot/0000775000000000000000000000000012301323623016423 5ustar unattended-upgrades-0.82.1ubuntu1/test/aptroot/etc/0000775000000000000000000000000012301323623017176 5ustar unattended-upgrades-0.82.1ubuntu1/test/aptroot/etc/apt/0000775000000000000000000000000012301323623017762 5ustar unattended-upgrades-0.82.1ubuntu1/test/aptroot/etc/apt/sources.list0000664000000000000000000000023712250412747022355 0ustar # updates deb http://archive.ubuntu.com/ubuntu/ lucid-updates main restricted # security deb http://security.ubuntu.com/ubuntu lucid-security main restricted unattended-upgrades-0.82.1ubuntu1/test/aptroot/etc/apt/apt.conf.d/0000775000000000000000000000000012301323623021714 5ustar unattended-upgrades-0.82.1ubuntu1/test/aptroot/etc/apt/apt.conf.d/50unattended-upgrades0000664000000000000000000000230512250412747025760 0ustar // Automatically upgrade packages from these (origin, archive) pairs Unattended-Upgrade::Allowed-Origins { "Ubuntu lucid-security"; }; // List of packages to not update Unattended-Upgrade::Package-Blacklist { // "vim"; // "libc6"; // "libc6-dev"; // "libc6-i686"; "ant-doc"; }; // Send email to this address for problems or packages upgrades // If empty or unset then no email is sent, make sure that you // have a working mail setup on your system. The package 'mailx' // must be installed or anything that provides /usr/bin/mail. //Unattended-Upgrade::Mail "root@localhost"; // Set this value to "true" to get emails only on errors. Default // is to always send a mail if Unattended-Upgrade::Mail is set //Unattended-Upgrade::MailOnlyOnError "true"; // Do automatic removal of new unused dependencies after the upgrade // (equivalent to apt-get autoremove) //Unattended-Upgrade::Remove-Unused-Dependencies "false"; // Automatically reboot *WITHOUT CONFIRMATION* if a // the file /var/run/reboot-required is found after the upgrade //Unattended-Upgrade::Automatic-Reboot "false"; // Use apt bandwidth limit feature, this example limits the download // speed to 70kb/sec //Acquire::http::Dl-Limit "70"; unattended-upgrades-0.82.1ubuntu1/test/aptroot/etc/apt/trusted.gpg0000664000000000000000000000665612250412747022201 0ustar AD?.F1ف|޼*Dea^*C:aRʚ_ ۓ6+ tjc1>8-b c ű)QP!}dmeCVEX(Q6W0$Xvð h#WZ7uē;mnTH"'9,-<RАF,Qb@q*pt %ieץ[P Fpi0~8\?Wځ][-Z)m$`+RaK)X_HұG6 #|9F< 'Kuϧ7 m-$7 (Cv,_b>b.(J>$aY1ʟn%8/V ];Ubuntu Archive Automatic Signing Key ^AD?  @nC}$SHW2ǒZ\6;yHNs *FAQg 1*}1!\dǖ)K&A9> eo㿍;ȰFC 膧$eǢIט;Yj܎/87`2vF% XIFCK j8xUV%5GJC@@zk>[k-a⒰FD( Tm.A\b\_:Np"ޤL)&*%椇 EƔ*(FE [l3;]XnX ȇ{ o2^Кb:X*t6,)e FE /m4 " `S:~ͦKK,d-nƯ]fFE0 y_?4WP0XpD1Zn阜N"} FEB  9`˧f (@s!K'8<VaKX;-ݡFE` .P焢"$t 伧V8ܦu-(qƟ4FEg| ~K\T|1r?sn'Ԕ#7%?}_ ^5El FE) Y҇K* )lGV2"VNF0 o7Yk|FE }Fj8EqװE=*Dr3>P]iZzFE1 >;_uL^wR_WfۑA}ʾCi@mlHFF 3L|BL4ues>\q7רMsFB 0kUDƑ< Scr{yuTMu (Q8O,ɔ *UOaFB P&<x\؍z{b"ǀmaЪ6#?I Ep % "J/푘5}_M I5xgn '1ZG4ƕ  ?'/[ @|}aϮ~D==W#z#Gg NTofy`CN@Ɓ6)@2k\1X 7Q)Y͊vli}1c~aG TPV>ޜ#u埂)"XjN-.``vR{4zB5W~Y*^ tAe z |e ̑i ^VrNT#m9ܗX!G-joq'm6!yPsL# 5T5M)L>9jbeaQtwlP?mC Zȃ#.8@ Zҫ϶z ZAxb"W4AGϚs>wϤB- ip6[~n@G\HDqkɓAz61oF3 (8!;p扗eVLd<5ل®hAq73֐ f7M˟jt ADG%KLQ똶@n$)fQKڊZ$Ri7oSyZ0EXyJ(bpq3ujr]Z<ײJyr- N;rȶ(j~VUlE! :&|;R LvhHU*!bάFf}g PD+ƓOBu&Jh,H/ b$=RM<m,;|LN1_O,V,V ذO9ikſ'+ ؀5ɟs郂A#z)"d0NV=Qm`qAB`ڤ5SKR-' hڑ rVUeJNН(ymg;t2B'3BDA==b%4+#LZ g{][uXa,/W mLCj8rG2t7=s(p]}:z6lz7N:b#۪Q~JH݈d#_=I ADG @nC}XOm{ tD325O z zwtunattended-upgrades-0.82.1ubuntu1/test/aptroot/var/0000775000000000000000000000000012301324003017204 5ustar unattended-upgrades-0.82.1ubuntu1/test/aptroot/var/log/0000775000000000000000000000000012301323623017774 5ustar unattended-upgrades-0.82.1ubuntu1/test/aptroot/var/lib/0000775000000000000000000000000012301323623017761 5ustar unattended-upgrades-0.82.1ubuntu1/test/aptroot/var/lib/dpkg/0000775000000000000000000000000012301323623020706 5ustar unattended-upgrades-0.82.1ubuntu1/test/aptroot/var/lib/dpkg/status0000664000000000000000000000324012250412747022164 0ustar Package: awstats Status: install ok installed Priority: extra Section: admin Installed-Size: 1260 Maintainer: Ubuntu Core Developers Architecture: all Version: 6.9~dfsg-1ubuntu3 Description: dummy Package: perl Status: install ok installed Priority: standard Section: perl Installed-Size: 18556 Maintainer: Ubuntu Developers Architecture: amd64 Version: 5.10.1-17ubuntu1 Description: Larry Wall's Practical Extraction and Report Language An interpreted scripting language, known among some as "Unix's Swiss Army Chainsaw". . Perl is optimised for scanning arbitrary text files and system administration. It has built-in extended regular expression matching and replacement, a data-flow mechanism to improve security with setuid scripts and is extensible via modules that can interface to C libraries. Package: ant-doc Status: install ok installed Priority: optional Section: doc Installed-Size: 35776 Maintainer: Ubuntu Core Developers Architecture: all Version: 1.0 Description: Java based build tool like make - API documentation and manual A system independent (i.e. not shell based) build tool that uses XML files as "Makefiles". This package contains the manual of ant as well as the Javadoc API documentation. Package: apt-doc Status: install ok installed Priority: optional Section: doc Installed-Size: 388 Maintainer: Ubuntu Developers Architecture: all Version: 0.7.25.3ubuntu9 Description-en_GB: Documentation for APT This package contains the user guide and offline guide, for APT, an Advanced Package Tool. unattended-upgrades-0.82.1ubuntu1/test/aptroot/var/lib/dpkg/updates/0000775000000000000000000000000012301323623022353 5ustar unattended-upgrades-0.82.1ubuntu1/test/aptroot/usr/0000775000000000000000000000000012301323623017234 5ustar unattended-upgrades-0.82.1ubuntu1/test/aptroot/usr/bin/0000775000000000000000000000000012301323623020004 5ustar unattended-upgrades-0.82.1ubuntu1/test/aptroot/usr/bin/dpkg0000775000000000000000000000055512250412747020675 0ustar #!/bin/sh # needed for apt to figure out the multiarch state if [ "$1" = "--print-foreign-architectures" ]; then exec dpkg $@ fi # we are just pretending echo "fake-dpkg: $@" # this should probably split into a seperate part read -p "FAKE PROMPT TO ENSURE WE DO NOT BLOCK ON READS - if its handing here, the stdin close did not work" INPUT echo "READ: $INPUT" unattended-upgrades-0.82.1ubuntu1/test/.coverage0000664000000000000000000001040612301324003016521 0ustar }q(U collectorqU coverage v3.7qUlinesq}q(U#/usr/share/pyshared/apt/__init__.pyq]q(KKKKKKKKK!K"K#K%eU /usr/share/pyshared/apt/cdrom.pyq]q (KKKKKKK.K0K?KCKGeU\/home/egon/devel/unattended-upgrades/build-area/unattended-upgrades-0.82.1/test/test_mail.pyq ]q (KKKKKK K K KKKKKKKKKK K"K#K$K%K'K)K*K+K-K1K2K3K4K5K7K8K9K;KK?KBKCKDKEKFKHKIKJKKKLKMKNKPKSKTKUKVKWKYKZK[K\K^K_K`KaKbKcKdKeKfKgKhKjKlKmKnKpKqKrKuKwKxKyK{K|K}KKKKKKKKKKKKKKKKKKKKKKKKKKeU`/home/egon/devel/unattended-upgrades/build-area/unattended-upgrades-0.82.1/test/test_conffile.pyq ]q (KKKKK KKKKKKKKKKKK!K$K%K&K(K*K+K,K.K0K1K2K4K7K8K9K;KK?KBKFKHKIKKKLKNKOKPKRKSKTKWKXKYeU(/usr/share/pyshared/apt/progress/text.pyq]q(KKKKKKKKKK"K*K+K-K1KBKFKHKMKUK]K^K`KgKtK~KKKKKKKKKMeU,/usr/share/pyshared/apt/progress/__init__.pyq]q(KKKeU`/home/egon/devel/unattended-upgrades/build-area/unattended-upgrades-0.82.1/test/test_pyflakes.pyq]q(KKKKKK K K K KKKKeUb/home/egon/devel/unattended-upgrades/build-area/unattended-upgrades-0.82.1/test/test_substitute.pyq]q(KKKKKK K KKKKKKKKKKKKK!K"K#eU(/usr/share/pyshared/apt/progress/base.pyq]q(KKKKKKKK K"K$K'K,K/K0K2K5K8K;KCKPK\K_K`KaKbKcKdKeKfKhKlKrKtKvK}KKKKKKKKKKKKKKKKKKKKKKKKKKKKKMM MMMMMMMMMM"M%M(M*M,M2M3M5eU"/usr/share/pyshared/apt/package.pyq]q(KKKKKKKKK K#K$K%K'K)K*K+K-K.K0K4K;KK@KAKBKCKFKGKJKMKNKQKSKYK^K~KKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKMMMMM M MMMMMMMMMMM M!M"M%M*M+M,M-M0M6M7M8M9M:M<M=M?M@MDMGMHMIMJMKMLMMMOMPMQMTMUMVMWMXMYM\MpMrMsMvMyM|M}MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM M M MMMMMMMMMMMMMMMM M$M%M'M(M+M,M-M.M/M2M4M5M8M:M;M<M=M?MAMBMCMEMFMHMIMLMMMRMVMWMXMYMZM[M\M]M^M_M`McMdMfMgMhMiMjMkMnMpMqMuMvM{M|M}M~MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM!M"M#M%M&M'M*M,M0M1M2M3M4M6M7M9M:M<M=M>M@MAMBMEMIMMMPMSMWMeMkM{euu.unattended-upgrades-0.82.1ubuntu1/test/create_debug_lock.py0000664000000000000000000000044412250412747020741 0ustar #!/usr/bin/python3 # # create a lock file so that unattended-upgrades-shutdown pauses # on shutdown -- useful for testing import apt_pkg import os import time pid = os.fork() if pid == 0: os.setsid() lock = apt_pkg.get_lock("/var/run/unattended-upgrades.lock") time.sleep(500) unattended-upgrades-0.82.1ubuntu1/test/packages/0000775000000000000000000000000012301323623016511 5ustar unattended-upgrades-0.82.1ubuntu1/test/packages/conf-test-package_1.1.deb0000664000000000000000000000115212250412747023047 0ustar ! debian-binary 1102431155 0 0 100644 4 ` 2.0 control.tar.gz 1102431155 0 0 100644 231 ` A P=eĝ7p50јm 1;5*3VAK"24.J)_{w>=d?"/|w i]>_/m9?.TvE`ͮ?C&/\c<_5_6O8p/N] 1 `%)l๏=׶ zP( data.tar.gz 1102431155 0 0 100644 194 ` A 0@Ѭ=Ej&V޾BM E Hm̲-S2gJDXeD4bZew׏OQ8$X _]\Mߝ릭~?Mkt^ 7_QϧO;8AmoapHwz(unattended-upgrades-0.82.1ubuntu1/test/packages/conf-test-package_1.0.deb0000664000000000000000000000116012250412747023045 0ustar ! debian-binary 1102431070 0 0 100644 4 ` 2.0 control.tar.gz 1102431070 0 0 100644 234 ` Aj0a} ] G6dtսJjj"_9ŴZ FڈQ3E߻ޙuε[2Sw0gIk$rOEGM.0Ƽi]w>#}//J\%\paP) 4߹/-G^9,)\FQT)<̩pwy(?(data.tar.gz 1102431070 0 0 100644 197 ` 1 0@̞"h5Foѩ6 4}uBۥdI^DNMSV=΅J[fh#h!8R ùoE'U*Sd߮]ƾ wƵy5/W7ie_m{#SWe( unattended-upgrades-0.82.1ubuntu1/test/packages/conf-test-package-new-conffile_1.deb0000664000000000000000000000120012250412747025254 0ustar ! debian-binary 1340909130 0 0 100644 4 ` 2.0 control.tar.gz 1340909130 0 0 100644 235 ` ջ08D_*F_b`(unattended-upgrades-0.82.1ubuntu1/test/packages/conf-test-package-257-conffiles_1.deb0000664000000000000000000000300612250412747025171 0ustar ! debian-binary 1302078781 0 0 100644 4 ` 2.0 control.tar.gz 1302078781 0 0 100644 1119 ` klSem VF@o2 ڞ^VF ".JYTH&^ !hp^D]"bILD3IۭBV䳓9O9H8lp@eaWU;drtʉ$nc7%:>B6$⍍1;5*[?Nt<^iMdiN+35\g/>cP*iES*i\+*TMZt1bXU-u8`@F9N2 gB?_rH]vSֿ窳).jj w4;vNH,+ϟxRKrO~>]_Zw7gjg _y+x8iӞި}DZQ;ZnkJFv$Vof!f^;{ܚ9xLEQ7irf e)n(((8mf9ۂc@ EQEQEQED{̏ʍمx#:\i(Co1#hG# Q#6J܅[p5=; R܆٘8v1cQ?·A1;X̃Lp%bzJً.5QC?5slxwb@Jpt1{ )ԣQbc ˰s$mtc3֡-XjT_;q/zX8=>xh1s 9ԗ_Z; UhEӊ UB+H>hgl<o]?Ho[ЉЂ1x +D=f2L1fCZը@ vl*PLG9z ˰s$?nE?»x"P)x"[q .E~ߋO܎Ps}~|7acp3gr1G6/w]ʈ.8/ F>D}[ ]5oa(((((?x data.tar.gz 1302078781 0 0 100644 229 ` M 0Y93I&+/PJBiօ7EZB $/8*Qz mi?(}wG?*/*foYXۈnlC96}4m?xBV2_N$,΋e7?ٛ,l՛.g4k?x <.( unattended-upgrades-0.82.1ubuntu1/test/packages/multiple-conffiles_1_all.deb0000664000000000000000000000122412250412747024046 0ustar ! debian-binary 1304007483 0 0 100644 4 ` 2.0 control.tar.gz 1304007483 0 0 100644 236 ` ͎ p} ^o'`%Eujv7em>8Q. #RJD]kʽѺe\lݻU7nhu=KD9tq/][ s9 T=IȊƸ9ֺ/5?1SP|ܯ9բ$wٻ<ƈE[Hf<(data.tar.gz 1304007483 0 0 100644 232 ` M0{iIz Ws(-c'" B 2@> r&;R;s_(|%bMOϵS+XV0v"̻b_t.VB6 m)_+N:FO!M^ߌ>&˶Cu debian-binary 1304007541 0 0 100644 4 ` 2.0 control.tar.gz 1304007541 0 0 100644 236 ` = p枂 Z JPz:Q~CI [duUWD>Ƅuz<}WR(B4F(%w>4C<:oUM:ɗO/$B+m4+)>/^l?<_O璡[ks֝me]͗AvaLo)/lEki=(data.tar.gz 1304007541 0 0 100644 246 ` j0}ja6] F4.Jhm*3|=؝JK-?o֦`VR雷)T#~{SifCf!YuX68%FD;?hq  C2:ۤ޺fȯgn4ڪ/h>zed[(unattended-upgrades-0.82.1ubuntu1/test/packages/conf-test-package-no-conffiles-anymore_2.deb0000664000000000000000000000114612250412747026744 0ustar ! debian-binary 1302079336 0 0 100644 4 ` 2.0 control.tar.gz 1302079336 0 0 100644 191 ` M@Z}cWJfBbH2 uQx(}VVk0ۯD՚jهւ8̹KIO㣿gUniiVοm&լnt)U[俺?us9ys4Jc/i놡Vs( data.tar.gz 1302079336 0 0 100644 229 ` M 0Y93I&+/PJBiօ7EZB $/8*Qz mi?(}wG?*/*foYXۈnlC96}4m?xBV2_N$,΋e7?ٛ,l՛.g4k?x <.( unattended-upgrades-0.82.1ubuntu1/test/packages/conf-test-xz_1.0_all.deb0000664000000000000000000000124612250412747022750 0ustar ! debian-binary/ 1358746555 1000 1000 100644 4 ` 2.0 control.tar.gz/ 1358746555 1000 1000 100644 234 ` Aj0a} ] G6dtսJjj"_9ŴZ FڈQ3E߻ޙuε[2Sw0gIk$rOEGM.0Ƽi]w>#}//J\%\paP) 4߹/-G^9,)\FQT)<̩pwy(?(data.tar.xz/ 1358746555 1000 1000 100644 252 ` 7zXZִF!t/'] }1Dd]Ptwb4YFI9# U "N2E0W]t-J':r50jRt'uQ UigZeWe%'|P1 B[0,ij:iZ]=d2ќкDqt&fB5Ry 8:UQO.1 xPgYZunattended-upgrades-0.82.1ubuntu1/test/test_reboot.py0000664000000000000000000000225012250412747017646 0ustar #!/usr/bin/python import apt_pkg import logging import unittest import os from mock import ( patch, ) import unattended_upgrade class RebootTestCase(unittest.TestCase): def setUp(self): # create reboot required file REBOOT_REQUIRED_FILE = "./reboot-required" with open(REBOOT_REQUIRED_FILE, "w"): pass self.addCleanup(lambda: os.remove(REBOOT_REQUIRED_FILE)) unattended_upgrade.REBOOT_REQUIRED_FILE = REBOOT_REQUIRED_FILE # enable automatic-reboot apt_pkg.config.set("Unattended-Upgrade::Automatic-Reboot", "1") @patch("subprocess.call") def test_reboot_now(self, mock_call): unattended_upgrade.reboot_if_requested_and_needed() mock_call.assert_called_with(["/sbin/shutdown", "-r", "now"]) @patch("subprocess.call") def test_reboot_time(self, mock_call): apt_pkg.config.set( "Unattended-Upgrade::Automatic-Reboot-Time", "03:00") unattended_upgrade.reboot_if_requested_and_needed(0) mock_call.assert_called_with(["/sbin/shutdown", "-r", "03:00"]) if __name__ == "__main__": logging.basicConfig(level=logging.DEBUG) unittest.main() unattended-upgrades-0.82.1ubuntu1/test/test_in_chroot.py0000664000000000000000000002030712250412747020343 0ustar #!/usr/bin/python3 import apt import logging import glob import os import re import shutil import subprocess import sys import time import unittest # debian #SOURCES_LIST=""" #deb http://ftp.de.debian.org/debian squeeze main contrib non-free #deb http://ftp.de.debian.org/debian squeeze-updates main contrib non-free #deb http://ftp.de.debian.org/debian squeeze-proposed-updates main contrib \ # non-free #deb http://security.debian.org squeeze/updates main contrib non-free #""" #DISTRO="squeeze" #ARCH="i386" #TARBALL="%s-%s.tgz" % (DISTRO, ARCH) #MIRROR="http://ftp.de.debian.org/debian" #APT_CONF="""APT::Architecture "%s";""" % ARCH #ORIGINS_PATTERN="origin=Debian,archive=stable,label=Debian-Security" # ubuntu SOURCES_LIST = """ deb http://archive.ubuntu.com/ubuntu/ lucid main restricted deb-src http://archive.ubuntu.com/ubuntu/ lucid main restricted deb http://archive.ubuntu.com/ubuntu/ lucid-updates main restricted deb-src http://archive.ubuntu.com/ubuntu/ lucid-updates main restricted deb http://security.ubuntu.com/ubuntu/ lucid-security main restricted deb-src http://security.ubuntu.com/ubuntu/ lucid-security main restricted """ DISTRO = "lucid" ARCH = "i386" TARBALL = "%s-%s.tgz" % (DISTRO, ARCH) MIRROR = "http://archive.ubuntu.com/ubuntu" APT_CONF = """APT::Architecture "%s";""" % ARCH ORIGINS_PATTERN = "origin=Ubuntu,archive=lucid-security" apt.apt_pkg.config.set("APT::Architecture", ARCH) sys.path.insert(0, "..") import unattended_upgrade class MockOptions(object): debug = True dry_run = False minimal_upgrade_steps = False class TestUnattendedUpgrade(unittest.TestCase): def _create_new_debootstrap_tarball(self, tarball, target): print("creating initial test tarball, this is needed only once") # force i386 subprocess.call( ["debootstrap", "--arch=%s" % ARCH, # smaller version of the minimal system "--variant=minbase", "--include=python-apt,apt-utils,gpgv,ubuntu-keyring," "ca-certificates", DISTRO, target, MIRROR]) subprocess.call(["chroot", target, "apt-get", "clean"]) subprocess.call(["tar", "czf", tarball, target]) def _unpack_debootstrap_tarball(self, tarball, target): subprocess.call(["tar", "xzf", tarball]) def test_normal_upgrade(self): print("Running normal unattended upgrade in chroot") options = MockOptions() options.minimal_upgrade_steps = False # run it target = self._run_upgrade_test_in_real_chroot(options) # ensure we upgraded the expected packages self.assertTrue(self._verify_install_log_in_real_chroot(target)) def test_minimal_steps_upgrade(self): print("Running minimal steps unattended upgrade in chroot") options = MockOptions() options.minimal_upgrade_steps = True # run it target = self._run_upgrade_test_in_real_chroot(options) # ensure we upgraded the expected packages self.assertTrue(self._verify_install_log_in_real_chroot(target)) def test_upgrade_on_shutdown_upgrade(self): print("Running unattended upgrade on shutdown (download and install) " "in chroot") # ensure that it actually installs in shutdown env mode options = MockOptions() os.environ["UNATTENDED_UPGRADES_FORCE_INSTALL_ON_SHUTDOWN"] = "1" apt.apt_pkg.config.set("Unattended-Upgrade::InstallOnShutdown", "1") target = self._run_upgrade_test_in_real_chroot(options) self.assertTrue(self._verify_install_log_in_real_chroot(target)) def _get_lockfile_location(self, target): return os.path.join( target, "var/log/unattended-upgrades/unattended-upgrades.log") def _setup_chroot(self, target): """ helper that setups a clean chroot """ if os.path.exists(target): subprocess.call(["umount", os.path.join(target, "dev", "pts")]) shutil.rmtree(target) if not os.path.exists(TARBALL): self._create_new_debootstrap_tarball(TARBALL, target) # create new self._unpack_debootstrap_tarball(TARBALL, target) open(os.path.join(target, "etc/apt/apt.conf"), "w").write(APT_CONF) open(os.path.join(target, "etc/apt/sources.list"), "w").write( SOURCES_LIST) def _run_upgrade_test_in_real_chroot(self, options, clean_chroot=True): """ helper that runs the unattended-upgrade in a chroot and does some basic verifications """ if os.getuid() != 0: print("Skipping because uid != 0") return # clear to avoid pollution in the chroot apt.apt_pkg.config.clear("Acquire::http::ProxyAutoDetect") # create chroot target = "./test-chroot.%s" % DISTRO # setup chroot if needed if clean_chroot: self._setup_chroot(target) # ensure we have /dev/pts in the chroot ret = subprocess.call(["mount", "-t", "devpts", "devptsfs", os.path.join(target, "dev", "pts")]) if ret != 0: raise Exception("Failed to mount %s/proc" % target) self.addCleanup( lambda: subprocess.call( ["umount", os.path.join(target, "dev", "pts")])) # and run the upgrade test pid = os.fork() if pid == 0: # chroot os.chroot(target) os.chdir("/") if not os.path.exists("/var/log/unattended-upgrades/"): os.makedirs("/var/log/unattended-upgrades/") # make sure we are up-to-date subprocess.call(["apt-get", "update", "-q", "-q"]) # run it apt.apt_pkg.config.clear("Unattended-Upgrade::Allowed-Origins") apt.apt_pkg.config.clear("Unattended-Upgrade::Origins-Pattern") apt.apt_pkg.config.set( "Unattended-Upgrade::Origins-Pattern::", ORIGINS_PATTERN) unattended_upgrade.DISTRO_CODENAME = "lucid" unattended_upgrade.main(options) os._exit(0) else: has_progress = False all_progress = "" last_progress = "" progress_log = os.path.join( target, "var/run/unattended-upgrades.progress") while True: time.sleep(0.01) if os.path.exists(progress_log): progress = open(progress_log).read() if progress and progress != last_progress: has_progress = progress.startswith("Progress") last_progress = progress all_progress += progress # check exit status (apid, status) = os.waitpid(pid, os.WNOHANG) if pid == apid: ret = os.WEXITSTATUS(status) break #print("*******************", all_progress) self.assertEqual(ret, 0) # this number is a bit random, we just want to be sure we have # progress data self.assertTrue(has_progress, True) self.assertTrue(len(all_progress) > 5) return target def _verify_install_log_in_real_chroot(self, target): # examine log log = self._get_lockfile_location(target) logfile = open(log).read() #print(logfile) NEEDLE_PKG = "ca-certificates" if not re.search("Packages that will be upgraded:.*%s" % NEEDLE_PKG, logfile): logging.warn( "Can not find expected %s upgrade in log" % NEEDLE_PKG) return False if "ERROR Installing the upgrades failed" in logfile: logging.warn("Got a ERROR in the logfile") return False dpkg_log = os.path.join( target, "var/log/unattended-upgrades/*-dpkg*.log") dpkg_logfile = open(glob.glob(dpkg_log)[0]).read() if not "Preparing to replace %s" % NEEDLE_PKG in dpkg_logfile: logging.warn("Did not find %s upgrade in the dpkg.log" % NEEDLE_PKG) return False #print(dpkg_logfile) return True if __name__ == "__main__": #logging.basicConfig(level=logging.DEBUG) unittest.main() unattended-upgrades-0.82.1ubuntu1/test/test_log_install_progress.py0000664000000000000000000000145512250412747022615 0ustar #!/usr/bin/python import apt_pkg import logging import os import sys import tempfile import unittest sys.path.insert(0, "..") from unattended_upgrades import _setup_logging class MockOptions: dry_run = False debug = False verbose = False class TestLogInstallProgress(unittest.TestCase): def setUp(self): self.tempdir = tempfile.mkdtemp() apt_pkg.init() self.mock_options = MockOptions() def test_log_installprogress(self): logdir = os.path.join(self.tempdir, "mylog") apt_pkg.config.set("Unattended-Upgrade::LogDir", logdir) logging.root.handlers = [] _setup_logging(self.mock_options) self.assertTrue(os.path.exists(logdir)) if __name__ == "__main__": logging.basicConfig(level=logging.DEBUG) unittest.main() unattended-upgrades-0.82.1ubuntu1/test/test_pyflakes.py0000775000000000000000000000105312250412747020175 0ustar import os import subprocess import unittest class TestPyflakesClean(unittest.TestCase): """ ensure that the tree is pyflakes clean """ def test_pyflakes_clean(self): top_src_dir = os.path.join(os.path.dirname(__file__), "..") targets = [ top_src_dir, os.path.join(top_src_dir, "unattended-upgrade"), os.path.join(top_src_dir, "unattended-upgrade-shutdown"), ] self.assertEqual(subprocess.call(["pyflakes", ] + targets), 0) if __name__ == "__main__": unittest.main() unattended-upgrades-0.82.1ubuntu1/test/test_pep8.py0000775000000000000000000000077612250412747017246 0ustar import os import subprocess import unittest class PackagePep8TestCase(unittest.TestCase): def test_pep8_clean(self): top_src_dir = os.path.join(os.path.dirname(__file__), "..") targets = [ top_src_dir, os.path.join(top_src_dir, "unattended-upgrade"), os.path.join(top_src_dir, "unattended-upgrade-shutdown"), ] self.assertEqual(subprocess.call(["pep8", "--repeat", ] + targets), 0) if __name__ == "__main__": unittest.main() unattended-upgrades-0.82.1ubuntu1/test/test_substitute.py0000775000000000000000000000220112250412747020566 0ustar #!/usr/bin/python3 import apt_pkg import logging import unittest import unattended_upgrade from unattended_upgrade import substitute, get_allowed_origins class TestSubstitude(unittest.TestCase): def setUp(self): # monkey patch DISTRO_{CODENAME, ID} unattended_upgrade.DISTRO_CODENAME = "nacked" unattended_upgrade.DISTRO_ID = "MyDistroID" def testSubstitute(self): """ test if the substitute function works """ self.assertTrue(substitute("${distro_codename}-updates"), "nacked-updates") self.assertTrue(substitute("${distro_id}"), "MyDistroID") def test_get_allowed_origins_with_substitute(self): """ test if substitute for get_allowed_origins works """ apt_pkg.config.clear("Unattended-Upgrade::Allowed-Origins") apt_pkg.config.set("Unattended-Upgrade::Allowed-Origins::", "${distro_id} ${distro_codename}-security") l = get_allowed_origins() self.assertTrue(("o=MyDistroID,a=nacked-security") in l) if __name__ == "__main__": logging.basicConfig(level=logging.DEBUG) unittest.main() unattended-upgrades-0.82.1ubuntu1/test/root.conffile/0000775000000000000000000000000012301323623017502 5ustar unattended-upgrades-0.82.1ubuntu1/test/root.conffile/etc/0000775000000000000000000000000012301323623020255 5ustar unattended-upgrades-0.82.1ubuntu1/test/root.conffile/etc/configuration-file10000664000000000000000000000006012250412747024052 0ustar This is a first configuration file, No really. unattended-upgrades-0.82.1ubuntu1/test/root.conffile/etc/configuration-file20000664000000000000000000000011712250412747024056 0ustar This is a second configuration file, It is modified by the user. by the user. unattended-upgrades-0.82.1ubuntu1/test/root.conffile/etc/configuration-file50000664000000000000000000000000512250412747024055 0ustar lala unattended-upgrades-0.82.1ubuntu1/test/root.conffile/etc/configuration-file0000664000000000000000000000006612250412747023777 0ustar This is a configuration file, dfasddfasdff No really. unattended-upgrades-0.82.1ubuntu1/test/root.conffile/var/0000775000000000000000000000000012301323623020272 5ustar unattended-upgrades-0.82.1ubuntu1/test/root.conffile/var/lib/0000775000000000000000000000000012301323623021040 5ustar unattended-upgrades-0.82.1ubuntu1/test/root.conffile/var/lib/dpkg/0000775000000000000000000000000012301323623021765 5ustar unattended-upgrades-0.82.1ubuntu1/test/root.conffile/var/lib/dpkg/status0000664000000000000000000000122112250412747023240 0ustar Package: test-package Status: install ok installed Architecture: all Version: 0.9 Conffiles: /etc/not-available-config-file 99b99d59ac8f5ecd3375107755ee8599 /etc/configuration-file 26b99d59ac8f5ecd3375107755ee8527 /etc/not-available-config-file2 88b99d59ac8f5ecd3375107755ee8588 /etc/configuration-file2 404d877bbd67dc2412ba80d7c92d6bc7 Package: multiple-conffiles Status: install ok installed Architecture: all Version: 1.0 Conffiles: /etc/configuration-file1 cb9a458f0fdc96e10b4d23923f16e3a0 /etc/configuration-file2 8bf10a884dcfe6a8c3e57039e14d2b92 Package: test-package-new-conffile Status: install ok installed Architecture: all Version: 0.9 unattended-upgrades-0.82.1ubuntu1/unattended-upgrade-shutdown.pyc0000664000000000000000000001035212317031601022122 0ustar  Rc @sddlZddlZddlZddlZddlZddlZddlZddlZddlZ ddl m Z ddlmZ yddl Z Wn!ejdejdnXdZdZejdZd Zed krd Zd Zejeeejee Zejd ddddddeddejd dddddejd dddddej\ZZej Z!ej"rej#Z!ne j$j%ddZ&e j'j(e&se j)e&ne j'j*e&dZ+ej,de+d e!d!d"dZ.e j/e j$j0d#ereje j1Z2d$e2d%Z?ej"d.e?e j@e?ejAneej6d*eje7ejBd/krejCe d0ejBejd1qqWe8ree d2ej nejdndS(3iN(t OptionParser(tgettexts$importing of apt_pkg failed, exitingicCsOtjjdrKtjdtjdd|gtjddgndS(Ns/sbin/usplash_writesRunning usplash_writetTEXTtPULSATE(tostpathtexiststloggingtdebugt subprocesstcall(tmsg((sunattended-upgrade-shutdown.pyt do_usplash1s cCs?tjjdr;tjdtjddd|gndS(Ns /bin/plymouthsRunning plymouth --texttmessages--text(RRRRRR R (R ((sunattended-upgrade-shutdown.pyt do_plymouth8s cCs(tj||t|t|dS(s: helper that will print msg to usplash, plymouth, console N(RtlogRR (R tlevel((sunattended-upgrade-shutdown.pytlog_msg>s cCsOtd}d}tjj|rA|dt|j7}nt|dS(s- helper to log the install progress (if any) s?Unattended-upgrade in progress during shutdown, sleeping for 5ss%/var/run/unattended-upgrades.progresss N(t_RRRtopentreadR(R tprogress((sunattended-upgrade-shutdown.pyt log_progressEs  t__main__sunattended-upgradess/usr/share/localets--debugtactiont store_truetdestRtdefaultthelpsprint debug messagess--delayi s0delay in minutes to wait for unattended-upgradess --lock-files!/var/run/unattended-upgrades.lockslock file locationsUnattended-Upgrade::LogDirs/var/log/unattended-upgrades/s unattended-upgrades-shutdown.logtfilenameRtformats'%(asctime)s %(levelname)s - %(message)ss%Unattended-Upgrade::InstallOnShutdownt1t-UNATTENDED_UPGRADES_FORCE_INSTALL_ON_SHUTDOWNs-starting unattended-upgrades in shutdown modesunattended-upgradetenvs,Running unattended-upgrades in shutdown modeisget_lock returned %islock not takens /var/run/unattended-upgrades.pids(found running unattended-upgrades pid %si<s$Giving up on lockfile after %s delayisAll upgrades installed(DtcopytsignaltsysttimeRtlogging.handlersRR tos.pathRtoptparseRRtapt_pkgt exceptiontexitR RtWARNRRt__name__t localesAppt localesDirtbindtextdomaint textdomaintparsert add_optiontFalset parse_argstoptionstargstINFORRtDEBUGtconfigtfind_dirtlogdirRRtmakedirstjointlogfilet basicConfigtNonetpt init_configtfind_btenvironR"tPopentTruetpolltsleept start_timetlock_was_takentget_lockt lock_filetrestintRRtpidtkilltSIGUSR1tdelaytwarning(((sunattended-upgrade-shutdown.pyts                              unattended-upgrades-0.82.1ubuntu1/TODO0000664000000000000000000000030312250412747014451 0ustar * add option to ignore trust? * package make have some logrotate magic in place for both unattended-upgrades.log and unatteded-upgrades-dpkg_$(date).log * package execution hooks * whitelist unattended-upgrades-0.82.1ubuntu1/unattended-upgrade-shutdown0000775000000000000000000001257412250412747021355 0ustar #!/usr/bin/python3 # Copyright (c) 2009 Canonical Ltd # # AUTHOR: # Michael Vogt # # unattended-upgrade-shutdown - helper that checks if a # unattended-upgrade is in progress and waits until it exists # # This file is part of unattended-upgrades # # unattended-upgrades is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License as published # by the Free Software Foundation; either version 2 of the License, or (at # your option) any later version. # # unattended-upgrades is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License # along with unattended-upgrades; if not, write to the Free Software # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA # import copy import signal import sys import time import logging import logging.handlers import gettext import subprocess import os.path from optparse import OptionParser from gettext import gettext as _ try: import apt_pkg except: # if there is no python-apt no unattended-upgrades can run so not # need to stop the shutdown logging.exception("importing of apt_pkg failed, exiting") sys.exit(0) def do_usplash(msg): if os.path.exists("/sbin/usplash_write"): logging.debug("Running usplash_write") subprocess.call(["/sbin/usplash_write", "TEXT", msg]) subprocess.call(["/sbin/usplash_write", "PULSATE"]) def do_plymouth(msg): if os.path.exists("/bin/plymouth"): logging.debug("Running plymouth --text") subprocess.call(["/bin/plymouth", "message", "--text", msg]) def log_msg(msg, level=logging.WARN): """ helper that will print msg to usplash, plymouth, console """ logging.log(level, msg) do_plymouth(msg) do_usplash(msg) def log_progress(): """ helper to log the install progress (if any) """ # wait a some seconds and try again msg = _("Unattended-upgrade in progress during shutdown, " "sleeping for 5s") # progress info progress = "/var/run/unattended-upgrades.progress" if os.path.exists(progress): msg += "\n" + open(progress).read() # log it log_msg(msg) if __name__ == "__main__": # setup gettext localesApp = "unattended-upgrades" localesDir = "/usr/share/locale" gettext.bindtextdomain(localesApp, localesDir) gettext.textdomain(localesApp) parser = OptionParser() parser.add_option("", "--debug", action="store_true", dest="debug", default=False, help="print debug messages") parser.add_option("", "--delay", default=10, help="delay in minutes to wait for unattended-upgrades") parser.add_option("", "--lock-file", default="/var/run/unattended-upgrades.lock", help="lock file location") (options, args) = parser.parse_args() # setup logging level = logging.INFO if options.debug: level = logging.DEBUG # use a normal logfile instead of syslog too as on shutdown its too # easy to get syslog killed logdir = apt_pkg.config.find_dir( "Unattended-Upgrade::LogDir", "/var/log/unattended-upgrades/") if not os.path.exists(logdir): os.makedirs(logdir) logfile = os.path.join(logdir, "unattended-upgrades-shutdown.log") logging.basicConfig(filename=logfile, level=level, format="%(asctime)s %(levelname)s - %(message)s") # check if we need to run unattended-upgrades on shutdown and if so, # run it p = None apt_pkg.init_config() if apt_pkg.config.find_b("Unattended-Upgrade::InstallOnShutdown", False): env = copy.copy(os.environ) env["UNATTENDED_UPGRADES_FORCE_INSTALL_ON_SHUTDOWN"] = "1" logging.debug("starting unattended-upgrades in shutdown mode") p = subprocess.Popen(["unattended-upgrade"], env=env) log_msg(_("Running unattended-upgrades in shutdown mode")) while True: log_progress() if p.poll() is not None: break time.sleep(5) # run the monitoring loop and keep the "UI" updated start_time = time.time() lock_was_taken = False while True: res = apt_pkg.get_lock(options.lock_file) logging.debug("get_lock returned %i" % res) # exit here if there is no lock if res > 0: logging.debug("lock not taken") break lock_was_taken = True # signal unattended-upgrades to stop p = "/var/run/unattended-upgrades.pid" if os.path.exists(p): pid = int(open(p).read()) logging.debug("found running unattended-upgrades pid %s" % pid) os.kill(pid, signal.SIGUSR1) # show log log_progress() time.sleep(5) if (time.time() - start_time) > options.delay*60: logging.warning(_("Giving up on lockfile after %s delay") % options.delay) sys.exit(1) # add finished info to the log/terminal to help tracking down # LP: #434835 if lock_was_taken: # re-use existing string log_msg(_("All upgrades installed"), logging.INFO) sys.exit(0) unattended-upgrades-0.82.1ubuntu1/__pycache__/0000775000000000000000000000000012317031600016162 5ustar unattended-upgrades-0.82.1ubuntu1/__pycache__/unattended-upgrade-shutdown.cpython-33.pyc0000664000000000000000000001102012301324006026226 0ustar R|c@sddlZddlZddlZddlZddlZddlZddlZddlZddlZ ddl m Z ddlmZ yddl Z Wn"ejdejdYnXddZddZejd d Zd d Zed krdZdZejeeejee Zejdddddddd6ddejddddddejddddddej\ZZej Z!ej"rej#Z!ne j$j%dd Z&e j'j(e&se j)e&ne j'j*e&d!Z+ej,d"e+d#e!d$d%dZ.e j/e j$j0d&d6reje j1Z2d'e2d(Z?ej"d1e?e j@e?ejAneej5d-eje6ejBd2krejCe d3ejBejd4qqe7ree d5ej nejdndS(8iN(u OptionParser(ugettextu$importing of apt_pkg failed, exitingcCsOtjjdrKtjdtjdd|gtjddgndS(Nu/sbin/usplash_writeuRunning usplash_writeuTEXTuPULSATE(uosupathuexistsuloggingudebugu subprocessucall(umsg((uunattended-upgrade-shutdown.pyu do_usplash1s u do_usplashcCs?tjjdr;tjdtjddd|gndS(Nu /bin/plymouthuRunning plymouth --textumessageu--text(uosupathuexistsuloggingudebugu subprocessucall(umsg((uunattended-upgrade-shutdown.pyu do_plymouth8s u do_plymouthcCs(tj||t|t|dS(u: helper that will print msg to usplash, plymouth, console N(uloggingulogu do_plymouthu do_usplash(umsgulevel((uunattended-upgrade-shutdown.pyulog_msg>s ulog_msgcCsOtd}d}tjj|rA|dt|j7}nt|dS(u- helper to log the install progress (if any) u?Unattended-upgrade in progress during shutdown, sleeping for 5su%/var/run/unattended-upgrades.progressu N(u_uosupathuexistsuopenureadulog_msg(umsguprogress((uunattended-upgrade-shutdown.pyu log_progressEs  u log_progressu__main__uunattended-upgradesu/usr/share/localeuu--debuguactionu store_trueudestudebugudefaultuhelpuprint debug messagesu--delayi u0delay in minutes to wait for unattended-upgradesu --lock-fileu!/var/run/unattended-upgrades.lockulock file locationuUnattended-Upgrade::LogDiru/var/log/unattended-upgrades/u unattended-upgrades-shutdown.logufilenameuleveluformatu'%(asctime)s %(levelname)s - %(message)su%Unattended-Upgrade::InstallOnShutdownu1u-UNATTENDED_UPGRADES_FORCE_INSTALL_ON_SHUTDOWNu-starting unattended-upgrades in shutdown modeuunattended-upgradeuenvu,Running unattended-upgrades in shutdown modeiuget_lock returned %iulock not takenu /var/run/unattended-upgrades.pidu(found running unattended-upgrades pid %si<u$Giving up on lockfile after %s delayiuAll upgrades installedFT(Ducopyusignalusysutimeuloggingulogging.handlersugettextu subprocessuos.pathuosuoptparseu OptionParseru_uapt_pkgu exceptionuexitu do_usplashu do_plymouthuWARNulog_msgu log_progressu__name__u localesAppu localesDirubindtextdomainu textdomainuparseru add_optionuFalseu parse_argsuoptionsuargsuINFOuleveludebuguDEBUGuconfigufind_dirulogdirupathuexistsumakedirsujoinulogfileu basicConfiguNoneupu init_configufind_buenvironuenvuPopenupollusleepu start_timeulock_was_takenuget_locku lock_fileuresuTrueuintuopenureadupidukilluSIGUSR1udelayuwarning(((uunattended-upgrade-shutdown.pyus                            unattended-upgrades-0.82.1ubuntu1/__pycache__/unattended-upgrade.cpython-34.pyc0000664000000000000000000007612412317031600024400 0ustar {3d8d9Z?d-d:d;Z@d<d=ZAd>d?ZBd@dAZCdBd-dCdDZDdEdFdGZEdHdIZFdJdKZGdLdMZHdNdOZIdPdQZJdRdSZKdTdUZLdVdWZMddXdYZNdZd[ZOd-d\d]ZPeQd^kr4d_ZRd`ZSejTeReSejUeReZVeVjWdadbdcdddeddfedgeVjWd-dhdcdddeddfedieVjWdjdkdcdddeddfedleVjWd-dmdcdddeddfedneVjWd-dodcdddeddfedpeVjWd-dqdcdddfededeVjX\ZYZZe j[dkre\edrej]dsne j e j^e j_ePeYndS)tN)Message)gettext)StringIO) OptionParser SUPPRESS_HELP)PopenPIPEz/var/run/reboot-requiredz /usr/bin/mailz/usr/sbin/sendmailZ lsb_releasez-cz-suniversal_newlinesTz-iz%/var/run/unattended-upgrades.progressz /var/run/unattended-upgrades.pidFc@seZdZdS)UnknownMatcherErrorN)__name__ __module__ __qualname__rrunattended-upgrade.pyr Ms r c@s4eZdZddZddZddZdS)UnattendedUpgradesCachecCs-tjj|d|||_|jdS)Nrootdir)aptCache__init__allowed_originsadjust_candidate_versions)selfrrrrrrSs z UnattendedUpgradesCache.__init__cCstjj||jdS)N)rrclearr)rrrrrYszUnattendedUpgradesCache.clearcCsx|D]}|jsqnt|j|jr7qnd}xb|jD]W}t|dr|jdkrtjd|qGnt||jrG|}PqGqGW|r||jkrtjd|||_qqWdS)z Adjust candidate versions to match highest allowed origin This adjusts the origin even if the candidate has a higher version Npolicy_priorityrz#ignoring ver '%s' with priority < 0z!adjusting candidate version: '%s') is_upgradableis_allowed_origin candidaterZversionshasattrrloggingdebug)rpkgZnew_candverrrrr^s   z1UnattendedUpgradesCache.adjust_candidate_versionsN)r r r rrrrrrrrQs   rc@s|eZdZdZddddZddZdd Zd d Zd d ZddZ ddZ ddZ dS)LogInstallProgresszr Install progress that writes to self.progress_log (/var/run/unattended-upgrades.progress by default) Fz$var/run/unattended-upgrades.progresscCsYtjjjj|||_tjjt j j d||_ ||_ d|_dS)NDir)rprogressbaseInstallProgressr logfile_dpkgospathjoinapt_pkgconfigfind_dir progress_logverbose output_logfd)rr'r/r.rrrrs    zLogInstallProgress.__init__c Cs<t|jd$}|jtd||fWdQXdS)NwzProgress: %s %% (%s))openr.write_)rr percentstatusfrrr status_changesz LogInstallProgress.status_changecCs}ddd|j|jj|j|jjg}xJ|ddD]8}tj|tj}tj|tj|tjBqDWd}t j j |ryd}xt j |D]}yt |}Wn3tk r}ztd|WYdd}~XnX||kr qnyt j|Wqtk rq}z2|d7}|dkr_td||fnWYdd}~XqXqWndS)Nrz /proc/self/fdzERROR: can not get fd for '%s'zERROR: os.close(%s): %s)ZwritefdZ write_streamfilenoZstatusfdZ status_streamfcntlZF_GETFDZF_SETFDZ FD_CLOEXECr(r)existslistdirint ExceptionprintcloseOSError)rZ required_fdsfdZ old_flagsZproc_fdZ error_countZfdnameerrr _fixup_fdss0  !!   zLogInstallProgress._fixup_fdscCs2tj}tj|tj}tj|ddS)Nr)r(devnullr2O_RDWRdup2)rZREDIRECT_INPUTrErrr_redirect_stdins z"LogInstallProgress._redirect_stdincCs^tjjddsZtj|jtjtjBd}tj|dtj|dndS)NzDebug::pkgDPkgPMFir9r:) r+r,find_br(r2r'rIO_CREATrJ)rZlogfdrrr_redirect_outputs"z#LogInstallProgress._redirect_outputcCs$tjjjj||jdS)N)rr$r%r&update_interface_do_verbose_output_if_needed)rrrrrOsz#LogInstallProgress.update_interfacecCstjjddrdS|jr|jdkrOtj|jtj|_ny t j |jgggdWnJt j k r}z'|j t j krt jdnWYdd}~XnXtjdtj|jdndS)NzDebug::pkgDPkgPMFrz select failedr9i)r+r,rLr/r0r(r2r'O_RDONLYselecterrorerrnoZEINTRrZ exceptionr3read)rrFrrrrPs  #z/LogInstallProgress._do_verbose_output_if_neededcCs=tj}|dkr9|j|j|jn|S)Nr)r(forkrGrKrN)rpidrrrrVs      zLogInstallProgress.forkN) r r r __doc__rr8rGrKrNrOrPrVrrrrr"~s   !    r"c@s.eZdZdZddZddZdS)UnlockedzP Context manager for unlocking the apt lock while cache.commit() is run c CsytjWnYnXdS)N)r+pkgsystem_unlock)rrrr __enter__szUnlocked.__enter__c CsytjWnYnXdS)N)r+rZ)rexc_type exc_valueexc_tbrrr__exit__szUnlocked.__exit__N)r r r rXr[r_rrrrrYs  rYcCsatjjtjjtjjdd}x-tj|D]}tj d|r=dSq=WdS)z[ Return True if the dpkg journal is dirty (similar to debSystem::CheckUpdates) zDir::State::statusZupdatesz[0-9]+TF) r(r)r*dirnamer+r,Z find_filer?rematch)dr7rrris_dpkg_journal_dirtys  rdcCstjddadS)NzSIGUSR1 received, will stopT)rwarningSIGNAL_STOP_REQUEST)signalZframerrrsignal_handlers rhcCs0itd6td6}tj|j|S)zb substitude known mappings and return a new string Currently supported ${distro-release} distro_codename distro_id)get_distro_codename get_distro_idstringZTemplate substitute)linemappingrrrrns  rncCstS)N)DISTRO_CODENAMErrrrrk srkcCstS)N) DISTRO_IDrrrrrlsrlcCsg}xtjjdD]}d|krC|jd\}}n|j\}}tjdd|}tjdd|}|jdt|t|fqW|S)z, legacy support for old Allowed-Origins var z#Unattended-Upgrade::Allowed-Origins:z([^\\]),z\1\\,z o=%s,a=%s)r+r, value_listsplitrasubappendrn)rsrjrirrrget_allowed_origins_legacys rycCs=t}x-tjjdD]}|jt|qW|S)zu return a list of allowed origins from apt.conf This will take substitutions (like distro_id) into account. z#Unattended-Upgrade::Origins-Pattern)ryr+r,rtrwrn)rrxrrrget_allowed_origins%s rzcCs|j}|dkr)tjddSd}|jdd}xe|jdD]T}dd |jd D\}}t|}|dkr|tj|j|M}n|dkr|tj|j|M}n|dkr|tj|j |M}n|dkr%|tj|j |M}nf|dkrM|tj|j |M}n>|dkru|tj|j |M}nt d||ftjd|||fqQW|S)z take a whitelist string in the form "origin=Debian,label=Debian-Security" and match against the given python-apt origin. A empty whitelist string never matches anything. z"empty match string matches nothingFTz\,z%2C,cSs(g|]}|jjddqS)z%2Cr|)stripreplace).0rxrrr ?s z*match_whitelist_string..=ooriginllabelasuitearchivec componentsitencodenamez4Unknown whitelist entry for macher '%s' (token '%s')zmatching '%s'='%s' against '%s')rzorigin)rzlabel)rrzarchive)rz component)zsite)rzcodename)r}rrer~rurnfnmatchrrrrrrr r)Z whitelistrrestokenZwhatvaluerrrmatch_whitelist_string0s8            rcCsd}d}t||}y&t|jd|}WdQXWn+tk rn}z |}WYdd}~XnX|rtjtdnAtjtdtjtd|tjtd||S)NFinstall_progresszAll upgrades installedzInstalling the upgrades failed!zerror message: '%s'z+dpkg returned a error! See '%s' for details)r"rYcommit SystemErrorrinfor4rS)cachepkgs_to_upgrader'r/rSr iprogressrFrrrupgrade_normal\s rr{cst||}|jd7_tjtjtt}t|}x|}x|D]} trstj ddS| } | j r| j n| j sV| j nqVt||stjddSddjD} | sqVnt| dkr$tjd | j| }Pnt| t|krbtjd t| | f| }njqVWt|d krt|t|tt|d } nd } |jd dj|d| ddtjd|tfdd|DyTt||} t,jd| }|sNtdnWdQXjWnjtk r}zJtjtdtjtd|tjtd|dSWYdd}~XnX|t|}tjd|t|d krItjtdPqIqIdS)Nz.minimal-stepszSIGNAL received, stoppingTzOInternal error while building a minimal partition.Cache has not allowed changesFcSsg|]}|jqSr)name)rprrrrs z,upgrade_in_minimal_steps..r9zfound leaf package %szfound partition of size %s (%s)rgY@r r|r5r6r{zapplying set %scsg|]}|qSrr)rr)rrrrs rzcache.commit() returned falsezInstalling the upgrades failed!zerror message: '%s'z+dpkg returned a error! See '%s' for detailszleft to upgrade %szAll upgrades installed)r"r.rgSIGUSR1rhrzsetrfrrer mark_upgradeZ is_installedZ mark_installcheck_changes_for_sanityrSZ get_changeslenrrrfloatr8r* rewind_cacherYrrAr2r4r)rr blacklistr'r/Z install_logrZ to_upgradeZsmallest_partitionpkgnamer Zchangesr5rrrFr)rrupgrade_in_minimal_stepsosx           -  rcCsF|s dSx5|jD]*}x!|D]}t||r!dSq!WqWdS)NFT)originsr)r!rrZallowedrrrrs  rcCs<x5|D]-}tj||rtjd|dSqWdS)Nz!skipping blacklisted package '%s'TF)rarbrr)rrZblacklist_regexprrris_pkgname_in_blacklists  rcCs*|jjdkrdSx |D]}|jrDtjd|jdS|jsV|jrt|j |stjd|jdSt |j|rdS|j j t jkrtjd|jdSt jjdd}|j jjd}|jr"|dkr"|dkr"tjd dSqqWd S) NrFzpkg '%s' now marked deletezpkg '%s' not in allowed originzpkg '%s' is on holdz,Unattended-Upgrade::IgnoreAppsRequireRestartzUpgrade-Requiresz app-restartz=pkg '%s' requires app-restart, not safe to upgrade unattendedT) _depcache broken_countZ marked_deleterrrmarked_installmarked_upgraderrrZ_pkgZselected_stater+Z SELSTATE_HOLDr,rLrecordget)rrrr Zignore_require_restartZupgrade_requiresrrrrs.       rcCsy6tj|jjd}tj|}|dSWnSttfk r}z-tj d||f|j ddSWYdd}~XnXdS)NcontrolPackagez!failed to read deb file '%s' (%s)r4r) apt_instDebFiler extractdatar+Z TagSectionIOErrorrrrSru)ZdebfilerZsectionsrFrrrpkgname_from_debs rc Csdd|g}dddddd|g}d g}t|d t}t|d |jd td d }t|d |jd td d }|jdjd}|S)Nzdpkg-debz--fsys-tarfileZtarz-xz-Oz-f-.md5sumstdoutstdinr Tr)rrrZ communicateru) Zdeb_file conf_fileZdpkg_cmdZtar_cmdZmd5_cmdZdpkg_pZtar_pZmd5_p pkg_md5sumrrrget_md5sum_for_file_in_debs   rcCsItjd|t|}tjjd}tjt|d}d}xV|D]N}|jd|krTtjd|d|kr|jd}PqqTqTWd}t j |}y%|j j dj jd }Wn<tk r} ztjd || fWYdd} ~ XnXi} x|jD]r} | j } | sPq2ntjd | | j} | d } | d }t| dkr| d}nd}|dks2tjj||  rq2n|dkrq2n| s| |jdkrtjd| |fq2n|| | rr)ZdestFileprefixrZ status_fileZtagfilerZsectionZ pkg_conffilesZdebrFZdpkg_status_conffilesrorrZmd5ZobsZfbZ current_md5rfprrrconffile_prompt sx     *     #       rcCsVdtjkrdStjjd}x*|D]"}|j}|dkr,dSq,WdS)Nz DPkg::OptionsT--force-confold--force-confnewF)rr)r+r,rtr})optionsZoptionrrrdpkg_conffile_promptcs   rcCs)|jx|D]}|jqWdS)z: set the cache back to the state with packages_to_upgrade N)rr)rrpkg2rrrrns  rcCstjdS)Nr9)r(unamerrrrhostusrFcCsid}x\|jD]N}t||jdt||krS|d|7}n||d7}qW|S)Nr{r )rurrfind)twidthZsubsequent_indentoutrxrrrwrap{s )rz/etc/apt/listchanges.confcCs3tjjtr"dtjdSENDMAIL_BINARYenviron)confrrrsetup_apt_listchangessrcCsu|jtjddd}tjtd||gdtjdd}|jj||jj |j }|S)NFerrorsr~z-srr ) encodelocalegetpreferredencoding subprocessr MAIL_BINARYrrr3rCwait) to_addresssubjectbodyZ encoded_bodyrretrrr_send_mail_using_mailxs  rcCst}||d<||drrrrSr4rLrisfileREBOOT_REQUIRED_FILErrr*r2rUgetvaluerrAssertionError) pkgsrpkgs_kept_backmem_logr'Zto_emailrrrrrrrsend_summary_mailsX&    #    rc Csrtjddttjtd|d}y|jsjtjj ddsjtjj ddrtj j tjj ddd d }t |d }|jd tjWdQXt|d d|D|||jp|j}n.t|dd|D||jp|j}WnHtk rm}z(tjdd|jdd}WYdd}~XnX|S)NDEBIAN_FRONTENDnoninteractivezWriting dpkg log to '%s'Fz!Unattended-Upgrades::MinimalStepsz Unattended-Upgrade::MinimalStepsr#varrunzunattended-upgrades.pidr1z%scSsg|]}|jqSr)r)rr rrrrs zdo_install..cSsg|]}|jqSr)r)rr rrrr s r:zException: %s zutf-8)r(putenvrrrr4Zminimal_upgrade_stepsr+r,rLr)r*r-r2r3getpidrr/rrrAr) rrblacklisted_pkgsrr'pkg_install_successZpidfrrFrrr do_installs2     rcCsttjjdtjj|dr@tjtj|dntjj|drptjtj|dndS)NzUnattended-Upgradez/etc/apt/apt.confz/etc/apt/apt.conf.d) r+r,rr(r)r>Zread_config_fileisdirZread_config_dir)rrrr_setup_alternative_rootdirs  rcCs(tjjdtjjdd}|S)NzUnattended-Upgrade::LogDirzAPT::UnattendedUpgrades::LogDirz/var/log/unattended-upgrades/)r+r,r-)logdirrrr _get_logdir!s    rcCsttjjdkrdSt}tjj|tj j dtj j dd}|j rtjj | rtj |ntjdtjddd|tj}t}|jrtj jd d tj jd d n|jr&|jtjtjtj}|j|n;|jra|jtjtjtj}|j|ntj j d d rtj|}|j|n|S)NrzUnattended-Upgrade::LogFilez APT::UnattendedUpgrades::LogFilezunattended-upgrades.loglevelformatz%%(asctime)s %(levelname)s %(message)sfilenamezDebug::pkgProblemResolver1zDebug::pkgDepCache::AutoInstallzUnattended-Upgrade::Mailr{)rrrootZhandlersrr(r)r*r+r,rdry_runr>makedirsZ basicConfigINFO getLoggerrZ apt_debugrrZsetLevelDEBUGZ StreamHandlersysrZ addHandlerr/)rrZlogfileloggerrZstdout_handlerZmem_log_handlerrrr_setup_logging*s>         r cCstjjdS)Nz%Unattended-Upgrade::Package-Blacklist)r+r,rtrrrrget_blacklisted_pkgsSsrcCstjjddrtjjtrtjjdd}|dkrXtj|nt j dtt j dd|gndS) Nz$Unattended-Upgrade::Automatic-RebootFz)Unattended-Upgrade::Automatic-Reboot-TimenowrzFound %s, rebootingz/sbin/shutdownz-r) r+r,rLr(r)r>rrrCrrercall) shutdown_lockZwhenrrrreboot_if_requested_and_neededWs     rcCsJtjjtjjdd}ttjj|ddWdQXdS)Nz Dir::StateZperiodiczunattended-upgrades-stampr1)r(r)r*r+r,r-r2)Zstatedirrrrwrite_stamp_filees!rc!3Cs |rt|nt|}t}t}tjtddj|tjtdtjtd|trt j j ddrt j jt j jd}t jt j j|dd }|d krtjtd ttd tjt j}d |d }tjd)|t?r0x|j@D]}tjd*||jA|jBkrttd+|jCtjtd+|jCn|jDs&ttd,|jEtjtd,|jEtjdnt j jF|jGsvttd-|jGtjd-|jGtjdn|jHs|j.tI|jGntJ|jGrt j jd.d/}|sttd0tI|jGntjtd0tI|jG|j.tI|jG| j.tI|jGqqWtjd1|tK|d kr=| jL| dd}g} x|D]}tjd2|j'|j,t-| ||r| j.|q|j'| kr| j.|j'ntjtd3|j'| jLx| D]}|j,qWqWq=n tjd4t j j d5d rt%d6d| D}x1||D]%}tjd7|| |jMqvWtjtd8dj||ntjd9| j!jN| j!jO| j!j"ftK| d kr4 tK| d kr4 tjtd:tPdSd;t jkru t j j d<d ru tjQ}|jd=dS|jRr tjd>t j j%d?d@ndjdAd| D}tjtdB|tSjSjT}t j jtUdC|jVdD}d}dF} tK| d krP t jdE} tW| | |||}n|jRsr tX||| ||ntP|jRs tY| ndS)GNz Initial blacklisted packages: %srz#Starting unattended upgrades scriptzAllowed origins are: %sz*Unattended-Upgrade::AutoFixInterruptedDpkgTzDir::State::StatuslockFrz.Unclean dpkg state detected, trying to correctrrZdpkgz--force-confoldz --configurez-aenvzdpkg --configure -a output: %sz@Unclean dpkg state, but locked, another package manager working?z=Lock could not be acquired (another package manager running?)z'Cache lock can not be acquired, exitingr9rrz"Cache has broken packages, exitingcSs"g|]}|jr|jqSr)is_auto_removabler)rr rrrrs zmain..zChecking: %s (%s)rzsanity check failedz?package '%s' upgradable but fails to be marked for upgrade (%s)keycSs|jS)N)r)rrrrszmain..rcSsg|]}|jqSr)r)rr rrrrs z/pkgs that look like they should be upgraded: %szGetArchives() failed: '%s'zfetch.run() result: %sz%szAn error occurred: '%s'z)The URI '%s' failed to download, abortingz-Download finished, but file '%s' not there?!?zUnattended-Upgrade::Mailr{zBPackage '%s' has conffile prompt and needs to be upgraded manuallyz blacklist: %szChecking (blacklist): %szpackage '%s' not upgradedz0dpkg is configured not to cause conffile promptsz.Unattended-Upgrade::Remove-Unused-DependenciescSs"g|]}|jr|jqSr)rr)rr rrrr7s zmarking %s for removez$Packages that are auto removed: '%s'z'InstCount=%i DelCount=%i BrokenCount=%iz1No packages found that can be upgraded unattendedZ-UNATTENDED_UPGRADES_FORCE_INSTALL_ON_SHUTDOWNz%Unattended-Upgrade::InstallOnShutdownz1Configured to install on shutdown, so exiting nowz5Option --dry-run given, *not* performing real actionszDebug::pkgDPkgPMrcSsg|]}|jqSr)r)rr rrrrZs z"Packages that will be upgraded: %szunattended-upgrades-dpkg_%s.logr4z!/var/run/unattended-upgrades.lock)Zrr rzrrrr4r*rdr+r,rLr(r)r`rZget_lockrerBcopyrrCr check_outputZCalledProcessErroroutputrZpkgsystem_lockrrSr exitrrrniceZ ActionGrouprrrgetattrrrrrrrwrrremoversortZAcquirerr$textZAcquireProgressZ SourceListZread_main_listZ_recordsZPackageManagerZ get_archivesrritemsr6Z STAT_ERRORZ error_textZcompleteZdesc_urir>destfileZ is_trustedrrrrZ mark_deleteZ inst_countZ del_countrr rdatetimerrZ isoformatrrr)!rrrrrZadmindirZlockfdrrrFrZ actiongrouprrZpkgs_auto_removabler rrZfetcherlistZrecsZpmritemrZold_pkgs_to_upgraderZnow_auto_removabler rr'rrrrrmainksb       !          #             *      *                      $         r)__main__zunattended-upgradesz/usr/share/localez-dz--debugaction store_truedefaulthelpzprint debug messagesz --apt-debugz,make apt/libapt print verbose debug messagesz-vz --verbosezprint info messagesz --dry-runz'Simulation, download but do not installz--minimal-upgrade-stepszs                   $$-]      , Q   Z      : % )               unattended-upgrades-0.82.1ubuntu1/__pycache__/unattended-upgrade-shutdown.cpython-34.pyc0000664000000000000000000000734612317031600026251 0ustar R|@sddlZddlZddlZddlZddlZddlZddlZddlZddlZ ddl m Z ddlmZ yddl Z Wn"ejdejdYnXddZddZejd d Zd d Zed krdZdZejeeejee Zejddddddddddejddddddejddddddej\ZZejZ ej!rej"Z ne j#j$d d!Z%e j&j'e%se j(e%ne j&j)e%d"Z*ej+d#e*d$e d%d&dZ,e j-e j#j.d'dreje j/Z0d(e0d)neej3d.eje4ej?d4krej@e d5ej?ejd6qqe5ree d7ejnejdndS)8N) OptionParser)gettextz$importing of apt_pkg failed, exitingcCsOtjjdrKtjdtjdd|gtjddgndS)Nz/sbin/usplash_writezRunning usplash_writeZTEXTZPULSATE)ospathexistsloggingdebug subprocesscall)msgr unattended-upgrade-shutdown.py do_usplash1s rcCs?tjjdr;tjdtjddd|gndS)Nz /bin/plymouthzRunning plymouth --textmessagez--text)rrrrrr r )r r r r do_plymouth8s rcCs(tj||t|t|dS)z: helper that will print msg to usplash, plymouth, console N)rlogrr)r levelr r r log_msg>s rcCsOtd}d}tjj|rA|dt|j7}nt|dS)z- helper to log the install progress (if any) z?Unattended-upgrade in progress during shutdown, sleeping for 5sz%/var/run/unattended-upgrades.progress N)_rrropenreadr)r Zprogressr r r log_progressEs  r__main__zunattended-upgradesz/usr/share/localez--debugaction store_truedestrdefaultFhelpzprint debug messagesz--delay z0delay in minutes to wait for unattended-upgradesz --lock-filez!/var/run/unattended-upgrades.lockzlock file locationzUnattended-Upgrade::LogDirz/var/log/unattended-upgrades/z unattended-upgrades-shutdown.logfilenamerformatz'%(asctime)s %(levelname)s - %(message)sz%Unattended-Upgrade::InstallOnShutdown1Z-UNATTENDED_UPGRADES_FORCE_INSTALL_ON_SHUTDOWNz-starting unattended-upgrades in shutdown modezunattended-upgradeenvz,Running unattended-upgrades in shutdown modezget_lock returned %izlock not takenTz /var/run/unattended-upgrades.pidz(found running unattended-upgrades pid %s<z$Giving up on lockfile after %s delayzAll upgrades installed)AcopysignalsysZtimerZlogging.handlersrr os.pathrZoptparserrZapt_pkgZ exceptionexitrrZWARNrr__name__Z localesAppZ localesDirbindtextdomain textdomainparserZ add_option parse_argsZoptionsargsINFOrrDEBUGconfigZfind_dirZlogdirrrmakedirsjoinZlogfileZ basicConfigpZ init_configZfind_benvironr$PopenZpollZsleepZ start_timeZlock_was_takenZget_lockZ lock_fileresintrrpidkillSIGUSR1ZdelayZwarningr r r r s                            unattended-upgrades-0.82.1ubuntu1/__pycache__/unattended-upgrade.cpython-33.pyc0000664000000000000000000012121112317031600024363 0ustar {3d2d3Z?d4d5Z@d6d7ZAd+d8d9ZBd:d;ZCd<d=ZDd>d?ZEd@d+dAdBZFdCdDdEZGdFdGZHdHdIZIdJdKZJdLdMZKdNdOZLdPdQZMdRdSZNdTdUZOddVdWZPdXdYZQd+dZd[ZReSd\kr4d]ZTd^ZUejVeTeUejWeTeZXeXjYd_d`dadbdce(ddedeeXjYd+dfdadbdce(ddedgeXjYdhdidadbdce(ddedjeXjYd+dkdadbdce(ddedleXjYd+dmdadbdce(ddedneXjYd+dodadbddedce(eXjZ\Z[Z\e j]dkre^edpej_dqne j e j`e jaeRe[ndS(riN(uMessage(ugettext(uStringIO(u OptionParseru SUPPRESS_HELP(uPopenuPIPEu/var/run/reboot-requiredu /usr/bin/mailu/usr/sbin/sendmailu lsb_releaseu-cu-suuniversal_newlinesu-iu%/var/run/unattended-upgrades.progressu /var/run/unattended-upgrades.pidcBs|EeZdZdS(uUnknownMatcherErrorN(u__name__u __module__u __qualname__(u __locals__((uunattended-upgrade.pyuUnknownMatcherErrorMsuUnknownMatcherErrorcBs8|EeZdZddZddZddZdS(uUnattendedUpgradesCachecCs-tjj|d|||_|jdS(Nurootdir(uaptuCacheu__init__uallowed_originsuadjust_candidate_versions(uselfurootdiruallowed_origins((uunattended-upgrade.pyu__init__Ss u UnattendedUpgradesCache.__init__cCstjj||jdS(N(uaptuCacheuclearuadjust_candidate_versions(uself((uunattended-upgrade.pyuclearYsuUnattendedUpgradesCache.clearcCsx|D]}|jsqnt|j|jr7qnd}xb|jD]W}t|dr|jdkrtj d|qGnt||jrG|}PqGqGW|r||jkrtj d|||_qqWdS(u Adjust candidate versions to match highest allowed origin This adjusts the origin even if the candidate has a higher version upolicy_priorityiu#ignoring ver '%s' with priority < 0u!adjusting candidate version: '%s'N( u is_upgradableuis_allowed_originu candidateuallowed_originsuNoneuversionsuhasattrupolicy_priorityuloggingudebug(uselfupkgunew_canduver((uunattended-upgrade.pyuadjust_candidate_versions^s   u1UnattendedUpgradesCache.adjust_candidate_versionsN(u__name__u __module__u __qualname__u__init__uclearuadjust_candidate_versions(u __locals__((uunattended-upgrade.pyuUnattendedUpgradesCacheQs  uUnattendedUpgradesCachecBs|EeZdZdZddddZddZddZd d Zd d Z d dZ ddZ ddZ dS(uLogInstallProgressur Install progress that writes to self.progress_log (/var/run/unattended-upgrades.progress by default) u$var/run/unattended-upgrades.progresscCsYtjjjj|||_tjjt j j d||_ ||_ d|_dS(NuDir(uaptuprogressubaseuInstallProgressu__init__u logfile_dpkguosupathujoinuapt_pkguconfigufind_diru progress_loguverboseuNoneu output_logfd(uselfu logfile_dpkguverboseu progress_log((uunattended-upgrade.pyu__init__s    uLogInstallProgress.__init__c Cs<t|jd$}|jtd||fWdQXdS(NuwuProgress: %s %% (%s)(uopenu progress_loguwriteu_(uselfupkgupercentustatusuf((uunattended-upgrade.pyu status_changesu LogInstallProgress.status_changecCs}ddd|j|jj|j|jjg}xJ|ddD]8}tj|tj}tj|tj|tjBqDWd}t j j |ryd}xt j |D]}yt |}Wn3tk r}ztd|WYdd}~XnX||kr qnyt j|Wqtk rq}z2|d7}|dkr_td||fnWYdd}~XqXqWndS(Niiiiu /proc/self/fduERROR: can not get fd for '%s'uERROR: os.close(%s): %s(uwritefdu write_streamufilenoustatusfdu status_streamufcntluF_GETFDuF_SETFDu FD_CLOEXECuosupathuexistsulistdiruintu ExceptionuprintucloseuOSError(uselfu required_fdsufdu old_flagsuproc_fdu error_countufdnameue((uunattended-upgrade.pyu _fixup_fdss0  !!   uLogInstallProgress._fixup_fdscCs2tj}tj|tj}tj|ddS(Ni(uosudevnulluopenuO_RDWRudup2(uselfuREDIRECT_INPUTufd((uunattended-upgrade.pyu_redirect_stdins u"LogInstallProgress._redirect_stdincCs^tjjddsZtj|jtjtjBd}tj |dtj |dndS(NuDebug::pkgDPkgPMiiiF( uapt_pkguconfigufind_buFalseuosuopenu logfile_dpkguO_RDWRuO_CREATudup2(uselfulogfd((uunattended-upgrade.pyu_redirect_outputs"u#LogInstallProgress._redirect_outputcCs$tjjjj||jdS(N(uaptuprogressubaseuInstallProgressuupdate_interfaceu_do_verbose_output_if_needed(uself((uunattended-upgrade.pyuupdate_interfacesu#LogInstallProgress.update_interfacecCstjjddrdS|jr|jdkrOtj|j tj |_ny t j |jgggdWnJt j k r}z'|j t jkrtjdnWYdd}~XnXtjdtj|jdndS(NuDebug::pkgDPkgPMiu select failediiF(uapt_pkguconfigufind_buFalseuverboseu output_logfduNoneuosuopenu logfile_dpkguO_RDONLYuselectuerroruerrnouEINTRuloggingu exceptionuwriteuread(uselfue((uunattended-upgrade.pyu_do_verbose_output_if_neededs  #u/LogInstallProgress._do_verbose_output_if_neededcCs=tj}|dkr9|j|j|jn|S(Ni(uosuforku _fixup_fdsu_redirect_stdinu_redirect_output(uselfupid((uunattended-upgrade.pyuforks      uLogInstallProgress.forkNF( u__name__u __module__u __qualname__u__doc__uFalseu__init__u status_changeu _fixup_fdsu_redirect_stdinu_redirect_outputuupdate_interfaceu_do_verbose_output_if_neededufork(u __locals__((uunattended-upgrade.pyuLogInstallProgress~s  !    uLogInstallProgresscBs2|EeZdZdZddZddZdS(uUnlockeduP Context manager for unlocking the apt lock while cache.commit() is run c CsytjWnYnXdS(N(uapt_pkgupkgsystem_unlock(uself((uunattended-upgrade.pyu __enter__suUnlocked.__enter__c CsytjWnYnXdS(N(uapt_pkgupkgsystem_unlock(uselfuexc_typeu exc_valueuexc_tb((uunattended-upgrade.pyu__exit__suUnlocked.__exit__N(u__name__u __module__u __qualname__u__doc__u __enter__u__exit__(u __locals__((uunattended-upgrade.pyuUnlockeds uUnlockedcCsatjjtjjtjjdd}x-tj|D]}tj d|r=dSq=WdS(u[ Return True if the dpkg journal is dirty (similar to debSystem::CheckUpdates) uDir::State::statusuupdatesu[0-9]+TF( uosupathujoinudirnameuapt_pkguconfigu find_fileulistdirureumatchuTrueuFalse(uduf((uunattended-upgrade.pyuis_dpkg_journal_dirtys  uis_dpkg_journal_dirtycCstjddadS(NuSIGUSR1 received, will stopT(ulogginguwarninguTrueuSIGNAL_STOP_REQUEST(usignaluframe((uunattended-upgrade.pyusignal_handlers usignal_handlercCs0itd6td6}tj|j|S(ub substitude known mappings and return a new string Currently supported ${distro-release} udistro_codenameu distro_id(uget_distro_codenameu get_distro_idustringuTemplateu substitute(ulineumapping((uunattended-upgrade.pyu substitutes  u substitutecCstS(N(uDISTRO_CODENAME(((uunattended-upgrade.pyuget_distro_codename suget_distro_codenamecCstS(N(u DISTRO_ID(((uunattended-upgrade.pyu get_distro_idsu get_distro_idcCsg}xtjjdD]}d|krC|jd\}}n|j\}}tjdd|}tjdd|}|jdt|t|fqW|S(u, legacy support for old Allowed-Origins var u#Unattended-Upgrade::Allowed-Originsu:u([^\\]),u\1\\,u o=%s,a=%s(uapt_pkguconfigu value_listusplitureusubuappendu substitute(uallowed_originsusu distro_idudistro_codename((uunattended-upgrade.pyuget_allowed_origins_legacys uget_allowed_origins_legacycCs=t}x-tjjdD]}|jt|qW|S(uu return a list of allowed origins from apt.conf This will take substitutions (like distro_id) into account. u#Unattended-Upgrade::Origins-Pattern(uget_allowed_origins_legacyuapt_pkguconfigu value_listuappendu substitute(uallowed_originsus((uunattended-upgrade.pyuget_allowed_origins%s uget_allowed_originscCs|j}|dkr)tjddSd}|jdd}xe|jdD]T}dd|jdD\}}t|}|dkr|tj|j |M}n|dkr|tj|j |M}n|dkr|tj|j |M}n|dkr%|tj|j |M}nf|dkrM|tj|j |M}n>|dkru|tj|j|M}ntd||ftjd|||fqQW|S(u take a whitelist string in the form "origin=Debian,label=Debian-Security" and match against the given python-apt origin. A empty whitelist string never matches anything. uu"empty match string matches nothingu\,u%2Cu,cSs(g|]}|jjddqS(u%2Cu,(ustripureplace(u.0us((uunattended-upgrade.pyu ?s u*match_whitelist_string..u=uouoriginululabeluausuiteuarchiveucu componentusiteunucodenameu4Unknown whitelist entry for macher '%s' (token '%s')umatching '%s'='%s' against '%s'FT(uouorigin(ululabel(uausuiteuarchive(ucu component(usite(unucodename(ustripulogginguwarninguFalseuTrueureplaceusplitu substituteufnmatchuoriginulabeluarchiveu componentusiteucodenameuUnknownMatcherErrorudebug(u whitelistuoriginuresutokenuwhatuvalue((uunattended-upgrade.pyumatch_whitelist_string0s8            umatch_whitelist_stringcCsd}d}t||}y&t|jd|}WdQXWn+tk rn}z |}WYdd}~XnX|rtjtdnAtj tdtj td|tj td||S(Nuinstall_progressuAll upgrades installeduInstalling the upgrades failed!uerror message: '%s'u+dpkg returned a error! See '%s' for detailsF( uNoneuFalseuLogInstallProgressuUnlockeducommitu SystemErrorulogginguinfou_uerror(ucacheupkgs_to_upgradeu logfile_dpkguverboseuerroruresu iprogressue((uunattended-upgrade.pyuupgrade_normal\s uupgrade_normalucst||}|jd7_tjtjtt}t|}x|}x|D]} trstj ddS| } | j r| j n| j sV| jnqVt||stjddSddjD} | sqVnt| dkr$tjd| j| }Pnt| t|krbtjdt| | f| }njqVWt|d krt|t|tt|d } nd } |jd d j|d | ddtjd|tfdd|DyTt||} t,jd| }|sNtdnWdQXjWnjtk r}zJtjtdtjtd|tjtd|dSWYdd}~XnX|t|}tjd|t|d krItj tdPqIqIdS(Nu.minimal-stepsuSIGNAL received, stoppinguOInternal error while building a minimal partition.Cache has not allowed changescSsg|]}|jqS((uname(u.0up((uunattended-upgrade.pyu s u,upgrade_in_minimal_steps..iufound leaf package %sufound partition of size %s (%s)igY@upkgu,upercentustatusuuapplying set %scsg|]}|qS(((u.0uname(ucache(uunattended-upgrade.pyu s uinstall_progressucache.commit() returned falseuInstalling the upgrades failed!uerror message: '%s'u+dpkg returned a error! See '%s' for detailsuleft to upgrade %suAll upgrades installedTF(!uLogInstallProgressu progress_logusignaluSIGUSR1usignal_handleruget_allowed_originsusetuSIGNAL_STOP_REQUESTulogginguwarninguTrueu is_upgradableu mark_upgradeu is_installedu mark_installucheck_changes_for_sanityuerroruFalseu get_changesulenudebugunameuclearufloatu status_changeujoinu rewind_cacheuUnlockeducommitu Exceptionuopenu_uinfo(ucacheupkgs_to_upgradeu blacklistu logfile_dpkguverboseu install_loguallowed_originsu to_upgradeusmallest_partitionupkgnameupkguchangesupercentu iprogressuresue((ucacheuunattended-upgrade.pyuupgrade_in_minimal_stepsosx           -  uupgrade_in_minimal_stepscCsF|s dSx5|jD]*}x!|D]}t||r!dSq!WqWdS(NFT(uFalseuoriginsumatch_whitelist_stringuTrue(uveruallowed_originsuoriginuallowed((uunattended-upgrade.pyuis_allowed_origins  uis_allowed_origincCs<x5|D]-}tj||rtjd|dSqWdS(Nu!skipping blacklisted package '%s'TF(ureumatchuloggingudebuguTrueuFalse(upkgnameu blacklistublacklist_regexp((uunattended-upgrade.pyuis_pkgname_in_blacklists  uis_pkgname_in_blacklistcCs*|jjdkrd Sx |D]}|jrDtjd|jd S|jsV|jrt |j |stjd|jd St |j|rd S|j j tjkrtjd|jd Stjjdd }|j jjd}|jr"|d kr"|dkr"tjdd SqqWd S( Niupkg '%s' now marked deleteupkg '%s' not in allowed originupkg '%s' is on holdu,Unattended-Upgrade::IgnoreAppsRequireRestartuUpgrade-Requiresu app-restartu=pkg '%s' requires app-restart, not safe to upgrade unattendedFT(u _depcacheu broken_countuFalseu marked_deleteuloggingudebugunameumarked_installumarked_upgradeuis_allowed_originu candidateuis_pkgname_in_blacklistu_pkguselected_stateuapt_pkgu SELSTATE_HOLDuconfigufind_burecordugetuTrue(ucacheuallowed_originsu blacklistupkguignore_require_restartuupgrade_requires((uunattended-upgrade.pyucheck_changes_for_sanitys.       ucheck_changes_for_sanitycCsy6tj|jjd}tj|}|dSWnSttfk r}z-tj d||f|j ddSWYdd}~XnXdS(NucontroluPackageu!failed to read deb file '%s' (%s)u_i( uapt_instuDebFileucontrolu extractdatauapt_pkgu TagSectionuIOErroru SystemErrorulogginguerrorusplit(udebfileucontrolusectionsue((uunattended-upgrade.pyupkgname_from_debs upkgname_from_debc Csdd|g}dddddd|g}d g}t|d t}t|d |jd td d}t|d |jd td d}|jd jd }|S(Nudpkg-debu--fsys-tarfileutaru-xu-Ou-fu-u.umd5sumustdoutustdinuuniversal_newlinesiT(uPopenuPIPEustdoutuTrueu communicateusplit( udeb_fileu conf_fileudpkg_cmdutar_cmdumd5_cmdudpkg_putar_pumd5_pu pkg_md5sum((uunattended-upgrade.pyuget_md5sum_for_file_in_debs   uget_md5sum_for_file_in_debcCsItjd|t|}tjjd}tjt|d}d}xV|D]N}|jd|krTtjd|d|kr|jd}PqqTqTWd}t j |}y%|j j dj jd }Wn<tk r} ztjd || fWYdd} ~ XnXi} x|jD]r} | j } | sPq2ntjd | | j} | d } | d }t| dkr| d}nd}|dks2tjj||  rq2n|dkrq2n| s| |jdkrtjd| |fq2n|| | s udo_install..cSsg|]}|jqS((uname(u.0upkg((uunattended-upgrade.pyu s iuException: %s uutf-8F(uosuputenvusetup_apt_listchangesulogginguinfou_uFalseuminimal_upgrade_stepsuapt_pkguconfigufind_bupathujoinufind_diruopenuwriteugetpiduupgrade_in_minimal_stepsuverboseudebuguupgrade_normalu Exceptionuencode( ucacheupkgs_to_upgradeublacklisted_pkgsuoptionsu logfile_dpkgupkg_install_successupidfufpue((uunattended-upgrade.pyu do_installs2     u do_installcCsttjjdtjj|dr@tjtj|dntjj|drptjtj|dndS(NuUnattended-Upgradeu/etc/apt/apt.confu/etc/apt/apt.conf.d( uapt_pkguconfiguclearuosupathuexistsuread_config_fileuisdiruread_config_dir(urootdir((uunattended-upgrade.pyu_setup_alternative_rootdirs  u_setup_alternative_rootdircCs(tjjdtjjdd}|S(NuUnattended-Upgrade::LogDiruAPT::UnattendedUpgrades::LogDiru/var/log/unattended-upgrades/(uapt_pkguconfigufind_dir(ulogdir((uunattended-upgrade.pyu _get_logdir!s    u _get_logdircCsttjjdkrdSt}tjj|tj j dtj j dd}|j rtjj | rtj |ntjdtjddd|tj}t}|jrtj jd d tj jd d n|jr&|jtjtjtj}|j|n;|jra|jtjtjtj}|j|ntj j d d rtj|}|j|n|S(NiuUnattended-Upgrade::LogFileu APT::UnattendedUpgrades::LogFileuunattended-upgrades.loguleveluformatu%%(asctime)s %(levelname)s %(message)sufilenameuDebug::pkgProblemResolveru1uDebug::pkgDepCache::AutoInstalluUnattended-Upgrade::Mailu(ulenuloggingurootuhandlersu _get_logdiruosupathujoinuapt_pkguconfigufindudry_runuexistsumakedirsu basicConfiguINFOu getLoggeruStringIOu apt_debugusetudebugusetLeveluDEBUGu StreamHandlerusysustdoutu addHandleruverbose(uoptionsulogdirulogfileuloggerumem_logustdout_handlerumem_log_handler((uunattended-upgrade.pyu_setup_logging*s>         u_setup_loggingcCstjjdS(Nu%Unattended-Upgrade::Package-Blacklist(uapt_pkguconfigu value_list(((uunattended-upgrade.pyuget_blacklisted_pkgsSsuget_blacklisted_pkgscCstjjddrtjjtrtjjdd}|dkrXtj |nt j dtt j dd|gndS( Nu$Unattended-Upgrade::Automatic-Rebootu)Unattended-Upgrade::Automatic-Reboot-TimeunowiuFound %s, rebootingu/sbin/shutdownu-rF(uapt_pkguconfigufind_buFalseuosupathuexistsuREBOOT_REQUIRED_FILEufinducloseulogginguwarningu subprocessucall(u shutdown_lockuwhen((uunattended-upgrade.pyureboot_if_requested_and_neededWs     ureboot_if_requested_and_neededcCsJtjjtjjdd}ttjj|ddWdQXdS(Nu Dir::Stateuperiodicuunattended-upgrades-stampuw(uosupathujoinuapt_pkguconfigufind_diruopen(ustatedir((uunattended-upgrade.pyuwrite_stamp_filees!uwrite_stamp_filec!3Cs |rt|nt|}t}t}tjtddj|tjtdtjtd|trt j j ddDrt jjt j jd}t jt jj|ddE}|dkrtjtd ttd tjt j}d |d | j#}y|j?|||Wn<tk rN} ztjtd&| WYdd} ~ XnX|j@}tjd'|tAr0x|jBD]}tjd(||jC|jDkrttd)|jEtjtd)|jEn|jFs&ttd*|jGtjtd*|jGt j!dnt jjH|jIsvttd+|jItjd+|jIt j!dn|jJs|j0tK|jIntL|jIrt j jd,d-}|sttd.tK|jIntjtd.tK|jI|j0tK|jI| j0tK|jIqqWtjd/|tM|dkr=| jN| dd}g} x|D]}tjd0|j)|j.t/| ||r| j0|q|j)| kr| j0|j)ntjtd1|j)| jNx| D]}|j.qWqWq=n tjd2t j j d3dErt'd4d| D}x1||D]%}tjd5|| |jOqvWtjtd6dj||ntjd7| j#jP| j#jQ| j#j$ftM| dkr4 tM| dkr4 tjtd8tRdSd9t jkru t j j d:dEru tjS}|jd;dS|jTr tjd<t j j'd=d>ndjd?d| D}tjtd@|tUjUjV}t jjtWdA|jXdB}d}dF} tM| dkrP t jdC} tZ| | |||}n|jTsr t[||| ||ntR|jTs t\| ndS(GNu Initial blacklisted packages: %su u#Starting unattended upgrades scriptuAllowed origins are: %su*Unattended-Upgrade::AutoFixInterruptedDpkguDir::State::Statusulockiu.Unclean dpkg state detected, trying to correctunoninteractiveuDEBIAN_FRONTENDudpkgu--force-confoldu --configureu-auenvudpkg --configure -a output: %su@Unclean dpkg state, but locked, another package manager working?u=Lock could not be acquired (another package manager running?)u'Cache lock can not be acquired, exitingiurootdiruallowed_originsu"Cache has broken packages, exitingicSs"g|]}|jr|jqS((uis_auto_removableuname(u.0upkg((uunattended-upgrade.pyu s umain..uChecking: %s (%s)uoriginsusanity check failedu?package '%s' upgradable but fails to be marked for upgrade (%s)ukeycSs|jS(N(uname(up((uunattended-upgrade.pyusumain..u cSsg|]}|jqS((uname(u.0upkg((uunattended-upgrade.pyu s u/pkgs that look like they should be upgraded: %suGetArchives() failed: '%s'ufetch.run() result: %su%suAn error occurred: '%s'u)The URI '%s' failed to download, abortingu-Download finished, but file '%s' not there?!?uUnattended-Upgrade::MailuuBPackage '%s' has conffile prompt and needs to be upgraded manuallyu blacklist: %suChecking (blacklist): %supackage '%s' not upgradedu0dpkg is configured not to cause conffile promptsu.Unattended-Upgrade::Remove-Unused-DependenciescSs"g|]}|jr|jqS((uis_auto_removableuname(u.0upkg((uunattended-upgrade.pyu 7s umarking %s for removeu$Packages that are auto removed: '%s'u'InstCount=%i DelCount=%i BrokenCount=%iu1No packages found that can be upgraded unattendedu-UNATTENDED_UPGRADES_FORCE_INSTALL_ON_SHUTDOWNu%Unattended-Upgrade::InstallOnShutdownu1Configured to install on shutdown, so exiting nowu5Option --dry-run given, *not* performing real actionsuDebug::pkgDPkgPMu1cSsg|]}|jqS((uname(u.0upkg((uunattended-upgrade.pyu Zs u"Packages that will be upgraded: %suunattended-upgrades-dpkg_%s.logu_u!/var/run/unattended-upgrades.lockTFi(]u_setup_alternative_rootdiru_setup_logginguget_allowed_originsuget_blacklisted_pkgsulogginguinfou_ujoinuis_dpkg_journal_dirtyuapt_pkguconfigufind_buTrueuosupathudirnameufinduget_lockuFalseuwarninguprintucopyuenvironucloseu subprocessu check_outputuCalledProcessErroruoutputudebugupkgsystem_locku SystemErroruerrorusysuexituUnattendedUpgradesCacheu _depcacheu broken_countuniceu ActionGroupusetu is_upgradableunameugetattru candidateuis_pkgname_in_blacklistuis_allowed_originu mark_upgradeucheck_changes_for_sanityuappendumarked_installumarked_upgradeuremoveu rewind_cacheusortuAcquireuaptuprogressutextuAcquireProgressu SourceListuread_main_listu_recordsuPackageManageru get_archivesurunudpkg_conffile_promptuitemsustatusu STAT_ERRORu error_textucompleteudesc_uriuexistsudestfileu is_trustedupkgname_from_debuconffile_promptulenuclearu mark_deleteu inst_countu del_countuwrite_stamp_fileu getLoggerudry_runudatetimeunowu _get_logdiru isoformatuNoneu do_installusend_summary_mailureboot_if_requested_and_needed(!uoptionsurootdirumem_loguallowed_originsublacklisted_pkgsuadmindirulockfduenvuoutputueucacheu actiongroupupkgs_to_upgradeupkgs_kept_backupkgs_auto_removableupkgupkgnameupkgsufetcherulisturecsupmuresuitemuemailuold_pkgs_to_upgradeupkg2unow_auto_removableuloggerunowu logfile_dpkgupkg_install_successu shutdown_lock((uunattended-upgrade.pyumainksb       !          #             *      *                      $         umainu__main__uunattended-upgradesu/usr/share/localeu-du--debuguactionu store_trueudefaultuhelpuprint debug messagesu --apt-debugu,make apt/libapt print verbose debug messagesu-vu --verboseuprint info messagesu --dry-runu'Simulation, download but do not installu--minimal-upgrade-stepsu<Upgrade in minimal steps (and allow interrupting with SIGINTu--minimal_upgrade_stepsu+You need to be root to run this applicationi(bucopyudatetimeuerrnou email.charsetuemailufcntlufnmatchugettextulocaleuloggingureuosuselectusignalustringu subprocessusysu email.messageuMessageu_uiouStringIOuoptparseu OptionParseru SUPPRESS_HELPuPopenuPIPEuaptuapt_instuapt_pkguREBOOT_REQUIRED_FILEu MAIL_BINARYuSENDMAIL_BINARYu check_outputuTrueustripuDISTRO_CODENAMEu DISTRO_IDu PROGRESS_LOGuPID_FILEuFalseuSIGNAL_STOP_REQUESTu ValueErroruUnknownMatcherErroruCacheuUnattendedUpgradesCacheuprogressubaseuInstallProgressuLogInstallProgressuUnlockeduis_dpkg_journal_dirtyusignal_handleru substituteuget_distro_codenameu get_distro_iduget_allowed_origins_legacyuget_allowed_originsumatch_whitelist_stringuupgrade_normaluupgrade_in_minimal_stepsuis_allowed_originuis_pkgname_in_blacklistucheck_changes_for_sanityupkgname_from_debuget_md5sum_for_file_in_debuconffile_promptudpkg_conffile_promptu rewind_cacheuhostuwrapusetup_apt_listchangesu_send_mail_using_mailxu_send_mail_using_sendmailusend_summary_mailu do_installu_setup_alternative_rootdiru _get_logdiru_setup_logginguget_blacklisted_pkgsureboot_if_requested_and_neededuwrite_stamp_fileumainu__name__u localesAppu localesDirubindtextdomainu textdomainuparseru add_optionu parse_argsuoptionsuargsugetuiduprintuexituSIGHUPuSIG_IGN(((uunattended-upgrade.pyus                   -]      , Q   Z      : % )