# new developer: make deb

**URL:** <https://forum.ansible.com/t/new-developer-make-deb/26934>\
**Category:** Ansible Developer\
**Tags:** galaxy-ng\
**Created:** [March 8, 2018, 11:38am UTC](https://forum.ansible.com/t/new-developer-make-deb/26934 "2018-03-08T11:38:04Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Altug\_Tekin](https://avatars.discourse-cdn.com/v4/letter/a/90ced4/32.png) [@Altug\_Tekin](https://forum.ansible.com/u/Altug_Tekin)\
**Post date:** [March 8, 2018, 11:38am UTC](https://forum.ansible.com/t/new-developer-make-deb/26934/1 "2018-03-08T11:38:04Z")

</div>

Hi,

I am new to the Ansible github project. Hope this is not a stupid question…

I want to get accustomed to the basic development workflow on my local machine.

I checked out the github repository and executed make deb:

**1. git clone [https://github.com/ansible/ansible.git](https://github.com/ansible/ansible.git)**

**2. cd ansible/**

I edited some portion of the code and now I want to use the new code base:

**3. make deb**

_The output of make is as follows:_

**Cleaning up distutils stuff**  
**rm -rf build**  
**rm -rf dist**  
**rm -rf lib/ansible.egg-info/**  
**Cleaning up byte compiled python stuff**  
**find . -type f -regex “.\*.py[co]$” -delete**  
**find . -type d -name “pycache” -delete**  
**Cleaning up editor backup files**  
**find . -type f -not -path ./test/units/inventory\_test\_data/group\_vars/noparse/all.yml~ ( -name “_~" -or -name "#_” ) -delete**  
**find . -type f ( -name “\*.swp” ) -delete**  
**Cleaning up manpage stuff**  
**find ./docs/man -type f -name “\*.xml” -delete**  
**find ./docs/man -type f -name “\*.asciidoc” -delete**  
**find ./docs/man/man3 -type f -name “\*.3” -delete**  
**rm -f ./docs/man/man1/\***  
**Cleaning up output from test runs**  
**rm -rf test/test\_data**  
**rm -rf shippable/**  
**rm -rf logs/**  
**rm -rf .cache/**  
**rm -f test/units/.coverage\***  
**rm -rf test/results/_/_**  
**find test/ -type f -name ‘\*.retry’ -delete**  
**Cleaning up RPM building stuff**  
**rm -rf MANIFEST rpm-build**  
**Cleaning up Debian building stuff**  
**rm -rf debian**  
**rm -rf deb-build**  
**rm -rf docs/json**  
**rm -rf docs/js**  
**Cleaning up authors file**  
**rm -f AUTHORS.TXT**  
**Cleaning up docsite**  
**make -C docs/docsite clean**  
**make[1]: Entering directory ‘/home/my-user/workspace\_oxygen\_python/ansible/docs/docsite’**  
**rm -rf htmlout**  
**rm -rf module\_docs**  
**rm -rf \_build**  
**rm -f .buildinfo**  
**rm -f objects.inv**  
**rm -rf \*.doctrees**  
**Cleaning up minified css files**  
**find . -type f -name “\*.min.css” -delete**  
**Cleaning up byte compiled python stuff**  
**find . -regex “.\*.py[co]$” -delete**  
**Cleaning up editor backup files**  
**find . -type f ( -name “_~" -or -name "#_” ) -delete**  
**find . -type f ( -name “\*.swp” ) -delete**  
**Cleaning up generated rst**  
**rm rst/cli/ansible-\*.rst**  
**rm: cannot remove ‘rst/cli/ansible-\*.rst’: No such file or directory**  
**Makefile:47: recipe for target ‘clean’ failed**  
**make[1]: [clean] Error 1 (ignored)**  
**rm rst/cli/ansible.rst**  
**rm: cannot remove ‘rst/cli/ansible.rst’: No such file or directory**  
**Makefile:47: recipe for target ‘clean’ failed**  
**make[1]: [clean] Error 1 (ignored)**  
**rm rst/modules/_\_by\_category.rst_**  
 _ **rm: cannot remove 'rst/modules/** _ **_by\_category.rst’: No such file or directory_**  
 _ **Makefile:47: recipe for target ‘clean’ failed**  
 **make[1]: [clean] Error 1 (ignored)**  
 **rm rst/modules/list\_of** _ **_.rst_**  
 _ **rm: cannot remove 'rst/modules/list\_of\_** _ **.rst’: No such file or directory**  
**Makefile:47: recipe for target ‘clean’ failed**  
**make[1]: [clean] Error 1 (ignored)**  
**rm rst/modules/_\_maintained.rst_**  
 _ **rm: cannot remove 'rst/modules/** _ **\_maintained.rst’: No such file or directory**  
**Makefile:47: recipe for target ‘clean’ failed**  
**make[1]: [clean] Error 1 (ignored)**  
**rm rst/modules/_\_module.rst_**  
 _ **rm: cannot remove 'rst/modules/** _ **\_module.rst’: No such file or directory**  
**Makefile:47: recipe for target ‘clean’ failed**  
**make[1]: [clean] Error 1 (ignored)**  
**rm rst/modules/_\_plugin.rst_**  
 _ **rm: cannot remove 'rst/modules/** _ **_plugin.rst’: No such file or directory_**  
 _ **Makefile:47: recipe for target ‘clean’ failed**  
 **make[1]: [clean] Error 1 (ignored)**  
 **rm rst/playbooks\_directives.rst**  
 **rm: cannot remove ‘rst/playbooks\_directives.rst’: No such file or directory**  
 **Makefile:47: recipe for target ‘clean’ failed**  
 **make[1]: [clean] Error 1 (ignored)**  
 **rm rst/plugins//.rst**  
 **rm: cannot remove ‘rst/plugins//.rst’: No such file or directory**  
 **Makefile:47: recipe for target ‘clean’ failed**  
 **make[1]: [clean] Error 1 (ignored)**  
 **rm rst/reference\_appendices/config.rst**  
 **rm: cannot remove ‘rst/reference\_appendices/config.rst’: No such file or directory**  
 **Makefile:47: recipe for target ‘clean’ failed**  
 **make[1]: [clean] Error 1 (ignored)**  
 **rm rst/reference\_appendices/playbooks\_keywords.rst**  
 **rm: cannot remove ‘rst/reference\_appendices/playbooks\_keywords.rst’: No such file or directory**  
 **Makefile:47: recipe for target ‘clean’ failed**  
 **make[1]: [clean] Error 1 (ignored)**  
 **make[1]: Leaving directory ‘/home/my-user/workspace\_oxygen\_python/ansible/docs/docsite’**  
 **make -C docs/api clean**  
 **make[1]: Entering directory ‘/home/my-user/workspace\_oxygen\_python/ansible/docs/api’**  
 **rm -rf build/**  
\_\_rm -rf rst/.rst_  
**make[1]: Leaving directory ‘/home/my-user/workspace\_oxygen\_python/ansible/docs/api’**  
\*_mkdir -p ./docs/man/man1/ ; \*_  
**PYTHONPATH=./lib docs/bin/generate\_man.py --template-file=docs/templates/man.j2 --output-dir=docs/man/man1/ --output-format man lib/ansible/cli/\*.py**  
**Wrote doc to /home/my-user/workspace\_oxygen\_python/ansible/docs/man/man1/ansible-pull.1.asciidoc.in**  
**Wrote doc to /home/my-user/workspace\_oxygen\_python/ansible/docs/man/man1/ansible-console.1.asciidoc.in**  
**Wrote doc to /home/my-user/workspace\_oxygen\_python/ansible/docs/man/man1/ansible-doc.1.asciidoc.in**  
**Wrote doc to /home/my-user/workspace\_oxygen\_python/ansible/docs/man/man1/ansible.1.asciidoc.in**  
**Wrote doc to /home/my-user/workspace\_oxygen\_python/ansible/docs/man/man1/ansible-inventory.1.asciidoc.in**  
**Wrote doc to /home/my-user/workspace\_oxygen\_python/ansible/docs/man/man1/ansible-vault.1.asciidoc.in**  
**Wrote doc to /home/my-user/workspace\_oxygen\_python/ansible/docs/man/man1/ansible-config.1.asciidoc.in**  
**Wrote doc to /home/my-user/workspace\_oxygen\_python/ansible/docs/man/man1/ansible-galaxy.1.asciidoc.in**  
**Wrote doc to /home/my-user/workspace\_oxygen\_python/ansible/docs/man/man1/ansible-playbook.1.asciidoc.in**  
**make ./docs/man/man1/ansible-vault.1 ./docs/man/man1/ansible.1 ./docs/man/man1/ansible-playbook.1 ./docs/man/man1/ansible-config.1 ./docs/man/man1/ansible-inventory.1 ./docs/man/man1/ansible-console.1 ./docs/man/man1/ansible-doc.1 ./docs/man/man1/ansible-pull.1 ./docs/man/man1/ansible-galaxy.1**  
**make[1]: Entering directory ‘/home/my-user/workspace\_oxygen\_python/ansible’**  
**sed “s/%VERSION%/2.6.0/” docs/man/man1/ansible-vault.1.asciidoc.in \> docs/man/man1/ansible-vault.1.asciidoc**  
**ERROR: AsciiDoc ‘a2x’ command is not installed but is required to build ./docs/man/man1/ansible-vault.1 ./docs/man/man1/ansible.1 ./docs/man/man1/ansible-playbook.1 ./docs/man/man1/ansible-config.1 ./docs/man/man1/ansible-inventory.1 ./docs/man/man1/ansible-console.1 ./docs/man/man1/ansible-doc.1 ./docs/man/man1/ansible-pull.1 ./docs/man/man1/ansible-galaxy.1**  
**Makefile:151: recipe for target ‘docs/man/man1/ansible-vault.1’ failed**  
**make[1]: \*\*\* [docs/man/man1/ansible-vault.1] Error 1**  
**rm docs/man/man1/ansible-vault.1.asciidoc**  
**make[1]: Leaving directory ‘/home/my-user/workspace\_oxygen\_python/ansible’**  
**Makefile:355: recipe for target ‘docs’ failed**  
**make: \*\*\* [docs] Error 2**

I think I get an error. What am I doing wrong?

---

<div class="post-metadata">

**Author:** ![Serge\_van\_Ginderacht](https://avatars.discourse-cdn.com/v4/letter/s/b782af/32.png) [@Serge\_van\_Ginderacht](https://forum.ansible.com/u/Serge_van_Ginderacht)\
**Post date:** [March 8, 2018, 11:47am UTC](https://forum.ansible.com/t/new-developer-make-deb/26934/2 "2018-03-08T11:47:36Z")

</div>

The error seems quite clear here:

**ERROR: AsciiDoc ‘a2x’ command is not installed but is required to build …**

**Serge**

---

<div class="post-metadata">

**Author:** ![Altug\_Tekin](https://avatars.discourse-cdn.com/v4/letter/a/90ced4/32.png) [@Altug\_Tekin](https://forum.ansible.com/u/Altug_Tekin)\
**Post date:** [March 8, 2018, 3:14pm UTC](https://forum.ansible.com/t/new-developer-make-deb/26934/3 "2018-03-08T15:14:18Z")

</div>

first thanks for your answer and sorry again for the next stupid question.

Ok I installed this stuff here:

**sudo apt-get install -y asciidoc libxslt1-dev docbook-xsl xsltproc libxml2-utils devscripts**

Now **make deb** fails here:

ansible-2.6.0/docs/docsite/\_static/basic.css  
ansible-2.6.0/docs/docsite/\_static/default.css  
ansible-2.6.0/docs/docsite/\_static/jquery.js  
ansible-2.6.0/docs/docsite/\_static/minus.png  
ansible-2.6.0/docs/docsite/\_static/bootstrap-scrollspy.js  
ansible-2.6.0/README.md  
ansible-2.6.0/setup.py  
ansible-2.6.0/VERSION  
debuild: unknown dpkg-buildpackage/debuild option: --source-option=-I  
dpkg-buildpackage -rfakeroot -d -us -uc --source-option=-I -S  
dpkg-buildpackage: source package ansible  
dpkg-buildpackage: source version 2.6.0-100.git201802270732.60a24bb.devel~unstable  
dpkg-buildpackage: source distribution unstable  
dpkg-buildpackage: source changed by Ansible, Inc. [info@ansible.com](mailto:info@ansible.com)  
dpkg-source -I --before-build ansible-2.6.0  
fakeroot debian/rules clean  
debian/rules:6: /usr/share/cdbs/1/rules/debhelper.mk: No such file or directory  
debian/rules:7: /usr/share/cdbs/1/class/python-distutils.mk: No such file or directory  
make: \*\*\* No rule to make target ‘/usr/share/cdbs/1/class/python-distutils.mk’. Stop.  
dpkg-buildpackage: error: fakeroot debian/rules clean gave error exit status 2  
debuild: fatal error at line 1376:  
dpkg-buildpackage -rfakeroot -d -us -uc --source-option=-I -S failed  
Makefile:317: recipe for target ‘deb-src’ failed  
make: \*\*\* [deb-src] Error 29

I am on Linux Mint 18.1 Serena/ Ubuntu 5.4.0-6ubuntu1~16.04.9 .

Any help setting up the basic workflow is appreciated. And again sorry for stupid questions. Just kick me out of the mailinglist if you want.

---

<div class="post-metadata">

**Author:** ![Kai\_Stian\_Olstad](https://avatars.discourse-cdn.com/v4/letter/k/e19adc/32.png) [@Kai\_Stian\_Olstad](https://forum.ansible.com/u/Kai_Stian_Olstad)\
**Post date:** [March 8, 2018, 6:57pm UTC](https://forum.ansible.com/t/new-developer-make-deb/26934/4 "2018-03-08T18:57:27Z")

</div>

You need to check the line Build-Depends: in file packaging/debian/control and install the requirement listed there.

---

<div class="post-metadata">

**Author:** ![Altug\_Tekin](https://avatars.discourse-cdn.com/v4/letter/a/90ced4/32.png) [@Altug\_Tekin](https://forum.ansible.com/u/Altug_Tekin)\
**Post date:** [March 9, 2018, 9:19am UTC](https://forum.ansible.com/t/new-developer-make-deb/26934/5 "2018-03-09T09:19:50Z")

</div>

Hey Thanks. Now here comes yet another stupid question.

Thanks to your hint to the file **packaging/debian/control** I have found the **README.md** file in the same folder.

I have proceded like its written there:

1. **apt-get install asciidoc cdbs debootstrap devscripts make pbuilder python-setuptools**
2. **git clone [https://github.com/ansible/ansible.git](https://github.com/ansible/ansible.git)**
3. **cd ansible**
4. **sudo su**
5. **DEB\_DIST=‘xenial trusty precise’ make deb**

Now I get this error:

**…**  
**dpkg-source: info: building ansible in ansible\_2.6.0-100.git201802270732.60a24bb.devel~precise.dsc**  
**dpkg-genchanges -S \>…/ansible\_2.6.0-100.git201802270732.60a24bb.devel~precise\_source.changes**  
**dpkg-genchanges: including full source code in upload**  
**dpkg-source -I --after-build ansible-2.6.0**  
**dpkg-buildpackage: source-only upload: Debian-native package**  
**Now running lintian…**  
**warning: the authors of lintian do not recommend running it with root privileges!**  
**W: ansible source: native-package-with-dash-version**  
**E: ansible source: source-is-missing docs/docsite/\_static/jquery.js line length is 517 characters (\>512)**  
**E: ansible source: source-is-missing docs/docsite/\_static/underscore.js line length is 530 characters (\>512)**  
**E: ansible source: source-is-missing docs/docsite/\_themes/sphinx\_rtd\_theme/static/js/modernizr.min.js**  
**E: ansible source: source-is-missing docs/docsite/\_themes/sphinx\_rtd\_theme/static/js/theme.js line length is 4287 characters (\>512)**  
**W: ansible source: debian-revision-not-well-formed 2.6.0-100.git201802270732.60a24bb.devel~precise**  
**W: ansible source: binary-nmu-debian-revision-in-source 2.6.0-100.git201802270732.60a24bb.devel~precise**  
**W: ansible source: ancient-standards-version 3.9.3 (current is 3.9.7)**  
**Finished running lintian.**

---

<div class="post-metadata">

**Author:** ![Altug\_Tekin](https://avatars.discourse-cdn.com/v4/letter/a/90ced4/32.png) [@Altug\_Tekin](https://forum.ansible.com/u/Altug_Tekin)\
**Post date:** [March 12, 2018, 8:39am UTC](https://forum.ansible.com/t/new-developer-make-deb/26934/6 "2018-03-12T08:39:31Z")

</div>

Hey,

I have also tried the build steps for the docker stuff:

1. **git clone [https://github.com/ansible/ansible.git](https://github.com/ansible/ansible.git)**
2. **cd ansible**
3. **docker build -t ansible-deb-builder -f packaging/debian/Dockerfile .**
4. **docker run --privileged -e DEB\_DIST=‘xenial’ -v $(pwd):/ansible ansible-deb-builder**

Resulting in another error:

…(retrieving lots of stuff, some fails)

_I: Retrieving zlib1g 1:1.2.8.dfsg-2ubuntu4_  
_I: Validating zlib1g 1:1.2.8.dfsg-2ubuntu4_  
_E: Couldn’t download packages: debianutils diffutils dpkg dpkg-dev e2fslibs e2fsprogs findutils g++ g+±5 gnupg gpgv grep gzip initscripts libacl1 libatomic1 libdpkg-perl libgcc1 libgcrypt20 libgdbm3 libisl15 liblsan0 liblz4-1 libmpx0 libncurses5 libncursesw5 libperl5.22 libquadmath0 libsemanage-common login make makedev mawk ncurses-bin perl sensible-utils systemd sysv-rc tzdata util-linux_  
_E: debootstrap failed_  
_W: Aborting with an error_  
_I: cleaning the build env_  
_I: removing directory /var/cache/pbuilder/build/369 and its subdirectories_  
_W: /root/.pbuilderrc does not exist_  
_I: Current time: Fri Mar 9 13:53:36 UTC 2018_  
_I: pbuilder-time-stamp: 1520603616_  
_I: Building the build Environment_  
_I: extracting base tarball [/var/cache/pbuilder/xenial-amd64-base.tgz]_

_gzip: stdin: unexpected end of file_  
_tar: Child returned status 1_  
_tar: Error is not recoverable: exiting now_  
_E: failed to extract /var/cache/pbuilder/xenial-amd64-base.tgz to /var/cache/pbuilder/build/3546_  
_W: /root/.pbuilderrc does not exist_  
_I: using fakeroot in build._  
_I: pbuilder: network access will be disabled during build_  
_I: Current time: Fri Mar 9 13:53:36 UTC 2018_  
_I: pbuilder-time-stamp: 1520603616_  
_I: Building the build Environment_  
_I: extracting base tarball [/var/cache/pbuilder/xenial-amd64-base.tgz]_

_gzip: stdin: unexpected end of file_  
_tar: Child returned status 1_  
_tar: Error is not recoverable: exiting now_  
_E: failed to extract /var/cache/pbuilder/xenial-amd64-base.tgz to /var/cache/pbuilder/build/3563_  
_Makefile:288: recipe for target ‘deb’ failed_  
_make: \*\*\* [deb] Error 1_

What can I do? Should I reinstall my OS?
