diff options
author | 2023-08-03 16:33:41 +0600 | |
---|---|---|
committer | 2023-08-03 16:33:41 +0600 | |
commit | 70faa8e9a0ff3cba74b4f753e257d56b768fcbd2 (patch) | |
tree | 3a49460715f7319d100e0cc9c1a278758500c7c8 /debian | |
download | aptdaemon-70faa8e9a0ff3cba74b4f753e257d56b768fcbd2.tar.gz aptdaemon-70faa8e9a0ff3cba74b4f753e257d56b768fcbd2.zip |
Import Upstream version 1.1.1+bzr982
Diffstat (limited to 'debian')
53 files changed, 6328 insertions, 0 deletions
diff --git a/debian/aptdaemon-data.install b/debian/aptdaemon-data.install new file mode 100644 index 0000000..322c917 --- /dev/null +++ b/debian/aptdaemon-data.install @@ -0,0 +1 @@ +usr/share/icons/hicolor/*/*/aptdaemon*.png diff --git a/debian/aptdaemon.install b/debian/aptdaemon.install new file mode 100644 index 0000000..238c43a --- /dev/null +++ b/debian/aptdaemon.install @@ -0,0 +1,9 @@ +etc/apt/apt.conf.d/20dbus +etc/dbus-1/system.d/org.debian.apt.conf +../../build/scripts-3.*/aptd /usr/sbin +../../build/scripts-3.*/aptdcon /usr/bin +usr/share/dbus-1/system-services/org.debian.apt.service +usr/share/polkit-1/actions/org.debian.apt.policy +usr/share/locale +usr/share/man +usr/share/apport/package-hooks/aptdaemon.py diff --git a/debian/changelog b/debian/changelog new file mode 100644 index 0000000..64f74cf --- /dev/null +++ b/debian/changelog @@ -0,0 +1,2127 @@ +aptdaemon (1.1.1+bzr982-0ubuntu39mint1) vera; urgency=medium + + * Fix tiny scrolledwindows + * Specify version in gi import + * Allow removal of essential/required orphans + + -- Clement Lefebvre <root@linuxmint.com> Sat, 03 Dec 2022 13:47:18 +0000 + +aptdaemon (1.1.1+bzr982-0ubuntu39) jammy; urgency=medium + + * No-change rebuild with Python 3.10 only. + + -- Matthias Klose <doko@ubuntu.com> Thu, 17 Mar 2022 15:06:12 +0100 + +aptdaemon (1.1.1+bzr982-0ubuntu38) jammy; urgency=medium + + * debian/patches/gdk-gtk-versions.py: Specify the versions of Gtk and Gtk + which are required. (LP: #1939324) + + -- Brian Murray <brian@ubuntu.com> Wed, 19 Jan 2022 11:48:25 -0800 + +aptdaemon (1.1.1+bzr982-0ubuntu37) jammy; urgency=medium + + * fix-some-deprecated-code.patch (LP: #1951985) + + -- Gunnar Hjalmarsson <gunnarhj@ubuntu.com> Tue, 23 Nov 2021 18:05:11 +0100 + +aptdaemon (1.1.1+bzr982-0ubuntu36) hirsute; urgency=medium + + * SECURITY UPDATE: info disclosure via transaction properties + (LP: #1899513) + - debian/patches/CVE-2020-16128.patch: drop privileges when doing file + checks in aptdaemon/core.py, aptdaemon/worker/aptworker.py, + aptdaemon/utils.py. + - CVE-2020-16128 + * SECURITY UPDATE: policykit checks are too late (LP: #1899193) + - debian/patches/CVE-2020-27349.patch: check PolicyKit before + simulating local install in aptdaemon/core.py. + - CVE-2020-27349 + + -- Marc Deslauriers <marc.deslauriers@ubuntu.com> Fri, 11 Dec 2020 09:49:56 -0500 + +aptdaemon (1.1.1+bzr982-0ubuntu35) hirsute; urgency=medium + + * test-with-timeout.patch: Do not pass --disable-timeout to aptd when + running tests, so we don't get tests stuck for hours. + + -- Julian Andres Klode <juliank@ubuntu.com> Thu, 12 Nov 2020 11:17:21 +0100 + +aptdaemon (1.1.1+bzr982-0ubuntu34) groovy; urgency=medium + + * SECURITY UPDATE: information disclosure via locale (LP: #1888235) + - debian/patches/CVE-2020-15703.patch: reject locales with full paths + in aptdaemon/core.py. + - CVE-2020-15703 + + -- Marc Deslauriers <marc.deslauriers@ubuntu.com> Thu, 24 Sep 2020 10:49:44 -0400 + +aptdaemon (1.1.1+bzr982-0ubuntu33) groovy; urgency=medium + + * Update crash handler to use the changed apport function. (LP: #1700810) + + -- Brian Murray <brian@ubuntu.com> Mon, 11 May 2020 15:10:33 -0700 + +aptdaemon (1.1.1+bzr982-0ubuntu32) focal; urgency=medium + + * Build-Depend on dh-python (LP: #1870049) + + -- Julian Andres Klode <juliank@ubuntu.com> Wed, 01 Apr 2020 16:28:36 +0200 + +aptdaemon (1.1.1+bzr982-0ubuntu31) focal; urgency=medium + + * Fix compatibility with python-apt security update (LP: #1858973) + + -- Julian Andres Klode <juliank@ubuntu.com> Thu, 23 Jan 2020 11:22:34 +0100 + +aptdaemon (1.1.1+bzr982-0ubuntu30) focal; urgency=medium + + * Port to debhelper 12 + + -- Julian Andres Klode <juliank@ubuntu.com> Mon, 13 Jan 2020 16:25:52 +0100 + +aptdaemon (1.1.1+bzr982-0ubuntu29) focal; urgency=medium + + * Remove unused python- build-dependencies (LP: #1859477) + + -- Julian Andres Klode <juliank@ubuntu.com> Mon, 13 Jan 2020 16:00:17 +0100 + +aptdaemon (1.1.1+bzr982-0ubuntu28) eoan; urgency=medium + + * d/patches/remove-lintian-scanning-of-local-packages.patch: + Remove lintian scanning of local packages. lintian has changed in Debian + in ways that break this feature and removing it seems like a better use of + time than fixing it. + <infinity> Removing that code with extreme prejudice sounds solid. + + -- Michael Hudson-Doyle <michael.hudson@ubuntu.com> Thu, 01 Aug 2019 12:25:29 +1200 + +aptdaemon (1.1.1+bzr982-0ubuntu27) eoan; urgency=medium + + * Completely fix the dependency solving to work as any normal apt + frontend does, avoiding auto-fixing, and solving dependencies of the + version we are actually installing. + + -- Julian Andres Klode <juliank@ubuntu.com> Wed, 26 Jun 2019 11:39:20 +0200 + +aptdaemon (1.1.1+bzr982-0ubuntu26) eoan; urgency=medium + + * Remove call to install_protect(), gone in APT 1.9 + + -- Julian Andres Klode <juliank@ubuntu.com> Mon, 24 Jun 2019 17:50:40 +0200 + +aptdaemon (1.1.1+bzr982-0ubuntu25) eoan; urgency=medium + + * Say "The lock is held by %s" instead of "hold by" when lock fails + + -- Julian Andres Klode <juliank@ubuntu.com> Fri, 21 Jun 2019 23:04:50 +0200 + +aptdaemon (1.1.1+bzr982-0ubuntu24) eoan; urgency=medium + + * Fixup: Ignore failure to delete non-existing DPKG_FRONTEND_LOCKED + variable when releasing locks. + + -- Julian Andres Klode <juliank@ubuntu.com> Fri, 07 Jun 2019 13:36:48 +0200 + +aptdaemon (1.1.1+bzr982-0ubuntu23) eoan; urgency=medium + + * Various locking fixes (LP: #1831981) + - Implement frontend locking + - Adjust locking order to match APT + - Use reverse order for unlocking + + -- Julian Andres Klode <juliank@ubuntu.com> Fri, 07 Jun 2019 12:04:55 +0200 + +aptdaemon (1.1.1+bzr982-0ubuntu22) eoan; urgency=medium + + * Use PackageKit's socket-activated debconf helper (LP: #1726068) + * Fix failing tests and disable ones we do not care about anymore (PK/PEP8) + * Make failing tests fail the build again + * Drop python2 support + + -- Julian Andres Klode <juliank@ubuntu.com> Fri, 24 May 2019 12:16:27 +0200 + +aptdaemon (1.1.1+bzr982-0ubuntu21) disco; urgency=medium + + * Use 'return' instead of 'raise StopIteration', in order to adjust for + PEP 479 which turns 'raise StopIteration' into a 'RuntimeError' + (LP: #1811694) + + -- Julian Andres Klode <juliank@ubuntu.com> Wed, 27 Mar 2019 15:49:09 +0100 + +aptdaemon (1.1.1+bzr982-0ubuntu20) cosmic; urgency=medium + + * d/patches/python3.7-compat.patch: do not use 'async' as a variable + name as that is now a keyword in Python 3.7. + + -- Michael Hudson-Doyle <michael.hudson@ubuntu.com> Thu, 02 Aug 2018 09:46:26 +1200 + +aptdaemon (1.1.1+bzr982-0ubuntu19) bionic; urgency=medium + + * d/p/lp1690541-details-open-twice.patch: Indicate that the AptTerminal + widget would like extra space so we can see more terminal output. + (LP: #1690541) + + -- Brian Murray <brian@ubuntu.com> Tue, 27 Feb 2018 16:21:11 -0800 + +aptdaemon (1.1.1+bzr982-0ubuntu18) bionic; urgency=medium + + * d/p/lp1689668-config-file-window.patch: Ensure that the dialog to resolve + config conflicts is large enough to provide useful information. + (LP: #1689668) + + -- Brian Murray <brian@ubuntu.com> Tue, 27 Feb 2018 08:43:10 -0800 + +aptdaemon (1.1.1+bzr982-0ubuntu17) zesty; urgency=medium + + * d/patches/lp1623856-window-height.patch: Set the scrolled + window minimum height so that the text is more readable. (LP: #1623856) + * d/tests/control: Update a dependency. + + -- Barry Warsaw <barry@ubuntu.com> Mon, 23 Jan 2017 18:00:53 -0500 + +aptdaemon (1.1.1+bzr982-0ubuntu16) yakkety; urgency=medium + + * debian/control: + - Have python(3)-aptdaemon depend on aptdaemon (LP: #1605868) + + -- Jeremy Bicha <jbicha@ubuntu.com> Wed, 17 Aug 2016 12:54:52 -0400 + +aptdaemon (1.1.1+bzr982-0ubuntu15) yakkety; urgency=medium + + * debian/patches/drop_pkcompat.patch: don't call on pkcompat's PackageKit + implementation. Instead, expect PackageKit to be DBus-activated so we can + work correctly with PackageKit 1.1.1. (LP: #1496292) + * debian/patches/pk1.1.1-compat.patch: remove API that is no longer there + in PackageKit 1.1.1: GET_DEPENDS and GET_REQUIRES. + * debian/control: + - drop python3-aptdaemon.pkcompat binary package. + - aptdaemon Breaks/Replaces python3-aptdaemon.pkcompat for transition. + - Depends on gir1.2-packagekitglib-1.0 (>= 1.1.1) now, to enforce using + PackageKit 1.1; which drops GET_DEPENDS and GET_REQUIRES. + + -- Mathieu Trudel-Lapierre <cyphermox@ubuntu.com> Mon, 06 Jun 2016 20:22:54 -0400 + +aptdaemon (1.1.1+bzr982-0ubuntu14) wily; urgency=medium + + * debian/patches/lp1439769-aptdaemon-autoinstall.patch: Display the flag + name in the error message, not the package name. + + -- Brian Murray <brian@ubuntu.com> Mon, 12 Oct 2015 09:02:44 -0700 + +aptdaemon (1.1.1+bzr982-0ubuntu13) wily; urgency=medium + + * Drop Vcs-Bzr from debian/control: + - The branch pointed to is "ubuntu-vivid". This is obviously incorrect + for wily; and you shouldn't have to do a busywork update of Vcs-Bzr + with each release. + - Uploaders do not have commit rights on the listed branch. A Vcs-Bzr + field should only point to a branch that uploaders have rights to, + otherwise it can never be authoritative. + * debian/patches/lp1439769-aptdaemon-autoinstall.patch: Take a flag to + indicate whether a requested package is auto-installed. Thanks to + Michael Vogt <mvo@ubuntu.com>. Closes LP: #1439769. + + -- Steve Langasek <steve.langasek@ubuntu.com> Tue, 06 Oct 2015 11:33:41 -0700 + +aptdaemon (1.1.1+bzr982-0ubuntu12) wily; urgency=medium + + * debian/patches/fix-observed-linitian-error.diff: drop Ubuntu patch that + was added this cycle, it's not needed with the recent lintian change + + -- Sebastien Bacher <seb128@ubuntu.com> Thu, 01 Oct 2015 12:22:11 +0200 + +aptdaemon (1.1.1+bzr982-0ubuntu11) wily; urgency=medium + + * debian/patches/lintian_deprecated_error.patch: + - don't list the binary-file-compressed-with-upx lintian error, it was + removed from Debian/Ubuntu and is leading software-center to display + warnings about skype or chrome debs (lp: #1490169) + + -- Sebastien Bacher <seb128@ubuntu.com> Wed, 30 Sep 2015 16:46:03 +0200 + +aptdaemon (1.1.1+bzr982-0ubuntu10) wily; urgency=medium + + * debian/control: let python(3)-aptdaemon Depends on + gir1.2-packagekitglib-1.0 (<< 0.9) (restrict the version because + 0.9 is incompatible, also that version was uploaded to + wily-proposed and deleted but some users got it installed, that + way apt knows there is a conflict to resolve) (lp: #1496292) + * debian/patches/key_value_typo.patch: + - remove trailing "," causing a TypeError, thanks Justin McPherson + + -- Sebastien Bacher <seb128@ubuntu.com> Tue, 29 Sep 2015 16:40:25 +0200 + +aptdaemon (1.1.1+bzr982-0ubuntu9) wily; urgency=medium + + * Fix package installation by not considering the "data" which is bogus to + pass to apt. (LP: #1352654) + * Fix undefined NATIVE_ARCH by getting it from the worker. + + -- Iain Lane <iain@orangesquash.org.uk> Mon, 28 Sep 2015 18:10:56 +0100 + +aptdaemon (1.1.1+bzr982-0ubuntu8) wily; urgency=medium + + * debian/patches/lp1487087.diff: Always avoid the bogus mock + .assert_called() call. + + -- Barry Warsaw <barry@ubuntu.com> Thu, 20 Aug 2015 15:33:06 -0400 + +aptdaemon (1.1.1+bzr982-0ubuntu7) wily; urgency=medium + + * debian/patches/lp1487087.diff: Added to skip a bogus .assert_called() + call on a mock which no longer exists, but only under Python 3.5. + + -- Barry Warsaw <barry@ubuntu.com> Thu, 20 Aug 2015 10:17:28 -0400 + +aptdaemon (1.1.1+bzr982-0ubuntu6) wily; urgency=medium + + * debian/patches/pep8-accommodations.diff: Added to make the PEP 8 test + not fail autopkgtests due to pep8 tool bogosity. + * debian/patches/fix-observed-linitian-error.diff: Adjust the test to + check for the lintian error actually observed. + + -- Barry Warsaw <barry@ubuntu.com> Wed, 19 Aug 2015 11:40:43 -0400 + +aptdaemon (1.1.1+bzr982-0ubuntu5) wily; urgency=medium + + * No-change rebuild for python3.5 transition + + -- Steve Langasek <steve.langasek@ubuntu.com> Wed, 22 Jul 2015 04:09:09 +0000 + +aptdaemon (1.1.1+bzr982-0ubuntu4) wily; urgency=low + + [ Michael Vogt ] + * SECURITY UPDATE: information disclosure via simulate dbus method + (LP: #1449587) + - debian/patches/lp1449587.diff: drop privileges when running lintian, + update tests. + - CVE-2015-1323 + + -- Marc Deslauriers <marc.deslauriers@ubuntu.com> Tue, 16 Jun 2015 13:38:47 -0400 + +aptdaemon (1.1.1+bzr982-0ubuntu3) vivid; urgency=low + + * debian/patches/lp1356823.diff: + - try harder to fix crash #1356823 + + -- Michael Vogt <michael.vogt@ubuntu.com> Thu, 16 Apr 2015 10:05:07 -0500 + +aptdaemon (1.1.1+bzr982-0ubuntu2) vivid; urgency=low + + * debian/patches/lp1356823.diff: + - fix crash #1356823 + + -- Michael Vogt <michael.vogt@ubuntu.com> Fri, 10 Apr 2015 10:01:10 +0200 + +aptdaemon (1.1.1+bzr982-0ubuntu1) vivid; urgency=low + + * fix crash in _on_progress_details() (LP: #1436725) + + -- Michael Vogt <michael.vogt@ubuntu.com> Tue, 07 Apr 2015 11:34:02 +0200 + +aptdaemon (1.1.1+bzr981-0ubuntu2) vivid; urgency=medium + + * autopkgtest: Don't let root reports in /var/crash fail the test. + + -- Martin Pitt <martin.pitt@ubuntu.com> Mon, 01 Dec 2014 08:01:17 +0100 + +aptdaemon (1.1.1+bzr981-0ubuntu1) vivid; urgency=medium + + * New bzr snapshot: + + Port to VTE 2.91 + * Update Vcs-* to point to vivid branch + * Standards-Version → 3.9.6, no changes required + + -- Iain Lane <iain@orangesquash.org.uk> Tue, 11 Nov 2014 16:05:26 +0000 + +aptdaemon (1.1.1+bzr980-0ubuntu1) utopic; urgency=medium + + * New bzr snapshot: + - Drop obsolete gobject compatibility and gtkwidgets + - Drop obsolete dbus.glib imports + - Do not crash when "#" are in comments + * Drop fix-configparser.patch, applied upstream. + * Refresh other patches. + * Drop python-aptdaemon.gtkwidgets and python-aptdaemon-gtk binaries. These + have been obsolete for a long time, unmaintained/untested, and there are + no reverse dependencies any more. + + -- Martin Pitt <martin.pitt@ubuntu.com> Thu, 21 Aug 2014 15:47:42 +0200 + +aptdaemon (1.1.1+bzr973-1ubuntu4) utopic; urgency=medium + + * debian/python3-aptdaemon.pkcompat.install: + - install pkutils.py, which is required by pkcompat.py. + + -- Alberto Milone <alberto.milone@canonical.com> Wed, 30 Jul 2014 15:47:24 +0200 + +aptdaemon (1.1.1+bzr973-1ubuntu3) utopic; urgency=medium + + * New bzr snapshot to fix PEP-8 errors. + * Update Vcs-* for utopic branch. + + -- Martin Pitt <martin.pitt@ubuntu.com> Thu, 26 Jun 2014 09:26:20 +0200 + +aptdaemon (1.1.1+bzr970-1ubuntu2) utopic; urgency=low + + * debian/patches/lp1153725-temporary-workaround.patch: + - dropped, tests work fine (LP: #1153725) + + -- Michael Vogt <michael.vogt@ubuntu.com> Thu, 12 Jun 2014 10:36:33 +0200 + +aptdaemon (1.1.1+bzr970-1ubuntu1) utopic; urgency=low + + * New bzr snapshot + - lp:~brian-murray/aptdaemon/package-version-in-crash + + include package version in crash reports + * patches already upstream: + + upstream_lintian_2.5.18.patch + + upstream_lp1024590.patch + + lp1266844.patch + + fix-ftbs.patch + + -- Michael Vogt <michael.vogt@ubuntu.com> Fri, 06 Jun 2014 11:27:25 +0200 + +aptdaemon (1.1.1-1ubuntu5) trusty; urgency=low + + * debian/python3-aptdaemon.test.install: + - install all test deb files + * debian/patches/dbus_timeout.patch: + - fix pep8 issue + * debian/patches/fix-configparser.patch: + - do not crash when "#" are in comments + * debian/patches/py3_inheritable.patch: + - set status-fds inheritable to fix InstallFiles() + * debian/tests/control: + - add missing fakeroot dependency + - add missing lintian dependency + + -- Michael Vogt <michael.vogt@ubuntu.com> Fri, 11 Apr 2014 14:48:52 +0200 + +aptdaemon (1.1.1-1ubuntu4) trusty; urgency=low + + * debian/patches/dbus_timeout.patch + - increase dbus timeouts to avoid a dbus timeout error if a + policykit authentication dialog is not answered for a while + * debian/patches/lp1266844.patch: + - workaround for LP: #1266844, thanks to Brian Murray + + -- Michael Vogt <michael.vogt@ubuntu.com> Thu, 10 Apr 2014 16:28:03 +0200 + +aptdaemon (1.1.1-1ubuntu3) trusty; urgency=medium + + * Rewrite the python shebang path to /usr/bin/python3. + + -- Matthias Klose <doko@ubuntu.com> Thu, 20 Feb 2014 17:39:44 +0100 + +aptdaemon (1.1.1-1ubuntu2) trusty; urgency=low + + * Backport fix for LP: #1024590 from trunk r963 + + -- Michael Vogt <michael.vogt@ubuntu.com> Thu, 05 Dec 2013 14:39:32 +0100 + +aptdaemon (1.1.1-1ubuntu1) trusty; urgency=low + + * Merge with Debian unstable. Remaining Ubuntu changes: + - Build-depend on dh-translations and use it in debian/rules. + - Add upstream_lintian_2.5.18.patch: Recently updated lintian 2.5.18 + dropped $LINTIAN_ROOT, adjust tests accordingly (cherrypicked from + upstream trunk). Fixes autopkgtest. + - fix_ftbs.patch: Fix FTBFS (LP: #1226100) with latest pep8 version. + * Move Vcs-Bzr to trusty branch. + + -- Martin Pitt <martin.pitt@ubuntu.com> Thu, 24 Oct 2013 07:01:30 +0200 + +aptdaemon (1.1.1-1) unstable; urgency=low + + [ Sebastian Heinlein ] + * New upstream release: + - Updated and improved PackageKit 0.8 D-Bus interface support + - Configuration file conflicts now default to replace + - Colored console output + - Minor bug fixes + *debian/control: + - Require the latest PackageKit-Glib version + - Add breaks for the obsoleted PackageKit client libraries of the 0.7.x + series + * debian/patches: + - apt-dbus-text-api.patch: merged upstream + - debconf-flush.patch: merged upstream + - fix-gobject-io-add-watch.patch: merged upstream + - fix-lp898851.patch: merged upstream + - lp1058038.patch: merged upstream + - upstream-dropped-lintian-check.patch: merged upstream + - upstream-pep8-fixes.patch: merged upstream + - fix-high-trust-pkcompat.diff: updated + + [ Julian Andres Klode ] + * Re-enable test suite again + + -- Julian Andres Klode <jak@debian.org> Thu, 15 Aug 2013 13:09:38 +0200 + +aptdaemon (1.0-1) unstable; urgency=low + + * Merge with Ubuntu saucy. + - Fixes incorrect GObjectMeta usage (Closes: #707768) + * Build-Depend on xauth (xvfb tests don't seem to work otherwise) + * Disable tests for now, the test infrastructure seems broken; but + upstream does not react to the bug report, and I don't want to + wait any longer because #707768 really needs to be closed. + + -- Julian Andres Klode <jak@debian.org> Sun, 14 Jul 2013 18:11:59 +0200 + +aptdaemon (1.0-0ubuntu10) saucy; urgency=low + + * Update Vcs-* to saucy branch. + * Add upstream-dropped-lintian-check.patch: Drop + missing-pre-dependency-on-multiarch-support, it was dropped from saucy + lintian. + + -- Martin Pitt <martin.pitt@ubuntu.com> Thu, 06 Jun 2013 08:54:17 +0200 + +aptdaemon (1.0-0ubuntu9) raring; urgency=low + + * Flush debconf-communicate stdin after writing to it + (LP: #1163142, #1163163). + + -- Colin Watson <cjwatson@ubuntu.com> Tue, 02 Apr 2013 14:07:01 +0100 + +aptdaemon (1.0-0ubuntu8) raring; urgency=low + + *debian/patches/fix-lp898851.patch: Workaround a random crash during + progress dialog. Thanks to Sebastian Heinlein for the patch. (LP: #898851) + + -- Brian Murray <brian@ubuntu.com> Fri, 22 Mar 2013 15:09:13 -0700 + +aptdaemon (1.0-0ubuntu7) raring; urgency=low + + * debian/rules: Drop the hackery again to salvage the "whitelist directory" + test case, and instead exclude it in lp1153725-temporary-workaround.patch + as well. This fixes the failing autopkgtest. + + -- Martin Pitt <martin.pitt@ubuntu.com> Mon, 18 Mar 2013 14:27:32 +0100 + +aptdaemon (1.0-0ubuntu6) raring; urgency=low + + [ Martin Pitt ] + * Add gir1.2-vte-2.90 build and test dependency. + * debian/rules: Wait for previous xvfb to finish before starting the next + one. + + [ Barry Warsaw ] + * debian/control: + - Add Build-Depend on xvfb. + - Bump Standards-Version to 3.9.4. + * debian/rules: Run the tests under xvfb-run to avoid core dumps. + * debian/patches/lp1153725-temporary-workaround.patch: Temporarily + disable test which fails during the build. + * debian/rules: Add the missing test directory and symlinks before running + tests, as a workaround to LP #1153725. Clean up symlink directory in + override_dh_auto_clean. + + -- Martin Pitt <martin.pitt@ubuntu.com> Mon, 18 Mar 2013 13:14:20 +0100 + +aptdaemon (1.0-0ubuntu5) raring; urgency=low + + * Add pep8 build dependency as well, as tests are called during package + build. + * disable-broken-test.patch: Disable harder, as a mere rename doesn't work + with test auto-discovery. + * Add gir1.2-gtk-3.0 build and test dependencies so that gtk3widgets can + import Gdk. + + -- Martin Pitt <martin.pitt@ubuntu.com> Mon, 18 Mar 2013 12:17:19 +0100 + +aptdaemon (1.0-0ubuntu4) raring; urgency=low + + * Add missing pep8 test dependency. + * Add upstream-pep8-fixes.patch: Fix some PEP-8 issues, caught by test + suite. + * Add disable-broken-test.patch: Disable + test/data/high-trust-repository-whitelist.d/ test, as this directory and + its contents are not actually shipped in the released tarball. Fixes + autopkgtest failure. + + -- Martin Pitt <martin.pitt@ubuntu.com> Mon, 18 Mar 2013 11:16:11 +0100 + +aptdaemon (1.0-0ubuntu3) raring; urgency=low + + * Make the DEP-8 tests depend on xvfb. + + -- Colin Watson <cjwatson@ubuntu.com> Fri, 15 Mar 2013 13:12:30 +0000 + +aptdaemon (1.0-0ubuntu2) raring; urgency=low + + * Run DEP-8 tests under xvfb-run, to match tests run during the build. + + -- Colin Watson <cjwatson@ubuntu.com> Fri, 15 Mar 2013 11:34:25 +0000 + +aptdaemon (1.0-0ubuntu1) raring; urgency=low + + * New stable bug fix release 1.0: + - Add PEP8 compliance and a corresponding test + - Fix PackageKit tests if an http proxy is set (LP: #1050799) + - Fix crash for Python GTK2 clients (LP: #1108552) + - Fix crash if configuration file changes are only one line long - + thanks to Barry Warsaw and Robert Collins (LP: #1120322) + - Fix crash if the removal of a package valid candidate is simulated + - Allow repository release names to include dots + - Convert aptdaemon exceptions to PackageKit ones in the compat + layer (currently only invalid input ant failed authorization are + supported) + - Store the default values in the PackageKit transaction interface + statically typed + - Fix setting the speed property in the PackageKit interface + - Several grammar and typo fixes in user interface messages and + documentation (LP: #1112492) + * debian/patches: + - fix-high-trust-pkcompat.diff: updated + - apt-dbus-text-api.patch: updated + - fix-gobject-io-add-watch.patch: Added. Always include the priority + in a GLib.io_add_watch() call to not cause problems with the backwards + compatibility + + -- Sebastian Heinlein <glatzor@ubuntu.com> Mon, 11 Mar 2013 07:02:07 +0100 + +aptdaemon (0.45+bzr883-0ubuntu1) raring; urgency=low + + * New upstream snapshot: + - Don't change the automatic installed state when upgrading package + (Thanks a lot to Daniel Hartwig, LP: #1078544) + - Add a regression test for LP: #750958 + - Don't depend on dpkg-dev to select the correct lintian profile. + (Fixes LP: #1066457) + - If the user cannot be autohrized (either missing privileges + or a cancelled password dialog) the transaction will fail. + - Don't fail if we want to remove a a package without a + candidate during transaction simulation. + + -- Michael Vogt <michael.vogt@ubuntu.com> Mon, 17 Dec 2012 11:45:14 +0100 + +aptdaemon (0.45+bzr877-0ubuntu1) raring; urgency=low + + * New upstream snapshot: + - ignore lintian "file-in-etc-not-marked-as-conffile" (LP: #1060505) + + -- Michael Vogt <michael.vogt@ubuntu.com> Fri, 30 Nov 2012 08:28:18 +0100 + +aptdaemon (0.45+bzr876-0ubuntu1) raring; urgency=low + + * New upstream snapshot: + - fix signal handling with latest python-gi + - support /* */ comments in apt.conf{,.d} + + -- Michael Vogt <michael.vogt@ubuntu.com> Wed, 28 Nov 2012 14:19:11 +0100 + +aptdaemon (0.45+bzr874-0ubuntu1) raring; urgency=low + + * New upstream snapshot: + - Fix ClientTest.test_tid_caching without a system D-BUS. + + -- Martin Pitt <martin.pitt@ubuntu.com> Mon, 26 Nov 2012 12:42:15 +0100 + +aptdaemon (0.45+bzr873-0ubuntu1) raring; urgency=low + + * debian/control: Update Vcs-* for raring branch. + * New upstream snapshot: + - Open Apport crash report files in binary mode (LP #1054984) + - Fix unicode decode error in py2 clients (LP #846044) + - Fix tests for stricter GPG key requirements of current python3-apt + (LP #1016643) + - Reorganize transaction ID caching to avoid using pygobject internals and + work with pygobject 3.7.x + - Fix deprecated GObject API calls + * Drop patches applied upstream: + - binary-mode-report-writing.patch + - test-long-keyids.patch + - lp846044.patch + - test-debconf-priority.patch + + -- Martin Pitt <martin.pitt@ubuntu.com> Mon, 26 Nov 2012 12:22:02 +0100 + +aptdaemon (0.45+bzr861-0ubuntu9.1) quantal-proposed; urgency=low + + [ Sebastian Heinlein ] + * do not issue a "quality warning" if dpkg-vendor is missing + (LP: #1066457) + + -- Michael Vogt <michael.vogt@ubuntu.com> Tue, 16 Oct 2012 13:58:07 +0200 + +aptdaemon (0.45+bzr861-0ubuntu9) quantal; urgency=low + + * Workaround that ensures that for sys.getfilesystemencoding() + "utf8" is used when the daemon is dbus auto-activatied (LP: #1058038) + + -- Michael Vogt <michael.vogt@ubuntu.com> Tue, 09 Oct 2012 14:27:36 +0200 + +aptdaemon (0.45+bzr861-0ubuntu8) quantal; urgency=low + + * debian/patches/lp846044.patch: + - fix unicode decode error in py2 clients (LP: #846044) + + -- Michael Vogt <michael.vogt@ubuntu.com> Mon, 08 Oct 2012 15:57:29 +0200 + +aptdaemon (0.45+bzr861-0ubuntu7) quantal; urgency=low + + * Following https://bugs.launchpad.net/bugs/1016643, + apt.auth.add_key_from_keyserver requires long (v4) keyids. Fix + tests.test_pk to account for that. + * Force debconf priority to high for test_debconf. + + -- Colin Watson <cjwatson@ubuntu.com> Sun, 07 Oct 2012 15:28:18 +0100 + +aptdaemon (0.45+bzr861-0ubuntu6) quantal; urgency=low + + * Ensure the transaction is simulated in the pkcompat layer to + ensure the high-trust repo support works from the packagekit + compatibilty layer. This is needed for the unity-webapps + passwordless install to work. + + -- Michael Vogt <michael.vogt@ubuntu.com> Thu, 04 Oct 2012 16:58:34 +0200 + +aptdaemon (0.45+bzr861-0ubuntu5) quantal; urgency=low + + * debian/patches/binary-mode-report-writing.patch: open our crash + report for writing in binary mode. Closes LP: #1054984. + + -- Steve Langasek <steve.langasek@ubuntu.com> Wed, 26 Sep 2012 10:24:48 -0700 + +aptdaemon (0.45+bzr861-0ubuntu4) quantal; urgency=low + + * debian/patches/apt-dbus-text-api.patch: + - Convert Origin.label from python-apt API to python-dbus API, for + Python 2 compatibility (LP: #978654). + + -- Colin Watson <cjwatson@ubuntu.com> Mon, 17 Sep 2012 15:12:38 +0100 + +aptdaemon (0.45+bzr861-0ubuntu3) quantal; urgency=low + + * debian/tests/control: Added missing dependencies required to run + autopkgtest. Thanks Jean-Baptiste Lallement! + + -- Martin Pitt <martin.pitt@ubuntu.com> Thu, 13 Sep 2012 19:17:22 +0200 + +aptdaemon (0.45+bzr861-0ubuntu2) quantal; urgency=low + + * Add autopkgtest integration. Thanks Jean-Baptiste Lallement! + + -- Martin Pitt <martin.pitt@ubuntu.com> Thu, 13 Sep 2012 12:45:12 +0200 + +aptdaemon (0.45+bzr861-0ubuntu1) quantal; urgency=low + + * New upstream snapshot: + - lp:~mvo/aptdaemon/support-for-whitelisted-repositories that adds + support for a new trusted-repo policykit action LP: #1035207 + - lp:~vorlon/aptdaemon/lp.1034806 that fixes unicode/str errors + LP: #768691, #926340, #1034806 + * debian/patches/fix_gettext_return_value_type.patch: + - dropped, merged as part of lp:~vorlon/aptdaemon/lp.1034806 + + -- Michael Vogt <michael.vogt@ubuntu.com> Thu, 13 Sep 2012 09:13:07 +0200 + +aptdaemon (0.45+bzr857-0ubuntu1) quantal; urgency=low + + * fix FTBFS in the tests when LANG/LANGUAGE is unset + + -- Michael Vogt <michael.vogt@ubuntu.com> Wed, 12 Sep 2012 12:02:38 +0200 + +aptdaemon (0.45+bzr856-0ubuntu1) quantal; urgency=low + + * New upstream snapshot: + - pkcompat: Fix get_files() LP: #1040619 (thanks to Martin Pitt) + - Fix crash when run inside non-ascii dirs LP: #1044900 + - Fix crash in widget's diff view if a @@ line does not have a range + LP: #875879 (thanks to Brian Murray) + - Support credentials change when adding a repository that is already + in sources.list/auth.conf + + -- Michael Vogt <michael.vogt@ubuntu.com> Fri, 07 Sep 2012 10:20:10 +0200 + +aptdaemon (0.45+bzr852-0ubuntu2) quantal; urgency=low + + * debian/patches/fix_gettext_return_value_type.patch: also return unicode + from aptdaemon.utils.IsoCodes.get_localised_name(). (LP: #1034806) + + -- Steve Langasek <steve.langasek@ubuntu.com> Sat, 11 Aug 2012 01:39:05 +0000 + +aptdaemon (0.45+bzr852-0ubuntu1) quantal; urgency=low + + [ Martin Pitt ] + * debian/rules: Make test suite failures fatal again. + + [ Michael Vogt ] + * New upstream snapshot: + - lp:~evfool/aptdaemon/lp1030988: + Change the error message for installation required from + unauthenticated sources (LP: #1030988) + - lp:~dobey/aptdaemon/fix-imports: + Check that the item in sys.modules is not None before trying to + import it + - fix "compatibilty" typo + + -- Michael Vogt <michael.vogt@ubuntu.com> Fri, 10 Aug 2012 16:16:03 +0200 + +aptdaemon (0.45+bzr848-0ubuntu2) quantal; urgency=low + + * debian/patches/fix_gettext_return_value_type.patch: + - Make sure to always return unicode from core.Transaction.gettext() + (LP: #926340). Based partially on a patch by Sebastian Heinlein. + + -- Colin Watson <cjwatson@ubuntu.com> Wed, 08 Aug 2012 16:19:51 +0100 + +aptdaemon (0.45+bzr848-0ubuntu1) quantal; urgency=low + + * New upstream snapshot: + - aptdaemon/client.py: Prefer GI GObject module. (LP: #1026066) + - lintian supports skipping user profiles since 2.5.9, make use of this to + simplify code a bit. + * debian/rules: Temporarily make test suite non-fatal while + tests.test_worker.WorkerTestCase.test_install_file() is failing, as above + fix is urgent for alpha-3. + + -- Martin Pitt <martin.pitt@ubuntu.com> Tue, 24 Jul 2012 10:09:31 +0200 + +aptdaemon (0.45+bzr846-0ubuntu1) quantal; urgency=low + + * New upstream snapshot: + - Python3 porting from lp:~aptdaemon-developers/aptdaemon/py3k + - Fix package status enum description for an unknown status + which resulted in a type mismatch in the gettext call + (fixes LP: #900982) + - Still report available blocked updates if the dependency system + is broken (final partial fix to LP: #932581) + - client: Use INT64 in signals where required (Fixes LP: #981124) + - use lintian profiles instead of tags + * debian/aptdaemon.install: + - use the new lintian profiles instead of the tags + * debian/patches/series: + - drop patches, applied upstream + + -- Michael Vogt <michael.vogt@ubuntu.com> Thu, 14 Jun 2012 12:27:44 +0200 + +aptdaemon (0.45-3) unstable; urgency=low + + * Drop the pkcompat package for now, to ease PackageKit 0.8 transition. Will + upload a new aptdaemon release after PK 0.8 migrated to testing. + + -- Julian Andres Klode <jak@debian.org> Fri, 28 Jun 2013 23:32:36 +0200 + +aptdaemon (0.45-2) unstable; urgency=medium + + * Check downloaded key id; merged from Ubuntu (CVE-2012-0962) + + -- Julian Andres Klode <jak@debian.org> Sat, 02 Mar 2013 18:57:17 +0100 + +aptdaemon (0.45-1) unstable; urgency=low + + * New upstream releases bringing a lot of bug fixes and improvements + * debian/control: + - Remove use of X(B|S)-Python-Version + - python-aptdaemon.pkcompat now provides packagekit-system-interface + which helps to avoid ugly or dependencies in PackageKit clients + - Don't use the shlibs depends since we don't have got any libraries + * debian/aptdaemon.install: + - Don't ship the aptdaemon.desktop file which was used in the apport + reports + + -- Sebastian Heinlein (Devel) <devel@glatzor.de> Mon, 11 Jun 2012 11:07:08 +0200 + +aptdaemon (0.43+bzr838-0ubuntu2) quantal; urgency=low + + * python3-aptdaemon.test needs to Breaks/Replaces python-aptdaemon.test, + which it replaces. + + -- Steve Langasek <steve.langasek@ubuntu.com> Wed, 13 Jun 2012 13:08:20 -0700 + +aptdaemon (0.43+bzr838-0ubuntu1) quantal; urgency=low + + * Upload of the latest Python3 porting efforts from trunk + * debian/patches: + - Add disable_simulate_test: Fails on build bot for unknown reasons + * debian/control: + - Switch aptdaemon package to Python3 by default + - Add new python3-aptdaemon.gtk3widgets package + - Replace python-aptdaemon.test by python3-aptdaemon.test + - Replace python-aptdaemon.pkcompat by python3-aptdaemon.pkcompat + - python3-aptdaemon.pkcompat provides the new virtual package + packagekit-system-interface to obsolete the OR dependencies + with packagekit of PackageKit clients + - Remove policykit1 dependecy from the modules and add it to the server + package + - Remove not used shlibs macros + - Remove dependency to python-packagekit, since we ship the enums + in python3-aptdaemon.pkcompat + - Add build dependencies to run the test suite + * debian/rules: + - Build with Python2 and 3 + - Enable the test suite + * debian/*.(install|docs|examples): + - Adpat to above package changes + + [ Steve Langasek ] + * debian/control: + - Remove python-software-properties dependency in favor of new + python-apt with apt.auth module + - Add explicit depends, build-depends on iso-codes, which is needed but + is otherwise only a Recommend. + * aptdaemon/test.py: explicitly set the chroot directory in the apt config + as part of the test setup, without which apt-key's chroot handling won't + work. + * test/test_pk.py: increase the sleep on startup, to allow longer for + fake-polkitd to start up. + * aptdaemon/worker.py: restore compatibility with python2, which doesn't + have urllib.parse. + + -- Steve Langasek <steve.langasek@ubuntu.com> Wed, 13 Jun 2012 09:44:55 -0700 + +aptdaemon (0.43+bzr810-0ubuntu3) quantal; urgency=low + + * debian/python-aptdaemon.test.install: Fix installation path of + dpkg-wrapper.sh. + + -- Martin Pitt <martin.pitt@ubuntu.com> Wed, 23 May 2012 12:53:16 +0200 + +aptdaemon (0.43+bzr810-0ubuntu2) quantal; urgency=low + + * debian/control: Update Vcs-* for quantal branch. + * debian/python-aptdaemon.test.install: Install test dbus.conf. + + -- Martin Pitt <martin.pitt@ubuntu.com> Tue, 22 May 2012 11:01:33 +0200 + +aptdaemon (0.43+bzr810-0ubuntu1) quantal; urgency=low + + * new upstream snapshot + * debian/control: + - add lintian recommends to get automatic checking of deb + packages + + -- Michael Vogt <michael.vogt@ubuntu.com> Fri, 11 May 2012 15:56:04 +0200 + +aptdaemon (0.43+bzr805-0ubuntu1) precise; urgency=low + + * New upstream snapshot: + - Fix: Catch a possible exception in apt.cache.Cache.required_download + which can occur if the user e.g. rebooted the system during a running + debconf question (fixes LP: #659438) + Furthermore raise ERROR_INCOMPLETE_INSTALL to signal the client + that a call of FixIncompleteInstall() (basically a dpkg --configure -a + call) fixes the issue + - Fix: Sync all properties of the D-Bus transaction in the client before + emitting the Finished signal (fixes LP: #747172) to ensure all changed + properties are available (the order of received signals is not + guranteed and the finished signal could be received before an error + signal) + Additionally raise the timeout before removing a transaction from + D-Bus on the server side to give clients more time to sync + - Fix wrong variable names in the download progress (fixes LP: #971839, + LP: #976521) + - Fix: Catch a possible pipe reading error (fixes LP: #733090) + - Fix: Don't show the name of aptdaemon in crash reports + (fixes LP: #973370) + Aptdaemon is a system daemon and should work and fail silently + - Fix: Fallback to a default terminal width of 80 chars (fixes LP: #948588) + The width request could fail on standard input/output redirections + - Fix: Don't use a reserved name for the simulate helper function + - Fix: Convert exceptions to string before raising TransactionFailed() + - Fix wrong variable name in the add license key failed error message + - Fix: Don't overwrite the GObject.GObject.disconnect in + aptdemon.client.Transaction by renaming the method to + _disconnect_from_dbus() + - Fix: Allow to cancel a transaction which hasn't been queued yet and + is still in limbo + - Fix: Raise NotImplementedError instead of ImplementedError + - Add a test case for config file changes handling + * debian/aptdaemon.install: + - Don't ship the obsolete .desktop file anymore + + -- Sebastian Heinlein <glatzor@ubuntu.com> Mon, 09 Apr 2012 20:48:44 +0200 + +aptdaemon (0.43+bzr790-1) unstable; urgency=high + + * New upstream snapshot + * fixes CVE-2012-0944 + + -- Michael Vogt <mvo@debian.org> Mon, 02 Apr 2012 20:57:57 +0200 + +aptdaemon (0.43+bzr790-0ubuntu1) precise; urgency=low + + New upstream snapshot: + * merged patch for LP: #959131 (CVE 2012-0944) + * pkcompat: Don't crash if the system time went backwards during a + transaction (Fixes LP: #940367) + * worker: catch SystemErrors from python-apt when performing a system + upgrade (fixes LP: #932581) + * pkcompat: Don't crash if an unsupported locale is used for the + transaction, fixes LP: #944553 + * Fix download progress information for translations of languages with + an ISO 639 2T code (3 letters), e.g. Asturian (ast) - fixes LP: #966111 + * test: Add a test to ensure that every transaction is simulated + before it gets queued. + + -- Michael Vogt <michael.vogt@ubuntu.com> Mon, 02 Apr 2012 19:04:16 +0200 + +aptdaemon (0.43+bzr784-0ubuntu1) precise; urgency=low + + New upstream snapshot: + * lock: Fix an exception if the lock file doesn't exists + (fixes LP: #954581) + * Decrease the priority of the daemon to avoid blocking the user + interface (fixes LP: #942437) + * Make the network detection code more robust (Fixes LP:#933597) + * Add missing file to POTFILES.in. (LP: #953938) + * more fixes + + -- Michael Vogt <michael.vogt@ubuntu.com> Wed, 14 Mar 2012 13:26:31 +0100 + +aptdaemon (0.43+bzr778-0ubuntu1) precise; urgency=low + + * fix crash in pkgcompat on restart_required + + -- Michael Vogt <michael.vogt@ubuntu.com> Fri, 09 Mar 2012 09:26:06 +0100 + +aptdaemon (0.43+bzr777-0ubuntu1) precise; urgency=low + + * New upstream snapshot: + - store sources.list credentials in /etc/apt/auth.conf instead of + sources.list to avoid having to make sources.list file(s) mode + 0640 + - pkcompat: Support the RequireRestart signal + - worker: Allow to install an alternative version (by number or by + origin) of an already installed package + - pkcompat: improve UpdatesChanged signal emission + - pkcompat: Completely adapt to the python-apt 0.8 API + - pkcompat: Don't throw an error if we try to cancel a native pk + transaction + + -- Michael Vogt <michael.vogt@ubuntu.com> Fri, 09 Mar 2012 09:02:40 +0100 + +aptdaemon (0.43+bzr769-1) unstable; urgency=low + + * New upstream snapshot + - Works without pkcompat (Closes: #652644) + * Merge with Ubuntu; remaining changes: + - debian/control: Changes of Vcs, Maintainer stuff + - Do not use dh-translations + + -- Julian Andres Klode <jak@debian.org> Mon, 05 Mar 2012 16:03:14 +0100 + +aptdaemon (0.43+bzr769-0ubuntu1) precise; urgency=low + + * New upstream snapshot: + - Add plugin support to PackageKit compat layer. + - Port to gobject-introspection. + - Various bug fixes. + * debian/control: Update dependencies for GI. + + -- Martin Pitt <martin.pitt@ubuntu.com> Fri, 03 Feb 2012 06:37:42 +0100 + +aptdaemon (0.43+bzr756-0ubuntu1) precise; urgency=low + + [ Chris Coulson ] + * After simulating a transaction, correctly disconnect from the + "transaction-simulated" signal + + [ Sebastian Heinlein ] + * Catch exceptions in apt.debfile.DebFile.check() + + -- Michael Vogt <michael.vogt@ubuntu.com> Tue, 03 Jan 2012 13:30:22 +0100 + +aptdaemon (0.43+bzr754-0ubuntu1) precise; urgency=low + + [ Martin Pitt ] + * debian/control: debian/control: Move from transitional python-gobject to + python-gi for GTK3 package. + + [ Michael Vogt ] + * New bzr snapshot + + [ Robert Roth ] + * Fix license typo (LP: #903911) + * Change from up-to-date to up to date for consistency (LP: #864336) + + [ Sebastian Heinlein ] + - Fix downgrade option of aptdcon + - Add support for cancelling the transaction in PK + - Fix changelog cache cleanup + - Typo fixes + + -- Michael Vogt <michael.vogt@ubuntu.com> Thu, 15 Dec 2011 10:15:46 +0100 + +aptdaemon (0.43+bzr742-0ubuntu1) precise; urgency=low + + * New bzr snapshot: + - Fix resizing the GTK3 progress dialog (LP: #840942) + - py3 exception compat fixes + - fixes in pkcompat code + - merged "pretty repo" branch with nicer progress information on + cache updates + - cache changelogs + + -- Michael Vogt <michael.vogt@ubuntu.com> Thu, 01 Dec 2011 14:40:52 +0100 + +aptdaemon (0.43+bzr715-0) UNRELEASED; urgency=low + + * new bzr snapshot: + - Add a small README about the state of the PackageKit compatibilty + - Add support for the store_in_cache argument of PackageKit's + DownloadPackages + - Do an additional resolver run to ensure that autoremove does + not leave the cache inconsistent + * debian/patches: + - Remove 01_add_dpkg_untranslated_messages_env.patch (merged by upstream) + - Remove 03_additional_resolve_run.patch (merged upstream) + * debian/python-aptdaemon.pkcompat.docs: Ship README + * debian/README.Debian: Removed since obsolete + + -- Sebastian Heinlein <devel@glatzor.de> Mon, 21 Nov 2011 12:04:11 +0100 + +aptdaemon (0.43+bzr713-1) unstable; urgency=low + + * Merge with Ubuntu, remaining differences: + - debian/control: Changes of Vcs, Maintainer stuff + - Do not use dh-translations + * New upstream snapshot (revision 713) + + -- Julian Andres Klode <jak@debian.org> Mon, 21 Nov 2011 11:24:00 +0100 + +aptdaemon (0.43+bzr712-0ubuntu1) precise; urgency=low + + [ Michael Vogt ] + * Merged from the latest debian upload + (thanks Julian Andres Klode) + + [ Sebastian Heinlein ] + * new bzr snapshot with: + - pkcompat branch + - async simulate + * add new python-aptdaemon.pkgcompat package that provides the + packagekit system API + + -- Michael Vogt <michael.vogt@ubuntu.com> Mon, 21 Nov 2011 10:08:24 +0100 + +aptdaemon (0.43+bzr707-1) unstable; urgency=low + + [ Julian Andres Klode ] + * Merge with Ubuntu, remaining differences: + - debian/control: Vcs, Maintainer changes. + * Merge brings us: + - New version (Closes: #644613) + - Use of python2 instead of python-central (Closes: #616738) + * Do not use dh-translations + + [ Sebastian Heinlein ] + * New bzr snapshot: + - Add the PackageKit compatibilty layer + * debian/control: + - Add new binary package python-aptdaemon.pkcompat + - Correct VCS location + * debian/python-aptdaemon: + - Ship the networking module + + -- Julian Andres Klode <jak@debian.org> Sun, 20 Nov 2011 14:49:48 +0100 + +aptdaemon (0.43+bzr703-0ubuntu1) precise; urgency=low + + * New bzr snapshot: + - Merge the AddLicenseKey method + - Replace the backported unittest2 framework by the native one of + Python 2.7 and Nose to collect the tests + + -- Michael Vogt <michael.vogt@ubuntu.com> Fri, 18 Nov 2011 12:03:22 +0100 + +aptdaemon (0.43+bzr701-0ubuntu1) precise; urgency=low + + * new bzr snapshot: + - aptdaemon/progress.py: fix crash when a translation has the wrong + number of %s (LP: #858684) + - Map messages from apt on the status-fd to enums to provide better + terms and translations in the future - fixes LP#641262 + - lp:~mpt/aptdaemon/bug-635138: + * Fixes bug 635138 (Apt cache repair 'In Progress' text is + 'Repairing broken deps'). + * debian/patches/02_fix_crash_on_dpkg_disappear.patch: + - dropped, we are out of stringfreeze now + + -- Michael Vogt <michael.vogt@ubuntu.com> Mon, 14 Nov 2011 09:26:01 +0100 + +aptdaemon (0.43+bzr697-0ubuntu1) oneiric; urgency=low + + * debian/patches/03_additional_resolve_run.patch: + - do an additional resolver run to ensure that autoremove does + not leave the cache inconsistent (LP: #659111) + + -- Michael Vogt <michael.vogt@ubuntu.com> Wed, 28 Sep 2011 13:36:53 +0200 + +aptdaemon (0.43+bzr697) oneiric; urgency=low + + * New bzr bugfix version: + - Don't block on lintian calls to avoid time outs on the DBus + by making use of the excellent preexec_fn of subprocess + (LP: #812023) + - pyflakes based import fixes, this fixes a unneeded glib import + that can cause crashes with gtk2/gtk3 (pygtk/pygi) + - use the deprecated message attribute to avoid encoding errors + (LP: #846044) + + -- Michael Vogt <michael.vogt@ubuntu.com> Mon, 19 Sep 2011 14:01:15 +0200 + +aptdaemon (0.43+bzr695) oneiric; urgency=low + + * New bzr snapshot: + - Don't track valid DBusException sent to the client by apport + - Make TransactionProgressDialog.run() method deferable + - Unset the apt-listbugs frontend in non-interactive mode + - Workaround a bug in apt's ListUpdate which doesn't handle + cancellation properly + * debian/changelog: Fix a typo in the previous log entry + + -- Michael Vogt <michael.vogt@ubuntu.com> Wed, 14 Sep 2011 15:48:01 +0200 + +aptdaemon (0.43+bzr691) oneiric; urgency=low + + * New bzr snapshot: + - Fix integer overflows in the ProgressDetails property (LP: #827677, + LP: #834104) by switching to dbus.Double and dbus.Int64 + - Fix apport crash reports on dpkg failure (LP: #799982) + + -- Sebastian Heinlein <devel@glatzor.de> Fri, 26 Aug 2011 15:22:19 +0200 + +aptdaemon (0.43+bzr686) oneiric; urgency=low + + * New bzr snapshot: + - Improve apport integration by adding a package hook and only sending + reports if running as a system service + - Fix default values for ProgressDetails signal + - Fixes to the test suite + - More debugging output to help resolve DBus type conversion/overflow + errors + * debian/aptdaemon.install: + - Ship apport package hook + - Ship desktop file to provide a nicer name in apport dialogs + * debian/control: + - Add missing dependency on python-pkg-resources to python-aptdaemon + (LP: #788121) + + -- Sebastian Heinlein <devel@glatzor.de> Fri, 26 Aug 2011 08:13:42 +0200 + +aptdaemon (0.43+bzr676-0ubuntu1) oneiric; urgency=low + + * new bzr snapshot: + - Make the handling of exceptions in the forked child process + more robust + - Fix showing the header of the translation (.mo file) + if we try to translate an empty string + + -- Michael Vogt <michael.vogt@ubuntu.com> Thu, 25 Aug 2011 10:30:13 +0200 + +aptdaemon (0.43+bzr674-0ubuntu1) oneiric; urgency=low + + * new bzr snapshot: + - add /var/log/apt/history.log integration + - switch bytes_{done,total} to 64bit to follow a change in apt + (LP: #825468) + - fix multiarch names (LP: #828898, LP: #828162) + + -- Michael Vogt <michael.vogt@ubuntu.com> Tue, 23 Aug 2011 11:29:50 +0200 + +aptdaemon (0.43+bzr670-0ubuntu1) oneiric; urgency=low + + * New bzr snapshot: Fix previous patch to only use GObject when actually + using GI. + + -- Martin Pitt <martin.pitt@ubuntu.com> Wed, 17 Aug 2011 13:58:17 +0200 + +aptdaemon (0.43+bzr669-0ubuntu1) oneiric; urgency=low + + * New bzr snapshot: Move from static gobject to GI GObject module, to be + compatible to upcoming pygobject 3.0. + + -- Martin Pitt <martin.pitt@ubuntu.com> Wed, 17 Aug 2011 08:11:43 +0200 + +aptdaemon (0.43+bzr666-0ubuntu1) oneiric; urgency=low + + * new bzr snapshot: + - fix LP: #818521 + - prepare for py3 + - fix crash in _parse_localename() (LP: #825056) + + -- Michael Vogt <michael.vogt@ubuntu.com> Fri, 12 Aug 2011 11:13:32 +0200 + +aptdaemon (0.43+bzr663-0ubuntu1) oneiric; urgency=low + + * New bzr snapshot add adds a RebootRequiered property + + -- Michael Vogt <michael.vogt@ubuntu.com> Thu, 28 Jul 2011 16:44:12 +0200 + +aptdaemon (0.43+bzr662-0ubuntu1) oneiric; urgency=low + + * New bzr snapshot + * debian/patches/01_add_dpkg_untranslated_messages_env.patch: + - add DPKG_UNTRANSLATED_MESSAGES environment in the child + to force untranslated dpkg messages for easier bug duplication + detection + + -- Michael Vogt <michael.vogt@ubuntu.com> Tue, 28 Jun 2011 10:01:10 +0100 + +aptdaemon (0.43+bzr660-0ubuntu1) oneiric; urgency=low + + * New bzr snapshot, this will improve the quality of the + apport pkgfailure reports + + -- Michael Vogt <michael.vogt@ubuntu.com> Fri, 10 Jun 2011 11:34:50 +0200 + +aptdaemon (0.41+bzr658-0ubuntu2) oneiric; urgency=low + + * debian/control: Drop GTK2 GIR dependencies, only use GTK 3 now. + * debian/control: Drop lintian recommends. It's too heavy for a default + install (pulling in dpkg-dev, build-essential, g++, lots of Perl, and + associated helper tools like diffstat). This will be replaced with + aptdaemon or software-center installing lintian when you add a third-party + repository. (UbuntuSpec:desktop-o-cdspace) + * debian/control: Fix "allows to" grammar error, thanks lintian. + + -- Martin Pitt <martin.pitt@ubuntu.com> Tue, 31 May 2011 10:54:29 +0200 + +aptdaemon (0.41+bzr658-0ubuntu1) oneiric; urgency=low + + * New bzr snapshot, this fixes (LP: #781874) + + -- Michael Vogt <michael.vogt@ubuntu.com> Mon, 16 May 2011 11:48:39 +0200 + +aptdaemon (0.41+bzr657-0ubuntu1.1) natty-proposed; urgency=low + + * patches/fix_lp_781874.patch: + - fix bug when canceling a transaction (LP: #781874) + + -- Michael Vogt <michael.vogt@ubuntu.com> Mon, 16 May 2011 11:39:08 +0200 + +aptdaemon (0.41+bzr657-0ubuntu1) natty-proposed; urgency=low + + * New bzr bugfix snapshot: + - fix FD leak (LP: #742935) + - fix interrupts in a forked child + - fix crash when dbus exceptions have unicode messages (LP: #761386) + + -- Michael Vogt <michael.vogt@ubuntu.com> Thu, 28 Apr 2011 17:55:29 +0200 + +aptdaemon (0.41+bzr651-0ubuntu1) natty; urgency=low + + * New bzr bugfix snapshot: + - ensure dbus exceptions strings are utf8 + - merge 01_fix_locking.patch upstream + - merge 03_do_not_close_invalid_fd.patch upstream + * debian/patches/02_fix_crash_on_dpkg_disappear.patch: + - refreshed + + -- Michael Vogt <mvo@ubuntu.com> Tue, 19 Apr 2011 08:52:09 +0200 + +aptdaemon (0.41+bzr646-0ubuntu2) natty; urgency=low + + * debian/patches/01_fix_locking.patch: + - cherry pick from evfool, many thanks (LP: #764422) + * debian/patches/02_fix_crash_on_dpkg_disappear.patch: + - add (empty) mapping the apt progress message that is triggered + when a empty package disappears + + -- Michael Vogt <michael.vogt@ubuntu.com> Mon, 18 Apr 2011 13:48:38 +0200 + +aptdaemon (0.41+bzr646-0ubuntu1) natty; urgency=low + + * New bzr bugfix snapshot: + - fix crash in wait_for_lock (LP: #763642) + + -- Michael Vogt <michael.vogt@ubuntu.com> Mon, 18 Apr 2011 09:25:51 +0200 + +aptdaemon (0.41+bzr645-0ubuntu1) natty; urgency=low + + * New bzr bugfix snapshot: + - fix state of queue transactions (LP: #702442) + - unify cache open (LP: #694505) + - relax lintian check on libc (for lsb) + - catch overflow errors (LP: #758837) + * debian/lintian-{fatal,nonfatal}.tag.Ubuntu: + - rename from "tag" to "tags" so that they actually get applied + (LP: #712377) + + -- Michael Vogt <michael.vogt@ubuntu.com> Fri, 15 Apr 2011 13:57:10 +0200 + +aptdaemon (0.41+bzr641-0ubuntu1) natty; urgency=low + + * debian/lintian-nonfatal.tag.Ubuntu: + - relax checks more (LP: #756649) + - relax libc check, not valid for e.g. lsb packages + - call cache.open() after cache.update() + - utf8 fixes (LP: #736507) + - lock fixes + - fix cdrom medium detection (LP: #755655) + + -- Michael Vogt <michael.vogt@ubuntu.com> Thu, 14 Apr 2011 16:31:39 +0200 + +aptdaemon (0.41+bzr629-0ubuntu1) natty; urgency=low + + * New bzr bugfix snapshot: + - improve utf8 encoding handling tests + - lp:~mvo/aptdaemon/relax-lintian-checks merged + - improve terminal handling, LP: #741260, #693290, #741260, + #738056, #742780, #743818, #744444, #746727, #747539, #753700, + #753762, #753927, #754134, #754174, #754205, #754206, #754220 + - fix refactoring lefovers (LP: #752220) + - don't segfault if we cannot read the status of the process holding + a lock (LP: #745517) + * debian/patches/01_relax_lintian_checks.patch: + - removed, taken upstream + * debian/patches/02_fix_unicode_in_convert_struct.patch: + - removed, taken usptream + * debian/patches/04_import_logging.patch: + - removed, fixed usptream + + -- Michael Vogt <michael.vogt@ubuntu.com> Tue, 12 Apr 2011 13:25:49 +0200 + +aptdaemon (0.41+bzr614-0ubuntu3) natty; urgency=low + + * debian/patches/04_import_logging.patch: + - Import logging to resolve undefined name. (LP: #752220) + + -- Barry Warsaw <barry@ubuntu.com> Fri, 08 Apr 2011 18:36:22 -0400 + +aptdaemon (0.41+bzr614-0ubuntu2) natty; urgency=low + + * debian/patches/02_fix_unicode_in_convert_struct.patch: + - Decode non-unicode strings in _convert_struct (LP: #736507) + * debian/patches/03_do_not_close_invalid_fd.patch: + - Do not close invalid streams (LP: #741370) + + -- Julian Andres Klode <juliank@ubuntu.com> Thu, 07 Apr 2011 10:02:21 +0200 + +aptdaemon (0.41+bzr614-0ubuntu1) natty; urgency=low + + * New bzr bugfix snapshot: + - fix i18n crash (LP: #724735) + - Allow to specify package names with an architecture + (for multiarch) + - Client: Exit the transaction processing if there has been an + error + - Make the run method of the GTK2 progress dialog deferable + (LP: #626798) + * debian/patches/01_relax_lintian_checks.patch: + - add lp:~mvo/aptdaemon/relax-lintian-checks as distro patch + until upstream (LP: #712377) + + -- Michael Vogt <michael.vogt@ubuntu.com> Tue, 05 Apr 2011 16:31:37 +0200 + +aptdaemon (0.41+bzr604-0ubuntu1) natty; urgency=low + + * New bzr bugfix snapshot: + - fix fix typo (LP: #733732), thanks to seb128 + - Fix variable name in the Finished signal + - Don't raise an error if trying to close an already closed fd + - Open the controlling terminal already at the SetTerminal call time + - bugfix in the apt config parser + * debian/patches/disable_config_parser_test.patch: + - removed, this is properly fixed now + + -- Michael Vogt <michael.vogt@ubuntu.com> Wed, 23 Mar 2011 15:44:07 +0100 + +aptdaemon (0.41+bzr597-0ubuntu1) natty; urgency=low + + * New upstream bzr snapshot: + - data/org.debian.apt.policy.in: Drop gettext domain field, it will be + added during package build. (LP #690270 upstream task) + * debian/control, debian/rules: Build with dh_translations. (LP: #690270) + + -- Martin Pitt <martin.pitt@ubuntu.com> Thu, 17 Mar 2011 12:30:25 +0100 + +aptdaemon (0.41+bzr595-0ubuntu1) natty; urgency=low + + * New upstream bzr snapshot: + - fix installing local debs (LP: #702217) + + -- Michael Vogt <michael.vogt@ubuntu.com> Tue, 08 Mar 2011 08:52:55 +0100 + +aptdaemon (0.41+bzr594-0ubuntu1) natty; urgency=low + + * New upstream bzr snapshot: + - Show details about broken dependencies + - Call waitpid after reading the output from lintian to avoid interrupted + system calls on systems under heavy load + - aptdaemon/worker.py, tests/test_client.py: fix crash in + enable_distro_component and add test, update docstring (and fix + docstring for remove_vendor_key along the way) + - aptdaemon/worker.py, tests/test_client.py: fix crash in + client.add_repository(), add test for client.add_repository(), refactor + test for enable_component() to make it more generic + - gtk3widgets.py: Fix require_version usage. + * debian/control: Add appropriate python-gobject dependency to + python-aptdaemon.gtk3widgets, to ensure availability of PyGI. + + -- Martin Pitt <martin.pitt@ubuntu.com> Thu, 03 Mar 2011 17:31:24 +0100 + +aptdaemon (0.41+bzr586-0ubuntu2) natty; urgency=low + + * debian/control: Add proper Conflicts:/Replaces: to avoid file overwrite + error on upgrades. (LP: #724683) + + -- Martin Pitt <martin.pitt@ubuntu.com> Fri, 25 Feb 2011 09:29:02 +0100 + +aptdaemon (0.41+bzr586-0ubuntu1) natty; urgency=low + + * new bzr snapshot that contains a security fix for + LP: #722228 + * support for set-candidate-release added + * debian/control: + - remove python-{unittest2,mock} from the build-depends + - build for python >= 2.7 + * disable testsuite during build time until the MIR for + python-{unittest2,mock} are done + + -- Michael Vogt <michael.vogt@ubuntu.com> Tue, 22 Feb 2011 16:18:34 +0100 + +aptdaemon (0.41+bzr582-0ubuntu1) natty; urgency=low + + [ Sebastian Heinlein ] + * New upstream version: + - Strictly use the specified D-Bus types in signal and return values + allowing to write non-Python bindings + - New GTK3 client widgets (thanks to Martin Pitt) + - Greatly enhanced test suite by moving to unittest2, allowing to perform + package operations in a chroot and running tests on a local session + dbus: "dbus-launch unit2 discover" + - Improved error reporting + - Improved open progress (Thanks to Michael Vogt) + - Run lintian as the user who initiated the transaction + - Several bug fixes (fixes LP: #707490, LP: #712838) + + * debian/control: + - Add python-aptdaemon.gtkwidgets and python-aptdaemon.gtk3widgets + instead of a shared python-aptdaemon-gtk to follow the package + naming of the Python policy. Python-aptdaemon-gtk is kept as + a transitional dummy package + - Add a new aptdaemon-data package which provides common files + (e.g. icons) for the client modules + - aptdaemon recommends lintian to test local packages before + installing + - Add build dependencies on python-apt, python-gobject, python-defer, + python-software-properties, python-dbus, python-debian, + python-mock, dbus-x11 and python-unittest2 to run unittests at build + time + - Add missing dependency on python-dbus and python-debian to + python-aptdaemon + - Add a new package python-aptdaemon.test package which provides + the infrastructure to write unittests for aptdaemon clients + - Raise Python minimum version to 2.6 + + * debian/patches: + - Remove 09_fix_index_race_659438 - merged upstream + - Remove 00upstream_gtk3_fixes - merged upstream + - Remove 05_sources_list_password - merged upstream + - Add disable_config_parser_test.patch: The test fails on the build + system. Needs some more investigation. So temporarily disabled. + + * debian/rules: + - Run the test suite at package build time by overriding dh_auto_test + + * debian/python-aptdaemon.test.(install|examples): + - Ship the aptdaemon.test module, the silly packages repo, the dpkg + wrapper and the fake PolicyKit daemon + + * debian/python-aptdaemon.gtk(3)widgets.(install|example): + - Ship the corresponding Python module and example client + + * debian/aptdaemon-data.install: + - Ship the icons + + [ Michael Vogt ] + * debian/control: + - add missing Replaces + + -- Michael Vogt <michael.vogt@ubuntu.com> Wed, 09 Feb 2011 10:33:15 +0100 + +aptdaemon (0.40+bzr541-0ubuntu2) natty; urgency=low + + * Add 00upstream_gtk3_fixes.patch: Adjust gtk3widgets.py to work with + current pygobject/gtk. Taken from upstream branch r563. + + -- Martin Pitt <martin.pitt@ubuntu.com> Fri, 28 Jan 2011 15:45:29 +0100 + +aptdaemon (0.40+bzr541-0ubuntu1) natty; urgency=low + + * New upstream bzr snapshot: + - gtk3widgets.py: Put back AptTerminal class, now that vte has a GTK3 GIR + - gtk3widgets.py: Make work with GTK2, too + - gtk3widgets.py: When using GTK 2, import the correct Vte GIR version + - Documentation fixes. + * debian/control: Add alternative gir-* dependencies. + + -- Martin Pitt <martin.pitt@ubuntu.com> Mon, 10 Jan 2011 21:11:13 -0600 + +aptdaemon (0.40+bzr529-0ubuntu3) natty; urgency=low + + [ Sebastian Heinlein ] + * debian/patches/09_fix_index_race_659438.patch: + - If the background cron job rebuilds the apt indexes the + apt.Cache.required_download method fails, since it tries to access + the not available indexes. This patch is a workaround since it + is requires a lock on the indexes before caluclating the size + (LP: #659438) + + -- Michael Vogt <michael.vogt@ubuntu.com> Mon, 03 Jan 2011 12:26:48 +0100 + +aptdaemon (0.40+bzr529-0ubuntu2) natty; urgency=low + + * No-change rebuild to prefer python2.7. + + -- Martin Pitt <martin.pitt@ubuntu.com> Wed, 22 Dec 2010 09:33:29 +0100 + +aptdaemon (0.40+bzr529-0ubuntu1) natty; urgency=low + + * new bzr snapshot: + - fixes crash when there is no aptdaemon translation for the + language in use is available + + -- Michael Vogt <michael.vogt@ubuntu.com> Tue, 07 Dec 2010 14:04:23 +0100 + +aptdaemon (0.40+bzr527-0ubuntu1) natty; urgency=low + + * New upstream release 0.40. This involves some API changes, so please test + and adapt your programs. See NEWS for details. + * Upgrade to current upstream bzr head, which adds a gtk3widgets module + which uses GTK 3.0 and pygobject (with introspection). gtk3-demo.py is a + corresponding port of gtk-demo.py. + * 05_sources_list_password.patch: Unfuzz. + * Drop 07_fix-race-597017.patch, upstream now. + * Drop 08_fix_deb_install.patch, fixed differently upstream. + * debian/python-aptdaemon.install: Drop defer.py, it's now a separate + project. Add dependency to python-defer in debian/control. + * debian/python-aptdaemon.install: Install the new modules from upstream. + * debian/python-aptdaemon-gtk.install, debian/python-aptdaemon-gtk.examples: + Install the gtk3 variants of the module and example script. + * debian/control: Update Vcs-Bzr: to natty branch. + * debian/rules: Switch from pycentral to dh_python2. Drop python-central + build dependency. + * debian/control: Bump Standards-Version to 3.9.1 (no changes necessary). + + -- Martin Pitt <martin.pitt@ubuntu.com> Tue, 07 Dec 2010 11:44:07 +0100 + +aptdaemon (0.33-0ubuntu1) natty; urgency=low + + * new upstream release + * debian/patches/06_rosetta_po_update.patch: + - removed, upstream has up-to-date translations + + -- Michael Vogt <michael.vogt@ubuntu.com> Wed, 20 Oct 2010 09:40:01 +0200 + +aptdaemon (0.31+bzr506-0ubuntu3) maverick-proposed; urgency=low + + * debian/patches/08_fix_deb_install.patch: + - fix installing deb packages with odd/broken installed-size + fields (LP: #656633) + + -- Michael Vogt <michael.vogt@ubuntu.com> Tue, 19 Oct 2010 16:52:13 +0200 + +aptdaemon (0.31+bzr506-0ubuntu2) maverick; urgency=low + + * 07_fix-race-597017.patch: + - fix race in locking by backporting the relevant bits from + lp:aptdaemon/trunk (thanks to Sebastian Heinlein) + (LP: #597017) + + -- Michael Vogt <michael.vogt@ubuntu.com> Tue, 05 Oct 2010 18:04:52 +0200 + +aptdaemon (0.31+bzr506-0ubuntu1) maverick; urgency=low + + * fix incorrect error message on failed key adding + * fix crash when sys.stdin.encoding returns None + * fix gettext string (thanks Gabor) + + -- Michael Vogt <michael.vogt@ubuntu.com> Mon, 27 Sep 2010 22:55:21 +0200 + +aptdaemon (0.31+bzr503-0ubuntu1) maverick; urgency=low + + * merge fixes from bzr: + - allow purge of removed files with conffiles left + - fix bug when deferable is called with sync=True + - use wait=False in enable_distro component + - Fix local dpkg installation from unicode pathes by + converting the strings to UTF-8 + - fix potential exception in wait=True, defer=True calls + + -- Michael Vogt <michael.vogt@ubuntu.com> Thu, 16 Sep 2010 09:11:50 +0200 + +aptdaemon (0.31+bzr496-0ubuntu1) maverick; urgency=low + + * merge fixes from bzr: + - fix for aptdaemon.client.get_transaction() + - autodetect if "defer" is needed + + -- Michael Vogt <michael.vogt@ubuntu.com> Fri, 10 Sep 2010 10:23:34 +0200 + +aptdaemon (0.31+bzr493-0ubuntu1) maverick; urgency=low + + * new bzr snapshot: + - makes 03_auth_me_less.patch no longer needed (applied upstream) + - improvements to the policykit privs + + -- Michael Vogt <michael.vogt@ubuntu.com> Thu, 09 Sep 2010 17:25:30 +0200 + +aptdaemon (0.31+bzr488-0ubuntu1) maverick; urgency=low + + * new bzr snapshot: + - makes 07_i18n_fixes.patch no longer needed (applied upstream) + - supports partial cache update (important fix for the buy-something + use case) + - fix missing (untranslated) role strings + * debian/control: + - depend on the right python-apt version + + -- Michael Vogt <michael.vogt@ubuntu.com> Thu, 09 Sep 2010 11:39:45 +0200 + +aptdaemon (0.31+bzr487-0ubuntu1) maverick; urgency=low + + * new bzr snapshot: + - makes 07_i18n_fixes.patch no longer needed (applied upstream) + - supports partial cache update (important fix for the buy-something + use case) + - fix missing (untranslated) role strings + * debian/control: + - depend on the right python-apt version + + -- Michael Vogt <michael.vogt@ubuntu.com> Thu, 09 Sep 2010 17:10:24 +0200 + +aptdaemon (0.31+bzr476-0ubuntu2) maverick; urgency=low + + * debian/patches/07_i18n_fixes.patch: + - use dgettext to not clobber the clients gettext.textdomain + on import (LP: #631675) + * debian/patches/05_sources_list_password.patch: + - when adding a sources.list entry with a password protect + the file via mode 0640 and root.admin ownership + + -- Michael Vogt <michael.vogt@ubuntu.com> Wed, 08 Sep 2010 09:38:31 +0200 + +aptdaemon (0.31+bzr476-0ubuntu1) maverick; urgency=low + + * new bzr snapshot that fixes missing i18n in the policykit + descriptions (LP: #625409) + + -- Michael Vogt <michael.vogt@ubuntu.com> Tue, 31 Aug 2010 22:27:29 +0200 + +aptdaemon (0.31+bzr474-0ubuntu1) maverick; urgency=low + + * new bzr snapshot that fixes some locking issues (LP: #616470) + * debian/python-aptdaemon.install: + - add lock.py to the installed files + + -- Michael Vogt <michael.vogt@ubuntu.com> Wed, 25 Aug 2010 16:50:28 +0200 + +aptdaemon (0.31+bzr468-0ubuntu1) maverick; urgency=low + + * new bzr snapshot that fixes authentication timeout problem + (LP: #623424), big thanks to Sebastian Heinlein + + -- Michael Vogt <michael.vogt@ubuntu.com> Tue, 24 Aug 2010 20:49:32 +0200 + +aptdaemon (0.31+bzr466-0ubuntu1) maverick; urgency=low + + * .bzr-builddeb/default.conf: + - switch to lp:~aptdaemon-developers/aptdaemon/0.3 + * new bzr snapshot from the 0.3 stable branch: + - simplify/improved policykit priviligies + + -- Michael Vogt <michael.vogt@ubuntu.com> Tue, 24 Aug 2010 09:00:36 +0200 + +aptdaemon (0.31+bzr449-0ubuntu2) maverick; urgency=low + + * debian/patches/06_rosetta_po_update.patch: + - updated translations from rosetta for the policy.in + file (LP: #445603) + + -- Michael Vogt <michael.vogt@ubuntu.com> Mon, 23 Aug 2010 11:10:24 +0200 + +aptdaemon (0.31+bzr449-0ubuntu1) maverick; urgency=low + + * new bzr snapshot that fixes two crashes + + -- Michael Vogt <michael.vogt@ubuntu.com> Mon, 09 Aug 2010 14:58:42 +0200 + +aptdaemon (0.31+bzr447-0ubuntu1) maverick; urgency=low + + * new bzr snapshot + * drop 01_vendor-keys-download.patch, taken upstream + + -- Michael Vogt <michael.vogt@ubuntu.com> Mon, 26 Jul 2010 08:45:23 +0200 + +aptdaemon (0.31+bzr427-0ubuntu1) maverick; urgency=low + + * new bzr snapshot + * debian/patches/03_auth_me_less.patch: + - updated to include less auth for adding buy-something repos + + -- Michael Vogt <michael.vogt@ubuntu.com> Mon, 12 Jul 2010 09:46:15 +0200 + +aptdaemon (0.31+bzr416-0ubuntu1) maverick; urgency=low + + * updated to current bzr + - fixes STAT_FAILED vs STAT_ERROR crash + * debian/patches/01_vendor-keys-download.patch: + - add changes from lp:~mvo/aptdaemon/download-vendor-keys + to support downloading repository vendor keys via https + * debian/patches/03_auth_me_less.patch: + - updated to current code + * debian/control: + - use DH_CENTRAL=include-links + + -- Michael Vogt <michael.vogt@ubuntu.com> Fri, 02 Jul 2010 10:28:33 +0200 + +aptdaemon (0.31+bzr413-1) unstable; urgency=low + + * Merge with Ubuntu, remaining differences: + - debian/copyright uses DEP-5 format. + - debian/source/format: Set to "3.0 (quilt)". + - debian/rules: Use debhelper 7 instead of quilt + - debian/watch: Added watch file. + - debian/control: Reindent, Vcs, Maintainer changes. + * debian/patches/03_auth_me_less.patch: Change patch level to 1. + + -- Julian Andres Klode <jak@debian.org> Sun, 06 Jun 2010 14:30:27 +0200 + +aptdaemon (0.31+bzr412-0ubuntu1) maverick; urgency=low + + * New bzr snapshot that improves the gtk progress widget + + -- Michael Vogt <michael.vogt@ubuntu.com> Mon, 31 May 2010 15:03:56 +0200 + +aptdaemon (0.31+bzr403-0ubuntu1) maverick; urgency=low + + * First release of the new 0.3X development branch + * debian/patches: + - Remove 01_enable_component: Merged upstream + - Remove 02_fix_errback: Merged upstream + - Remove 04_caution_is_good: Merged upstream + - Remove 05_conffile_not_exists: Merged upstream + - Update 03_auth_me_less: Remove cherry-picked PolicyKit enhancements + * aptdaemon.install: Ship the man pages + * control: Fix location of vcs + + -- Sebastian Heinlein <glatzor@ubuntu.com> Tue, 25 May 2010 12:09:50 +0200 + +aptdaemon (0.11+bzr345-0ubuntu4) lucid; urgency=low + + * debian/patches/04_caution_is_good.patch + - cherry pick fix from trunk to prevent removal of essenial + or required packages (LP: #561018) + * debian/patches/05_conffile_not_exists.patch: + - Do not fail on not available files (LP: #563504) + + -- Michael Vogt <michael.vogt@ubuntu.com> Fri, 16 Apr 2010 22:09:03 +0200 + +aptdaemon (0.11+bzr345-0ubuntu3) lucid; urgency=low + + * debian/patches/03_auth_me_less.patch: + - require only a single authentication prompt when adding + a repository and installing immediately from it + (thanks to Sebastian Heinlein) + + -- Michael Vogt <michael.vogt@ubuntu.com> Thu, 01 Apr 2010 17:34:12 +0200 + +aptdaemon (0.11+bzr345-0ubuntu2) lucid; urgency=low + + * debian/patches/02_fix_errback.patch: + - fix error handling from policykit (LP: #530393) + + -- Michael Vogt <michael.vogt@ubuntu.com> Thu, 01 Apr 2010 08:52:21 +0200 + +aptdaemon (0.11+bzr345-0ubuntu1) lucid; urgency=low + + * New snapshot that fixes crashes in AddRepository and + DpkgRecovery + + -- Michael Vogt <michael.vogt@ubuntu.com> Wed, 31 Mar 2010 10:43:22 +0200 + +aptdaemon (0.11+bzr343-1) unstable; urgency=low + + * New upstream snapshot. + * 01_unused_removal.patch: Drop, merged upstream. + * debian/aptdaemon.install: Install the manpages. + * debian/control: breaks software-center (<< 1.1.21) + * python-apt-08api.diff: Port to new python-apt API (Closes: #572071) + + -- Julian Andres Klode <jak@debian.org> Mon, 29 Mar 2010 13:44:55 +0200 + +aptdaemon (0.11+bzr342-0ubuntu2) lucid; urgency=low + + * debian/patches/01_enable_component.patch: + - add missing EnableComponents call to fix bug when + components are referenced but not enabled + + -- Michael Vogt <michael.vogt@ubuntu.com> Tue, 30 Mar 2010 16:19:38 +0200 + +aptdaemon (0.11+bzr342-0ubuntu1) lucid; urgency=low + + * New snapshot release based on the stable branch + - fixes debconf race condition (LP: #455861) + - should fix freeze in software-center (LP: #544424) + * .bzr-builddeb/default.conf: + - updatd to point at the stable 0.2.x branch + * debian/patches/01_unused_removal.patch: + - removed, taken upstream + * debian/patches/02_fix-455861.patch: + - removed, taken upstream + + -- Michael Vogt <michael.vogt@ubuntu.com> Fri, 26 Mar 2010 10:15:37 +0100 + +aptdaemon (0.11+bzr322-1) unstable; urgency=low + + * New upstream snapshot. + * Merge debian/patches/series from Ubuntu: + - add 01_unused_removal.patch to allow removal of no longer + used dependencies on removal + * debian/control: add break on software-center (from Ubuntu) + * Update Standards-Version to 3.8.4. + + -- Julian Andres Klode <jak@debian.org> Tue, 02 Feb 2010 16:14:55 +0100 + +aptdaemon (0.11+bzr322-0ubuntu2) lucid; urgency=low + + * debian/patches/02_fix-455861.patch: + - merge patch from james_w to fix race in debconf socket + code (many thanks) LP: #455861 + + -- Michael Vogt <michael.vogt@ubuntu.com> Tue, 16 Mar 2010 17:17:53 +0100 + +aptdaemon (0.11+bzr322-0ubuntu1) lucid; urgency=low + + * New git snapshot + * debian/patches/series: + - add 01_unused_removal.patch to allow removal of no longer + used dependencies on removal + + -- Michael Vogt <michael.vogt@ubuntu.com> Mon, 04 Jan 2010 12:59:14 +0100 + +aptdaemon (0.11+bzr319-0ubuntu1) lucid; urgency=low + + * New git snapshot + - support generic meta-data for a transaction (LP: #493775) + - improvements to the gtk widgets + - bugfixes + * debian/control: + - add break on software-center + + -- Michael Vogt <michael.vogt@ubuntu.com> Mon, 14 Dec 2009 11:33:47 +0100 + +aptdaemon (0.11+bzr297-0ubuntu1) lucid; urgency=low + + * New git snapshot, API improvements + * debian/control: + - update Vcs-Bzr branch to point to "ubuntu-lucid" + * debian/patches/aptd-sbin.patch, + debian/patches/aptd_http_proxy.patch: + - removed, taken upstream + + -- Michael Vogt <michael.vogt@ubuntu.com> Mon, 07 Dec 2009 18:08:28 +0100 + +aptdaemon (0.11-2) unstable; urgency=low + + * Add missing dependency on python-software-properties. + + -- Julian Andres Klode <jak@debian.org> Mon, 30 Nov 2009 17:39:39 +0100 + +aptdaemon (0.11-1) unstable; urgency=low + + * Initial upload to Debian unstable (Closes: #558690) + * Switch source package to 3.0 (quilt) and use debhelper 7. + * debian/copyright: Use the DEP-5 format. + * debian/watch: Add. + * aptd-sbin.patch: Drop, merged upstream. + + -- Julian Andres Klode <jak@debian.org> Sun, 29 Nov 2009 20:40:01 +0100 + +aptdaemon (0.10+bzr264-0ubuntu1) karmic; urgency=low + + [ Sebastian Heinlein ] + * Import translations from Launchpad - fixes LP #445603 + * If the cache refresh was cancelled do not show a download + failed error - fixes LP #440941 + + [ Michael Vogt ] + * fix install file to ensure the translations gets installed + + -- Michael Vogt <michael.vogt@ubuntu.com> Wed, 14 Oct 2009 18:19:12 +0200 + +aptdaemon (0.10+bzr260-0ubuntu1) karmic; urgency=low + + [ Sebastian Heinlein ] + * Merge fix for killing randomly user processes on hung dpkg + operations - fixes LP: #446534 + + -- Michael Vogt <michael.vogt@ubuntu.com> Mon, 12 Oct 2009 17:20:15 +0200 + +aptdaemon (0.10+bzr259-0ubuntu1) karmic; urgency=low + + * debian/patches/aptd_http_proxy.patch: + - add basic http proxy proxy support (LP: #446069) + * dropped patches: + - debian/patches/aptd_locking_fixes.patch + - debian/patches/fix_syslog_crash.patch + Both got accepted upstream (no other changes in r259) + + -- Michael Vogt <michael.vogt@ubuntu.com> Fri, 09 Oct 2009 10:16:49 +0200 + +aptdaemon (0.10+bzr258-0ubuntu1) karmic; urgency=low + + * New upstream snapshot: + - fix hang in authentication dialog (LP: #426720) + - don't ask for authentication twice (LP: #437094) + - better handling for broken dependencies + * remove mvo-branch.patch, disallow-unauthenticated-branch.diff + both got merged upstream + * debian/patches/fix_syslog_crash.patch: + - fix crash if no syslogd is installed + * aptdaemon/worker.py: + - test lock of the apt download dir as well + + -- Michael Vogt <michael.vogt@ubuntu.com> Tue, 06 Oct 2009 09:01:10 +0200 + +aptdaemon (0.10+bzr242-0ubuntu3) karmic; urgency=low + + * debian/patches/mvo-branch.patch: + - updated to include fix debconf race with multiple transactions + in the queue (LP: #432607) + + -- Michael Vogt <michael.vogt@ubuntu.com> Fri, 02 Oct 2009 14:40:47 +0200 + +aptdaemon (0.10+bzr242-0ubuntu2) karmic; urgency=low + + * debian/patches/mvo-branch.patch: + - updated to include fix for gettext fiddling (LP: #438077) + + -- Michael Vogt <michael.vogt@ubuntu.com> Mon, 28 Sep 2009 18:54:35 +0200 + +aptdaemon (0.10+bzr242-0ubuntu1) karmic; urgency=low + + * aptdaemon/core.py: + - do not fail on a not running syslog daemon (LP: #428843) + * Include dpkg errors in the error output + * debian/rules: + - move to simple-patchsys (for now) to make maintaining the + patches simpler + * debian/patches/disallow-unauthenticated-branch.diff: + Patch generated from lp:~mvo/aptdaemon/allow-unauthenticated + to support controlling if unauthenticated packages are allowed + during a transaction. Default to "not allow unauthenticated" + (LP: #435313) + * debian/patches/mvo-branch.patch: + Patch generated from lp:~mvo/aptdaemon/mvo that fixes: + - aptdaemon/worker.py: check the apt download dir lock + in _watch_lock to avoid possible race with apt-get LP: #437709 + - aptdaemon/progress.py: fix crash in error handling (LP: #436808) + - aptdaemon/progress.py: fix crash in INSTALL_TIMEOUT handling + (LP: #430860) + - aptdaemon/gtkwidgets.py: make the dialog resizable and add bigger + default size (LP: #434937) + - aptdaemon/core.py: add _remove_from_connection_no_raise() that + will discard errors if the object is not exported (LP: #422585) + + -- Michael Vogt <michael.vogt@ubuntu.com> Mon, 28 Sep 2009 09:39:34 +0200 + +aptdaemon (0.10+bzr240-0ubuntu1) karmic; urgency=low + + * New upstream snapshot version: + - Allow to cancel a running transaction in the console client + (LP: #424436) + - fixes in config file handling code + - fixes in the error handling of the daemon + - better error reporting for dpkg failures + + -- Michael Vogt <michael.vogt@ubuntu.com> Tue, 22 Sep 2009 12:07:47 +0200 + +aptdaemon (0.10+bzr234-0ubuntu1) karmic; urgency=low + + * New upstream snapshot version: + - less verbose debug (LP: #432937) + - do not send dbus signal if dbus is not available (LP: #432310) + - bugfixes + - conffile handling + - fix in progress code (LP #428964) + - improvements in the logging + + -- Michael Vogt <michael.vogt@ubuntu.com> Mon, 21 Sep 2009 18:01:09 +0200 + +aptdaemon (0.10+bzr226-0ubuntu1) karmic; urgency=low + + * When the dpkg lock is taken, wait until its released and + emit a appropriate status (LP: #420980) + * setup correct TERM environment in the daemon + + -- Michael Vogt <michael.vogt@ubuntu.com> Tue, 01 Sep 2009 18:40:25 +0200 + +aptdaemon (0.10+bzr223-0ubuntu1) karmic; urgency=low + + * fix bug in repository adding code when a empty components + list is used + + -- Michael Vogt <michael.vogt@ubuntu.com> Thu, 27 Aug 2009 17:02:16 +0200 + +aptdaemon (0.10+bzr222-0ubuntu1) karmic; urgency=low + + * fix AttributeError (LP: #403467) + * add support for adding repositories + + -- Michael Vogt <michael.vogt@ubuntu.com> Thu, 27 Aug 2009 14:46:20 +0200 + +aptdaemon (0.10+bzr220-0ubuntu1) karmic; urgency=low + + * new version that includes a transaction cache and + bugfixes + + -- Michael Vogt <michael.vogt@ubuntu.com> Mon, 24 Aug 2009 17:33:22 +0200 + +aptdaemon (0.10+bzr216-0ubuntu1) karmic; urgency=low + + [ Sebastian Heinlein ] + * New snapshot release: + - API change: Use a D-Bus properties interface for setting terminal, locale + and debconf socket + - Use a simple async programming mechanism inspired by Twisted's deferreds + - Port to PolicyKit-1 + - Allow to manage APT gpg keys (thanks to Olof Kindgren) + - Fix progress calcualtion during installation + * debian/control: + - Replace dependency on policykit by policykit-1 + * debian/aptdaemon.install: Adapt install location of PolicyKit-1 action files + * debian/python-aptdaemon.install: + - Replaced policykit.py by policykit1.py + - Added loop.py and defer.py + + [ Stephan Peijnik ] + * debian/control: Replaced build-dependency on python-all-dev with python. + * debian/aptdaemon.install: Removed misc.py + * debian/copyright: Fixed lintian warning about dh_make boilerplate. + + -- Michael Vogt <michael.vogt@ubuntu.com> Mon, 17 Aug 2009 08:22:13 +0200 + +aptdaemon (0.10+bzr208-0ubuntu1) karmic; urgency=low + + * updated to current bzr + + -- Michael Vogt <michael.vogt@ubuntu.com> Fri, 10 Jul 2009 09:32:00 +0200 + +aptdaemon (0.10+bzr185-0ubuntu1) karmic; urgency=low + + * updated to current bzr + * fixd FTBFS + * adjust install files + + -- Michael Vogt <michael.vogt@ubuntu.com> Mon, 06 Jul 2009 09:56:53 +0200 + +aptdaemon (0.10+bzr173.1-0ubuntu1) karmic; urgency=low + + * fix incorrect setup.py from a unclean build env + + -- Michael Vogt <michael.vogt@ubuntu.com> Thu, 02 Jul 2009 11:09:28 +0200 + +aptdaemon (0.10+bzr173-0ubuntu1) karmic; urgency=low + + * Initial Release. + + -- Sebastian Heinlein <devel@glatzor.de> Tue, 30 Jun 2009 15:06:36 +0200 diff --git a/debian/compat b/debian/compat new file mode 100644 index 0000000..48082f7 --- /dev/null +++ b/debian/compat @@ -0,0 +1 @@ +12 diff --git a/debian/control b/debian/control new file mode 100644 index 0000000..3b1aa8a --- /dev/null +++ b/debian/control @@ -0,0 +1,136 @@ +Source: aptdaemon +Section: admin +Priority: extra +Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com> +XSBC-Original-Maintainer: Julian Andres Klode <jak@debian.org> +Build-Depends: debhelper (>= 7.3), + debconf-i18n, + dbus, + dh-python, + dh-translations, + python3-all, + python3-setuptools, + python3-distutils-extra, + python3-nose, + gir1.2-glib-2.0, + gir1.2-gtk-3.0, + gir1.2-packagekitglib-1.0 (>= 0.8.9), + gir1.2-vte-2.91, + python3-apt (>= 0.8.5~ubuntu1), + python3-defer (>= 1.0.6), + python3-dbus, + python3-gi, + python3-mock, + python3-pkg-resources, + iso-codes, + pep8, + xauth, + xvfb +Standards-Version: 3.9.6 +Homepage: https://launchpad.net/aptdaemon +XS-Original-Vcs-Bzr: nosmart+http://bzr.debian.org/bzr/apt/aptdaemon/debian-sid +XS-Original-Vcs-Browser: http://bzr.debian.org/loggerhead/apt/aptdaemon/debian-sid +X-Python3-Version: >= 3.2 +XS-Testsuite: autopkgtest + +Package: aptdaemon +Architecture: all +Depends: ${misc:Depends}, + ${python3:Depends}, + gir1.2-glib-2.0, + python3-aptdaemon (= ${binary:Version}), + python3-gi, + policykit-1, +Breaks: software-center (<< 1.1.21), python3-aptdaemon.pkcompat +Replaces: python3-aptdaemon.pkcompat +Description: transaction based package management service + Aptdaemon allows normal users to perform package management tasks, e.g. + refreshing the cache, upgrading the system, installing or removing software + packages. + . + Currently it comes with the following main features: + . + - Programming language independent D-Bus interface, which allows one to + write clients in several languages + - Runs only if required (D-Bus activation) + - Fine grained privilege management using PolicyKit, e.g. allowing all + desktop user to query for updates without entering a password + - Support for media changes during installation from DVD/CDROM + - Support for debconf (Debian's package configuration system) + - Support for attaching a terminal to the underlying dpkg call + . + This package contains the aptd script and all the data files required to run + the daemon. Moreover it contains the aptdcon script, which is a command + line client for aptdaemon. The API is not stable yet. + +Package: python3-aptdaemon +Architecture: all +Section: python +Depends: ${misc:Depends}, + ${python3:Depends}, + aptdaemon, + gir1.2-glib-2.0, + gir1.2-packagekitglib-1.0 (>= 1.1.1), + python3-apt (>= 0.8.5~ubuntu1), + python3-defer (>= 1.0.6), + python3-dbus, + python3-gi, + python3-pkg-resources, + iso-codes, +Description: Python 3 module for the server and client of aptdaemon + Aptdaemon is a transaction based package management service. It allows + normal users to perform package management tasks, e.g. refreshing the + cache, upgrading the system, installing or removing software packages. + . + This package provides the Python 3 modules required to run aptdaemon + and to implement a client. The API is not stable yet. + +Package: python3-aptdaemon.test +Architecture: all +Section: python +Depends: ${misc:Depends}, + ${python3:Depends}, + python3-aptdaemon (= ${binary:Version}), +Breaks: python-aptdaemon.test +Replaces: python-aptdaemon.test +Description: Test environment for aptdaemon clients + Aptdaemon is a transaction based package management daemon. It allows + normal users to perform package management tasks, e.g. refreshing the + cache, upgrading the system, installing or removing software packages. + . + This package provides the aptdaemon.test module and several helper + scripts and a test repository to write unittests for aptdaemon + clients. + +Package: aptdaemon-data +Architecture: all +Depends: ${misc:Depends} +Replaces: python-aptdaemon-gtk (<= 0.41+bzr580-0ubuntu1) +Description: data files for clients + Aptdaemon is a transaction based package management daemon. It allows + normal users to perform package management tasks, e.g. refreshing the + cache, upgrading the system, installing or removing software packages. + . + This package provides common data files (e.g. icons) for aptdaemon + clients. + +Package: python3-aptdaemon.gtk3widgets +Architecture: all +Section: python +Depends: ${misc:Depends}, + ${python3:Depends}, + python3-aptdaemon (= ${binary:Version}), + python3-gi, + gir1.2-gtk-3.0, + gir1.2-vte-2.91, + aptdaemon-data +Conflicts: python-aptdaemon-gtk (<< 0.41+bzr582-0ubuntu1) +Replaces: python-aptdaemon-gtk (<< 0.41+bzr582-0ubuntu1) +Description: Python 3 GTK+ 3 widgets to run an aptdaemon client + Aptdaemon is a transaction based package management daemon. It allows + normal users to perform package management tasks, e.g. refreshing the + cache, upgrading the system, installing or removing software packages. + . + This package provides the Python 3 GTK+ 3 widgets to implement a fully + working graphical client. The widgets can be used to initiate, to + monitor and to control a transaction. The API is not stable yet. diff --git a/debian/copyright b/debian/copyright new file mode 100644 index 0000000..430ae2d --- /dev/null +++ b/debian/copyright @@ -0,0 +1,34 @@ +Format-Specification: http://svn.debian.org/wsvn/dep/web/deps/dep5.mdwn?rev=59 +Source: https://launchpad.net/aptdaemon + +Files: * +Copyright: © 2008-2009 Sebastian Heinlein <devel@glatzor.de> +License: GPL-2+ + +Files: aptdaemon/client.py +Copyright: © 2008 Canonical Ltd. + © 2008 Aidan Skinner <aidan@skinner.me.uk> + © 2008 Martin Pitt <martin.pitt@ubuntu.com> + © 2008 Tim Lauridsen <timlau@fedoraproject.org> + © 2008 Sebastian Heinlein <devel@glatzor.de> +License: GPL-2+ + +Files: aptdaemon/debconf.py +Copyright: © 2009 Sebastian Heinlein <devel@glatzor.de> + © 2009 Michael Vogt <mvo@ubuntu.com> +License: GPL-2+ + +Files: debian/* +Copyright: © 2008-2009 Sebastian Heinlein <devel@glatzor.de> + © 2009 Canonical Ltd. + © 2009 Julian Andres Klode <jak@debian.org> +License: GPL-2+ + +License: GPL-2+ + This package 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. + . + On Debian systems, the complete text of the GNU General + Public License can be found in `/usr/share/common-licenses/GPL-2'. diff --git a/debian/lintian-fatal.tags.Ubuntu b/debian/lintian-fatal.tags.Ubuntu new file mode 100644 index 0000000..105b95c --- /dev/null +++ b/debian/lintian-fatal.tags.Ubuntu @@ -0,0 +1,34 @@ +# custom checks for aptdaemon +bad-package-name +bad-relation +bad-version-number +binary-in-etc +build-info-in-binary-control-file-section +control-file-has-bad-owner +control-file-has-bad-permissions +debian-control-file-uses-obsolete-national-encoding +debian-control-with-duplicate-fields +dir-or-file-in-mnt +dir-or-file-in-tmp +file-in-usr-marked-as-conffile +forbidden-postrm-interpreter +maintainer-address-is-on-localhost +maintainer-address-malformed +maintainer-address-missing +maintainer-name-missing +maintainer-script-removes-device-files +malformed-deb-archive +missing-dependency-on-perlapi +no-architecture-field +no-maintainer-field +no-package-name +no-source-field +no-version-field +not-allowed-control-file +package-contains-ancient-file +package-has-no-description +package-not-lowercase +package-uses-local-diversion +source-field-does-not-match-pkg-name +symlink-has-too-many-up-segments +too-many-architectures diff --git a/debian/lintian-nonfatal.tags.Ubuntu b/debian/lintian-nonfatal.tags.Ubuntu new file mode 100644 index 0000000..b588805 --- /dev/null +++ b/debian/lintian-nonfatal.tags.Ubuntu @@ -0,0 +1,12 @@ +# non fatal +#arch-dependent-file-in-usr-share +arch-independent-package-contains-binary-or-object +binary-with-bad-dynamic-table +control-interpreter-without-depends +dir-or-file-in-var-www +# see comment #36 of bug #712377 +#missing-dependency-on-libc +non-etc-file-marked-as-conffile +package-contains-info-dir-file +preinst-interpreter-without-predepends +wrong-file-owner-uid-or-gid diff --git a/debian/patches/CVE-2020-15703.patch b/debian/patches/CVE-2020-15703.patch new file mode 100644 index 0000000..caf9360 --- /dev/null +++ b/debian/patches/CVE-2020-15703.patch @@ -0,0 +1,16 @@ +Description: Reject locales with full path + _parse_localename() treats "/tmp/a." as a locale with language "/tmp/a" and + empty region, so add an extra safety check. +Author: Julian Andres Klode <juliank@ubuntu.com> +Bug: https://bugs.launchpad.net/ubuntu/+source/aptdaemon/+bug/1888235 +--- a/aptdaemon/core.py ++++ b/aptdaemon/core.py +@@ -821,6 +821,8 @@ class Transaction(DBusObject): + """ + if self.status != enums.STATUS_SETTING_UP: + raise errors.TransactionAlreadyRunning() ++ if "/" in str(locale_str): ++ raise ValueError("Security exception: Absolute path for locale") + try: + # ensure locale string is str() and not dbus.String() + (lang, encoding) = locale._parse_localename(str(locale_str)) diff --git a/debian/patches/CVE-2020-16128.patch b/debian/patches/CVE-2020-16128.patch new file mode 100644 index 0000000..4e10f9f --- /dev/null +++ b/debian/patches/CVE-2020-16128.patch @@ -0,0 +1,166 @@ +Description: Fix file existence disclosures (CVE-2020-16128) + Move set_euid_egid into aptdaemon.utils and use it when setting + Terminal and DebConfSocket properties, to ensure our checks only + have access to the same objects the user has. + . + Rewrite the checks so that they avoid extra os.access lookups and + have correct error handling for os.open() in the terminal, and + os.stat() in the debconf case. +Author: Julian Andres Klode <juliank@ubuntu.com> +Bug-Ubuntu: https://bugs.launchpad.net/bugs/1899513 +--- a/aptdaemon/core.py ++++ b/aptdaemon/core.py +@@ -60,7 +60,7 @@ from . import enums + from defer import inline_callbacks, return_value, Deferred + from defer.utils import dbus_deferred_method + from . import policykit1 +-from .utils import split_package_id ++from .utils import split_package_id, set_euid_egid + from .worker import DummyWorker + from .worker.aptworker import (AptWorker, + trans_only_installs_pkgs_from_high_trust_repos) +@@ -1107,24 +1107,28 @@ class Transaction(DBusObject): + """ + if self.status != enums.STATUS_SETTING_UP: + raise errors.TransactionAlreadyRunning() +- if not os.access(ttyname, os.W_OK): +- raise errors.AptDaemonError("Pty device does not exist: " +- "%s" % ttyname) +- if not os.stat(ttyname)[4] == self.uid: +- raise errors.AptDaemonError("Pty device '%s' has to be owned by" +- "the owner of the transaction " +- "(uid %s) " % (ttyname, self.uid)) +- if os.path.dirname(ttyname) != "/dev/pts": +- raise errors.AptDaemonError("%s isn't a tty" % ttyname) +- try: +- slave_fd = os.open(ttyname, os.O_RDWR | os.O_NOCTTY) +- if os.isatty(slave_fd): +- self.terminal = dbus.String(ttyname) +- self.PropertyChanged("Terminal", self.terminal) +- else: ++ with set_euid_egid(self.uid, self.gid): ++ if os.path.dirname(ttyname) != "/dev/pts": + raise errors.AptDaemonError("%s isn't a tty" % ttyname) +- finally: +- os.close(slave_fd) ++ ++ slave_fd = None ++ try: ++ slave_fd = os.open(ttyname, os.O_RDWR | os.O_NOCTTY) ++ except Exception: ++ raise errors.AptDaemonError("Could not open %s" % ttyname) ++ else: ++ if os.fstat(slave_fd).st_uid != self.uid: ++ raise errors.AptDaemonError("Pty device '%s' has to be owned by" ++ "the owner of the transaction " ++ "(uid %s) " % (ttyname, self.uid)) ++ if os.isatty(slave_fd): ++ self.terminal = dbus.String(ttyname) ++ self.PropertyChanged("Terminal", self.terminal) ++ else: ++ raise errors.AptDaemonError("%s isn't a tty" % ttyname) ++ finally: ++ if slave_fd is not None: ++ os.close(slave_fd) + + def _set_debconf(self, debconf_socket): + """Set the socket of the debconf proxy. +@@ -1140,13 +1144,17 @@ class Transaction(DBusObject): + """ + if self.status != enums.STATUS_SETTING_UP: + raise errors.TransactionAlreadyRunning() +- if not os.access(debconf_socket, os.W_OK): +- raise errors.AptDaemonError("socket does not exist: " +- "%s" % debconf_socket) +- if not os.stat(debconf_socket)[4] == self.uid: +- raise errors.AptDaemonError("socket '%s' has to be owned by the " +- "owner of the " +- "transaction" % debconf_socket) ++ with set_euid_egid(self.uid, self.gid): ++ try: ++ stat = os.stat(debconf_socket) ++ except Exception: ++ raise errors.AptDaemonError("socket status could not be read: " ++ "%s" % debconf_socket) ++ else: ++ if stat.st_uid != self.uid: ++ raise errors.AptDaemonError("socket '%s' has to be owned by the " ++ "owner of the " ++ "transaction" % debconf_socket) + self.debconf = dbus.String(debconf_socket) + self.PropertyChanged("DebconfSocket", self.debconf) + +--- a/aptdaemon/worker/aptworker.py ++++ b/aptdaemon/worker/aptworker.py +@@ -58,6 +58,7 @@ from . import BaseWorker + from ..enums import * + from ..errors import * + from .. import lock ++from ..utils import set_euid_egid + from ..progress import ( + DaemonOpenProgress, + DaemonInstallProgress, +@@ -90,25 +91,6 @@ USE_HTTP="yes" + """ + + +-@contextlib.contextmanager +-def set_euid_egid(uid, gid): +- # no need to drop privs +- if os.getuid() != 0 and os.getgid() != 0: +- yield +- return +- # temporary drop privs +- os.setegid(gid) +- old_groups = os.getgroups() +- os.setgroups([gid]) +- os.seteuid(uid) +- try: +- yield +- finally: +- os.seteuid(os.getuid()) +- os.setegid(os.getgid()) +- os.setgroups(old_groups) +- +- + def trans_only_installs_pkgs_from_high_trust_repos(trans, + whitelist=set()): + """Return True if this transaction only touches packages in the +--- a/aptdaemon/utils.py ++++ b/aptdaemon/utils.py +@@ -24,7 +24,9 @@ __author__ = "Sebastian Heinlein <devel@ + + __all__ = ("deprecated", "IsoCodes") + ++import os + import sys ++import contextlib + import gettext + import functools + import warnings +@@ -58,6 +60,25 @@ def deprecated(func): + return new_func + + ++@contextlib.contextmanager ++def set_euid_egid(uid, gid): ++ # no need to drop privs ++ if os.getuid() != 0 and os.getgid() != 0: ++ yield ++ return ++ # temporary drop privs ++ os.setegid(gid) ++ old_groups = os.getgroups() ++ os.setgroups([gid]) ++ os.seteuid(uid) ++ try: ++ yield ++ finally: ++ os.seteuid(os.getuid()) ++ os.setegid(os.getgid()) ++ os.setgroups(old_groups) ++ ++ + class IsoCodes(object): + + """Provides access to the iso-codes language, script and country diff --git a/debian/patches/CVE-2020-27349.patch b/debian/patches/CVE-2020-27349.patch new file mode 100644 index 0000000..230ed4a --- /dev/null +++ b/debian/patches/CVE-2020-27349.patch @@ -0,0 +1,31 @@ +From 5d6e1ca82a07ef1739dfea20ad17f077ceccfdcf Mon Sep 17 00:00:00 2001 +From: Julian Andres Klode <julian.klode@canonical.com> +Date: Tue, 1 Dec 2020 12:25:00 +0100 +Subject: [PATCH] Check PolicyKit before simulating local install + (CVE-2020-27349) + +Given that we are opening a deb here as root that is controlled +by a non-root user, without any authorization, this is a whole +lot of safety issues. + +Bug-Ubuntu: https://bugs.launchpad.net/bugs/1899193/ +--- + aptdaemon/core.py | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/aptdaemon/core.py b/aptdaemon/core.py +index 885b30b..6043b17 100644 +--- a/aptdaemon/core.py ++++ b/aptdaemon/core.py +@@ -1073,6 +1073,8 @@ class Transaction(DBusObject): + def _simulate_real(self): + if self._simulated_cb: + raise errors.TransactionAlreadySimulating() ++ if self.role == enums.ROLE_INSTALL_FILE: ++ yield self._check_auth() + self.queue.worker.simulate(self) + deferred = Deferred() + if self._idle_watch is not None: +-- +2.29.2 + diff --git a/debian/patches/allow-unauthenticated.patch b/debian/patches/allow-unauthenticated.patch new file mode 100644 index 0000000..7c84232 --- /dev/null +++ b/debian/patches/allow-unauthenticated.patch @@ -0,0 +1,23 @@ +Description: Forward allow_unauthenticated to python-apt + Forward the allow_unauthenticated flag to python-apt so packages can continue + to be downloaded without them being authenticated, avoiding breakage with recent + python-apt uploads. +Author: Julian Andres Klode <juliank@ubuntu.com> +Origin: vendor +Bug-Ubuntu: https://bugs.launchpad.net/ubuntu/+source/python-apt/+bug/1858973 +--- a/aptdaemon/worker/aptworker.py ++++ b/aptdaemon/worker/aptworker.py +@@ -1068,7 +1068,12 @@ class AptWorker(BaseWorker): + end=install_range[1]) + with self._frozen_status(): + try: +- self._cache.commit(fetch_progress, inst_progress) ++ # This was backported as ++ if "allow_unauthenticated" in apt.Cache.commit.__doc__: ++ self._cache.commit(fetch_progress, inst_progress, ++ allow_unauthenticated=trans.allow_unauthenticated) ++ else: ++ self._cache.commit(fetch_progress, inst_progress) + except apt.cache.FetchFailedException as error: + raise TransactionFailed(ERROR_PACKAGE_DOWNLOAD_FAILED, + str(error)) diff --git a/debian/patches/apport-report.patch b/debian/patches/apport-report.patch new file mode 100644 index 0000000..c715386 --- /dev/null +++ b/debian/patches/apport-report.patch @@ -0,0 +1,24 @@ +Description: write apport reports the right way +Author: Brian Murray <brian@ubuntu.com> +Origin: vendor +Bug-Ubuntu: http://launchpad.net/bugs/1700810 +Forwarded: not-needed +Last-Update: 2020-05-11 +--- +This patch header follows DEP-3: http://dep.debian.net/deps/dep3/ +Index: aptdaemon-1.1.1+bzr982/aptdaemon/crash.py +=================================================================== +--- aptdaemon-1.1.1+bzr982.orig/aptdaemon/crash.py ++++ aptdaemon-1.1.1+bzr982/aptdaemon/crash.py +@@ -69,9 +69,8 @@ def create_report(error, traceback, tran + uid = os.path.basename(trans.tid) + + # Write report +- report_path = apport.fileutils.make_report_path(report, uid) +- if not os.path.exists(report_path): +- report.write(open(report_path, 'wb')) ++ with apport.fileutils.make_report_file(report, uid) as f: ++ report.write(f) + + if __name__ == "__main__": + apt_pkg.init_config() diff --git a/debian/patches/dbus_timeout.patch b/debian/patches/dbus_timeout.patch new file mode 100644 index 0000000..569f450 --- /dev/null +++ b/debian/patches/dbus_timeout.patch @@ -0,0 +1,63 @@ +=== modified file 'aptdaemon/client.py' +Index: aptdaemon/aptdaemon/client.py +=================================================================== +--- aptdaemon.orig/aptdaemon/client.py ++++ aptdaemon/aptdaemon/client.py +@@ -47,6 +47,10 @@ from .errors import convert_dbus_excepti + __all__ = ("AptTransaction", "AptClient", "get_transaction", "get_aptdaemon") + + ++# the default timeout for dbus method calls ++_APTDAEMON_DBUS_TIMEOUT = 86400 ++ ++ + class AptTransaction(GObject.Object): + + """Represents an aptdaemon transaction. +@@ -704,7 +708,8 @@ class AptTransaction(GObject.Object): + try: + return self._iface.RunAfter(transaction.tid, + error_handler=error_handler, +- reply_handler=reply_handler) ++ reply_handler=reply_handler, ++ timeout=_APTDAEMON_DBUS_TIMEOUT) + except Exception as error: + if error_handler: + error_handler(error) +@@ -727,7 +732,8 @@ class AptTransaction(GObject.Object): + """ + try: + return self._iface.Run(error_handler=error_handler, +- reply_handler=reply_handler) ++ reply_handler=reply_handler, ++ timeout=_APTDAEMON_DBUS_TIMEOUT) + except Exception as error: + if error_handler: + error_handler(error) +@@ -1609,10 +1615,11 @@ class AptClient(object): + if async: + deferred = defer.Deferred() + dbus_method(reply_handler=deferred.callback, +- error_handler=deferred.errback, *args, timeout=86400) ++ error_handler=deferred.errback, *args, ++ timeout=_APTDAEMON_DBUS_TIMEOUT) + tid = yield deferred + else: +- tid = dbus_method(*args, timeout=86400) ++ tid = dbus_method(*args, timeout=_APTDAEMON_DBUS_TIMEOUT) + trans = AptTransaction(tid, self.bus) + if self._locale: + yield trans.set_locale(self._locale) +Index: aptdaemon/aptdaemon/core.py +=================================================================== +--- aptdaemon.orig/aptdaemon/core.py ++++ aptdaemon/aptdaemon/core.py +@@ -83,7 +83,7 @@ APTDAEMON_DBUS_SERVICE = 'org.debian.apt + APTDAEMON_TRANSACTION_DBUS_INTERFACE = 'org.debian.apt.transaction' + + APTDAEMON_IDLE_CHECK_INTERVAL = 60 +-APTDAEMON_IDLE_TIMEOUT = 5 * 60 ++APTDAEMON_IDLE_TIMEOUT = 10 * 60 + + # Maximum allowed time between the creation of a transaction and its queuing + TRANSACTION_IDLE_TIMEOUT = 300 diff --git a/debian/patches/do-not-raise-stopiteration.patch b/debian/patches/do-not-raise-stopiteration.patch new file mode 100644 index 0000000..7813b36 --- /dev/null +++ b/debian/patches/do-not-raise-stopiteration.patch @@ -0,0 +1,68 @@ +Description: Adjust stopping generators for PEP479 + Adjust aptdaemon for PEP479, where raise StopIteration + stopped working and should become return. +Author: Julian Andres Klode <juliank@ubuntu.com> +Last-Update: 2019-03-27 + +--- aptdaemon-1.1.1+bzr982.orig/aptdaemon/core.py ++++ aptdaemon-1.1.1+bzr982/aptdaemon/core.py +@@ -935,7 +935,7 @@ class Transaction(DBusObject): + self.progress = 9 + yield self._simulate_real() + else: +- raise StopIteration ++ return + + @inline_callbacks + def _check_auth(self): +@@ -946,7 +946,7 @@ class Transaction(DBusObject): + self.status = enums.STATUS_AUTHENTICATING + action = self.ROLE_ACTION_MAP[self.role] + if action is None: +- raise StopIteration ++ return + # Special case if InstallPackages only touches stuff from the + # high trust whitelist + if (self.role in (enums.ROLE_INSTALL_PACKAGES, +@@ -1028,16 +1028,16 @@ class Transaction(DBusObject): + else: + self.status = enums.STATUS_CANCELLING + self.exit = enums.EXIT_CANCELLED +- raise StopIteration ++ return + if self.tid in self.queue.limbo: + self.exit = enums.EXIT_CANCELLED +- raise StopIteration ++ return + elif self.cancellable: + log_trans.debug("Setting cancel event") + self.cancelled = True + self.status = enums.STATUS_CANCELLING + self.paused = False +- raise StopIteration ++ return + raise errors.AptDaemonError("Could not cancel transaction") + + # pylint: disable-msg=C0103,C0322 +--- aptdaemon-1.1.1+bzr982.orig/aptdaemon/networking.py ++++ aptdaemon-1.1.1+bzr982/aptdaemon/networking.py +@@ -177,7 +177,7 @@ class NetworkManagerMonitor(NetworkMonit + def _on_nm_active_conn_props_changed(self, props): + """Callback if properties of the active connection changed.""" + if "Default" not in props: +- raise StopIteration ++ return + yield self.get_network_state() + + @inline_callbacks +--- aptdaemon-1.1.1+bzr982.orig/doc/source/aptdaemon.client.rst ++++ aptdaemon-1.1.1+bzr982/doc/source/aptdaemon.client.rst +@@ -91,7 +91,7 @@ code in a synchronous way: + ... transaction = yield apt_client.update() + ... except errors.NotAuthorizedError: + ... print "You are not allowed to update the cache!" +- ... raise StopIteration ++ ... return + ... yield transaction.set_locale("de_DE") + ... yield transaction.run() + ... print "Transaction has started" diff --git a/debian/patches/drop_pkcompat.patch b/debian/patches/drop_pkcompat.patch new file mode 100644 index 0000000..64980a7 --- /dev/null +++ b/debian/patches/drop_pkcompat.patch @@ -0,0 +1,2068 @@ +From: Mathieu Trudel-Lapierre <mathieu.trudel-lapierre@canonical.com> +Subject: Drop pkcompat PackageKit compatibility module. + +Just use straight PackageKit. + +--- + +--- + aptdaemon/core.py | 12 + aptdaemon/pkcompat.py | 2022 -------------------------------------------------- + 2 files changed, 2 insertions(+), 2032 deletions(-) + +Index: b/aptdaemon/core.py +=================================================================== +--- a/aptdaemon/core.py ++++ b/aptdaemon/core.py +@@ -1445,22 +1445,14 @@ class AptDaemon(DBusObject): + load_plugins = not options.disable_plugins + try: + from .worker.pkworker import AptPackageKitWorker +- from . import pkcompat +- except ImportError: +- self.worker = AptWorker(options.chroot, load_plugins) +- else: + self.worker = AptPackageKitWorker(options.chroot, + load_plugins) ++ except: ++ self.worker = AptWorker(options.chroot, load_plugins) + self.queue = TransactionQueue(self.worker) + self.queue.connect("queue-changed", self._on_queue_changed) + # keep state of the last information about reboot required + self._reboot_required = self.worker.is_reboot_required() +- try: +- self.packagekit = pkcompat.PackageKit(self.queue, connect, bus) +- except dbus.exceptions.NameExistsException: +- log.warning("PackageKit is already running") +- except NameError: +- pass + log.debug("Daemon was initialized") + + def _on_queue_changed(self, queue): +Index: b/aptdaemon/pkcompat.py +=================================================================== +--- a/aptdaemon/pkcompat.py ++++ /dev/null +@@ -1,2022 +0,0 @@ +-# !/usr/bin/env python +-# -*- coding: utf-8 -*- +-""" +-Provides a limited compatibility layer to PackageKit +- +-Copyright (C) 2007 Ali Sabil <ali.sabil@gmail.com> +-Copyright (C) 2007 Tom Parker <palfrey@tevp.net> +-Copyright (C) 2008-2011 Sebastian Heinlein <glatzor@ubuntu.com> +- +-Licensed under the GNU General Public License Version 2 +- +-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. +-""" +- +-__author__ = "Sebastian Heinlein <devel@glatzor.de>" +- +-import datetime +-import glob +-import gzip +-import locale +-import logging +-import os +-import platform +-import re +-import subprocess +-import tempfile +-import time +-import uuid +- +-from defer import inline_callbacks, return_value +-from defer.utils import dbus_deferred_method +-import dbus +-from gi.repository import GObject, GLib +-from gi.repository import PackageKitGlib as pk +- +-# for optional plugin support +-try: +- import pkg_resources +-except ImportError: +- pkg_resources = None +- +-from . import policykit1 +-from . import core +-from .core import APTDAEMON_TRANSACTION_DBUS_INTERFACE +-from . import enums as aptd_enums +-from .errors import TransactionFailed +-from . import errors +-from .progress import DaemonAcquireProgress +-from . import worker +-from . import networking +-from .pkutils import (bitfield_summarize, bitfield_add, bitfield_remove, +- bitfield_contains) +-from .utils import split_package_id +- +- +-pklog = logging.getLogger("AptDaemon.PackageKit") +- +-# Check if update-manager-core is installed to get aware of the +-# latest distro releases +-try: +- from UpdateManager.Core.MetaRelease import MetaReleaseCore +-except ImportError: +- META_RELEASE_SUPPORT = False +-else: +- META_RELEASE_SUPPORT = True +- +-PACKAGEKIT_DBUS_INTERFACE = "org.freedesktop.PackageKit" +-PACKAGEKIT_DBUS_SERVICE = "org.freedesktop.PackageKit" +-PACKAGEKIT_DBUS_PATH = "/org/freedesktop/PackageKit" +- +-PACKAGEKIT_TRANS_DBUS_INTERFACE = "org.freedesktop.PackageKit.Transaction" +-PACKAGEKIT_TRANS_DBUS_SERVICE = "org.freedesktop.PackageKit.Transaction" +- +-MAP_EXIT_ENUM = { +- aptd_enums.EXIT_SUCCESS: pk.ExitEnum.SUCCESS, +- aptd_enums.EXIT_CANCELLED: pk.ExitEnum.CANCELLED, +- aptd_enums.EXIT_FAILED: pk.ExitEnum.FAILED, +- aptd_enums.EXIT_FAILED: pk.ExitEnum.FAILED, +- aptd_enums.EXIT_PREVIOUS_FAILED: pk.ExitEnum.FAILED} +- +-MAP_STATUS_ENUM = { +- aptd_enums.STATUS_AUTHENTICATING: pk.StatusEnum.WAITING_FOR_AUTH, +- aptd_enums.STATUS_SETTING_UP: pk.StatusEnum.SETUP, +- aptd_enums.STATUS_QUERY: pk.StatusEnum.QUERY, +- aptd_enums.STATUS_WAITING: pk.StatusEnum.WAIT, +- aptd_enums.STATUS_RUNNING: pk.StatusEnum.RUNNING, +- aptd_enums.STATUS_CANCELLING: pk.StatusEnum.CANCEL, +- aptd_enums.STATUS_CLEANING_UP: pk.StatusEnum.CLEANUP, +- aptd_enums.STATUS_COMMITTING: pk.StatusEnum.COMMIT, +- aptd_enums.STATUS_DOWNLOADING: pk.StatusEnum.DOWNLOAD, +- aptd_enums.STATUS_DOWNLOADING_REPO: pk.StatusEnum.DOWNLOAD_REPOSITORY, +- aptd_enums.STATUS_FINISHED: pk.StatusEnum.FINISHED, +- aptd_enums.STATUS_LOADING_CACHE: pk.StatusEnum.LOADING_CACHE, +- aptd_enums.STATUS_RESOLVING_DEP: pk.StatusEnum.DEP_RESOLVE, +- aptd_enums.STATUS_RUNNING: pk.StatusEnum.RUNNING, +- aptd_enums.STATUS_WAITING_LOCK: pk.StatusEnum.WAITING_FOR_LOCK, +- aptd_enums.STATUS_WAITING_MEDIUM: pk.StatusEnum.UNKNOWN, +- aptd_enums.STATUS_WAITING_CONFIG_FILE_PROMPT: pk.StatusEnum.UNKNOWN} +- +-MAP_ERROR_ENUM = { +- aptd_enums.ERROR_CACHE_BROKEN: pk.ErrorEnum.NO_CACHE, +- aptd_enums.ERROR_DEP_RESOLUTION_FAILED: ( +- pk.ErrorEnum.DEP_RESOLUTION_FAILED), +- aptd_enums.ERROR_INCOMPLETE_INSTALL: pk.ErrorEnum.NO_CACHE, +- aptd_enums.ERROR_INVALID_PACKAGE_FILE: ( +- pk.ErrorEnum.PACKAGE_CORRUPT), +- aptd_enums.ERROR_KEY_NOT_INSTALLED: pk.ErrorEnum.GPG_FAILURE, +- aptd_enums.ERROR_KEY_NOT_REMOVED: pk.ErrorEnum.GPG_FAILURE, +- aptd_enums.ERROR_NOT_REMOVE_ESSENTIAL_PACKAGE: ( +- pk.ErrorEnum.PACKAGE_FAILED_TO_REMOVE), +- aptd_enums.ERROR_NO_CACHE: pk.ErrorEnum.NO_CACHE, +- aptd_enums.ERROR_NO_LOCK: pk.ErrorEnum.CANNOT_GET_LOCK, +- aptd_enums.ERROR_NO_PACKAGE: pk.ErrorEnum.PACKAGE_NOT_FOUND, +- aptd_enums.ERROR_PACKAGE_ALREADY_INSTALLED: ( +- pk.ErrorEnum.PACKAGE_ALREADY_INSTALLED), +- aptd_enums.ERROR_PACKAGE_DOWNLOAD_FAILED: ( +- pk.ErrorEnum.PACKAGE_DOWNLOAD_FAILED), +- aptd_enums.ERROR_PACKAGE_MANAGER_FAILED: ( +- pk.ErrorEnum.TRANSACTION_ERROR), +- aptd_enums.ERROR_PACKAGE_NOT_INSTALLED: ( +- pk.ErrorEnum.PACKAGE_NOT_INSTALLED), +- aptd_enums.ERROR_PACKAGE_UNAUTHENTICATED: ( +- pk.ErrorEnum.BAD_GPG_SIGNATURE), +- aptd_enums.ERROR_PACKAGE_UPTODATE: ( +- pk.ErrorEnum.NO_PACKAGES_TO_UPDATE), +- aptd_enums.ERROR_REPO_DOWNLOAD_FAILED: ( +- pk.ErrorEnum.REPO_NOT_AVAILABLE), +- aptd_enums.ERROR_UNREADABLE_PACKAGE_FILE: ( +- pk.ErrorEnum.INVALID_PACKAGE_FILE), +- aptd_enums.ERROR_SYSTEM_ALREADY_UPTODATE: ( +- pk.ErrorEnum.NO_PACKAGES_TO_UPDATE), +- aptd_enums.ERROR_NOT_AUTHORIZED: pk.ErrorEnum.NOT_AUTHORIZED, +- aptd_enums.ERROR_AUTH_FAILED: pk.ErrorEnum.NOT_AUTHORIZED} +- +-MAP_PACKAGE_ENUM = { +- aptd_enums.PKG_CONFIGURING: pk.InfoEnum.INSTALLING, +- aptd_enums.PKG_DISAPPEARING: pk.InfoEnum.UNKNOWN, +- aptd_enums.PKG_INSTALLED: pk.InfoEnum.FINISHED, +- aptd_enums.PKG_INSTALLING: pk.InfoEnum.INSTALLING, +- aptd_enums.PKG_PREPARING_INSTALL: pk.InfoEnum.PREPARING, +- aptd_enums.PKG_PREPARING_PURGE: pk.InfoEnum.PREPARING, +- aptd_enums.PKG_PREPARING_REMOVE: pk.InfoEnum.PREPARING, +- aptd_enums.PKG_PURGED: pk.InfoEnum.FINISHED, +- aptd_enums.PKG_PURGING: pk.InfoEnum.REMOVING, +- aptd_enums.PKG_REMOVED: pk.InfoEnum.FINISHED, +- aptd_enums.PKG_REMOVING: pk.InfoEnum.REMOVING, +- aptd_enums.PKG_RUNNING_TRIGGER: pk.InfoEnum.CLEANUP, +- aptd_enums.PKG_UNKNOWN: pk.InfoEnum.UNKNOWN, +- aptd_enums.PKG_UNPACKING: pk.InfoEnum.DECOMPRESSING, +- aptd_enums.PKG_UPGRADING: pk.InfoEnum.UPDATING} +- +-MAP_POLICY = { +- "org.freedesktop.packagekit.cancel-foreign": ( +- policykit1.PK_ACTION_CANCEL_FOREIGN), +- "org.freedesktop.packagekit.package-install": ( +- policykit1.PK_ACTION_INSTALL_OR_REMOVE_PACKAGES), +- "org.freedesktop.packagekit.package-install-untrusted": ( +- policykit1.PK_ACTION_INSTALL_OR_REMOVE_PACKAGES), +- "org.freedesktop.packagekit.system-trust-signing-key": ( +- policykit1.PK_ACTION_CHANGE_REPOSITORY), +- "org.freedesktop.packagekit.package-eula-accept": ( +- policykit1.PK_ACTION_INSTALL_OR_REMOVE_PACKAGES), +- "org.freedesktop.packagekit.package-remove": ( +- policykit1.PK_ACTION_INSTALL_OR_REMOVE_PACKAGES), +- "org.freedesktop.packagekit.system-update": ( +- policykit1.PK_ACTION_UPGRADE_PACKAGES), +- "org.freedesktop.packagekit.system-sources-configure": ( +- policykit1.PK_ACTION_CHANGE_REPOSITORY), +- "org.freedesktop.packagekit.system-sources-refresh": ( +- policykit1.PK_ACTION_UPDATE_CACHE), +- "org.freedesktop.packagekit.system-network-proxy-configure": ( +- policykit1.PK_ACTION_SET_PROXY), +- "org.freedesktop.packagekit.device-rebind": ( +- policykit1.PK_ACTION_INSTALL_OR_REMOVE_PACKAGES), +- "org.freedesktop.packagekit.upgrade-system": ( +- policykit1.PK_ACTION_UPGRADE_PACKAGES), +- "org.freedesktop.packagekit.repair-system": ( +- policykit1.PK_ACTION_INSTALL_OR_REMOVE_PACKAGES), +- "org.freedesktop.packagekit.trigger-offline-update": ( +- policykit1.PK_ACTION_UPGRADE_PACKAGES), +- "org.freedesktop.packagekit.clear-offline-update": ( +- policykit1.PK_ACTION_UPGRADE_PACKAGES)} +- +- +-class PackageKit(core.DBusObject): +- +- """Provides a limited set of the PackageKit system D-Bus API.""" +- +- def __init__(self, queue, connect=True, bus=None): +- """Initialize a new PackageKit compatibility layer. +- +- Keyword arguments: +- connect -- if the daemon should connect to the D-Bus (default is True) +- bus -- the D-Bus to connect to (defaults to the system bus) +- """ +- pklog.info("Initializing PackageKit compat layer") +- bus_name = None +- bus_path = None +- if connect is True: +- if bus is None: +- bus = dbus.SystemBus() +- self.bus = bus +- bus_path = PACKAGEKIT_DBUS_PATH +- bus_name = dbus.service.BusName(PACKAGEKIT_DBUS_SERVICE, self.bus) +- core.DBusObject.__init__(self, bus_name, bus_path) +- self._updates_changed_timeout_id = None +- self._updates_changed = False +- self.queue = queue +- self.queue.worker.connect("transaction-done", +- self._on_transaction_done) +- self.queue.connect("queue-changed", self._on_queue_changed) +- self._distro_id = None +- self.netmon = networking.get_network_monitor() +- self.netmon.connect("network-state-changed", +- self._on_network_state_changed) +- self._get_network_state() +- +- @inline_callbacks +- def _get_network_state(self): +- """Helper to defer the network state checking.""" +- yield self.netmon.get_network_state() +- +- # SIGNALS +- +- # pylint: disable-msg=C0103,C0322 +- @dbus.service.signal(dbus_interface=PACKAGEKIT_DBUS_INTERFACE, +- signature="") +- def RestartSchedule(self): +- """A system restart has been sceduled.""" +- pass +- +- # pylint: disable-msg=C0103,C0322 +- @dbus.service.signal(dbus_interface=PACKAGEKIT_DBUS_INTERFACE, +- signature="as") +- def TransactionListChanged(self, transactions): +- """The transaction list has changed, because either a transaction +- has finished or a new transaction created. +- +- :param transactions: A list of transaction ID's. +- :type transactions: as +- """ +- pklog.debug("Emitting TransactionListChanged signal: %s", transactions) +- +- # pylint: disable-msg=C0103,C0322 +- @dbus.service.signal(dbus_interface=PACKAGEKIT_DBUS_INTERFACE, +- signature="") +- def UpdatesChanged(self): +- """This signal is emitted when the number of updates has changed.""" +- pklog.debug("Emitting UpdatesChanged signal") +- +- # pylint: disable-msg=C0103,C0322 +- @dbus.service.signal(dbus_interface=PACKAGEKIT_DBUS_INTERFACE, +- signature="") +- def RepoListChanged(self): +- """This signal is emitted when the repository list has changed.""" +- pass +- +- # pylint: disable-msg=C0103,C0322 +- @dbus.service.signal(dbus_interface=PACKAGEKIT_DBUS_INTERFACE, +- signature="") +- def Changed(self): +- """This signal is emitted when a property on the interface changes.""" +- pklog.debug("Emitting PackageKit Changed()") +- +- # METHODS +- +- # pylint: disable-msg=C0103,C0322 +- @dbus_deferred_method(PACKAGEKIT_DBUS_INTERFACE, +- in_signature="s", out_signature="u", +- sender_keyword="sender") +- def CanAuthorize(self, action_id, sender): +- """Allows a client to find out if it would be allowed to authorize +- an action. +- +- :param action_id: The action ID, e.g. +- org.freedesktop.packagekit.system-network-proxy-configure +- :returns: The result, either yes, no or interactive. +- """ +- pklog.info("CanAuthorize() was called: %s", str(action_id)) +- return self._can_authorize(action_id, sender) +- +- @inline_callbacks +- def _can_authorize(self, action_id, sender): +- try: +- action_id_aptd = MAP_POLICY[action_id] +- except KeyError: +- return_value(pk.AuthorizeEnum.UNKNOWN) +- try: +- policykit1.check_authorization_by_name( +- self, action_id, flags=policykit1.CHECK_AUTH_NONE) +- except policykit1.NotAuthorizedError: +- return_value(pk.AuthorizeEnum.NO) +- except policykit1.AuthorizationFailed: +- # check_authorization_* behaves a little bit different if the +- # flags are set to NONE instead of INTERACTIVE +- return_value(pk.AuthorizeEnum.INTERACTIVE) +- except: +- return_value(pk.AuthorizeEnum.UNKNOWN) +- return_value(pk.AuthorizeEnum.YES) +- +- # pylint: disable-msg=C0103,C0322 +- @dbus.service.method(PACKAGEKIT_DBUS_INTERFACE, +- in_signature="s", out_signature="") +- def StateHasChanged(self, reason): +- """This method suggests to PackageKit that the package backend state +- may have changed. This allows plugins to the native package manager +- to suggest that PackageKit drops it's caches. +- +- :param reason: +- The reason of the state change. Valid reasons are resume or +- posttrans. Resume is given a lower priority than posttrans. +- """ +- pklog.info("StateHasChanged() was called: %s", str(reason)) +- self._updates_changed = True +- if reason == "cache-update": +- self._check_updates_changed(timeout=30) +- elif reason == "resume": +- self._check_updates_changed(timeout=180) +- +- # pylint: disable-msg=C0103,C0322 +- @dbus_deferred_method(PACKAGEKIT_DBUS_INTERFACE, +- in_signature="", out_signature="o", +- sender_keyword="sender") +- def CreateTransaction(self, sender): +- """Gets a new transaction ID from the daemon. +- +- :returns: The tid, e.g. 45_dafeca_checkpoint32 +- """ +- pklog.info("CreateTransaction() was called") +- return self._create_transaction(sender) +- +- @inline_callbacks +- def _create_transaction(self, sender): +- pid, uid, gid, cmdline = yield policykit1.get_proc_info_from_dbus_name( +- sender, self.bus) +- pktrans = PackageKitTransaction( +- pid, uid, gid, cmdline, self.queue, sender) +- return_value(pktrans.tid) +- +- # pylint: disable-msg=C0103,C0322 +- @dbus.service.method(PACKAGEKIT_DBUS_INTERFACE, +- in_signature="", out_signature="s") +- def GetDaemonState(self): +- """Return the state of the currently running transactions.""" +- pklog.info("GetDaemonState() was called") +- # FIXME: Add some useful data here +- return "All is fine!" +- +- # pylint: disable-msg=C0103,C0322 +- @dbus.service.method(PACKAGEKIT_DBUS_INTERFACE, +- in_signature="", out_signature="ao") +- def GetTransactionList(self): +- """Gets the transaction list of any transactions that are in +- progress. +- +- :returns: A list of transaction ID's +- """ +- pklog.info("GetTransactionList() was called") +- return self._get_transaction_list() +- +- # HELPERS +- +- def _get_properties(self, iface): +- """Helper to get the properties of a D-Bus interface.""" +- if iface == PACKAGEKIT_DBUS_INTERFACE: +- return { +- # Claim that we are a current version +- "VersionMajor": dbus.UInt32(0), +- "VersionMinor": dbus.UInt32(8), +- "VersionMicro": dbus.UInt32(9), +- "BackendName": dbus.String("aptdaemon"), +- "BackendDescription": dbus.String("Compatibility layer"), +- "BackendAuthor": dbus.String(__author__), +- "Groups": dbus.UInt64(self.queue.worker.groups), +- "Provides": dbus.UInt64(self.queue.worker.provides), +- "Filters": dbus.UInt64(self.queue.worker.filters), +- "Roles": dbus.UInt64(self.queue.worker.roles), +- "MimeTypes": dbus.Array(self.queue.worker.mime_types, +- signature="s"), +- "Locked": dbus.Boolean(False), +- "NetworkState": dbus.UInt32(self.netmon.state), +- "DistroId": dbus.String(self._get_distro_id())} +- else: +- return {} +- +- def _get_distro_id(self): +- """Return information about the distibution.""" +- if self._distro_id is None: +- distro, version, _codename = platform.dist() +- self._distro_id = "%s;%s;%s" % (distro or "unknown", +- version or "unknown", +- self.queue.worker.NATIVE_ARCH) +- return self._distro_id +- +- def _on_network_state_changed(self, mon, state): +- self.Changed() +- self.PropertiesChanged(PACKAGEKIT_DBUS_INTERFACE, +- {"NetworkState": dbus.UInt32(state)}, []) +- +- def _on_queue_changed(self, queue): +- self.TransactionListChanged(self._get_transaction_list()) +- self._check_updates_changed() +- +- def _get_transaction_list(self): +- pk_transactions = [] +- for trans in self.queue.items: +- # We currently only emit PackageKit transaction +- # FIXME: Should we use MergedTransaction for all transactions and +- # ROLE_UNKOWN for aptdaemon only transactions? +- try: +- pk_transactions.append(trans.pktrans.tid) +- except AttributeError: +- pass +- try: +- pk_transactions.append(self.queue.worker.trans.pktrans.tid) +- except AttributeError: +- pass +- return pk_transactions +- +- def _on_transaction_done(self, worker, trans): +- # If a cache modifing transaction is completed schedule an +- # UpdatesChanged signal +- if trans.role in (aptd_enums.ROLE_INSTALL_FILE, +- aptd_enums.ROLE_INSTALL_PACKAGES, +- aptd_enums.ROLE_REMOVE_PACKAGES, +- aptd_enums.ROLE_UPGRADE_PACKAGES, +- aptd_enums.ROLE_COMMIT_PACKAGES, +- aptd_enums.ROLE_UPGRADE_SYSTEM, +- aptd_enums.ROLE_FIX_BROKEN_DEPENDS): +- self._updates_changed = True +- self._check_updates_changed() +- elif trans.role == aptd_enums.ROLE_UPDATE_CACHE: +- self._updates_changed = True +- self._check_updates_changed(timeout=30) +- +- def _check_updates_changed(self, timeout=60): +- """After the queue was processed schedule a delayed UpdatesChanged +- signal if required. +- """ +- if not self.queue.items and self._updates_changed: +- if self._updates_changed_timeout_id: +- # If we already have a scheduled UpdatesChanged signal +- # delay it even further +- pklog.debug("UpdatesChanged signal re-scheduled") +- GLib.source_remove(self._updates_changed_timeout_id) +- else: +- pklog.debug("UpdatesChanged signal scheduled") +- self._updates_changed_timeout_id = \ +- GLib.timeout_add_seconds(timeout, +- self._delayed_updates_changed) +- +- def _delayed_updates_changed(self): +- """Emit the UpdatesChanged signal and clear the timeout.""" +- self.UpdatesChanged() +- self._updates_changed_timeout_id = None +- self._updates_changed = False +- return False +- +- +-class MergedTransaction(core.Transaction): +- +- """Overlay of an Aptdaemon transaction which also provides the +- PackageKit object and its interfaces. +- """ +- +- def __init__(self, pktrans, role, queue, connect=True, +- bus=None, packages=None, kwargs=None): +- core.Transaction.__init__(self, pktrans.tid[1:], role, queue, +- pktrans.pid, pktrans.uid, pktrans.gid, +- pktrans.cmdline, pktrans.sender, +- connect, bus, packages, kwargs) +- self.pktrans = pktrans +- self.run_time = 0 +- +- @inline_callbacks +- def _run(self, sender): +- """Run the transaction and convert exceptions to PackageKit ones.""" +- try: +- yield core.Transaction._run(self, sender) +- except (TransactionFailed, errors.NotAuthorizedError, +- errors.AuthorizationFailed): +- # It is sufficient for PackageKit if the exit state and error +- # code of the transaction are set. So silently drop the execp +- if self.error: +- pass +- except Exception as error: +- raise error +- +- @inline_callbacks +- def _check_auth(self): +- """Override the auth method to allow simulates without any +- authorization. +- """ +- if bitfield_contains(self.pktrans.flags, +- pk.TransactionFlagEnum.SIMULATE): +- raise StopIteration +- else: +- yield core.Transaction._check_auth(self) +- +- @inline_callbacks +- def _check_simulated(self): +- """Skip simulate calls for simulated transactions.""" +- if bitfield_contains(self.pktrans.flags, +- pk.TransactionFlagEnum.SIMULATE): +- raise StopIteration +- else: +- yield core.Transaction._check_simulated(self) +- +- def _set_status(self, enum): +- core.Transaction._set_status(self, enum) +- self.pktrans.status = get_pk_status_enum(enum) +- +- status = property(core.Transaction._get_status, _set_status) +- +- def _set_progress(self, percent): +- core.Transaction._set_progress(self, percent) +- self.pktrans.percentage = self._progress +- +- progress = property(core.Transaction._get_progress, _set_progress) +- +- def _set_progress_details(self, details): +- core.Transaction._set_progress_details(self, details) +- self.pktrans.download_size_remaing = int(details[3]) - int(details[2]) +- self.pktrans.speed = int(details[4]) +- self.pktrans.remaining_time = int(details[5]) +- self.pktrans.elapsed_time = int(time.time() - self.pktrans.start_time) +- +- progress_details = property(core.Transaction._get_progress_details, +- _set_progress_details) +- +- def _set_progress_package(self, progress): +- core.Transaction._set_progress_package(self, progress) +- pkg_name, enum = progress +- # Ignore dpkg triggers +- if enum == aptd_enums.PKG_RUNNING_TRIGGER or pkg_name == "dpkg-exec": +- return +- try: +- id = self.pktrans.pkg_id_cache[pkg_name] +- except KeyError: +- id = get_pk_package_id(pkg_name) +- self.emit_package(get_pk_package_enum(enum), id, "") +- +- progress_package = property(core.Transaction._get_progress_package, +- _set_progress_package) +- +- def _set_progress_download(self, progress_download): +- core.Transaction._set_progress_download(self, progress_download) +- prog_enum = progress_download[1] +- prog_name = progress_download[2] +- total_size = progress_download[3] +- partial_size = progress_download[4] +- +- try: +- id = self.pktrans.pkg_id_cache[prog_name] +- except KeyError: +- return +- self.pktrans.Package(pk.InfoEnum.DOWNLOADING, id, "") +- if prog_enum == aptd_enums.DOWNLOAD_IDLE: +- percentage = 0 +- elif prog_enum == aptd_enums.DOWNLOAD_FETCHING and total_size > 0: +- percentage = partial_size * 100 / total_size +- elif prog_enum == aptd_enums.DOWNLOAD_DONE: +- percentage = 100 +- else: +- # In the case of an error +- percentage = 0 +- self.pktrans.ItemProgress(id, pk.InfoEnum.DOWNLOADING, percentage) +- +- progress_download = property(core.Transaction._get_progress_download, +- _set_progress_download) +- +- def _set_exit(self, enum): +- core.Transaction._set_exit(self, enum) +- self.pktrans.exit = get_pk_exit_enum(enum) +- +- exit = property(core.Transaction._get_exit, _set_exit) +- +- def _set_error(self, excep): +- core.Transaction._set_error(self, excep) +- self.pktrans.ErrorCode(get_pk_error_enum(excep.code), +- self._error_property[1]) +- +- error = property(core.Transaction._get_error, _set_error) +- +- def _remove_from_connection_no_raise(self): +- core.Transaction._remove_from_connection_no_raise(self) +- if self.pktrans is None: +- return False +- self.pktrans.Destroy() +- try: +- self.pktrans.remove_from_connection() +- except LookupError as error: +- pklog.debug("remove_from_connection() raised LookupError: %s", +- error) +- finally: +- self.pktrans.trans = None +- self.pktrans = None +- return False +- +- def emit_details(self, package_id, license, group, detail, url, size): +- self.pktrans.Details(package_id, license, group, detail, url, size) +- +- def emit_files(self, id, file_list): +- self.pktrans.Files(id, file_list) +- +- def emit_package(self, info, id, summary): +- if id.startswith("dpkg-exec;"): +- # PackageKit would show a non existing package +- pklog.debug("Don't emit Package() signal for the dpkg trigger") +- return +- self.pktrans.Package(info, id, summary) +- self.pktrans.last_package = id +- +- def emit_update_detail(self, package_id, updates, obsoletes, vendor_urls, +- bugzilla_urls, cve_urls, restart, update_text, +- changelog, state, issued, updated): +- self.pktrans.UpdateDetail(package_id, updates, obsoletes, vendor_urls, +- bugzilla_urls, cve_urls, restart, +- update_text, changelog, state, issued, +- updated) +- +- +-class PackageKitTransaction(core.DBusObject): +- +- """Provides a PackageKit transaction object.""" +- +- def __init__(self, pid, uid, gid, cmdline, queue, sender, +- connect=True, bus=None): +- pklog.info("Initializing PackageKit transaction") +- bus_name = None +- bus_path = None +- self.tid = "/%s" % uuid.uuid4().hex +- if connect is True: +- if bus is None: +- bus = dbus.SystemBus() +- self.bus = bus +- bus_path = self.tid +- bus_name = dbus.service.BusName(PACKAGEKIT_DBUS_SERVICE, bus) +- core.DBusObject.__init__(self, bus_name, bus_path) +- self.queue = queue +- self.hints = {} +- self.start_time = time.time() +- self._elapsed_time = dbus.UInt32(0) +- self._remaining_time = dbus.UInt32(0) +- self._download_size_remaining = dbus.UInt64(0) +- self._speed = dbus.UInt32(0) +- self._caller_active = True +- self._allow_cancel = False +- self._percentage = dbus.UInt32(0) +- self._status = pk.StatusEnum.SETUP +- self._last_package = "" +- self.uid = dbus.UInt32(uid) +- self.gid = dbus.UInt32(gid) +- self.pid = pid +- self.cmdline = cmdline +- self.role = pk.RoleEnum.UNKNOWN +- self.sender = sender +- self.trans = None +- self.flags = pk.TransactionFlagEnum.NONE +- self.pkg_id_cache = {} +- +- @property +- def allow_cancel(self): +- return self._allow_cancel +- +- @allow_cancel.setter +- def allow_cancel(self, value): +- self._allow_cancel = dbus.Boolean(value) +- self.PropertiesChanged(PACKAGEKIT_TRANS_DBUS_INTERFACE, +- {"AllowCancel": self._allow_cancel}, []) +- self.Changed() +- +- @property +- def last_package(self): +- return self._last_package +- +- @last_package.setter +- def last_package(self, value): +- self._last_package = dbus.String(value) +- self.PropertiesChanged(PACKAGEKIT_TRANS_DBUS_INTERFACE, +- {"LastPackage": self._last_package}, []) +- self.Changed() +- +- @property +- def caller_active(self): +- return self._caller_active +- +- @caller_active.setter +- def caller_active(self, value): +- self._caller_active = dbus.Boolean(value) +- self.PropertiesChanged(PACKAGEKIT_TRANS_DBUS_INTERFACE, +- {"CallerActive": self._caller_active}, []) +- self.Changed() +- +- @property +- def percentage(self): +- return self._percentage +- +- @percentage.setter +- def percentage(self, progress): +- self._percentage = dbus.UInt32(progress) +- self.PropertiesChanged(PACKAGEKIT_TRANS_DBUS_INTERFACE, +- {"Percentage": self._percentage}, []) +- self.Changed() +- +- @property +- def status(self): +- return self._status +- +- @status.setter +- def status(self, enum): +- self._status = dbus.UInt32(enum) +- self.PropertiesChanged(PACKAGEKIT_TRANS_DBUS_INTERFACE, +- {"Status": self._status}, []) +- self.Changed() +- +- @property +- def elapsed_time(self): +- return self._elapsed_time +- +- @elapsed_time.setter +- def elapsed_time(self, ela): +- self._elpased_time = dbus.UInt32(ela) +- self.PropertiesChanged(PACKAGEKIT_TRANS_DBUS_INTERFACE, +- {"ElapsedTime": self._elapsed_time}, []) +- self.Changed() +- +- @property +- def remaining_time(self): +- return self._remaining_time +- +- @remaining_time.setter +- def remaining_time(self, value): +- self._remaining_time = dbus.UInt32(value) +- self.PropertiesChanged(PACKAGEKIT_TRANS_DBUS_INTERFACE, +- {"RemainingTime": self._remaining_time}, []) +- self.Changed() +- +- @property +- def download_size_remaining(self): +- return self._download_size_remaining +- +- @download_size_remaining.setter +- def download_size_remaining(self, value): +- self._download_size_remaining = dbus.UInt64(value) +- self.PropertiesChanged(PACKAGEKIT_TRANS_DBUS_INTERFACE, +- {"DownloadSizeRemaining": +- self._download_size_remaining}, []) +- self.Changed() +- +- @property +- def speed(self): +- return self._speed +- +- @speed.setter +- def speed(self, speed): +- self._speed = dbus.UInt32(speed) +- self.PropertiesChanged(PACKAGEKIT_TRANS_DBUS_INTERFACE, +- {"Speed": self._speed}, []) +- self.Changed() +- +- @property +- def exit(self): +- return self._exit +- +- @exit.setter +- def exit(self, enum): +- self._exit = enum +- self.run_time = int((time.time() - self.start_time) * 1000) +- # The time could go backwards ... +- if self.run_time < 0: +- self.run_time = 0 +- if enum == pk.ExitEnum.CANCELLED: +- self.ErrorCode(pk.ErrorEnum.TRANSACTION_CANCELLED, "") +- self.status = pk.StatusEnum.FINISHED +- self.Finished(enum, self.run_time) +- +- # SIGNALS +- +- # pylint: disable-msg=C0103,C0322 +- @dbus.service.signal(dbus_interface=PACKAGEKIT_TRANS_DBUS_INTERFACE, +- signature="osbuusus") +- def Transaction(self, object_path, timespec, succeeded, role, duration, +- data, uid, cmdline): +- """This signal is sent when more details are required about a +- specific transaction. +- +- :param object_path: The transaction ID of the old transaction. +- :param timespec: The timespec of the old transaction in ISO8601 format. +- :param succeeded: If the transaction succeeded. +- :param role: The role enumerated type. +- :param duration: The duration of the transaction in milliseconds. +- :param data: Any data associated +- :param uid: The user ID of the user that scheduled the action. +- :param cmdline: The command line of the tool that scheduled the action, +- e.g. /usr/bin/gpk-application. +- """ +- pklog.debug("Emitting Transaction signal: %s, %s, %s, %s, %s, %s, " +- "%s, %s", object_path, timespec, succeeded, +- pk.role_enum_to_string(role), duration, data, uid, +- cmdline) +- +- # pylint: disable-msg=C0103,C0322 +- @dbus.service.signal(dbus_interface=PACKAGEKIT_TRANS_DBUS_INTERFACE, +- signature="us") +- def ErrorCode(self, code, details): +- """This signal is used to report errors back to the session program. +- Errors should only be send on fatal abort. +- +- :param code: Enumerated type, e.g. no-network. +- :param details: Long description or error, e.g. "failed to connect" +- +- :type code: u +- :type details: s +- """ +- pklog.debug("Emitting ErrorCode signal: %s, %s", +- pk.error_enum_to_string(code), details) +- +- # pylint: disable-msg=C0103,C0322 +- @dbus.service.signal(dbus_interface=PACKAGEKIT_TRANS_DBUS_INTERFACE, +- signature="") +- def Changed(self): +- """This signal is emitted when a property on the interface changes.""" +- pklog.debug("Emitting Changed signal") +- +- # pylint: disable-msg=C0103,C0322 +- @dbus.service.signal(dbus_interface=PACKAGEKIT_TRANS_DBUS_INTERFACE, +- signature="") +- def Destroy(self): +- """This signal is sent when the transaction has been destroyed +- and is no longer available for use.""" +- pklog.debug("Emitting Destroy signal") +- +- # pylint: disable-msg=C0103,C0322 +- @dbus.service.signal(dbus_interface=PACKAGEKIT_TRANS_DBUS_INTERFACE, +- signature="uu") +- def Finished(self, exit_enum, runtime): +- """This signal is used to signal that the transaction has finished. +- :param exit: The PkExitEnum describing the exit status of the +- transaction. +- :param runtime: The amount of time in milliseconds that the +- transaction ran for. +- +- :type exit: s +- :type runtime: u +- """ +- pklog.debug("Emitting Finished signal: %s, %s", +- pk.exit_enum_to_string(exit_enum), runtime) +- pass +- +- # pylint: disable-msg=C0103,C0322 +- @dbus.service.signal(dbus_interface=PACKAGEKIT_TRANS_DBUS_INTERFACE, +- signature="ssusst") +- def Details(self, package_id, license, group, detail, url, size): +- """This signal allows the backend to convey more details about the +- package. +- +- :param package_id: The package ID +- +- :param license: +- The license string, e.g. GPLv2+ or BSD and (MPLv1.1 or GPLv2+). +- Moredetails about the correct way to format licensing strings can +- be found on the Fedora packaging wiki. +- :param group: +- The enumerated package group description +- :param detail: +- The multi-line package description. If formatting is required, +- then markdown syntax should be used, e.g. This is **critically** +- important +- :param url: +- The upstream project homepage +- :param size: +- The size of the package in bytes. This should be the size of the +- entire package file, not the size of the files installed on the +- system. If the package is not installed, and already downloaded +- and present in the package manager cache, then this value should +- be set to zero. +- """ +- pklog.debug("Emitting Details signal for %s", package_id) +- +- # pylint: disable-msg=C0103,C0322 +- @dbus.service.signal(dbus_interface=PACKAGEKIT_TRANS_DBUS_INTERFACE, +- signature="us") +- def Message(self, kind, details): +- """This signal is sent when the backend wants to send a message to +- the session. +- +- The message will be shown after the transaction has been completed. +- """ +- pklog.debug("Emitting Message signal: %s, %s", kind, details) +- +- # pylint: disable-msg=C0103,C0322 +- @dbus.service.signal(dbus_interface=PACKAGEKIT_TRANS_DBUS_INTERFACE, +- signature="sas") +- def Files(self, package_id, file_list): +- """This signal is used to push file lists from the backend to the +- session. +- +- :param package_id: +- The Package ID that called the method. +- :param file_list: +- The file list +- """ +- pklog.debug("Emitting Files signal: %s, %s", package_id, file_list) +- +- # pylint: disable-msg=C0103,C0322 +- @dbus.service.signal(dbus_interface=PACKAGEKIT_TRANS_DBUS_INTERFACE, +- signature="suu") +- def ItemProgress(self, package_id, status, percentage): +- """This signal allows the backend to send information about +- package or repository progress when using Simultanous mode. +- +- :param package_id: The package ID +- :param status: +- The status enumerated value that is being completed +- :param percentage: +- The percentage of this action is completed +- """ +- pklog.debug("Emitting ItemProgress signal for %s: %s, %s", +- package_id, pk.info_enum_to_string(status), percentage) +- +- # pylint: disable-msg=C0103,C0322 +- @dbus.service.signal(dbus_interface=PACKAGEKIT_TRANS_DBUS_INTERFACE, +- signature="sasasasasasussuss") +- def UpdateDetail(self, package_id, updates, obsoletes, vendor_urls, +- bugzilla_urls, cve_urls, restart, update_text, changelog, +- state, issued, updated): +- """This signal is sent when more details are required about a +- specific update. +- +- :param package_id: The package ID +- :param updates: +- A list of package_id's that are to be updated. +- :param obsoletes: +- A list of package_id's that are to be obsoleted. +- :param vendor_urls: +- A URL with more details on the update, e.g. a page with more +- information on the update. The format of this command should +- be http://www.foo.org/page.html?4567;Update to SELinux +- :param bugzilla_urls: +- A bugzilla URL with more details on the update. If no URL is +- available then this field should be left empty. +- :param cve_urls: +- A CVE URL with more details on the security advisory. +- :param restart: +- A valid restart type, e.g. system. +- :param update_text: +- The update text describing the update. If formatting is required, +- then markdown syntax should be used, e.g. This is **critically** +- important. +- :param changelog: +- The ChangeLog text describing the changes since the last version. +- :param state: +- The state of the update, e.g. stable or testing. +- :param issued: +- The ISO8601 encoded date that the update was issued. +- :param updated: +- The ISO8601 encoded date that the update was updated. +- """ +- pklog.debug("Emitting UpdateDetail signal for %s", package_id) +- +- # pylint: disable-msg=C0103,C0322 +- @dbus.service.signal(dbus_interface=PACKAGEKIT_TRANS_DBUS_INTERFACE, +- signature="uss") +- def Package(self, info, package_id, summary): +- """This signal allows the backend to communicate packages to the +- session. +- +- If updating, as packages are updated then emit them to the screen. +- This allows a summary to be presented after the transaction. +- When returning results from a search always return installed +- before available for the same package name. +- +- :param info: A valid info enumerated type +- :param package_id: This identifier is of the form +- name;version;arch;data in a single string and is meant to +- represent a single package unique across all local and remote +- data stores. For a remote, not-installed package the data +- field should be set as the repository identifier or repository +- name. The data field for an installed package must be prefixed +- with installed as this is used to identify which packages are +- installable or installed in the client tools. As a special +- extension, if the package manager is able to track which +- repository a package was originally installed from, then the data +- field can be set to installed:REPO-NAME which allows the frontend +- client to advise the user of the package origin. The data field +- for a non-installed local package must be local as this signifies +- a repository name is not available and that package resides +- locally on the client system rather than in any specific +- repository. +- :param summary: The one line package summary, e.g. Clipart for +- OpenOffice +- """ +- pklog.debug("Emitting Package signal: %s, %s, %s'", +- pk.info_enum_to_string(info), package_id, summary[:10]) +- +- # pylint: disable-msg=C0103,C0322 +- @dbus.service.signal(dbus_interface=PACKAGEKIT_TRANS_DBUS_INTERFACE, +- signature="sss") +- def DistroUpgrade(self, distro_type, name, summary): +- """This signal allows the backend to communicate distribution upgrades +- to the session. +- :param type: A valid upgrade string enumerated type, e.g. stable +- or unstable +- :param name: The short name of the distribution, e.g. Fedora Core +- 10 RC1 +- :param summary: The multi-line description of the release +- """ +- pklog.debug("Emitting DistroUpgrade signal: %s, %s, %s", +- pk.distro_upgrade_enum_to_string(distro_type), +- name, summary) +- +- # pylint: disable-msg=C0103,C0322 +- @dbus.service.signal(dbus_interface=PACKAGEKIT_TRANS_DBUS_INTERFACE, +- signature="us") +- def RequireRestart(self, restart_type, package_id): +- """This signal is sent when the session client should notify the user +- that a restart is required to get all changes into effect. +- +- :param package_id: +- The Package ID of the package tiggering the restart +- :param file_list: +- One of system, application or session +- """ +- pklog.debug("Emitting RequireRestart signal: %s, %s", +- pk.restart_enum_to_string(restart_type), package_id) +- +- # METHODS +- +- # pylint: disable-msg=C0103,C0322 +- @dbus.service.method(PACKAGEKIT_TRANS_DBUS_INTERFACE, +- in_signature="as", out_signature="") +- def SetHints(self, hints): +- """This method allows the calling session to set transaction hints +- for the package manager which can change as the transaction runs. +- +- This method can be sent before the transaction has been run or +- whilst it is running. There is no limit to the number of times +- this method can be sent, although some backends may only use the +- values that were set before the transaction was started. +- +- Each parameter value is optional. +- +- :param hints: The values as an array of strings, for example +- ['locale=en_GB.utf8','interactive=false','cache-age=3600'] +- """ +- pklog.info("SetHints() was called: %s", get_string_from_array(hints)) +- for hint in hints: +- key, value = hint.split("=", 1) +- if key not in ["locale", "idle", "background", "interactive", +- "cache-age", "frontend-socket"]: +- raise Exception("Invalid option %s" % key) +- self.hints[key] = value +- +- # pylint: disable-msg=C0103,C0322 +- @dbus_deferred_method(PACKAGEKIT_TRANS_DBUS_INTERFACE, +- in_signature="", out_signature="", +- sender_keyword="sender") +- def Cancel(self, sender): +- """This method cancels a transaction that is already running.""" +- if self.trans: +- return self.trans._cancel(sender) +- +- # pylint: disable-msg=C0103,C0322 +- @dbus_deferred_method(PACKAGEKIT_TRANS_DBUS_INTERFACE, +- in_signature="tasbb", out_signature="", +- sender_keyword="sender") +- def RemovePackages(self, flags, package_ids, allow_deps, autoremove, +- sender): +- """This method removes packages from the local system. +- +- This method typically emits Progress, Status and Error and Package. +- +- Package enumerated types should be downloading, updating, +- installing or removing. +- +- :param flags: If the transaction should be simulated or prepared +- :param package_ids: An array of package IDs. +- :param allow_deps: +- Either true or false. If true allow other packages to be removed +- with the package, but false should cause the script to abort if +- other packages are dependant on the package. +- :param autoremove: +- Either true or false. This option is only really interesting on +- embedded devices with a limited amount of flash storage. It +- suggests to the packagekit backend that dependencies installed at +- the same time as the package should also be removed if they are not +- required by anything else. For instance, if you install OpenOffice, +- it might download libneon as a dependency. When auto_remove is set +- to true, and you remove OpenOffice then libneon will also get +- removed automatically. +- """ +- pklog.info("RemovePackages() was called: %s, %s", +- get_string_from_flags(flags), +- get_string_from_array(package_ids)) +- return self._remove_packages(flags, package_ids, allow_deps, +- autoremove, sender) +- +- @inline_callbacks +- def _remove_packages(self, flags, package_ids, allow_deps, autoremove, +- sender): +- self.role = pk.RoleEnum.REMOVE_PACKAGES +- self.flags = flags +- self.trans = self._get_merged_trans(aptd_enums.ROLE_REMOVE_PACKAGES, +- pkg_ids=package_ids, +- pkg_type=aptd_enums.PKGS_REMOVE) +- yield self.trans._set_property(APTDAEMON_TRANSACTION_DBUS_INTERFACE, +- "RemoveObsoletedDepends", autoremove, +- sender) +- # FIXME: Implement allow_deps +- yield self.trans._run(sender) +- +- # pylint: disable-msg=C0103,C0322 +- @dbus_deferred_method(PACKAGEKIT_TRANS_DBUS_INTERFACE, +- in_signature="tas", out_signature="", +- sender_keyword="sender") +- def UpdatePackages(self, flags, package_ids, sender): +- """This method updates existing packages on the local system. +- +- The installer should always update extra packages automatically +- to fulfil dependencies. +- +- This should allow an application to find out what package owns a +- file on the system. +- +- This method typically emits Progress, Status and Error and Package. +- +- :param flags: +- If the transaction is only allowed to install trusted packages. +- Unsigned packages should not be installed if the flags +- contains ONLY_TRUSED. +- If this method is can only install trusted packages, and +- the packages are unsigned, then the backend will send a +- ErrorCode(missing-gpg-signature). On recieving this error, the +- client may choose to retry with ONLY_TRUSTED set after +- gaining further authentication. +- : param package_ids: An array of package IDs. +- """ +- pklog.info("UpdatePackages() was called: %s, %s", +- get_string_from_flags(flags), +- get_string_from_array(package_ids)) +- return self._update_packages(flags, package_ids, sender) +- +- @inline_callbacks +- def _update_packages(self, flags, package_ids, sender): +- self.role = pk.RoleEnum.UPDATE_PACKAGES +- self.flags = flags +- self.trans = self._get_merged_trans(aptd_enums.ROLE_UPGRADE_PACKAGES, +- pkg_ids=package_ids, +- pkg_type=aptd_enums.PKGS_UPGRADE) +- yield self.trans._set_property( +- APTDAEMON_TRANSACTION_DBUS_INTERFACE, +- "AllowUnauthenticated", +- not bitfield_contains(flags, +- pk.TransactionFlagEnum.ONLY_TRUSTED), +- sender) +- yield self.trans._run(sender) +- +- # pylint: disable-msg=C0103,C0322 +- @dbus_deferred_method(PACKAGEKIT_TRANS_DBUS_INTERFACE, +- in_signature="uas", out_signature="", +- sender_keyword="sender") +- def InstallPackages(self, flags, package_ids, sender): +- """This method installs new packages on the local system. +- +- The installer should always install extra packages automatically +- as the use could call GetDepends prior to the install if a +- confirmation is required in the UI. +- +- This method typically emits Progress, Status and Error and Package. +- +- Package enumerated types should be downloading, updating, +- installing or removing. +- +- :param flags: +- If the transaction is only allowed to install trusted packages. +- Unsigned packages should not be installed if the flags +- contains ONLY_TRUSED. +- If this method is can only install trusted packages, and +- the packages are unsigned, then the backend will send a +- ErrorCode(missing-gpg-signature). On recieving this error, the +- client may choose to retry with ONLY_TRUSTED set after +- gaining further authentication. +- : param package_ids: An array of package IDs. +- """ +- pklog.info("InstallPackages() was called: %s, %s", +- get_string_from_flags(flags), +- get_string_from_array(package_ids)) +- return self._install_packages(flags, package_ids, sender) +- +- @inline_callbacks +- def _install_packages(self, flags, package_ids, sender): +- self.role = pk.RoleEnum.INSTALL_PACKAGES +- self.flags = flags +- self.trans = self._get_merged_trans(aptd_enums.ROLE_INSTALL_PACKAGES, +- pkg_ids=package_ids, +- pkg_type=aptd_enums.PKGS_INSTALL) +- yield self.trans._set_property( +- APTDAEMON_TRANSACTION_DBUS_INTERFACE, +- "AllowUnauthenticated", +- not bitfield_contains(flags, +- pk.TransactionFlagEnum.ONLY_TRUSTED), +- sender) +- yield self.trans._run(sender) +- +- # pylint: disable-msg=C0103,C0322 +- @dbus.service.method(PACKAGEKIT_TRANS_DBUS_INTERFACE, +- in_signature="su", out_signature="", +- sender_keyword="sender") +- def UpgradeSystem(self, distro_id, upgrade_kind, sender): +- """This method updates existing packages on the local system. +- +- The installer should always update extra packages automatically +- to fulfil dependencies. +- +- This should allow an application to find out what package owns a +- file on the system. +- +- This method typically emits Progress, Status and Error and Package. +- +- :param distro_id: The distribution id to upgrade to, e.g. saucy +- :param upgrade_kind: +- The type of upgrade e.g. minimal, default or complete. +- Minimal upgrades will download the smallest amount of data +- before launching a installer. +- The default is to download enough data to launch a full graphical +- installer, but a complete upgrade will be required if there is no +- internet access during install time. +- """ +- pklog.info("UpgradeSystem() was called") +- GLib.idle_add(self._fail_not_implemented) +- +- # pylint: disable-msg=C0103,C0322 +- @dbus_deferred_method(PACKAGEKIT_TRANS_DBUS_INTERFACE, +- in_signature="t", out_signature="", +- sender_keyword="sender") +- def RepairSystem(self, flags, sender): +- """This method recovers the package managment system from e.g. +- unsatisified dependencies of installed packages. +- +- :param flags: +- If the transaction is only allowed to install trusted packages. +- Unsigned packages should not be installed if the flags +- contains ONLY_TRUSED. +- If this method is can only install trusted packages, and +- the packages are unsigned, then the backend will send a +- ErrorCode(missing-gpg-signature). On recieving this error, the +- client may choose to retry with ONLY_TRUSTED set after +- gaining further authentication. +- """ +- pklog.info("RepairSystem() was called") +- return self._repair_system(flags, sender) +- +- @inline_callbacks +- def _repair_system(self, flags, sender): +- self.role = pk.RoleEnum.REPAIR_SYSTEM +- self.flags = flags +- self.trans = self._get_merged_trans(aptd_enums.ROLE_FIX_BROKEN_DEPENDS) +- yield self.trans._set_property( +- APTDAEMON_TRANSACTION_DBUS_INTERFACE, +- "AllowUnauthenticated", +- not bitfield_contains(flags, +- pk.TransactionFlagEnum.ONLY_TRUSTED), +- sender) +- yield self.trans._run(sender) +- +- # pylint: disable-msg=C0103,C0322 +- @dbus_deferred_method(PACKAGEKIT_TRANS_DBUS_INTERFACE, +- in_signature="b", out_signature="", +- sender_keyword="sender") +- def RefreshCache(self, force, sender): +- """This method should fetch updated meta-data for all enabled +- repositories. +- +- When fetching each software source, ensure to emit RepoDetail for +- the current source to give the user interface some extra details. +- Be sure to have the "enabled" field set to true, otherwise you +- wouldn't be fetching that source. +- +- This method typically emits Progress, Error and RepoDetail. +- +- :param force: If the caches should be cleaned and reloaded even if +- there is valid, up to date data. +- """ +- pklog.info("RefreshCache() was called") +- self.role = pk.RoleEnum.REFRESH_CACHE +- return self._refresh_cache(force, sender) +- +- @inline_callbacks +- def _refresh_cache(self, force, sender): +- self.trans = self._get_merged_trans(aptd_enums.ROLE_UPDATE_CACHE, +- kwargs={"sources_list": None}) +- yield self.trans._run(sender) +- +- @dbus_deferred_method(PACKAGEKIT_TRANS_DBUS_INTERFACE, +- in_signature="as", out_signature="", +- sender_keyword="sender") +- def GetUpdateDetail(self, package_ids, sender): +- """This method returns details about a specific update. +- +- This method typically emits UpdateDetail and Error +- +- :param package_ids: An array of package IDs. +- """ +- pklog.info("GetUpdateDetail() was called") +- self.role = pk.RoleEnum.GET_UPDATE_DETAIL +- kwargs = {"package_ids": package_ids} +- return self._run_query(kwargs, sender) +- +- @dbus_deferred_method(PACKAGEKIT_TRANS_DBUS_INTERFACE, +- in_signature="t", out_signature="", +- sender_keyword="sender") +- def GetUpdates(self, filter, sender): +- """This method should return a list of packages that are installed +- and are upgradable. It should only return the newest update for +- each installed package. +- +- This method typically emits Progress, Error and Package. +- +- :param filter: A correct filter, e.g. none or installed;~devel +- """ +- pklog.info("GetUpdates() was called") +- self.role = pk.RoleEnum.GET_UPDATES +- kwargs = {"filters": filter} +- return self._run_query(kwargs, sender) +- +- @dbus.service.method(PACKAGEKIT_TRANS_DBUS_INTERFACE, +- in_signature="", out_signature="", +- sender_keyword="sender") +- def GetDistroUpgrades(self, sender): +- """This method should return a list of distribution upgrades that are +- available. It should not return updates, only major upgrades. +- +- This method typically emits DistroUpgrade, Error +- """ +- pklog.info("GetDistroUpgrades() was called") +- self.role = pk.RoleEnum.GET_DISTRO_UPGRADES +- self.status = pk.StatusEnum.RUNNING +- GLib.idle_add(defer_idle, self._get_distro_upgrades) +- +- def _get_distro_upgrades(self): +- # FIXME: Should go into the worker after the threading branch is merged +- # It allows to run a nested loop until the download is finished +- self.allow_cancel = False +- self.percentage = 101 +- self.status = pk.StatusEnum.DOWNLOAD_UPDATEINFO +- +- if META_RELEASE_SUPPORT is False: +- self.ErrorCode(pk.ErrorEnum.INTERNAL_ERROR, +- "Please make sure that update-manager-core is" +- "correctly installed.") +- self.exit = pk.ExitEnum.FAILED +- return +- +- # FIXME Evil to start the download during init +- meta_release = GMetaRelease() +- meta_release.connect("download-done", +- self._on_distro_upgrade_download_done) +- +- def _on_distro_upgrade_download_done(self, meta_release): +- # FIXME: Add support for description +- if meta_release.new_dist is not None: +- self.DistroUpgrade("stable", +- "%s %s" % (meta_release.new_dist.name, +- meta_release.new_dist.version), +- "The latest stable release") +- self.exit = pk.ExitEnum.SUCCESS +- +- @dbus_deferred_method(PACKAGEKIT_TRANS_DBUS_INTERFACE, +- in_signature="tas", out_signature="", +- sender_keyword="sender") +- def Resolve(self, filter, packages, sender): +- """This method turns a single package name into a package_id suitable +- for the other methods. +- +- If the package is a fully formed package_id, then this should be +- treated as an exact package match. This is useful to find the summary +- or installed status of a package_id returned from other methods. +- +- This method typically emits Error and Package. +- +- Package enumerated types should be available or installed. +- +- :param filter: A correct filter, e.g. none or installed;~devel +- :param packages: +- An array of package names, e.g. scribus-clipart. The package +- names are case sensitive, so for instance: Resolve('Packagekit') +- would not match PackageKit. As a special case, if Resolve() is +- called with a name prefixed with @ then this should be treated as +- a category, for example: @web-development. In this instance, a +- meta-package should be emitted, for example: +- web-development;;;meta with the correct installed status and +- summary for the category. +- """ +- pklog.info("Resolve() was called: %s", get_string_from_array(packages)) +- self.role = pk.RoleEnum.RESOLVE +- kwargs = {"filters": filter, "packages": packages} +- return self._run_query(kwargs, sender) +- +- @dbus_deferred_method(PACKAGEKIT_TRANS_DBUS_INTERFACE, +- in_signature="t", out_signature="", +- sender_keyword="sender") +- def GetPackages(self, filter, sender): +- """This method returns all the packages without a search term. +- +- This method typically emits Progress, Error and Package. +- +- Package enumerated types should be available or installed. +- +- :param filter: A correct filter, e.g. none or installed;~devel +- """ +- pklog.info("GetPackages() was called") +- self.role = pk.RoleEnum.GET_PACKAGES +- kwargs = {"filters": filter} +- return self._run_query(kwargs, sender) +- +- @dbus_deferred_method(PACKAGEKIT_TRANS_DBUS_INTERFACE, +- in_signature="as", out_signature="", +- sender_keyword="sender") +- def GetDetails(self, package_ids, sender): +- """This method should return all the details about a specific +- package_id. +- +- This method typically emits Progress, Status and Error and Details. +- +- :param package_ids: An array of package IDs. +- """ +- pklog.info("GetDetails() was called") +- self.role = pk.RoleEnum.GET_DETAILS +- kwargs = {"package_ids": package_ids} +- return self._run_query(kwargs, sender) +- +- @dbus_deferred_method(PACKAGEKIT_TRANS_DBUS_INTERFACE, +- in_signature="as", out_signature="", +- sender_keyword="sender") +- def GetFiles(self, package_ids, sender): +- """This method should return the file list of the package_id. +- +- This method typically emits Progress, Status and Error and Files. +- +- :param package_ids: An array of package IDs. +- """ +- pklog.info("GetFiles() was called") +- self.role = pk.RoleEnum.GET_FILES +- kwargs = {"package_ids": package_ids} +- return self._run_query(kwargs, sender) +- +- @dbus_deferred_method(PACKAGEKIT_TRANS_DBUS_INTERFACE, +- in_signature="tas", out_signature="", +- sender_keyword="sender") +- def SearchFiles(self, filter, values, sender): +- """This method searches for files on the local system and files in +- available packages. +- +- This should search for files. This should allow an application to +- find out what package owns a file on the system. +- +- This method typically emits Progress, Error and Package. +- +- Package enumerated types should be available or installed. +- +- :param filter: A correct filter, e.g. none or installed;~devel +- :param values: +- A filename or fully qualified path and filename on the system. +- If the search term begins with a / it will be assumed the entire +- path has been given and only packages that contain this exact +- path and filename will be returned. If the search term does not +- start with / then it should be treated as a single filename, +- which can be in any directory. The search is case sensitive, +- and should not be escaped or surrounded in quotes. +- """ +- pklog.info("SearchFiles() was called") +- self.role = pk.RoleEnum.SEARCH_FILE +- kwargs = {"filters": filter, +- "values": values} +- return self._run_query(kwargs, sender) +- +- @dbus_deferred_method(PACKAGEKIT_TRANS_DBUS_INTERFACE, +- in_signature="tas", out_signature="", +- sender_keyword="sender") +- def SearchDetails(self, filter, values, sender): +- """This method allows deeper searching than SearchName(). +- +- Do not refresh the package cache. This should be fast. This is very +- similar to search-name. This should search as much data as possible, +- including, if possible repo names, package summaries, descriptions, +- licenses and URLs. +- +- Try to emit installed before available packages first, as it allows +- the client program to perform the GUI filtering and matching whilst +- the daemon is running the transaction. +- +- If the backend includes installed and available versions of the same +- package when searching then the available version will have to be +- filtered in the backend. +- +- This method typically emits Progress, Error and Package. +- +- Package enumerated types should be available or installed. +- +- :param filter: A correct filter, e.g. none or installed;~devel +- :param values: +- A single word search term with no wildcard chars. The search term +- can contain many words separated by spaces. In this case, the +- search operator is AND. For example, search of gnome power should +- returns gnome-power-manager but not gnomesword or powertop. +- The search should not be treated as case sensitive. +- """ +- pklog.info("SearchDetails() was called") +- self.role = pk.RoleEnum.SEARCH_DETAILS +- kwargs = {"filters": filter, +- "values": values} +- return self._run_query(kwargs, sender) +- +- @dbus_deferred_method(PACKAGEKIT_TRANS_DBUS_INTERFACE, +- in_signature="tas", out_signature="", +- sender_keyword="sender") +- def SearchGroups(self, filter, values, sender): +- """This method returns packages from a given group enumerated type. +- +- Do not refresh the package cache. This should be fast. +- +- Try to emit installed before available packages first, as it +- allows the client program to perform the GUI filtering and matching +- whilst the daemon is running the transaction. +- +- If the backend includes installed and available versions of the same +- package when searching then the available version will have to be +- filtered in the backend. +- +- This method typically emits Progress, Error and Package. +- +- Package enumerated types should be available or installed. +- +- :param filter: A correct filter, e.g. none or installed;~devel +- :param values: +- An enumerated group type, or unknown. The search cannot contain +- spaces. The following recommendations are made below: If the values +- strings are prefixed with category: then the request is treated +- as a 'category search', for example: category:web-development. +- repo: then the request is treated as a 'repository search', for +- example: repo:fedora-debuginfo. In this instance all packages that +- were either installed from, or can be installed from the +- fedora-debuginfo source would be returned. +- """ +- pklog.info("SearchGroups() was called") +- self.role = pk.RoleEnum.SEARCH_GROUP +- kwargs = {"filters": filter, +- "values": values} +- return self._run_query(kwargs, sender) +- +- @dbus_deferred_method(PACKAGEKIT_TRANS_DBUS_INTERFACE, +- in_signature="tas", out_signature="", +- sender_keyword="sender") +- def SearchNames(self, filter, values, sender): +- """This method searches the package database by package name. +- +- Try to emit installed before available packages first, as it +- allows the client program to perform the GUI filtering and matching +- whilst the daemon is running the transaction. +- +- If the backend includes installed and available versions of the same +- package when searching then the available version will have to be +- filtered in the backend. +- +- The search methods should return all results in all repositories. +- This may mean that multiple versions of package are returned. If this +- is not what is wanted by the client program, then the newest filter +- should be used. +- +- This method typically emits Progress, Error and Package. +- +- Package enumerated types should be available or installed. +- +- :param filter: A correct filter, e.g. none or installed;~devel +- :param values: +- A single word search term with no wildcard chars. The search term +- can contain many words separated by spaces. In this case, the +- search operator is AND. For example, search of gnome power should +- returns gnome-power-manager but not gnomesword or powertop. +- The search should not be treated as case sensitive. +- """ +- pklog.info("SearchNames() was called") +- self.role = pk.RoleEnum.SEARCH_NAME +- kwargs = {"filters": filter, +- "values": values} +- return self._run_query(kwargs, sender) +- +- @dbus.service.method(PACKAGEKIT_TRANS_DBUS_INTERFACE, +- in_signature="s", out_signature="", +- sender_keyword="sender") +- def AcceptEula(self, eula_id, sender): +- """This method allows the user to accept a end user licence agreement. +- +- :param eula_id: A valid EULA ID +- """ +- self.role = pk.RoleEnum.ACCEPT_EULA +- GLib.idle_add(self._fail_not_implemented) +- +- @dbus_deferred_method(PACKAGEKIT_TRANS_DBUS_INTERFACE, +- in_signature="bas", out_signature="", +- sender_keyword="sender") +- def DownloadPackages(self, store_in_cache, package_ids, sender): +- """This method downloads packages into a temporary directory. +- +- This method should emit one Files signal for each package that +- is downloaded, with the file list set as the name of the complete +- downloaded file and directory, so for example: +- +- DownloadPackages('hal;0.1.2;i386;fedora', +- 'hal-info;2009-09-07;no-arch;updates') should send two signals, +- e.g. Files('hal;0.1.2;i386;fedora', '/tmp/hal-0.1.2.i386.rpm') +- and Files('hal-info;2009-09-07;no-arch;updates', +- '/tmp/hal-info-2009-09-07.noarch.rpm'). +- +- :param store_in_cache: +- If the downloaded files should be stored in the system package +- cache rather than copied into a newly created directory. See the +- developer docs for more details on how this is supposed to work. +- :param package_ids: An array of package IDs. +- """ +- pklog.info("DownloadPackages() was called: %s", +- get_string_from_array(package_ids)) +- self.role = pk.RoleEnum.DOWNLOAD_PACKAGES +- kwargs = {"store_in_cache": store_in_cache, +- "package_ids": package_ids} +- return self._run_query(kwargs, sender) +- +- @dbus.service.method(PACKAGEKIT_TRANS_DBUS_INTERFACE, +- in_signature="u", out_signature="", +- sender_keyword="sender") +- def GetOldTransactions(self, number, sender): +- """This method allows a client to view details for old transactions. +- +- :param number: +- The number of past transactions, or 0 for all known transactions. +- """ +- pklog.info("GetOldTransactions() was called: %s", str(number)) +- self.role = pk.RoleEnum.GET_OLD_TRANSACTIONS +- GLib.idle_add(self._fail_not_implemented) +- +- @dbus.service.method(PACKAGEKIT_TRANS_DBUS_INTERFACE, +- in_signature="t", out_signature="", +- sender_keyword="sender") +- def GetRepoList(self, filter, sender): +- """This method returns the list of repositories used in the system. +- +- This method should emit RepoDetail. +- +- :param filter: A correct filter, e.g. none or installed;~devel +- """ +- pklog.info("GetRepoList() was called") +- self.role = pk.RoleEnum.GET_REPO_LIST +- GLib.idle_add(self._fail_not_implemented) +- +- @dbus_deferred_method(PACKAGEKIT_TRANS_DBUS_INTERFACE, +- in_signature="tas", out_signature="", +- sender_keyword="sender") +- def InstallFiles(self, flags, full_paths, sender): +- """This method installs local package files onto the local system. +- +- The installer should always install extra dependant packages +- automatically. +- +- This method typically emits Progress, Status and Error and Package. +- +- Package enumerated types should be downloading, updating, installing +- or removing. +- +- :param flags: +- If the transaction is only allowed to install trusted packages. +- Unsigned packages should not be installed if the flags +- contains ONLY_TRUSED. +- If this method is can only install trusted packages, and +- the packages are unsigned, then the backend will send a +- ErrorCode(missing-gpg-signature). On recieving this error, the +- client may choose to retry with ONLY_TRUSTED set after +- gaining further authentication. +- :param full_paths: An array of full path and filenames to packages. +- """ +- pklog.info("InstallFiles() was called: %s, %s", +- get_string_from_flags(flags), +- get_string_from_array(full_paths)) +- return self._install_files(flags, full_paths, sender) +- +- @inline_callbacks +- def _install_files(self, flags, full_paths, sender): +- self.role = pk.RoleEnum.INSTALL_FILES +- self.flags = flags +- # Python-APT only supports installing one file +- if len(full_paths) != 1: +- self.ErrorCode(pk.ErrorEnum.NOT_SUPPORTED, +- "Only one package can be " +- "installed at the same time.") +- self.exit = pk.ExitEnum.FAILED +- raise StopIteration +- path = full_paths[0] +- if not os.path.abspath(path): +- self.ErrorCode(pk.ErrorEnum.NOT_SUPPORTED, +- "Path is not absolute: %s") +- self.exit = pk.ExitEnum.FAILED +- raise StopIteration +- if not os.path.isfile(path): +- self.ErrorCode(pk.ErrorEnum.INVALID_PACKAGE_FILE, +- "File doesn't exist: %s" % path) +- self.exit = pk.ExitEnum.FAILED +- raise StopIteration +- +- kwargs = {"path": path, +- "force": True} +- self.trans = self._get_merged_trans(aptd_enums.ROLE_INSTALL_FILE, +- kwargs=kwargs) +- yield self.trans._run(sender) +- +- @dbus_deferred_method(PACKAGEKIT_TRANS_DBUS_INTERFACE, +- in_signature="uss", out_signature="", +- sender_keyword="sender") +- def InstallSignature(self, sig_type, key_id, package_id, sender): +- """This method allows us to install new security keys. +- +- :param sig_type: A key type, e.g. gpg +- :param key_id: A key ID, e.g. BB7576AC +- :param package_id: +- A PackageID for the package that the user is trying to install +- (ignored) +- """ +- pklog.info("InstallSignature() was called: %s", str(key_id)) +- self.role = pk.RoleEnum.INSTALL_SIGNATURE +- kwargs = {"sig_type": sig_type, +- "key_id": key_id, +- "package_id": package_id} +- return self._run_query(kwargs, sender) +- +- @dbus.service.method(PACKAGEKIT_TRANS_DBUS_INTERFACE, +- in_signature="sss", out_signature="", +- sender_keyword="sender") +- def RepoSetData(self, repo_id, parameter, value, sender): +- """This method allows arbitary data to be passed to the repository +- handler. +- +- :param repo_id: +- A repository identifier, e.g. fedora-development-debuginfo +- :param parameter: +- The backend specific value, e.g. set-download-url. +- :param value: +- The backend specific value, e.g. http://foo.bar.org/baz. +- """ +- pklog.info("RepoSetData() was called: %s, %s, %s", +- str(repo_id), str(parameter), str(value)) +- self.role = pk.RoleEnum.REPO_SET_DATA +- GLib.idle_add(self._fail_not_implemented) +- +- @dbus_deferred_method(PACKAGEKIT_TRANS_DBUS_INTERFACE, +- in_signature="sb", out_signature="", +- sender_keyword="sender") +- def RepoEnable(self, repo_id, enabled, sender): +- """This method enables the repository specified. +- +- :param repo_id: +- A repository identifier, e.g. fedora-development-debuginfo or an +- apt source ("deb http://... unstable main") +- :param enabled: true if enabled, false if disabled. +- """ +- pklog.info("RepoEnable() was called(): %s, %s", +- str(repo_id), str(enabled)) +- self.role = pk.RoleEnum.REPO_ENABLE +- kwargs = {"repo_id": repo_id, +- "enabled": enabled} +- return self._run_query(kwargs, sender) +- +- @dbus_deferred_method(PACKAGEKIT_TRANS_DBUS_INTERFACE, +- in_signature="tsas", out_signature="", +- sender_keyword="sender") +- def WhatProvides(self, filter, type, values, sender): +- """This method returns packages that provide the supplied attributes. +- This method is useful for finding out what package(s) provide a +- modalias or GStreamer codec string. +- +- This method typically emits Progress, Status and Error and Package. +- +- Package enumerated types should be available or installed. +- +- :param filter: +- A correct filter, e.g. none or installed;~devel +- :param type: +- A PkProvideType, e.g. PK_PROVIDES_ENUM_CODEC. +- :param values: +- The data to send to the backend to get the packages. Note: This +- is backend specific. +- """ +- pklog.info("WhatProvides() was called") +- self.role = pk.RoleEnum.WHAT_PROVIDES +- kwargs = {"filters": filter, +- "provides_type": type, +- "values": values} +- return self._run_query(kwargs, sender) +- +- @dbus.service.method(PACKAGEKIT_TRANS_DBUS_INTERFACE, +- in_signature="", out_signature="", +- sender_keyword="sender") +- def GetCategories(self, sender): +- pklog.info("GetCategories() was called") +- """This method return the collection categories""" +- self.role = pk.RoleEnum.GET_CATEGORIES +- GLib.idle_add(self._fail_not_implemented) +- +- @dbus_deferred_method(PACKAGEKIT_TRANS_DBUS_INTERFACE, +- in_signature="tasb", out_signature="", +- sender_keyword="sender") +- def GetRequires(self, filter, package_ids, recursive, sender): +- """This method returns packages that depend on this package. This is +- useful to know, as if package_id is being removed, we can warn the +- user what else would be removed. +- +- This method typically emits Progress, Status and Error and Package. +- +- Package enumerated types should be available or installed. +- +- :param filter: A correct filter, e.g. none or installed;~devel +- :param package_ids: An array of package IDs. +- :param recursive: +- Either true or false. If yes then the requirements should be +- returned for all packages returned. This means if +- gnome-power-manager depends on NetworkManager and NetworkManager +- depends on HAL, then GetRequires on HAL should return both +- gnome-power-manager and NetworkManager. +- """ +- pklog.info("GetRequires() was called") +- self.role = pk.RoleEnum.GET_REQUIRES +- kwargs = {"filters": filter, +- "package_ids": package_ids, +- "recursive": recursive} +- return self._run_query(kwargs, sender) +- +- @dbus_deferred_method(PACKAGEKIT_TRANS_DBUS_INTERFACE, +- in_signature="tasb", out_signature="", +- sender_keyword="sender") +- def GetDepends(self, filter, package_ids, recursive, sender): +- """This method returns packages that this package depends on. +- +- This method typically emits Progress, Status and Error and Package. +- +- Package enumerated types should be available or installed. +- +- :param filter: A correct filter, e.g. none or installed;~devel +- :param package_ids: An array of package IDs. +- :param recursive: +- Either true or false. If yes then the requirements should be +- returned for all packages returned. This means if +- gnome-power-manager depends on NetworkManager and NetworkManager +- depends on HAL, then GetDepends on gnome-power-manager should +- return both HAL and NetworkManager. +- """ +- pklog.info("GetDepends() was called") +- self.role = pk.RoleEnum.GET_DEPENDS +- kwargs = {"filters": filter, +- "package_ids": package_ids, +- "recursive": recursive} +- return self._run_query(kwargs, sender) +- +- # HELPERS +- +- def _fail_not_implemented(self): +- self.ErrorCode(pk.ErrorEnum.NOT_SUPPORTED, "Unimplemented method") +- self.exit = pk.ExitEnum.FAILED +- return False +- +- def _get_properties(self, iface): +- """Helper to get the properties of a D-Bus interface.""" +- if iface == PACKAGEKIT_TRANS_DBUS_INTERFACE: +- return {"Role": dbus.UInt32(self.role), +- "Status": dbus.UInt32(self.status), +- "LastPackage": dbus.String(self.last_package), +- "Uid": dbus.UInt32(self.uid), +- "Percentage": dbus.UInt32(self.percentage), +- "AllowCancel": dbus.Boolean(self.allow_cancel), +- "CallerActive": dbus.Boolean(self.caller_active), +- "ElapsedTime": dbus.UInt32(self.elapsed_time), +- "RemainingTime": dbus.UInt32(self.remaining_time), +- "DownloadSizeRemaining": dbus.UInt64( +- self.download_size_remaining), +- "TransactionFlags": dbus.UInt64(self.flags), +- "Speed": dbus.UInt32(self.speed) +- } +- else: +- return {} +- +- @inline_callbacks +- def _run_query(self, kwargs, sender): +- self.trans = self._get_merged_trans(aptd_enums.ROLE_PK_QUERY, +- kwargs=kwargs) +- yield self.trans._run(sender) +- +- def _get_aptd_package_id(self, pk_id): +- """Convert a PackageKit Package ID to the apt syntax. +- e.g. xterm;235;i386;installed to xterm:i386=235 +- """ +- name, version, arch, data = pk_id.split(";") +- id = name +- if arch != self.queue.worker.NATIVE_ARCH and arch != "all": +- id += ":%s" % arch +- if version: +- id += "=%s" % version +- return id +- +- def _get_merged_trans(self, role, pkg_ids=None, pkg_type=None, +- kwargs=None): +- if pkg_ids: +- packages = [[], [], [], [], [], []] +- packages[pkg_type] = [self._get_aptd_package_id(pkg) +- for pkg in pkg_ids] +- else: +- packages = None +- if self.trans: +- raise Exception("%s: Transaction may only run once." % +- pk.ErrorEnum.TRANSACTION_FAILED) +- trans = MergedTransaction(self, role, self.queue, +- packages=packages, kwargs=kwargs) +- try: +- trans._set_locale(self.hints["locale"]) +- except (KeyError, ValueError): +- # If the locale isn't vaild or supported a ValueError +- # will be raised +- pass +- try: +- trans._set_debconf(self.hints["frontend-socket"]) +- except KeyError: +- pass +- self.queue.limbo[trans.tid] = trans +- return trans +- +- +-if META_RELEASE_SUPPORT: +- +- class GMetaRelease(GObject.GObject, MetaReleaseCore): +- +- __gsignals__ = {"download-done": (GObject.SignalFlags.RUN_FIRST, +- None, +- ())} +- +- def __init__(self): +- GObject.GObject.__init__(self) +- MetaReleaseCore.__init__(self, False, False) +- +- def download(self): +- MetaReleaseCore.download(self) +- self.emit("download-done") +- +- +-def get_pk_exit_enum(enum): +- try: +- return MAP_EXIT_ENUM[enum] +- except KeyError: +- return pk.ExitEnum.UNKNOWN +- +- +-def get_pk_status_enum(enum): +- try: +- return MAP_STATUS_ENUM[enum] +- except KeyError: +- return pk.StatusEnum.UNKNOWN +- +- +-def get_pk_package_enum(enum): +- try: +- return MAP_PACKAGE_ENUM[enum] +- except KeyError: +- return pk.InfoEnum.UNKNOWN +- +- +-def get_pk_error_enum(enum): +- try: +- return MAP_ERROR_ENUM[enum] +- except KeyError: +- return pk.ErrorEnum.UNKNOWN +- +- +-def get_pk_package_id(pk_id, data=""): +- """Convert an AptDaemon package ID to the PackageKit syntax. +- e.g. xterm:i368=235; to xterm;235;i386;installed +- """ +- # FIXME add arch support +- name, version, release = split_package_id(pk_id) +- try: +- name, arch = name.split(":", 1) +- except ValueError: +- arch = "" +- if version is None: +- version = "" +- if release is None: +- release = "" +- return "%s;%s;%s;%s" % (name, version, arch, data or release) +- +- +-def defer_idle(func, *args): +- func(*args) +- return False +- +- +-def get_string_from_flags(flags): +- """Return a human readable string of the applied transaction flags.""" +- ret = "" +- if flags == pk.TransactionFlagEnum.NONE: +- return "simulate" +- if bitfield_contains(flags, pk.TransactionFlagEnum.SIMULATE): +- ret += " simulate" +- if bitfield_contains(flags, pk.TransactionFlagEnum.ONLY_DOWNLOAD): +- ret += " only-download" +- if bitfield_contains(flags, pk.TransactionFlagEnum.ONLY_TRUSTED): +- ret += " only-trusted" +- return ret.strip() +- +- +-def get_string_from_array(array): +- """Convert a DBus Array to a human readable format""" +- return [str(value) for value in array] +- +- +-# vim: ts=4 et sts=4 diff --git a/debian/patches/failing-tests.patch b/debian/patches/failing-tests.patch new file mode 100644 index 0000000..f871fde --- /dev/null +++ b/debian/patches/failing-tests.patch @@ -0,0 +1,85 @@ +Description: Fix tests + Various test fixes, and disabling of broken ones +Author: Julian Andres Klode <julian.klode@canonical.com> +--- +This patch header follows DEP-3: http://dep.debian.net/deps/dep3/ +--- a/tests/test_lock.py ++++ b/tests/test_lock.py +@@ -74,7 +74,7 @@ class LockTest(unittest.TestCase): + # Lock! + aptdaemon.worker.aptworker.lock.status_lock.acquire() + self.assertEqual(2, subprocess.call(self.dpkg_cmd, env=self.env)) +- self.assertEqual(100, subprocess.call(self.apt_cmd, env=self.env, ++ self.assertEqual(0, subprocess.call(self.apt_cmd, env=self.env, + shell=True)) + # Relase and all should work again! + aptdaemon.worker.aptworker.lock.status_lock.release() +@@ -105,7 +105,7 @@ class LockTest(unittest.TestCase): + # Dpkg and apt-get doen't care about the lock as long as there aren't + # any downloads required + self.assertEqual(0, subprocess.call(self.dpkg_cmd, env=self.env)) +- self.assertEqual(0, subprocess.call(self.apt_cmd, env=self.env, ++ self.assertEqual(100, subprocess.call(self.apt_cmd, env=self.env, + shell=True)) + self.assertEqual(100, subprocess.call(self.inst_cmd, env=self.env, + shell=True)) +--- a/tests/test_pep8.py ++++ b/tests/test_pep8.py +@@ -26,6 +26,7 @@ import subprocess + import unittest + + ++@unittest.skip("Does not work") + class AptDaemonPep8TestCase(unittest.TestCase): + + def test(self): +--- a/tests/test_pk.py ++++ b/tests/test_pk.py +@@ -34,6 +34,7 @@ REPO_PATH = os.path.join(aptdaemon.test. + DEBUG = True + + ++@unittest.skip("Removed PackageKit compat") + class PackageKitTest(aptdaemon.test.AptDaemonTestCase): + + """Test the PackageKit compatibility layer.""" +--- a/tests/test_progress.py ++++ b/tests/test_progress.py +@@ -8,11 +8,17 @@ import mock + import sys + import unittest + ++import aptdaemon.test + from aptdaemon.progress import DaemonOpenProgress + + + class TestProgress(unittest.TestCase): + ++ def setUp(self): ++ self.chroot = aptdaemon.test.Chroot() ++ self.chroot.setup() ++ self.addCleanup(self.chroot.remove) ++ + def test_open_progress(self): + transaction = mock.Mock() + begin = 0 +--- a/aptdaemon/test.py ++++ b/aptdaemon/test.py +@@ -75,6 +75,7 @@ class Chroot(object): + os.makedirs(os.path.join(self.path, "etc/apt/apt.conf.d")) + os.makedirs(os.path.join(self.path, "etc/apt/sources.list.d")) + os.makedirs(os.path.join(self.path, "etc/apt/preferences.d")) ++ os.makedirs(os.path.join(self.path, "etc/apt/trusted.gpg.d")) + os.makedirs(os.path.join(self.path, "var/log")) + os.makedirs(os.path.join(self.path, "media")) + +--- a/tests/test_client.py ++++ b/tests/test_client.py +@@ -77,6 +77,7 @@ class ClientTest(aptdaemon.test.AptDaemo + self.chroot.setup() + self.addCleanup(self.chroot.remove) + self.chroot.add_test_repository() ++ self.chroot.add_trusted_key() + # Start aptdaemon with the chroot on the session bus + self.start_dbus_daemon() + self.bus = dbus.bus.BusConnection(self.dbus_address) diff --git a/debian/patches/fix-dependency-solving.patch b/debian/patches/fix-dependency-solving.patch new file mode 100644 index 0000000..56779fe --- /dev/null +++ b/debian/patches/fix-dependency-solving.patch @@ -0,0 +1,97 @@ +Description: Fix dependency solving + The install_protect() method was deprecated ages ago, and there are all + sorts of issues here. + . + So first of all, remove the install_protect() call as it was removed in apt + 1.9. + . + Secondly, do not pass auto_fix=True to mark_install(), as that creates its + own solver for each package and solves just that packages dependencies, which + causes odd results (the package could no longer be marked for install after + calling mark_install if its dependencies cannot be satisfied) + . + Thirdly, move the whole marking bits below any changes to the candidate + version so we actually mark the correct version for install. This worked + OK-ish before, because the install_protect() call would re-mark the packages, + but ugh, it's just crazy. +Author: Julian Andres Klode <juliank@ubuntu.com> +--- a/aptdaemon/worker/aptworker.py ++++ b/aptdaemon/worker/aptworker.py +@@ -338,7 +338,6 @@ class AptWorker(BaseWorker): + def _resolve_depends(self, trans, resolver): + """Resolve the dependencies using the given ProblemResolver.""" + self._call_plugins("modify_cache_before", resolver) +- resolver.install_protect() + try: + resolver.resolve() + except SystemError: +@@ -421,9 +420,7 @@ class AptWorker(BaseWorker): + raise TransactionFailed( + ERROR_PACKAGE_ALREADY_INSTALLED, + _("Package %s is already installed"), pkg_name) +- pkg.mark_install(False, True, from_user) +- resolver.clear(pkg) +- resolver.protect(pkg) ++ + if pkg_ver: + try: + pkg.candidate = pkg.versions[pkg_ver] +@@ -434,6 +431,10 @@ class AptWorker(BaseWorker): + elif pkg_rel: + self._set_candidate_release(pkg, pkg_rel) + ++ pkg.mark_install(False, False, from_user) ++ resolver.clear(pkg) ++ resolver.protect(pkg) ++ + def enable_distro_comp(self, trans, component): + """Enable given component in the sources list. + +@@ -777,10 +778,7 @@ class AptWorker(BaseWorker): + _("Package %s isn't installed"), + pkg_name) + auto = pkg.is_auto_installed +- pkg.mark_install(False, True, True) +- pkg.mark_auto(auto) +- resolver.clear(pkg) +- resolver.protect(pkg) ++ + if pkg_ver: + if pkg.installed and pkg.installed.version < pkg_ver: + # FIXME: We need a new error enum +@@ -805,6 +803,11 @@ class AptWorker(BaseWorker): + "downgrade %s to"), + pkg_name) + ++ pkg.mark_install(False, False, True) ++ pkg.mark_auto(auto) ++ resolver.clear(pkg) ++ resolver.protect(pkg) ++ + def _mark_packages_for_upgrade(self, packages, resolver): + """Mark packages for upgrade.""" + for pkg_name, pkg_ver, pkg_rel in [self._split_package_id(pkg) +@@ -820,10 +823,7 @@ class AptWorker(BaseWorker): + _("Package %s isn't installed"), + pkg_name) + auto = pkg.is_auto_installed +- pkg.mark_install(False, True, True) +- pkg.mark_auto(auto) +- resolver.clear(pkg) +- resolver.protect(pkg) ++ + if pkg_ver: + if (pkg.installed and + apt_pkg.version_compare(pkg.installed.version, +@@ -849,6 +849,11 @@ class AptWorker(BaseWorker): + elif pkg_rel: + self._set_candidate_release(pkg, pkg_rel) + ++ pkg.mark_install(False, False, True) ++ pkg.mark_auto(auto) ++ resolver.clear(pkg) ++ resolver.protect(pkg) ++ + @staticmethod + def _set_candidate_release(pkg, release): + """Set the candidate of a package to the one from the given release.""" diff --git a/debian/patches/fix-high-trust-pkcompat.diff b/debian/patches/fix-high-trust-pkcompat.diff new file mode 100644 index 0000000..6084b5c --- /dev/null +++ b/debian/patches/fix-high-trust-pkcompat.diff @@ -0,0 +1,16 @@ +Index: aptdaemon/aptdaemon/worker/aptworker.py +=================================================================== +--- aptdaemon.orig/aptdaemon/worker/aptworker.py ++++ aptdaemon/aptdaemon/worker/aptworker.py +@@ -113,8 +113,10 @@ def trans_only_installs_pkgs_from_high_t + # paranoia(2): we must want to install something + if not trans.packages[PKGS_INSTALL]: + return False ++ # we only care about the name, not the version ++ pkgs = [pkg.split("=")[0] for pkg in trans.packages[PKGS_INSTALL]] + # if the install packages matches the whitelisted set we are good +- return set(trans.packages[PKGS_INSTALL]) == set(trans.high_trust_packages) ++ return set(pkgs) == set(trans.high_trust_packages) + + + def read_high_trust_repository_dir(whitelist_cfg_d): diff --git a/debian/patches/fix-installation.patch b/debian/patches/fix-installation.patch new file mode 100644 index 0000000..c961842 --- /dev/null +++ b/debian/patches/fix-installation.patch @@ -0,0 +1,18 @@ +Description: Don't consider the "data" when installing a package - this is usually "Ubuntu" and isn't useful to pass to apt. +Author: Justin McPherson <justin.mcpherson@canonical.com> +Forwarded: https://code.launchpad.net/~justinmcp/aptdaemon/1352654/+merge/243354 +Bug-Ubuntu: https://bugs.launchpad.net/ubuntu/+source/aptdaemon/+bug/1352654 + +Index: b/aptdaemon/pkcompat.py +=================================================================== +--- a/aptdaemon/pkcompat.py ++++ b/aptdaemon/pkcompat.py +@@ -1904,8 +1904,6 @@ + id += ":%s" % arch + if version: + id += "=%s" % version +- if data and data not in ["local", "installed"]: +- id += "/%s" % data + return id + + def _get_merged_trans(self, role, pkg_ids=None, pkg_type=None, diff --git a/debian/patches/fix-some-deprecated-code.patch b/debian/patches/fix-some-deprecated-code.patch new file mode 100644 index 0000000..2cbca09 --- /dev/null +++ b/debian/patches/fix-some-deprecated-code.patch @@ -0,0 +1,182 @@ +Description: Fix some deprecated code +Author: Gunnar Hjalmarsson <gunnarhj@ubuntu.com> +Bug-Ubuntu: https://launchpad.net/bugs/1951985 +Last-Update: 2021-11-23 +--- + aptdaemon/client.py | 52 ++++++++++++++++++++++++++-------------------------- + aptdaemon/errors.py | 2 +- + aptdaemon/gtk3widgets.py | 6 +++--- + 3 files changed, 30 insertions(+), 30 deletions(-) + +diff --git a/aptdaemon/client.py b/aptdaemon/client.py +index c9fccd2..db032a3 100644 +--- a/aptdaemon/client.py ++++ b/aptdaemon/client.py +@@ -385,10 +385,10 @@ class AptTransaction(GObject.Object): + dependencies before the transaction will be executed. + """ + +- __gsignals__ = {"finished": (GObject.SIGNAL_RUN_FIRST, ++ __gsignals__ = {"finished": (GObject.SignalFlags.RUN_FIRST, + GObject.TYPE_NONE, + (GObject.TYPE_STRING,)), +- "dependencies-changed": (GObject.SIGNAL_RUN_FIRST, ++ "dependencies-changed": (GObject.SignalFlags.RUN_FIRST, + GObject.TYPE_NONE, + (GObject.TYPE_PYOBJECT, + GObject.TYPE_PYOBJECT, +@@ -397,37 +397,37 @@ class AptTransaction(GObject.Object): + GObject.TYPE_PYOBJECT, + GObject.TYPE_PYOBJECT, + GObject.TYPE_PYOBJECT)), +- "download-changed": (GObject.SIGNAL_RUN_FIRST, ++ "download-changed": (GObject.SignalFlags.RUN_FIRST, + GObject.TYPE_NONE, + (GObject.TYPE_INT64,)), +- "space-changed": (GObject.SIGNAL_RUN_FIRST, ++ "space-changed": (GObject.SignalFlags.RUN_FIRST, + GObject.TYPE_NONE, + (GObject.TYPE_INT64,)), +- "error": (GObject.SIGNAL_RUN_FIRST, ++ "error": (GObject.SignalFlags.RUN_FIRST, + GObject.TYPE_NONE, + (GObject.TYPE_STRING, GObject.TYPE_STRING)), +- "role-changed": (GObject.SIGNAL_RUN_FIRST, ++ "role-changed": (GObject.SignalFlags.RUN_FIRST, + GObject.TYPE_NONE, + (GObject.TYPE_STRING,)), +- "terminal-attached-changed": (GObject.SIGNAL_RUN_FIRST, ++ "terminal-attached-changed": (GObject.SignalFlags.RUN_FIRST, + GObject.TYPE_NONE, + (GObject.TYPE_BOOLEAN,)), +- "cancellable-changed": (GObject.SIGNAL_RUN_FIRST, ++ "cancellable-changed": (GObject.SignalFlags.RUN_FIRST, + GObject.TYPE_NONE, + (GObject.TYPE_BOOLEAN,)), +- "meta-data-changed": (GObject.SIGNAL_RUN_FIRST, ++ "meta-data-changed": (GObject.SignalFlags.RUN_FIRST, + GObject.TYPE_NONE, + (GObject.TYPE_PYOBJECT,)), +- "status-changed": (GObject.SIGNAL_RUN_FIRST, ++ "status-changed": (GObject.SignalFlags.RUN_FIRST, + GObject.TYPE_NONE, + (GObject.TYPE_STRING,)), +- "status-details-changed": (GObject.SIGNAL_RUN_FIRST, ++ "status-details-changed": (GObject.SignalFlags.RUN_FIRST, + GObject.TYPE_NONE, + (GObject.TYPE_STRING,)), +- "progress-changed": (GObject.SIGNAL_RUN_FIRST, ++ "progress-changed": (GObject.SignalFlags.RUN_FIRST, + GObject.TYPE_NONE, + (GObject.TYPE_INT,)), +- "progress-details-changed": (GObject.SIGNAL_RUN_FIRST, ++ "progress-details-changed": (GObject.SignalFlags.RUN_FIRST, + GObject.TYPE_NONE, + (GObject.TYPE_INT, + GObject.TYPE_INT, +@@ -435,7 +435,7 @@ class AptTransaction(GObject.Object): + GObject.TYPE_INT64, + GObject.TYPE_INT, + GObject.TYPE_INT64)), +- "progress-download-changed": (GObject.SIGNAL_RUN_FIRST, ++ "progress-download-changed": (GObject.SignalFlags.RUN_FIRST, + GObject.TYPE_NONE, + (GObject.TYPE_STRING, + GObject.TYPE_STRING, +@@ -443,7 +443,7 @@ class AptTransaction(GObject.Object): + GObject.TYPE_INT64, + GObject.TYPE_INT64, + GObject.TYPE_STRING)), +- "packages-changed": (GObject.SIGNAL_RUN_FIRST, ++ "packages-changed": (GObject.SignalFlags.RUN_FIRST, + GObject.TYPE_NONE, + (GObject.TYPE_PYOBJECT, + GObject.TYPE_PYOBJECT, +@@ -451,39 +451,39 @@ class AptTransaction(GObject.Object): + GObject.TYPE_PYOBJECT, + GObject.TYPE_PYOBJECT, + GObject.TYPE_PYOBJECT)), +- "unauthenticated-changed": (GObject.SIGNAL_RUN_FIRST, ++ "unauthenticated-changed": (GObject.SignalFlags.RUN_FIRST, + GObject.TYPE_NONE, + (GObject.TYPE_PYOBJECT,)), +- "paused": (GObject.SIGNAL_RUN_FIRST, ++ "paused": (GObject.SignalFlags.RUN_FIRST, + GObject.TYPE_NONE, + ()), +- "resumed": (GObject.SIGNAL_RUN_FIRST, ++ "resumed": (GObject.SignalFlags.RUN_FIRST, + GObject.TYPE_NONE, + ()), +- "allow-unauthenticated-changed": (GObject.SIGNAL_RUN_FIRST, ++ "allow-unauthenticated-changed": (GObject.SignalFlags.RUN_FIRST, + GObject.TYPE_NONE, + (GObject.TYPE_BOOLEAN,)), + "remove-obsoleted-depends-changed": ( +- GObject.SIGNAL_RUN_FIRST, ++ GObject.SignalFlags.RUN_FIRST, + GObject.TYPE_NONE, + (GObject.TYPE_BOOLEAN,)), +- "locale-changed": (GObject.SIGNAL_RUN_FIRST, ++ "locale-changed": (GObject.SignalFlags.RUN_FIRST, + GObject.TYPE_NONE, + (GObject.TYPE_STRING,)), +- "terminal-changed": (GObject.SIGNAL_RUN_FIRST, ++ "terminal-changed": (GObject.SignalFlags.RUN_FIRST, + GObject.TYPE_NONE, + (GObject.TYPE_STRING,)), +- "debconf-socket-changed": (GObject.SIGNAL_RUN_FIRST, ++ "debconf-socket-changed": (GObject.SignalFlags.RUN_FIRST, + GObject.TYPE_NONE, + (GObject.TYPE_STRING,)), +- "http-proxy-changed": (GObject.SIGNAL_RUN_FIRST, ++ "http-proxy-changed": (GObject.SignalFlags.RUN_FIRST, + GObject.TYPE_NONE, + (GObject.TYPE_STRING,)), +- "medium-required": (GObject.SIGNAL_RUN_FIRST, ++ "medium-required": (GObject.SignalFlags.RUN_FIRST, + GObject.TYPE_NONE, + (GObject.TYPE_STRING, + GObject.TYPE_STRING)), +- "config-file-conflict": (GObject.SIGNAL_RUN_FIRST, ++ "config-file-conflict": (GObject.SignalFlags.RUN_FIRST, + GObject.TYPE_NONE, + (GObject.TYPE_STRING, + GObject.TYPE_STRING)), +diff --git a/aptdaemon/errors.py b/aptdaemon/errors.py +index 4783179..cd98d6e 100644 +--- a/aptdaemon/errors.py ++++ b/aptdaemon/errors.py +@@ -174,7 +174,7 @@ def convert_dbus_exception(func): + This decorator requires introspection to the decorated function. So it + cannot be used on any already decorated method. + """ +- argnames, varargs, kwargs, defaults = inspect.getargspec(func) ++ argnames, varargs, kwargs, defaults = inspect.getfullargspec(func)[:4] + + @wraps(func) + def _convert_dbus_exception(*args, **kwargs): +diff --git a/aptdaemon/gtk3widgets.py b/aptdaemon/gtk3widgets.py +index af9faec..5c99c1d 100644 +--- a/aptdaemon/gtk3widgets.py ++++ b/aptdaemon/gtk3widgets.py +@@ -562,7 +562,7 @@ class AptProgressDialog(Gtk.Dialog): + features a progress bar, cancel button, status icon and label + """ + +- __gsignals__ = {"finished": (GObject.SIGNAL_RUN_FIRST, ++ __gsignals__ = {"finished": (GObject.SignalFlags.RUN_FIRST, + GObject.TYPE_NONE, ())} + + def __init__(self, transaction=None, parent=None, terminal=True, +@@ -1086,8 +1086,8 @@ class AptConfigFileConflictDialog(_ExpandableDialog): + return _ExpandableDialog.run(self) + + +-REGEX_RANGE = "^@@ \-(?P<from_start>[0-9]+)(?:,(?P<from_context>[0-9]+))? " \ +- "\+(?P<to_start>[0-9]+)(?:,(?P<to_context>[0-9]+))? @@" ++REGEX_RANGE = "^@@ \\-(?P<from_start>[0-9]+)(?:,(?P<from_context>[0-9]+))? " \ ++ "\\+(?P<to_start>[0-9]+)(?:,(?P<to_context>[0-9]+))? @@" + + + class DiffView(Gtk.TextView): diff --git a/debian/patches/frontend-locking.patch b/debian/patches/frontend-locking.patch new file mode 100644 index 0000000..1045124 --- /dev/null +++ b/debian/patches/frontend-locking.patch @@ -0,0 +1,56 @@ +Description: Various locking fixes (LP: #1831981) + - Implement frontend locking + - Adjust locking order to match APT + - Use reverse order for unlocking +Author: Julian Andres Klode <juliank@ubuntu.com> +Bug-Ubuntu: https://bugs.launchpad.net/bugs/1831981 + +--- a/aptdaemon/lock.py ++++ b/aptdaemon/lock.py +@@ -118,6 +118,7 @@ apt_pkg.init() + #: The lock for dpkg status file + _status_dir = os.path.dirname(apt_pkg.config.find_file("Dir::State::status")) + status_lock = FileLock(os.path.join(_status_dir, "lock")) ++frontend_lock = FileLock(os.path.join(_status_dir, "lock-frontend")) + + #: The lock for the package archive + _archives_dir = apt_pkg.config.find_dir("Dir::Cache::Archives") +@@ -131,19 +132,25 @@ lists_lock = FileLock(os.path.join( + def acquire(): + """Acquire an exclusive lock for the package management system.""" + try: +- for lock in archive_lock, status_lock, lists_lock: ++ for lock in frontend_lock, status_lock, archive_lock, lists_lock: + if not lock.locked: + lock.acquire() + except: + release() + raise + ++ os.environ['DPKG_FRONTEND_LOCKED'] = '1' + + def release(): + """Release an exclusive lock for the package management system.""" +- for lock in archive_lock, status_lock, lists_lock: ++ for lock in lists_lock, archive_lock, status_lock, frontend_lock: + lock.release() + ++ try: ++ del os.environ['DPKG_FRONTEND_LOCKED'] ++ except KeyError: ++ pass ++ + + def wait_for_lock(trans, alt_lock=None): + """Acquire the system lock or the optionally given one. If the lock +--- a/aptdaemon/worker/aptworker.py ++++ b/aptdaemon/worker/aptworker.py +@@ -198,6 +198,8 @@ class AptWorker(BaseWorker): + apt_pkg.config["DPkg::Options::"] = ("--log=%s/var/log/dpkg.log" % + chroot) + status_file = apt_pkg.config.find_file("Dir::State::status") ++ lock.frontend_lock.path = os.path.join(os.path.dirname(status_file), ++ "lock-frontend") + lock.status_lock.path = os.path.join(os.path.dirname(status_file), + "lock") + archives_dir = apt_pkg.config.find_dir("Dir::Cache::Archives") diff --git a/debian/patches/gdk-gtk-versions.py b/debian/patches/gdk-gtk-versions.py new file mode 100644 index 0000000..ce1e950 --- /dev/null +++ b/debian/patches/gdk-gtk-versions.py @@ -0,0 +1,13 @@ +Index: aptdaemon-1.1.1+bzr982/aptdaemon/gtk3widgets.py +=================================================================== +--- aptdaemon-1.1.1+bzr982.orig/aptdaemon/gtk3widgets.py ++++ aptdaemon-1.1.1+bzr982/aptdaemon/gtk3widgets.py +@@ -40,6 +40,8 @@ import re + + import gi + gi.require_version("Vte", "2.91") ++gi.require_version("Gdk", "3.0") ++gi.require_version("Gtk", "3.0") + + import apt_pkg + from gi.repository import GObject diff --git a/debian/patches/key_value_typo.patch b/debian/patches/key_value_typo.patch new file mode 100644 index 0000000..b286df1 --- /dev/null +++ b/debian/patches/key_value_typo.patch @@ -0,0 +1,18 @@ +Description: Remove trailing comma, was causing a TypeError. +Author: Justin McPherson <justin.mcpherson@canonical.com> +Forwarded: https://code.launchpad.net/~justinmcp/aptdaemon/1352654/+merge/243354 +Bug-Ubuntu: https://bugs.launchpad.net/ubuntu/+source/aptdaemon/+bug/1352654 +=== modified file 'aptdaemon/aptdaemon/worker/aptworker.py' +Index: aptdaemon-1.1.1+bzr982/aptdaemon/worker/aptworker.py +=================================================================== +--- aptdaemon-1.1.1+bzr982.orig/aptdaemon/worker/aptworker.py ++++ aptdaemon-1.1.1+bzr982/aptdaemon/worker/aptworker.py +@@ -1511,7 +1511,7 @@ class AptWorker(BaseWorker): + key = "APT::Periodic::AutocleanInterval" + return apt_pkg.config.find_i(key, 0) + elif option == "UnattendedUpgrade": +- key = "APT::Periodic::Unattended-Upgrade", ++ key = "APT::Periodic::Unattended-Upgrade" + return apt_pkg.config.find_b(key, False) + elif option == "GetPopconParticipation": + return self._get_popcon_pariticipation() diff --git a/debian/patches/lintian_deprecated_error.patch b/debian/patches/lintian_deprecated_error.patch new file mode 100644 index 0000000..a9b0309 --- /dev/null +++ b/debian/patches/lintian_deprecated_error.patch @@ -0,0 +1,20 @@ +Description: don't list deprecated lintian case +Author: Sebastien Bacher <seb128@ubuntu.com> +Forwarded: https://code.launchpad.net/~seb128/aptdaemon/lintian-upx-deprecated/+merge/272924 +Bug-Ubuntu: https://launchpad.net/bugs/1490169 +=== modified file 'aptdaemon/data/lintian/ubuntu/aptdaemon.profile' +Index: aptdaemon-1.1.1+bzr982/data/lintian/ubuntu/aptdaemon.profile +=================================================================== +--- aptdaemon-1.1.1+bzr982.orig/data/lintian/ubuntu/aptdaemon.profile ++++ aptdaemon-1.1.1+bzr982/data/lintian/ubuntu/aptdaemon.profile +@@ -5,9 +5,8 @@ Disable-Tags: + FSSTND-dir-in-usr, + FSSTND-dir-in-var, + arch-dependent-file-in-usr-share, +- binary-file-compressed-with-upx, + binary-or-shlib-defines-rpath, +- control-interpreter-in-usr-local, ++ control-interpreter-in-usr-local, + copyright-contains-dh_make-todo-boilerplate, + copyright-file-compressed, + copyright-file-is-symlink, diff --git a/debian/patches/lock-is-held-typo.patch b/debian/patches/lock-is-held-typo.patch new file mode 100644 index 0000000..5220b7d --- /dev/null +++ b/debian/patches/lock-is-held-typo.patch @@ -0,0 +1,15 @@ +Description: Fix typo hold vs held. +Author: Julian Andres Klode <juliank@ubuntu.com> +Last-Update: 2019-06-21 + +--- aptdaemon-1.1.1+bzr982.orig/aptdaemon/lock.py ++++ aptdaemon-1.1.1+bzr982/aptdaemon/lock.py +@@ -45,7 +45,7 @@ class LockFailedError(Exception): + """ + msg = "Could not acquire lock on %s." % flock + if process: +- msg += " The lock is hold by %s." % process ++ msg += " The lock is held by %s." % process + Exception.__init__(self, msg) + self.flock = flock + self.process = process diff --git a/debian/patches/lp1153725-temporary-workaround.patch b/debian/patches/lp1153725-temporary-workaround.patch new file mode 100644 index 0000000..8332058 --- /dev/null +++ b/debian/patches/lp1153725-temporary-workaround.patch @@ -0,0 +1,25 @@ +Description: Skip expected failures due to LP: #1153725. + Remove this when the actual bug is fixed or when we have a better patch. +Author: Barry Warsaw <barry@ubuntu.com> +Forwarded: not-needed + +Index: aptdaemon-1.0/tests/test_high_trust_repository_whitelist.py +=================================================================== +--- aptdaemon-1.0.orig/tests/test_high_trust_repository_whitelist.py 2013-03-18 14:24:18.377381909 +0100 ++++ aptdaemon-1.0/tests/test_high_trust_repository_whitelist.py 2013-03-18 14:24:43.493382864 +0100 +@@ -72,6 +72,7 @@ + self.worker.connect("transaction-simulated", + lambda w, t: self.loop.quit()) + ++ @unittest.expectedFailure + def test_read_high_trust_repository_whitelist_dir(self): + whitelist = read_high_trust_repository_dir( + os.path.join(aptdaemon.test.get_tests_dir(), +@@ -167,6 +168,7 @@ + self.start_fake_polkitd(PK_ACTION) + time.sleep(1) + ++ @unittest.expectedFailure + def test_high_trust_polkit_ok(self): + self.client = aptdaemon.client.AptClient(self.bus) + # test that the high trust whitelist works diff --git a/debian/patches/lp1356823.diff b/debian/patches/lp1356823.diff new file mode 100644 index 0000000..db7efb4 --- /dev/null +++ b/debian/patches/lp1356823.diff @@ -0,0 +1,13 @@ +=== modified file 'aptdaemon/pkcompat.py' +--- old/aptdaemon/pkcompat.py 2014-06-26 07:07:15 +0000 ++++ new/aptdaemon/pkcompat.py 2015-04-16 15:04:08 +0000 +@@ -586,6 +586,8 @@ + + def _remove_from_connection_no_raise(self): + core.Transaction._remove_from_connection_no_raise(self) ++ if self.pktrans is None: ++ return False + self.pktrans.Destroy() + try: + self.pktrans.remove_from_connection() + diff --git a/debian/patches/lp1439769-aptdaemon-autoinstall.patch b/debian/patches/lp1439769-aptdaemon-autoinstall.patch new file mode 100644 index 0000000..91120c9 --- /dev/null +++ b/debian/patches/lp1439769-aptdaemon-autoinstall.patch @@ -0,0 +1,50 @@ +Description: Take a flag to indicate whether a requested package is auto-installed + The aptdaemon API takes a complete list of packages to be installed, + including dependencies. This means that all packages are marked as + "selected" by the "user" for installation, even if on the other end of the + API they were selected for installation only to resolve dependencies of + other packages. + . + This patch adds an optional "auto" flag to the list of packages passed from + the client, so that aptdaemon can pass this information on to apt. +Author: Michael Vogt <mvo@ubuntu.com> +Bug-Ubuntu: https://bugs.launchpad.net/bugs/1439769 + +=== modified file 'aptdaemon/core.py' +Index: wily/aptdaemon/core.py +=================================================================== +--- wily.orig/aptdaemon/core.py ++++ wily/aptdaemon/core.py +@@ -2069,6 +2069,10 @@ class AptDaemon(DBusObject): + """ + for fullname in pkg_names: + name, version, release = split_package_id(fullname) ++ name, sep, auto_flag = name.partition("#") ++ if not auto_flag in ("", "auto"): ++ raise errors.AptDaemonError("%s isn't a valid flag" % ++ auto_flag) + if not re.match(REGEX_VALID_PACKAGENAME, name): + raise errors.AptDaemonError("%s isn't a valid package name" % + name) +Index: wily/aptdaemon/worker/aptworker.py +=================================================================== +--- wily.orig/aptdaemon/worker/aptworker.py ++++ wily/aptdaemon/worker/aptworker.py +@@ -388,6 +388,8 @@ class AptWorker(BaseWorker): + """Mark packages for installation.""" + for pkg_name, pkg_ver, pkg_rel in [self._split_package_id(pkg) + for pkg in packages]: ++ pkg_name, sep, auto_marker = pkg_name.partition("#") ++ from_user = (auto_marker != "auto") + try: + pkg = self._cache[pkg_name] + except KeyError: +@@ -417,7 +419,7 @@ class AptWorker(BaseWorker): + raise TransactionFailed( + ERROR_PACKAGE_ALREADY_INSTALLED, + _("Package %s is already installed"), pkg_name) +- pkg.mark_install(False, True, True) ++ pkg.mark_install(False, True, from_user) + resolver.clear(pkg) + resolver.protect(pkg) + if pkg_ver: diff --git a/debian/patches/lp1449587.diff b/debian/patches/lp1449587.diff new file mode 100644 index 0000000..16f82b6 --- /dev/null +++ b/debian/patches/lp1449587.diff @@ -0,0 +1,363 @@ +=== modified file 'aptdaemon/core.py' +Index: aptdaemon-1.1.1+bzr982/aptdaemon/core.py +=================================================================== +--- aptdaemon-1.1.1+bzr982.orig/aptdaemon/core.py 2015-06-11 09:18:21.910695506 -0400 ++++ aptdaemon-1.1.1+bzr982/aptdaemon/core.py 2015-06-11 09:18:21.906695457 -0400 +@@ -324,7 +324,7 @@ + "DebconfSocket", "MetaData", "Locale", + "RemoveObsoleteDepends") + +- def __init__(self, tid, role, queue, pid, uid, cmdline, sender, ++ def __init__(self, tid, role, queue, pid, uid, gid, cmdline, sender, + connect=True, bus=None, packages=None, kwargs=None): + """Initialize a new Transaction instance. + +@@ -360,6 +360,7 @@ + kwargs = {} + self.queue = queue + self.uid = uid ++ self.gid = gid + self.locale = dbus.String("") + self.allow_unauthenticated = dbus.Boolean(False) + self.remove_obsoleted_depends = dbus.Boolean(False) +@@ -1521,11 +1522,12 @@ + @inline_callbacks + def _create_trans(self, role, sender, packages=None, kwargs=None): + """Helper method which returns the tid of a new transaction.""" +- pid, uid, cmdline = ( ++ pid, uid, gid, cmdline = ( + yield policykit1.get_proc_info_from_dbus_name(sender, self.bus)) + tid = uuid.uuid4().hex +- trans = Transaction(tid, role, self.queue, pid, uid, cmdline, sender, +- packages=packages, kwargs=kwargs, bus=self.bus) ++ trans = Transaction( ++ tid, role, self.queue, pid, uid, gid, cmdline, sender, ++ packages=packages, kwargs=kwargs, bus=self.bus) + self.queue.limbo[trans.tid] = trans + return_value(trans.tid) + +Index: aptdaemon-1.1.1+bzr982/aptdaemon/pkcompat.py +=================================================================== +--- aptdaemon-1.1.1+bzr982.orig/aptdaemon/pkcompat.py 2015-06-11 09:18:21.910695506 -0400 ++++ aptdaemon-1.1.1+bzr982/aptdaemon/pkcompat.py 2015-06-11 09:18:21.910695506 -0400 +@@ -334,9 +334,10 @@ + + @inline_callbacks + def _create_transaction(self, sender): +- pid, uid, cmdline = yield policykit1.get_proc_info_from_dbus_name( ++ pid, uid, gid, cmdline = yield policykit1.get_proc_info_from_dbus_name( + sender, self.bus) +- pktrans = PackageKitTransaction(pid, uid, cmdline, self.queue, sender) ++ pktrans = PackageKitTransaction( ++ pid, uid, gid, cmdline, self.queue, sender) + return_value(pktrans.tid) + + # pylint: disable-msg=C0103,C0322 +@@ -468,7 +469,7 @@ + def __init__(self, pktrans, role, queue, connect=True, + bus=None, packages=None, kwargs=None): + core.Transaction.__init__(self, pktrans.tid[1:], role, queue, +- pktrans.pid, pktrans.uid, ++ pktrans.pid, pktrans.uid, pktrans.gid, + pktrans.cmdline, pktrans.sender, + connect, bus, packages, kwargs) + self.pktrans = pktrans +@@ -626,7 +627,7 @@ + + """Provides a PackageKit transaction object.""" + +- def __init__(self, pid, uid, cmdline, queue, sender, ++ def __init__(self, pid, uid, gid, cmdline, queue, sender, + connect=True, bus=None): + pklog.info("Initializing PackageKit transaction") + bus_name = None +@@ -652,6 +653,7 @@ + self._status = pk.StatusEnum.SETUP + self._last_package = "" + self.uid = dbus.UInt32(uid) ++ self.gid = dbus.UInt32(gid) + self.pid = pid + self.cmdline = cmdline + self.role = pk.RoleEnum.UNKNOWN +Index: aptdaemon-1.1.1+bzr982/aptdaemon/policykit1.py +=================================================================== +--- aptdaemon-1.1.1+bzr982.orig/aptdaemon/policykit1.py 2015-06-11 09:18:21.910695506 -0400 ++++ aptdaemon-1.1.1+bzr982/aptdaemon/policykit1.py 2015-06-11 09:18:21.910695506 -0400 +@@ -161,12 +161,15 @@ + bus = dbus.SystemBus() + pid = yield get_pid_from_dbus_name(dbus_name, bus) + with open("/proc/%s/status" % pid) as proc: +- values = [v for v in proc.readlines() if v.startswith("Uid:")] ++ lines = proc.readlines() ++ uid_values = [v for v in lines if v.startswith("Uid:")] ++ gid_values = [v for v in lines if v.startswith("Gid:")] + # instead of ", encoding='utf8'" we use the "rb"/decode() here for + # py2 compatibility + with open("/proc/%s/cmdline" % pid, "rb") as cmdline_file: + cmdline = cmdline_file.read().decode("utf-8") +- uid = int(values[0].split()[1]) +- return_value((pid, uid, cmdline)) ++ uid = int(uid_values[0].split()[1]) ++ gid = int(gid_values[0].split()[1]) ++ return_value((pid, uid, gid, cmdline)) + + # vim:ts=4:sw=4:et +Index: aptdaemon-1.1.1+bzr982/aptdaemon/progress.py +=================================================================== +--- aptdaemon-1.1.1+bzr982.orig/aptdaemon/progress.py 2015-06-11 09:18:21.910695506 -0400 ++++ aptdaemon-1.1.1+bzr982/aptdaemon/progress.py 2015-06-11 09:18:21.910695506 -0400 +@@ -628,6 +628,11 @@ + + def _child(self, path): + # Avoid running lintian as root ++ try: ++ os.setgroups([self.transaction.gid]) ++ except OSError: ++ pass ++ os.setgid(self.transaction.gid) + os.setuid(self.transaction.uid) + + if platform.dist()[1] == "debian": +Index: aptdaemon-1.1.1+bzr982/aptdaemon/worker/aptworker.py +=================================================================== +--- aptdaemon-1.1.1+bzr982.orig/aptdaemon/worker/aptworker.py 2015-06-11 09:18:21.910695506 -0400 ++++ aptdaemon-1.1.1+bzr982/aptdaemon/worker/aptworker.py 2015-06-11 09:18:21.910695506 -0400 +@@ -91,6 +91,25 @@ + """ + + ++@contextlib.contextmanager ++def set_euid_egid(uid, gid): ++ # no need to drop privs ++ if os.getuid() != 0 and os.getgid() != 0: ++ yield ++ return ++ # temporary drop privs ++ os.setegid(gid) ++ old_groups = os.getgroups() ++ os.setgroups([gid]) ++ os.seteuid(uid) ++ try: ++ yield ++ finally: ++ os.seteuid(os.getuid()) ++ os.setegid(os.getgid()) ++ os.setgroups(old_groups) ++ ++ + def trans_only_installs_pkgs_from_high_trust_repos(trans, + whitelist=set()): + """Return True if this transaction only touches packages in the +@@ -1199,8 +1218,16 @@ + + :returns: An apt.debfile.Debfile instance. + """ +- if not os.path.isfile(path): +- raise TransactionFailed(ERROR_UNREADABLE_PACKAGE_FILE, path) ++ # This code runs as root for simulate and simulate requires no ++ # authentication - so we need to ensure we do not leak information ++ # about files here (LP: #1449587, CVE-2015-1323) ++ # ++ # Note that the actual lintian run is also droping privs (real, ++ # not just seteuid) ++ with set_euid_egid(trans.uid, trans.gid): ++ if not os.path.isfile(path): ++ raise TransactionFailed(ERROR_UNREADABLE_PACKAGE_FILE, path) ++ + if not force and os.path.isfile("/usr/bin/lintian"): + with DaemonLintianProgress(trans) as progress: + progress.run(path) +Index: aptdaemon-1.1.1+bzr982/tests/test_high_trust_repository_whitelist.py +=================================================================== +--- aptdaemon-1.1.1+bzr982.orig/tests/test_high_trust_repository_whitelist.py 2015-06-11 09:18:21.910695506 -0400 ++++ aptdaemon-1.1.1+bzr982/tests/test_high_trust_repository_whitelist.py 2015-06-11 09:18:21.910695506 -0400 +@@ -115,7 +115,7 @@ + ("Ubuntu", "", "silly.*")) + # a high-trust whitelisted pkg and a non-whitelisted one + trans = Transaction(None, enums.ROLE_INSTALL_PACKAGES, self.queue, +- os.getpid(), os.getuid(), sys.argv[0], ++ os.getpid(), os.getuid(), os.getgid(), sys.argv[0], + "org.debian.apt.test", connect=False, + packages=[["silly-base", "other-pkg"], [], [], [], + [], []]) +@@ -127,7 +127,7 @@ + trans, self.worker._high_trust_repositories)) + # whitelisted only + trans = Transaction(None, enums.ROLE_INSTALL_PACKAGES, self.queue, +- os.getpid(), os.getuid(), sys.argv[0], ++ os.getpid(), os.getuid(), os.getgid(), sys.argv[0], + "org.debian.apt.test", connect=False, + packages=[["silly-base"], [], [], [], [], []]) + self.worker.simulate(trans) +Index: aptdaemon-1.1.1+bzr982/tests/test_worker.py +=================================================================== +--- aptdaemon-1.1.1+bzr982.orig/tests/test_worker.py 2015-06-11 09:18:21.910695506 -0400 ++++ aptdaemon-1.1.1+bzr982/tests/test_worker.py 2015-06-11 09:18:21.910695506 -0400 +@@ -77,7 +77,8 @@ + self.chroot.add_repository("/does/not/exist", copy_list=False) + # Only update the repository from the working snippet + trans = Transaction(None, enums.ROLE_UPDATE_CACHE, +- self.queue, os.getpid(), os.getuid(), sys.argv[0], ++ self.queue, os.getpid(), os.getuid(), ++ os.getgid(), sys.argv[0], + "org.debian.apt.test", connect=False, + kwargs={"sources_list": "test.list"}) + self.worker.simulate(trans) +@@ -99,7 +100,7 @@ + "silly-base_0.1-0_all.deb")) + # Install the package + trans = Transaction(None, enums.ROLE_UPGRADE_SYSTEM, +- self.queue, os.getpid(), ++ self.queue, os.getpid(), os.getgid(), + os.getuid(), sys.argv[0], + "org.debian.apt.test", connect=False, + kwargs={"safe_mode": False}) +@@ -130,7 +131,7 @@ + self.chroot.add_test_repository(copy_sig=False) + # Install the package + trans = Transaction(None, enums.ROLE_INSTALL_PACKAGES, self.queue, +- os.getpid(), os.getuid(), sys.argv[0], ++ os.getpid(), os.getuid(), os.getgid(), sys.argv[0], + "org.debian.apt.test", connect=False, + packages=[["silly-base"], [], [], [], [], []]) + self.worker.simulate(trans) +@@ -144,7 +145,7 @@ + + # Allow installation of unauthenticated packages + trans = Transaction(None, enums.ROLE_INSTALL_PACKAGES, self.queue, +- os.getpid(), os.getuid(), sys.argv[0], ++ os.getpid(), os.getuid(), os.getgid(), sys.argv[0], + "org.debian.apt.test", connect=False, + packages=[["silly-base"], [], [], [], [], []]) + trans.allow_unauthenticated = True +@@ -164,7 +165,7 @@ + self.chroot.add_test_repository() + # Install the package + trans = Transaction(None, enums.ROLE_INSTALL_PACKAGES, self.queue, +- os.getpid(), os.getuid(), sys.argv[0], ++ os.getpid(), os.getuid(), os.getgid(), sys.argv[0], + "org.debian.apt.test", connect=False, + packages=[["silly-depend-base"], [], [], [], + [], []]) +@@ -193,7 +194,7 @@ + Architecture: all + Auto-Installed: 1""") + trans = Transaction(None, enums.ROLE_REMOVE_PACKAGES, self.queue, +- os.getpid(), os.getuid(), sys.argv[0], ++ os.getpid(), os.getuid(), os.getgid(), sys.argv[0], + "org.debian.apt.test", connect=False, + packages=[[], [], ["silly-depend-base"], [], + [], []]) +@@ -219,7 +220,7 @@ + "silly-depend-base_0.1-0_all.deb"]: + self.chroot.install_debfile(os.path.join(REPO_PATH, pkg)) + trans = Transaction(None, enums.ROLE_REMOVE_PACKAGES, self.queue, +- os.getpid(), os.getuid(), sys.argv[0], ++ os.getpid(), os.getuid(), os.getgid(), sys.argv[0], + "org.debian.apt.test", connect=False, + packages=[[], [], ["silly-base"], [], [], []]) + self.worker.simulate(trans) +@@ -240,7 +241,7 @@ + pass + # Don't allow to remove essential packages + trans = Transaction(None, enums.ROLE_REMOVE_PACKAGES, self.queue, +- os.getpid(), os.getuid(), sys.argv[0], ++ os.getpid(), os.getuid(), os.getgid(), sys.argv[0], + "org.debian.apt.test", connect=False, + packages=[[], [], ["silly-essential"], [], [], []]) + self.worker.run(trans) +@@ -263,7 +264,7 @@ + Architecture: all + Auto-Installed: 1""") + trans = Transaction(None, enums.ROLE_COMMIT_PACKAGES, self.queue, +- os.getpid(), os.getuid(), sys.argv[0], ++ os.getpid(), os.getuid(), os.getgid(), sys.argv[0], + "org.debian.apt.test", connect=False, + packages=[[], [], [], [], + ["silly-base=0.1-0update1"], []]) +@@ -283,7 +284,7 @@ + pkg = os.path.join(REPO_PATH, "silly-base_0.1-0update1_all.deb") + self.chroot.install_debfile(pkg) + trans = Transaction(None, enums.ROLE_COMMIT_PACKAGES, self.queue, +- os.getpid(), os.getuid(), sys.argv[0], ++ os.getpid(), os.getuid(), os.getgid(), sys.argv[0], + "org.debian.apt.test", connect=False, + packages=[[], [], [], [], [], + ["silly-base=0.1-0"]]) +@@ -301,7 +302,7 @@ + for pkg in ["silly-base_0.1-0_all.deb", "silly-config_0.1-0_all.deb"]: + self.chroot.install_debfile(os.path.join(REPO_PATH, pkg)) + trans = Transaction(None, enums.ROLE_REMOVE_PACKAGES, self.queue, +- os.getpid(), os.getuid(), sys.argv[0], ++ os.getpid(), os.getuid(), os.getgid(), sys.argv[0], + "org.debian.apt.test", connect=False, + packages=[[], [], [], ["silly-config"], [], []]) + self.worker.run(trans) +@@ -324,7 +325,7 @@ + pkg = os.path.join(REPO_PATH, + "silly-depend-base-lintian-broken_0.1-0_all.deb") + trans = Transaction(None, enums.ROLE_INSTALL_FILE, self.queue, +- os.getpid(), os.getuid(), sys.argv[0], ++ os.getpid(), os.getuid(), os.getgid(), sys.argv[0], + "org.debian.apt.test", connect=False, + kwargs={"path": os.path.join(REPO_PATH, pkg), + "force": False}) +@@ -359,7 +360,7 @@ + self.chroot.install_debfile(os.path.join(REPO_PATH, pkg_base)) + pkg = os.path.join(REPO_PATH, "silly-bully_0.1-0_all.deb") + trans = Transaction(None, enums.ROLE_INSTALL_FILE, self.queue, +- os.getpid(), os.getuid(), sys.argv[0], ++ os.getpid(), os.getuid(), os.getgid(), sys.argv[0], + "org.debian.apt.test", connect=False, + kwargs={"path": os.path.join(REPO_PATH, pkg), + "force": True}) +@@ -379,7 +380,7 @@ + """ + pkg = os.path.join(REPO_PATH, "silly-base_0.1-0_all.deb") + trans = Transaction(None, enums.ROLE_INSTALL_FILE, self.queue, +- os.getpid(), os.getuid(), sys.argv[0], ++ os.getpid(), os.getuid(), os.getgid(), sys.argv[0], + "org.debian.apt.test", connect=False, + kwargs={"path": os.path.join(REPO_PATH, pkg), + "force": True}) +@@ -400,7 +401,7 @@ + for pkg in ["silly-base_0.1-0_all.deb", "silly-broken_0.1-0_all.deb"]: + self.chroot.install_debfile(os.path.join(REPO_PATH, pkg), True) + trans = Transaction(None, enums.ROLE_FIX_BROKEN_DEPENDS, self.queue, +- os.getpid(), os.getuid(), sys.argv[0], ++ os.getpid(), os.getuid(), os.getgid(), sys.argv[0], + "org.debian.apt.test", connect=False) + self.worker.simulate(trans) + self.loop.run() +@@ -420,7 +421,7 @@ + """ + self.chroot.add_test_repository() + trans = Transaction(None, enums.ROLE_COMMIT_PACKAGES, self.queue, +- os.getpid(), os.getuid(), sys.argv[0], ++ os.getpid(), os.getuid(), os.getgid(), sys.argv[0], + "org.debian.apt.test", + packages=[["silly-broken"], [], [], [], [], []], + connect=False) +@@ -459,7 +460,7 @@ + + self.chroot.add_test_repository() + trans = Transaction(None, enums.ROLE_ADD_LICENSE_KEY, self.queue, +- os.getpid(), os.getuid(), sys.argv[0], ++ os.getpid(), os.getuid(), os.getgid(), sys.argv[0], + "org.debian.apt.test", + kwargs={"pkg_name": "silly-license", + "json_token": "lalelu", +Index: aptdaemon-1.1.1+bzr982/tests/_test_py2_string_handling.py +=================================================================== +--- aptdaemon-1.1.1+bzr982.orig/tests/_test_py2_string_handling.py 2012-12-29 18:40:46.000000000 -0500 ++++ aptdaemon-1.1.1+bzr982/tests/_test_py2_string_handling.py 2015-06-11 09:47:02.608070571 -0400 +@@ -49,7 +49,8 @@ + self.start_dbus_daemon() + self.dbus = dbus.bus.BusConnection(self.dbus_address) + self.trans = Transaction(None, "role-test", None, +- os.getpid(), os.getuid(), sys.argv[0], ++ os.getpid(), os.getuid(), os.getgid(), ++ sys.argv[0], + "org.debian.apt.test", bus=self.dbus) + + def test(self): diff --git a/debian/patches/lp1487087.diff b/debian/patches/lp1487087.diff new file mode 100644 index 0000000..fdab301 --- /dev/null +++ b/debian/patches/lp1487087.diff @@ -0,0 +1,21 @@ +Description: .assert_called() is not a valid mock method, and its presence + masks a failing test. Under Python 3.5, an AttributeError is raised whereas + in earlier Python's this just silently passed. Since the intent of the test + can't be determined, for now just skip it. We don't use @unittest.skip + though because there is apparently some test leakage, so that if this entire + test is skipped, other tests fail. +Author: Barry Warsaw <barry@ubuntu.com> +Bug: https://bugs.launchpad.net/aptdaemon/+bug/1487087 + +--- a/tests/test_high_trust_repository_whitelist.py ++++ b/tests/test_high_trust_repository_whitelist.py +@@ -96,7 +96,8 @@ + "data/high-trust-repository-whitelist-broken.cfg")) + self.assertEqual(whitelist, set()) + # ensure we log a error if the config file is broken +- mock_log.error.assert_called() ++ # Skip due to LP: #1487087 ++ #mock_log.error.assert_called() + + @patch("aptdaemon.worker.log") + def test_read_high_trust_repository_whitelist_not_there(self, mock_log): diff --git a/debian/patches/lp1623856-window-height.patch b/debian/patches/lp1623856-window-height.patch new file mode 100644 index 0000000..a042895 --- /dev/null +++ b/debian/patches/lp1623856-window-height.patch @@ -0,0 +1,15 @@ +Description: Set the minimum scrolled window height +Author: Martin Wimpress +Bug-Ubuntu: https://bugs.launchpad.net/ubuntu/+source/update-manager/+bug/1623856 + +=== modified file 'aptdaemon/gtk3widgets.py' +--- a/aptdaemon/gtk3widgets.py ++++ b/aptdaemon/gtk3widgets.py +@@ -338,6 +338,7 @@ + self.download_scrolled.set_policy(Gtk.PolicyType.NEVER, + Gtk.PolicyType.AUTOMATIC) + self.download_scrolled.add(self.download_view) ++ self.download_scrolled.set_min_content_height(200) + hbox = Gtk.HBox() + hbox.pack_start(self.download_scrolled, True, True, 0) + if self.terminal: diff --git a/debian/patches/lp1689668-config-file-window.patch b/debian/patches/lp1689668-config-file-window.patch new file mode 100644 index 0000000..15d05c5 --- /dev/null +++ b/debian/patches/lp1689668-config-file-window.patch @@ -0,0 +1,13 @@ +Index: aptdaemon-1.1.1+bzr982/aptdaemon/gtk3widgets.py +=================================================================== +--- aptdaemon-1.1.1+bzr982.orig/aptdaemon/gtk3widgets.py ++++ aptdaemon-1.1.1+bzr982/aptdaemon/gtk3widgets.py +@@ -1066,7 +1066,7 @@ class AptConfigFileConflictDialog(_Expan + "the configuration file?") % from_path + msg = _("If you don't know why the file is there already, it is " + "usually safe to replace it.") +- scrolled = Gtk.ScrolledWindow() ++ scrolled = Gtk.ScrolledWindow(hexpand=True, vexpand=True) + scrolled.set_policy(Gtk.PolicyType.AUTOMATIC, Gtk.PolicyType.AUTOMATIC) + scrolled.set_shadow_type(Gtk.ShadowType.ETCHED_IN) + self.diffview = DiffView() diff --git a/debian/patches/lp1690541-details-open-twice.patch b/debian/patches/lp1690541-details-open-twice.patch new file mode 100644 index 0000000..329515f --- /dev/null +++ b/debian/patches/lp1690541-details-open-twice.patch @@ -0,0 +1,12 @@ +Index: aptdaemon-1.1.1+bzr982/aptdaemon/gtk3widgets.py +=================================================================== +--- aptdaemon-1.1.1+bzr982.orig/aptdaemon/gtk3widgets.py ++++ aptdaemon-1.1.1+bzr982/aptdaemon/gtk3widgets.py +@@ -395,6 +395,7 @@ class AptTerminal(Vte.Terminal): + self._master, self._slave = pty.openpty() + self._ttyname = os.ttyname(self._slave) + self.set_size(80, 24) ++ self.set_vexpand(True) + self.set_pty(Vte.Pty.new_foreign_sync(self._master)) + if transaction is not None: + self.set_transaction(transaction) diff --git a/debian/patches/native-arch.patch b/debian/patches/native-arch.patch new file mode 100644 index 0000000..a0c37fa --- /dev/null +++ b/debian/patches/native-arch.patch @@ -0,0 +1,17 @@ +Description: Fix NATIVE_ARCH not being defined +Author: Justin McPherson <justin.mcpherson@canonical.com> +Forwarded: https://code.launchpad.net/~justinmcp/aptdaemon/1352654/+merge/243354 + +Index: b/aptdaemon/pkcompat.py +=================================================================== +--- a/aptdaemon/pkcompat.py ++++ b/aptdaemon/pkcompat.py +@@ -392,7 +392,7 @@ + distro, version, _codename = platform.dist() + self._distro_id = "%s;%s;%s" % (distro or "unknown", + version or "unknown", +- NATIVE_ARCH) ++ self.queue.worker.NATIVE_ARCH) + return self._distro_id + + def _on_network_state_changed(self, mon, state): diff --git a/debian/patches/pep8-accommodations.diff b/debian/patches/pep8-accommodations.diff new file mode 100644 index 0000000..68ee5e4 --- /dev/null +++ b/debian/patches/pep8-accommodations.diff @@ -0,0 +1,35 @@ +Description: Various accommodations so that the PEP 8 tests don't cause + autopkgtests to fail. These include fixing the --exclude argument, adding + more files to the exclude pattern, and ignoring E402, which is bogus; see + https://github.com/PyCQA/pep8/issues/394. I also fixed one legitimate + looking violation. +Author: Barry Warsaw <barry@ubuntu.com> +Bug: https://bugs.launchpad.net/aptdaemon/+bug/1486646 + +--- a/tests/test_pep8.py ++++ b/tests/test_pep8.py +@@ -30,9 +30,11 @@ + + def test(self): + """Check if the source code matches the PEP8 style conventions.""" +- subprocess.check_call(["pep8", "--statistics", "--show-source", +- "--show-pep8", "--exclude", "pkenums.py", +- "aptdaemon", "tests"]) ++ subprocess.check_call([ ++ "pep8", "--statistics", "--show-source", ++ "--show-pep8", "--exclude", ++ "pkenums.py,aptdaemon,tests,debian,doc,.pc,gtk3-demo.py,setup.py", ++ "--ignore=E402"]) + + + if __name__ == "__main__": +--- a/apport/aptdaemon.py ++++ b/apport/aptdaemon.py +@@ -28,6 +28,7 @@ + + apt_pkg.init() + ++ + def add_info(report): + """Collect and append additional information about a crash. + diff --git a/debian/patches/pk-debconf-helper.patch b/debian/patches/pk-debconf-helper.patch new file mode 100644 index 0000000..9e672c7 --- /dev/null +++ b/debian/patches/pk-debconf-helper.patch @@ -0,0 +1,40 @@ +Description: Use PackageKit debconf socket +Author: Julian Andres Klode <julian.klode@canonical.com> +Bug-Ubuntu: https://bugs.launchpad.net/bugs/1726068 +Last-Update: 2019-05-24 <YYYY-MM-DD, last update of the meta-information, optional> +--- +This patch header follows DEP-3: http://dep.debian.net/deps/dep3/ +--- a/aptdaemon/client.py ++++ b/aptdaemon/client.py +@@ -888,6 +888,16 @@ class AptTransaction(GObject.Object): + _reply_handler = lambda: reply_handler(self) + else: + _reply_handler = None ++ ++ pk_socket = "/run/user/%d/pk-debconf-socket" % os.getuid() ++ if os.path.exists(pk_socket): ++ self._proxy.Set("org.debian.apt.transaction", "DebconfSocket", ++ pk_socket, ++ dbus_interface=dbus.PROPERTIES_IFACE, ++ reply_handler=_reply_handler, ++ error_handler=error_handler) ++ return ++ + self._debconf_helper = debconf.DebconfProxy(frontend) + self._proxy.Set("org.debian.apt.transaction", "DebconfSocket", + self._debconf_helper.socket_path, +--- a/aptdaemon/core.py ++++ b/aptdaemon/core.py +@@ -368,7 +368,11 @@ class Transaction(DBusObject): + self.pid = pid + self.http_proxy = dbus.String("") + self.terminal = dbus.String("") +- self.debconf = dbus.String("") ++ pk_socket = "/run/user/%d/pk-debconf-socket" % self.uid ++ if os.path.exists(pk_socket): ++ self.debconf = dbus.String(pk_socket) ++ else: ++ self.debconf = dbus.String("") + self.kwargs = kwargs + self._translation = None + # The transaction which should be executed after this one diff --git a/debian/patches/pk1.1.1_compat.patch b/debian/patches/pk1.1.1_compat.patch new file mode 100644 index 0000000..a744413 --- /dev/null +++ b/debian/patches/pk1.1.1_compat.patch @@ -0,0 +1,29 @@ +From: Michael Vogt <mvo@ubuntu.com> +Subject: Remove API that is no longer available in PK 1.1.1 + +--- + aptdaemon/worker/pkworker.py | 6 ------ + 1 file changed, 6 deletions(-) + +--- a/aptdaemon/worker/pkworker.py ++++ b/aptdaemon/worker/pkworker.py +@@ -172,8 +172,6 @@ + pk.RoleEnum.GET_UPDATE_DETAIL, + pk.RoleEnum.GET_PACKAGES, + pk.RoleEnum.GET_DETAILS, +- pk.RoleEnum.GET_DEPENDS, +- pk.RoleEnum.GET_REQUIRES, + pk.RoleEnum.SEARCH_NAME, + pk.RoleEnum.SEARCH_DETAILS, + pk.RoleEnum.SEARCH_GROUP, +@@ -289,10 +287,6 @@ + self.search_details(trans, **trans.kwargs) + elif trans.pktrans.role == pk.RoleEnum.SEARCH_FILE: + self.search_files(trans, **trans.kwargs) +- elif trans.pktrans.role == pk.RoleEnum.GET_DEPENDS: +- self.get_depends(trans, **trans.kwargs) +- elif trans.pktrans.role == pk.RoleEnum.GET_REQUIRES: +- self.get_requires(trans, **trans.kwargs) + elif trans.pktrans.role == pk.RoleEnum.GET_DETAILS: + self.get_details(trans, **trans.kwargs) + elif trans.pktrans.role == pk.RoleEnum.DOWNLOAD_PACKAGES: diff --git a/debian/patches/py3_inheritable.patch b/debian/patches/py3_inheritable.patch new file mode 100644 index 0000000..f642733 --- /dev/null +++ b/debian/patches/py3_inheritable.patch @@ -0,0 +1,14 @@ +=== modified file 'aptdaemon/progress.py' +--- a/aptdaemon/progress.py 2014-02-07 20:40:15 +0000 ++++ b/aptdaemon/progress.py 2014-04-11 11:58:33 +0000 +@@ -395,6 +395,9 @@ + self.last_activity = 0 + self.child_pid = 0 + self.status_parent_fd, self.status_child_fd = os.pipe() ++ if hasattr(os, "set_inheritable"): ++ os.set_inheritable(self.status_parent_fd, True) ++ os.set_inheritable(self.status_child_fd, True) + self.output = "" + self._line_buffer = "" + + diff --git a/debian/patches/python3.7-compat.patch b/debian/patches/python3.7-compat.patch new file mode 100644 index 0000000..867c6d2 --- /dev/null +++ b/debian/patches/python3.7-compat.patch @@ -0,0 +1,53 @@ +Description: do not use 'async' as a variable name + It is a keyword in Python 3.7. +Author: Michael Hudson-Doyle <michael.hudson@ubuntu.com> +Origin: vendor +Last-Update: 2018-08-02 +--- +This patch header follows DEP-3: http://dep.debian.net/deps/dep3/ +--- a/aptdaemon/client.py ++++ b/aptdaemon/client.py +@@ -1567,17 +1567,17 @@ + + def _run_transaction(self, method_name, args, wait, reply_handler, + error_handler): +- async = reply_handler and error_handler ++ async_ = reply_handler and error_handler + try: + deferred = self._run_transaction_helper(method_name, args, wait, +- async) ++ async_) + except Exception as error: +- if async: ++ if async_: + error_handler(error) + return + else: + raise +- if async: ++ if async_: + def on_error(error): + """Convert the DeferredException to a normal exception.""" + try: +@@ -1609,10 +1609,10 @@ + return trans + + @defer.inline_callbacks +- def _run_transaction_helper(self, method_name, args, wait, async): ++ def _run_transaction_helper(self, method_name, args, wait, async_): + daemon = get_aptdaemon(self.bus) + dbus_method = daemon.get_dbus_method(method_name) +- if async: ++ if async_: + deferred = defer.Deferred() + dbus_method(reply_handler=deferred.callback, + error_handler=deferred.errback, *args, +@@ -1626,7 +1626,7 @@ + if self.terminal: + yield trans.set_terminal(self.terminal) + yield trans.sync() +- if wait and async: ++ if wait and async_: + deferred_wait = defer.Deferred() + sig = trans.connect("finished", + lambda trans, exit: diff --git a/debian/patches/remove-lintian-scanning-of-local-packages.patch b/debian/patches/remove-lintian-scanning-of-local-packages.patch new file mode 100644 index 0000000..64f20a4 --- /dev/null +++ b/debian/patches/remove-lintian-scanning-of-local-packages.patch @@ -0,0 +1,180 @@ +From: Michael Hudson-Doyle <michael.hudson@canonical.com> +Date: Thu, 1 Aug 2019 12:13:07 +1200 +Subject: Remove lintian scanning of local packages. + +lintian has changed in Debian in ways that break this feature and +removing it seems like a better use of time than fixing it. +--- + aptdaemon/progress.py | 30 +----------------------------- + aptdaemon/worker/aptworker.py | 12 ------------ + setup.py | 4 ---- + tests/test_pk.py | 6 +++--- + tests/test_worker.py | 14 ++------------ + 5 files changed, 6 insertions(+), 60 deletions(-) + +diff --git a/aptdaemon/progress.py b/aptdaemon/progress.py +index 0a0cd7b..5312c5a 100644 +--- a/aptdaemon/progress.py ++++ b/aptdaemon/progress.py +@@ -14,8 +14,7 @@ __author__ = "Sebastian Heinlein <devel@glatzor.de>" + + __all__ = ("DaemonAcquireProgress", "DaemonOpenProgress", + "DaemonInstallProgress", "DaemonDpkgInstallProgress", +- "DaemonForkProgress", "DaemonDpkgRecoverProgress", +- "DaemonLintianProgress") ++ "DaemonForkProgress", "DaemonDpkgRecoverProgress") + + import locale + import logging +@@ -622,33 +621,6 @@ class DaemonForkProgress(object): + return False + + +-class DaemonLintianProgress(DaemonForkProgress): +- +- """Performs a lintian call.""" +- +- def _child(self, path): +- # Avoid running lintian as root +- try: +- os.setgroups([self.transaction.gid]) +- except OSError: +- pass +- os.setgid(self.transaction.gid) +- os.setuid(self.transaction.uid) +- +- if platform.dist()[1] == "debian": +- profile = "debian/aptdaemon" +- else: +- profile = "ubuntu/aptdaemon" +- # If HOME isn't set lintian won't try to load user profiles +- os.unsetenv("HOME") +- +- lintian_path = apt_pkg.config.find_file("Dir::Bin::Lintian", +- "/usr/bin/lintian") +- os.execlp(lintian_path, lintian_path, "--no-cfg", "--fail-on-warnings", +- "--profile", profile, path) +- os._exit(1) +- +- + class DaemonInstallProgress(DaemonForkProgress): + + """Progress to execute APT package operations in a child process.""" +diff --git a/aptdaemon/worker/aptworker.py b/aptdaemon/worker/aptworker.py +index 5211365..d936e10 100644 +--- a/aptdaemon/worker/aptworker.py ++++ b/aptdaemon/worker/aptworker.py +@@ -66,7 +66,6 @@ from ..progress import ( + DaemonDpkgInstallProgress, + DaemonDpkgReconfigureProgress, + DaemonDpkgRecoverProgress, +- DaemonLintianProgress, + DaemonForkProgress) + + log = logging.getLogger("AptDaemon.Worker") +@@ -1230,21 +1229,10 @@ class AptWorker(BaseWorker): + # This code runs as root for simulate and simulate requires no + # authentication - so we need to ensure we do not leak information + # about files here (LP: #1449587, CVE-2015-1323) +- # +- # Note that the actual lintian run is also droping privs (real, +- # not just seteuid) + with set_euid_egid(trans.uid, trans.gid): + if not os.path.isfile(path): + raise TransactionFailed(ERROR_UNREADABLE_PACKAGE_FILE, path) + +- if not force and os.path.isfile("/usr/bin/lintian"): +- with DaemonLintianProgress(trans) as progress: +- progress.run(path) +- # FIXME: Add an error to catch return state 2 (failure) +- if progress._child_exit != 0: +- raise TransactionFailed(ERROR_INVALID_PACKAGE_FILE, +- "Lintian check results for %s:" +- "\n%s" % (path, progress.output)) + try: + deb = apt.debfile.DebPackage(path, self._cache) + except IOError: +diff --git a/setup.py b/setup.py +index 45273df..c08cb5e 100755 +--- a/setup.py ++++ b/setup.py +@@ -50,10 +50,6 @@ setup(name="aptdaemon", + ("share/dbus-1/system-services/", + ["data/org.debian.apt.service", + "data/org.freedesktop.PackageKit.service"]), +- ("share/lintian/profiles/ubuntu/", +- ["data/lintian/ubuntu/aptdaemon.profile"]), +- ("share/lintian/profiles/debian/", +- ["data/lintian/debian/aptdaemon.profile"]), + ("share/man/man1", + ["doc/aptd.1", "doc/aptdcon.1"]), + ("share/man/man7", +diff --git a/tests/test_pk.py b/tests/test_pk.py +index dd386b4..1c73632 100644 +--- a/tests/test_pk.py ++++ b/tests/test_pk.py +@@ -119,9 +119,9 @@ class PackageKitTest(aptdaemon.test.AptDaemonTestCase): + def test_install_files(self): + """Test installing local package files.""" + +- path_pkg_lintian_fail = os.path.join( ++ path_pkg_config = os.path.join( + REPO_PATH, +- "silly-depend-base-lintian-broken_0.1-0_all.deb") ++ "silly-config_.1-0_all.deb") + path_pkg = os.path.join( + REPO_PATH, + "silly-depend-base_0.1-0_all.deb") +@@ -131,7 +131,7 @@ class PackageKitTest(aptdaemon.test.AptDaemonTestCase): + # Fail if more than package should be installed + try: + client.install_files(pk.TransactionFlagEnum.NONE, +- [path_pkg_lintian_fail, path_pkg], None, ++ [path_pkg_config, path_pkg], None, + lambda p, t, d: True, None) + except GLib.GError as error: + self.assertTrue("Only one package" in error.message) +diff --git a/tests/test_worker.py b/tests/test_worker.py +index 474be13..e82ace0 100644 +--- a/tests/test_worker.py ++++ b/tests/test_worker.py +@@ -315,15 +315,12 @@ Auto-Installed: 1""") + "etc/silly-packages.cfg")), + "Configuration file wasn't removed.") + +- @unittest.skipUnless( +- os.path.exists('/usr/share/lintian/profiles/debian/aptdaemon.profile'), +- 'this test needs aptdaemon installed, for the lintian profiles') + def test_install_file(self): + """Test the installation of a local package file.""" + # test + self.chroot.add_test_repository() + pkg = os.path.join(REPO_PATH, +- "silly-depend-base-lintian-broken_0.1-0_all.deb") ++ "silly-depend-base_0.1-0_all.deb") + trans = Transaction(None, enums.ROLE_INSTALL_FILE, self.queue, + os.getpid(), os.getuid(), os.getgid(), sys.argv[0], + "org.debian.apt.test", connect=False, +@@ -331,13 +328,6 @@ Auto-Installed: 1""") + "force": False}) + self.worker.simulate(trans) + self.loop.run() +- self.assertIn("wrong-file-owner-uid-or-gid", trans.error.details) +- self.assertEqual(trans.error.code, enums.ERROR_INVALID_PACKAGE_FILE, +- "Lintian failed to detect a broken package") +- # Now allow to install invalid packages +- trans.kwargs["force"] = True +- self.worker.simulate(trans) +- self.loop.run() + self.assertEqual(trans.depends[enums.PKGS_INSTALL], + ["silly-base=0.1-0update1"]) + self.assertTrue(trans.space > 0) +@@ -347,7 +337,7 @@ Auto-Installed: 1""") + "%s: %s" % (trans._error_property[0], + trans._error_property[1])) + self.worker._cache.open() +- pkg = self.worker._cache["silly-depend-base-lintian-broken"] ++ pkg = self.worker._cache["silly-depend-base"] + self.assertTrue(pkg.is_installed) + + def test_install_conflicting_file(self): diff --git a/debian/patches/series b/debian/patches/series new file mode 100644 index 0000000..0202a08 --- /dev/null +++ b/debian/patches/series @@ -0,0 +1,33 @@ +fix-high-trust-pkcompat.diff +dbus_timeout.patch +py3_inheritable.patch +lp1356823.diff +lp1449587.diff +pep8-accommodations.diff +lp1487087.diff +fix-installation.patch +native-arch.patch +key_value_typo.patch +lintian_deprecated_error.patch +lp1439769-aptdaemon-autoinstall.patch +drop_pkcompat.patch +pk1.1.1_compat.patch +lp1623856-window-height.patch +lp1689668-config-file-window.patch +lp1690541-details-open-twice.patch +python3.7-compat.patch +do-not-raise-stopiteration.patch +pk-debconf-helper.patch +failing-tests.patch +frontend-locking.patch +lock-is-held-typo.patch +fix-dependency-solving.patch +remove-lintian-scanning-of-local-packages.patch +allow-unauthenticated.patch +apport-report.patch +CVE-2020-15703.patch +test-with-timeout.patch +CVE-2020-16128.patch +CVE-2020-27349.patch +fix-some-deprecated-code.patch +gdk-gtk-versions.py diff --git a/debian/patches/test-with-timeout.patch b/debian/patches/test-with-timeout.patch new file mode 100644 index 0000000..8a51396 --- /dev/null +++ b/debian/patches/test-with-timeout.patch @@ -0,0 +1,15 @@ +Description: Run tests with a timeout + Tests are getting stuck for almost 3 hours because we race somewhere and end up + getting stuck waiting for calls that never happen. +Author: Julian Andres Klode <juliank@ubuntu.com> +--- a/aptdaemon/test.py ++++ b/aptdaemon/test.py +@@ -223,7 +223,7 @@ class AptDaemonTestCase(unittest.TestCas + path = "/usr/sbin/aptd" + else: + path = os.path.join(dir, "../aptd") +- cmd = ["python3", path, "--disable-timeout", "--disable-plugins", ++ cmd = ["python3", path, "--disable-plugins", + "--chroot", chroot] + if debug: + cmd.append("--debug") diff --git a/debian/python3-aptdaemon.gtk3widgets.examples b/debian/python3-aptdaemon.gtk3widgets.examples new file mode 100644 index 0000000..a88c1fa --- /dev/null +++ b/debian/python3-aptdaemon.gtk3widgets.examples @@ -0,0 +1 @@ +gtk3-demo.py diff --git a/debian/python3-aptdaemon.gtk3widgets.install b/debian/python3-aptdaemon.gtk3widgets.install new file mode 100644 index 0000000..19938ca --- /dev/null +++ b/debian/python3-aptdaemon.gtk3widgets.install @@ -0,0 +1 @@ +usr/lib/python3*/*-packages/aptdaemon/gtk3widgets.py diff --git a/debian/python3-aptdaemon.install b/debian/python3-aptdaemon.install new file mode 100644 index 0000000..457c677 --- /dev/null +++ b/debian/python3-aptdaemon.install @@ -0,0 +1,17 @@ +usr/lib/python3*/*-packages/aptdaemon/__init__.py +usr/lib/python3*/*-packages/aptdaemon/client.py +usr/lib/python3*/*-packages/aptdaemon/config.py +usr/lib/python3*/*-packages/aptdaemon/console.py +usr/lib/python3*/*-packages/aptdaemon/core.py +usr/lib/python3*/*-packages/aptdaemon/crash.py +usr/lib/python3*/*-packages/aptdaemon/debconf.py +usr/lib/python3*/*-packages/aptdaemon/enums.py +usr/lib/python3*/*-packages/aptdaemon/errors.py +usr/lib/python3*/*-packages/aptdaemon/logger.py +usr/lib/python3*/*-packages/aptdaemon/loop.py +usr/lib/python3*/*-packages/aptdaemon/lock.py +usr/lib/python3*/*-packages/aptdaemon/networking.py +usr/lib/python3*/*-packages/aptdaemon/policykit1.py +usr/lib/python3*/*-packages/aptdaemon/progress.py +usr/lib/python3*/*-packages/aptdaemon/utils.py +usr/lib/python3*/*-packages/aptdaemon/worker/*.py diff --git a/debian/python3-aptdaemon.test.examples b/debian/python3-aptdaemon.test.examples new file mode 100644 index 0000000..b0f0377 --- /dev/null +++ b/debian/python3-aptdaemon.test.examples @@ -0,0 +1 @@ +tests/test_client.py diff --git a/debian/python3-aptdaemon.test.install b/debian/python3-aptdaemon.test.install new file mode 100644 index 0000000..1eef8bb --- /dev/null +++ b/debian/python3-aptdaemon.test.install @@ -0,0 +1,9 @@ +usr/lib/python3*/*-packages/aptdaemon/test.py +tests/repo/glatzor.gpg /usr/share/aptdaemon/tests/repo/ +tests/repo/Packages /usr/share/aptdaemon/tests/repo/ +tests/repo/Release /usr/share/aptdaemon/tests/repo/ +tests/repo/Release.gpg /usr/share/aptdaemon/tests/repo/ +tests/repo/*.deb /usr/share/aptdaemon/tests/repo/ +tests/dpkg-wrapper.sh /usr/share/aptdaemon/tests/ +tests/fake-polkitd.py /usr/share/aptdaemon/tests/ +tests/dbus.conf /usr/share/aptdaemon/tests/ diff --git a/debian/rules b/debian/rules new file mode 100755 index 0000000..3e9ea40 --- /dev/null +++ b/debian/rules @@ -0,0 +1,24 @@ +#!/usr/bin/make -f + +#DH_VERBOSE=1 + +PYTHON3=$(shell py3versions -vr) + +%: + dh $@ --with=python3,translations --buildsystem=pybuild + +override_dh_auto_clean: + dh_auto_clean + rm -rf build *.egg-info po/aptdaemon.pot + +# ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS))) +# test-python%: +# # wait until previous xvfb-run has finished +# while [ -e /tmp/.X99-lock ]; do sleep 1; done +# xvfb-run python$* setup.py test -vv + +# override_dh_auto_test: $(PYTHON3:%=test-python%) +# endif + +override_dh_auto_test: + true diff --git a/debian/source/format b/debian/source/format new file mode 100644 index 0000000..89ae9db --- /dev/null +++ b/debian/source/format @@ -0,0 +1 @@ +3.0 (native) diff --git a/debian/tests/control b/debian/tests/control new file mode 100644 index 0000000..fffa7ec --- /dev/null +++ b/debian/tests/control @@ -0,0 +1,2 @@ +Tests: run-test +Depends: @, xvfb, pep8, python3-nose, python3-setuptools, python3-distutils-extra, python3-mock, gir1.2-packagekitglib-1.0, gir1.2-gtk-3.0, gir1.2-vte-2.91, fakeroot, lintian diff --git a/debian/tests/run-test b/debian/tests/run-test new file mode 100755 index 0000000..b0fb0f7 --- /dev/null +++ b/debian/tests/run-test @@ -0,0 +1,9 @@ +#!/bin/sh +set -e + +# clean up old crash reports +rm -rf /var/crash/* 2>&1 || true + +# succeeding test must not write anything to stderr, as per DEP-8 +# work around LP #972324 +env -u TMPDIR xvfb-run python3 setup.py test 2>&1 diff --git a/debian/watch b/debian/watch new file mode 100644 index 0000000..0668194 --- /dev/null +++ b/debian/watch @@ -0,0 +1,2 @@ +version=3 +http://launchpad.net/aptdaemon/+download .*/aptdaemon-([0-9.]+)\.tar\.gz |