Comment 2 for bug 1057560

Revision history for this message
Thomas Goirand (thomas-goirand) wrote :

Hi,

Indeed, we also have the problem when doing the Debian (eg: not Ubuntu, really Debian) packaging of Openstack. We aren't using release tarballs and bzr, but git and git-buildpackage. As a result, oslo / openstack assuming that if there's a ".git" file, it's fine to do git calls is a very wrong assumption. Here's the result of git-buildpackage with an up-to-date setup.py from Oslo:

<email address hidden> ~/openstack-auto-builder/sources/ceilometer/ceilometer$ git-buildpackage
debian/rules:30: warning: overriding commands for target `override_dh_gencontrol'
/usr/share/openstack-pkg-tools/pkgos.make:62: warning: ignoring old commands for target `override_dh_gencontrol'
dh clean --with python2
   dh_testdir
   debian/rules override_dh_auto_clean
make[1]: Entering directory `/home/zigo/openstack-auto-builder/sources/ceilometer/ceilometer'
debian/rules:30: warning: overriding commands for target `override_dh_gencontrol'
/usr/share/openstack-pkg-tools/pkgos.make:62: warning: ignoring old commands for target `override_dh_gencontrol'
dh_auto_clean
Could not create directory '/root/.ssh'.
The authenticity of host 'git.debian.org (217.196.43.140)' can't be established.
RSA key fingerprint is 8c:c0:b8:9f:0a:79:ee:1c:77:c4:b8:a1:70:55:b7:31.
Are you sure you want to continue connecting (yes/no)?

because of the use of fakeroot, and the fact that there's a .git folder (as I'm building with git-buildpackage), ceilometer/openstack/common/setup.py clean target tries to do "git fetch" thinking it's root.

That wouldn't be too much of a problem if this wasn't in the clean target. The problem is that git-buildpackage calls clean *before* applying any patches in debian/patches. So the result is that we have no choice but to patch upstream branch, which of course, we do not want to do.

Julien Danjou's patch here: https://review.openstack.org/#/c/16547/

fixes the problem, and I would really much like to have it applied.

Also, as a general rule, *please* do not do network access or git calls in Olso, *even* if we are running in a git checkout. I would also much much love to have the MANIFEST.py and the upstream ChangeLog file to be in a good condition after a "git pull". I can live with the ChangeLog thing, but the MANIFEST.py generated with git ls-files has annoyed us really a lot when doing the Debian packaging over Git. We currently carry a patch in debian/patches to have a correct MANIFEST.py, which we need to refresh when packaging a new version. It'd be great to stop using this dangerous hack where files might be forgotten.

I hope this will helps to have things to move in the correct direction,

Thomas Goirand (zigo)