From f10de91e7f0cb2f48042c512850ae7991b2498fd Mon Sep 17 00:00:00 2001 From: Evgeni Golov Date: Thu, 17 Mar 2016 18:06:42 +0100 Subject: [PATCH 1/4] moden apt can install local debs with dependencies just fine --- packaging/debian/README.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/packaging/debian/README.md b/packaging/debian/README.md index 8051b2cfa4a..f170c13333f 100644 --- a/packaging/debian/README.md +++ b/packaging/debian/README.md @@ -17,3 +17,7 @@ To install the Ansible DEB package and resolve dependencies: sudo dpkg -i sudo apt-get -fy install + +Or, if you are running Debian Stretch (or later) or Ubuntu Xenial (or later): + + sudo apt install From 3fd74890d33cddd492676aff36d8b8f2824fa14e Mon Sep 17 00:00:00 2001 From: Evgeni Golov Date: Thu, 17 Mar 2016 18:13:39 +0100 Subject: [PATCH 2/4] migrate to dh-python --- packaging/debian/control | 4 ++-- packaging/debian/rules | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/packaging/debian/control b/packaging/debian/control index 13f0c5b42de..e5dc2d44970 100644 --- a/packaging/debian/control +++ b/packaging/debian/control @@ -3,12 +3,12 @@ Section: admin Priority: optional Standards-Version: 3.9.3 Maintainer: Ansible, Inc. -Build-Depends: cdbs, debhelper (>= 5.0.0), asciidoc, python, python-support, python-setuptools +Build-Depends: cdbs, debhelper (>= 5.0.0), asciidoc, python, dh-python, python-setuptools Homepage: http://ansible.github.com/ Package: ansible Architecture: all -Depends: python, python-support (>= 0.90), python-jinja2, python-yaml, python-paramiko, python-httplib2, python-six, python-crypto (>= 2.6), python-setuptools, sshpass, ${misc:Depends} +Depends: python-jinja2, python-yaml, python-paramiko, python-httplib2, python-six, python-crypto (>= 2.6), python-setuptools, sshpass, ${misc:Depends}, ${python:Depends} Description: A radically simple IT automation platform A radically simple IT automation platform that makes your applications and systems easier to deploy. Avoid writing scripts or custom code to deploy and diff --git a/packaging/debian/rules b/packaging/debian/rules index 1b4a1575c91..f5894b7a43b 100755 --- a/packaging/debian/rules +++ b/packaging/debian/rules @@ -1,6 +1,7 @@ #!/usr/bin/make -f # -- makefile -- +DEB_PYTHON2_MODULE_PACKAGES=ansible + include /usr/share/cdbs/1/rules/debhelper.mk -DEB_PYTHON_SYSTEM = pysupport include /usr/share/cdbs/1/class/python-distutils.mk From de2fe08d9f5db3509fa0f4c24c705f33f3a68340 Mon Sep 17 00:00:00 2001 From: Evgeni Golov Date: Thu, 17 Mar 2016 18:28:23 +0100 Subject: [PATCH 3/4] update README.md --- packaging/debian/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packaging/debian/README.md b/packaging/debian/README.md index f170c13333f..22e584ff5c7 100644 --- a/packaging/debian/README.md +++ b/packaging/debian/README.md @@ -4,7 +4,7 @@ Ansible Debian Package To create an Ansible DEB package: sudo apt-get install python-paramiko python-yaml python-jinja2 python-httplib2 python-setuptools python-six sshpass - sudo apt-get install cdbs debhelper dpkg-dev git-core reprepro python-support fakeroot asciidoc devscripts docbook-xml xsltproc + sudo apt-get install cdbs debhelper dpkg-dev git-core reprepro dh-python fakeroot asciidoc devscripts docbook-xml xsltproc libxml2-utils git clone git://github.com/ansible/ansible.git cd ansible make deb From 0cdbc8b48da32ad706f89ffb58d09a27b8dd8965 Mon Sep 17 00:00:00 2001 From: Evgeni Golov Date: Fri, 18 Mar 2016 11:07:23 +0100 Subject: [PATCH 4/4] backwards compat for python-support on old Debian/Ubuntu releases --- packaging/debian/README.md | 7 ++++++- packaging/debian/control | 2 +- packaging/debian/rules | 3 +++ 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/packaging/debian/README.md b/packaging/debian/README.md index 22e584ff5c7..1561d854f8d 100644 --- a/packaging/debian/README.md +++ b/packaging/debian/README.md @@ -4,11 +4,16 @@ Ansible Debian Package To create an Ansible DEB package: sudo apt-get install python-paramiko python-yaml python-jinja2 python-httplib2 python-setuptools python-six sshpass - sudo apt-get install cdbs debhelper dpkg-dev git-core reprepro dh-python fakeroot asciidoc devscripts docbook-xml xsltproc libxml2-utils + sudo apt-get install cdbs debhelper dpkg-dev git-core reprepro fakeroot asciidoc devscripts docbook-xml xsltproc libxml2-utils + sudo apt-get install dh-python git clone git://github.com/ansible/ansible.git cd ansible make deb +On older releases that do not have `dh-python` (like Ubuntu 12.04), install `python-support` instead: + + sudo apt-get install python-support + The debian package file will be placed in the `../` directory. This can then be added to an APT repository or installed with `dpkg -i `. Note that `dpkg -i` does not resolve dependencies. diff --git a/packaging/debian/control b/packaging/debian/control index e5dc2d44970..c6b699d798b 100644 --- a/packaging/debian/control +++ b/packaging/debian/control @@ -3,7 +3,7 @@ Section: admin Priority: optional Standards-Version: 3.9.3 Maintainer: Ansible, Inc. -Build-Depends: cdbs, debhelper (>= 5.0.0), asciidoc, python, dh-python, python-setuptools +Build-Depends: cdbs, debhelper (>= 5.0.0), asciidoc, python, dh-python | python-support, python-setuptools Homepage: http://ansible.github.com/ Package: ansible diff --git a/packaging/debian/rules b/packaging/debian/rules index f5894b7a43b..3ebffe5c838 100755 --- a/packaging/debian/rules +++ b/packaging/debian/rules @@ -2,6 +2,9 @@ # -- makefile -- DEB_PYTHON2_MODULE_PACKAGES=ansible +ifneq ($(shell dpkg-query -f '$${Version}' -W python-support 2>/dev/null),) +DEB_PYTHON_SYSTEM=pysupport +endif include /usr/share/cdbs/1/rules/debhelper.mk include /usr/share/cdbs/1/class/python-distutils.mk