--- dogtail-0.6.1.orig/dogtail/config.py
+++ dogtail-0.6.1/dogtail/config.py
@@ -13,6 +13,15 @@
 def _encoding():
     return locale.getpreferredencoding().lower()
 
+def _homeDirOrNamedTmp(baseName):
+    if 'HOME' in os.environ:
+        # i.e. /home/foo/dogtail
+        return '/'.join((os.environ['HOME'], baseName))
+    else:
+        # i.e. /tmp/dogtail-foo
+        return '-'.join(('/'.join(('/tmp', baseName)), os.getlogin()))
+
+
 class _Config(object):
     """
     Contains configuration parameters for the dogtail run.
@@ -100,12 +109,15 @@
     """
     __scriptName = staticmethod(_scriptName)
     __encoding = staticmethod(_encoding)
+    __homeDirOrNamedTmp = staticmethod(_homeDirOrNamedTmp)
+
+    
 
     defaults = {
             # Storage
-            'scratchDir' : '/tmp/dogtail/',
-            'dataDir' : '/tmp/dogtail/data/',
-            'logDir' : '/tmp/dogtail/logs/',
+            'scratchDir' : '/'.join((_homeDirOrNamedTmp('dogtail'), '')),
+            'dataDir' : '/'.join((_homeDirOrNamedTmp('dogtail'), 'data', '')),
+            'logDir' : '/'.join((_homeDirOrNamedTmp('dogtail'), 'logs', '')),
             'scriptName' : _scriptName(),
             'encoding' : _encoding(),
             'configFile' : None,
--- dogtail-0.6.1.orig/dogtail/distro.py
+++ dogtail-0.6.1/dogtail/distro.py
@@ -129,12 +129,12 @@
         if not self.cache:
             import apt_pkg
             apt_pkg.init()
-            self.cache = apt_pkg.GetCache()
-        packages = self.cache.Packages
+            self.cache = apt_pkg.Cache()
+        packages = self.cache.packages
         for package in packages:
-            if package.Name == packageName:
+            if package.name == packageName:
                 import re
-                verString = re.match('.*Ver:\'(.*)-.*\' Section:', str(package.CurrentVer)).group(1)
+                verString = re.match('.*Ver:\'(.*)-.*\' Section:', str(package.current_ver)).group(1)
                 return Version.fromString(verString)
         raise PackageNotFoundError, packageName
 
@@ -156,17 +156,17 @@
         if not self.cache:
             import apt_pkg
             apt_pkg.init()
-            self.cache = apt_pkg.GetCache()
-        packages = self.cache.Packages
+            self.cache = apt_pkg.Cache()
+        packages = self.cache.packages
         for package in packages:
-            if package.Name == packageName:
-                current = package.CurrentVer
+            if package.name == packageName:
+                current = package.current_ver
                 if not current:
                     raise PackageNotFoundError, packageName
-                depends = current.DependsList
+                depends = current.depends_list
                 list = depends['Depends']
                 for dependency in list:
-                    name = dependency[0].TargetPkg.Name
+                    name = dependency[0].target_pkg.name
                     # Add to the hash using a dummy value
                     result[name] = None
         return result.keys()
--- dogtail-0.6.1.orig/debian/compat
+++ dogtail-0.6.1/debian/compat
@@ -0,0 +1 @@
+5
--- dogtail-0.6.1.orig/debian/copyright
+++ dogtail-0.6.1/debian/copyright
@@ -0,0 +1,24 @@
+This package was debianized by Zack Cerza <zcerza@coe.neu.edu> on
+Sun, 10 Jul 2006 22:40:36 -0400
+
+It was downloaded from http://people.redhat.com/zcerza/dogtail/
+
+Upstream Authors: Ed Rousseau and Zack Cerza
+
+This software is copyright (c) Red Hat, Inc.
+
+This program is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+
+On Debian systems, the complete text of the GNU General Public License can be found in the file `/usr/share/common-licenses/GPL'.
--- dogtail-0.6.1.orig/debian/changelog
+++ dogtail-0.6.1/debian/changelog
@@ -0,0 +1,120 @@
+dogtail (0.6.1-3.2.4.201403201252) ucs4-0-0-0; urgency=low
+
+  * UCS auto build. No patches were applied to the original source package
+
+ -- Univention builddaemon <buildd@univention.de>  Thu, 20 Mar 2014 12:52:41 +0100
+
+dogtail (0.6.1-3.2) unstable; urgency=high
+
+  * Non-maintainer upload.
+  * Apply patch by Julian Andres Klode to make it API compliant with
+    python-apt 0.8 (Closes: #572087).
+
+ -- Mehdi Dogguy <mehdi@debian.org>  Wed, 01 Jun 2011 16:18:42 +0200
+
+dogtail (0.6.1-3.1) unstable; urgency=low
+
+  * Non-maintainer upload.
+  * Fix "[DoS] use of /tmp/dogtail prevents use by multiple users"
+    Applied patch by Ludovico Gardenghi (Closes: #485752)
+
+ -- Bastian Venthur <venthur@debian.org>  Sun, 21 Feb 2010 14:57:10 +0100
+
+dogtail (0.6.1-3) unstable; urgency=low
+
+  * pyhton-at-spi has to be added as dependency (Closes: #402752)
+
+ -- Jose Carlos Garcia Sogo <jsogo@debian.org>  Sat, 16 Dec 2006 10:57:30 +0100
+
+dogtail (0.6.1-2) unstable; urgency=low
+
+  * Yay! As this has been actually uploaded to Debian... close the ITP
+    (Closes: #399327) 
+
+ -- Jose Carlos Garcia Sogo <jsogo@debian.org>  Sun, 19 Nov 2006 23:32:50 +0100
+
+dogtail (0.6.1-1) unstable; urgency=low
+
+  * New upstream version.
+  * Upload to Debian.
+  * Use python-support.
+  * debian/rules:
+    - remove dh_iconcache, as Debian does not support it.
+  * debian/control:
+    - add Depends on python-gnome2, python-apt, xvfb and xbase-clients
+
+ -- Jose Carlos Garcia Sogo <jsogo@debian.org>  Sun, 19 Nov 2006 21:50:49 +0100
+
+dogtail (0.5.1-0ubuntu1) edgy; urgency=low
+
+  * New upstream release.
+  * debian/rules:
+    - add dh_iconcache.
+
+ -- Daniel Holbach <daniel.holbach@ubuntu.com>  Tue,  1 Aug 2006 22:59:27 +0200
+
+dogtail (0.4.3+cvs2006.02.14-0ubuntu2) dapper; urgency=low
+
+  * debian/control: Add missing build dependency on python2.4, fixes
+    FTBFS. Thanks, Stuart Langridge (Closes: Malone #39827).
+
+ -- Daniel T Chen <crimsun@ubuntu.com>  Sun, 16 Apr 2006 21:55:34 -0400
+
+dogtail (0i.4.3+cvs2006.02.14-0ubuntu1) dapper; urgency=low
+
+  * [Zack Cerza <zcerza@coe.neu.edu>]
+    - New upstream release.
+    - Build-Depend on python-at-spi (>=0.5.3-1).
+    - Add post-install script that calls gtk-update-icon-cache.
+  * [Daniel Holbach]
+    - changed versioning and sponsored upload
+    - debian/python-dogtail.post-install:
+      - dropped, we can't update hicolor icon cache.
+    - debian/control:
+      - new description.
+      - bumped Standards-Version.
+      - changed python-at-spi Depends.
+
+ -- Daniel Holbach <daniel.holbach@ubuntu.com>  Wed, 22 Feb 2006 12:31:33 +0100
+
+dogtail (0.4.3-1) unstable; urgency=low
+
+  * New upstream release.
+
+ -- Zack Cerza <zcerza@coe.neu.edu>  Mon, 24 Oct 2005 02:32:14 -0400
+
+dogtail (0.4.2-3) unstable; urgency=low
+
+  * Correct website URL.
+
+ -- Zack Cerza <zcerza@coe.neu.edu>  Wed, 19 Oct 2005 19:16:14 -0400
+
+dogtail (0.4.2-2) unstable; urgency=low
+
+  * Add Recommends for xvfb. 
+
+ -- Zack Cerza <zcerza@coe.neu.edu>  Tue, 11 Oct 2005 16:59:04 -0400
+
+dogtail (0.4.2-1) unstable; urgency=low
+
+  * New upstream release.
+
+ -- Zack Cerza <zcerza@coe.neu.edu>  Thu,  6 Oct 2005 23:25:03 -0400
+
+dogtail (0.4.1-1) unstable; urgency=low
+
+  * New upstream release.
+
+ -- Zack Cerza <zcerza@coe.neu.edu>  Thu,  6 Oct 2005 17:23:03 -0400
+
+dogtail (0.4.0-1) unstable; urgency=low
+
+  * New upstream release.
+
+ -- Zack Cerza <zcerza@coe.neu.edu>  Thu,  6 Oct 2005 16:54:16 -0400
+
+dogtail (0.0.1.90-1) unstable; urgency=low
+
+  * Initial Release
+
+ -- Zack Cerza <zcerza@coe.neu.edu>  Sun, 10 Jul 2006 22:40:36 -0400
--- dogtail-0.6.1.orig/debian/pycompat
+++ dogtail-0.6.1/debian/pycompat
@@ -0,0 +1 @@
+2
--- dogtail-0.6.1.orig/debian/control
+++ dogtail-0.6.1/debian/control
@@ -0,0 +1,17 @@
+Source: dogtail
+Section: misc
+Priority: optional
+Maintainer: Jose Carlos Garcia Sogo <jsogo@debian.org>
+Build-Depends: debhelper (>=5), cdbs, python-dev, python-support (>= 0.4), python-at-spi
+Standards-Version: 3.7.2
+
+Package: python-dogtail
+Architecture: all
+Depends: ${python:Depends}, ${shlibs:Depends}, ${misc:Depends}, python-gnome2, python-apt (>= 0.7.93), xvfb, xbase-clients, python-at-spi
+Recommends: imagemagick, python-celementtree | python-elementtree
+Description: GUI test tool and automation framework
+ dogtail is a GUI test tool and automation framework written in Python.
+ It uses Accessibility (a11y) technologies to communicate with desktop
+ applications. dogtail scripts are written in Python.
+ .
+ Homepage: http://people.redhat.com/zcerza/dogtail/
--- dogtail-0.6.1.orig/debian/rules
+++ dogtail-0.6.1/debian/rules
@@ -0,0 +1,13 @@
+#!/usr/bin/make -f
+
+DEB_PYTHON_SYSTEM=pysupport
+
+include /usr/share/cdbs/1/rules/debhelper.mk
+include /usr/share/cdbs/1/class/python-distutils.mk
+
+DEB_COMPRESS_EXCLUDE := .txt
+
+binary-post-install/python-dogtail::
+	mv debian/python-dogtail/usr/share/doc/dogtail/* \
+		debian/python-dogtail/usr/share/doc/python-dogtail/
+	rm -rf debian/python-dogtail/usr/share/doc/dogtail/
