[PKG-Openstack-devel] [MoM] Packaging manila

Thomas Goirand thomas at goirand.fr
Sat May 2 22:41:23 UTC 2015



On 05/02/2015 06:35 PM, Malihe Asemani wrote:
> Hi Andreas,
>
> I started from reading /usr/bin/pkgos-setup-sbuild and trying to understand
> what is it doing. finally, I could run  "sudo pkgos-setup-sbuild dev mali"
> (I used sudo because the script manipulates some config files and needs
> permission for doing that).
> hmmm.... let me confess I had some problems with lines 375 & 376:
>
>      su ${THE_DEV_USER} -c pkgos-scan-repo
>      su ${THE_DEV_USER} -c pkgos-scan-repo ${REPO_NOCHANGE_BACKPORT_DEST}
>
> These commands complain about permissions when they are trying to upload
> packages on repo. I ran the command manually by root user and it worked
> correctly. finally I commented lines 375 and 376.
> Anyway, these commands are trying to upload some build-ed packages on repo,
> AFAIU. So, they are not our current concern, I guess.
>
>   Afterwards, I ran pkgos-bop in manila again. git-buildpakage used sbuild
> this time  and the current result is:
>
> gbp:info: Exporting 'HEAD' to '/home/mali/build-area/manila-tmp'
> gbp:info: Moving '/home/mali/build-area/manila-tmp' to
> '/home/mali/build-area/manila-2015.1~rc2'
> debian/rules:12: warning: overriding recipe for target 'get-orig-source'
> /usr/share/openstack-pkg-tools/pkgos.make:76: warning: ignoring old recipe
> for target 'get-orig-source'
> dh clean --with python2,systemd
>     dh_testdir
>     debian/rules override_dh_auto_clean
> make[1]: Entering directory '/home/mali/build-area/manila-2015.1~rc2'
> debian/rules:12: warning: overriding recipe for target 'get-orig-source'
> /usr/share/openstack-pkg-tools/pkgos.make:76: warning: ignoring old recipe
> for target 'get-orig-source'
> dh_auto_clean
> pyversions: missing X(S)-Python-Version in control file, fall back to
> debian/pyversions
> pyversions: missing debian/pyversions file, fall back to supported versions
> error in setup command: Error parsing
> /home/mali/build-area/manila-2015.1~rc2/setup.cfg: Exception: Versioning
> for this project requires either an sdist tarball, or access to an upstream
> git repository. Are you sure that git is installed?
> dh_auto_clean: python setup.py clean -a returned exit code 1
> debian/rules:20: recipe for target 'override_dh_auto_clean' failed
> make[1]: *** [override_dh_auto_clean] Error 1
> make[1]: Leaving directory '/home/mali/build-area/manila-2015.1~rc2'
> debian/rules:9: recipe for target 'clean' failed
> make: *** [clean] Error 2
> E: Failed to clean source directory /home/mali/build-area/manila-2015.1~rc2
> (/home/mali/build-area/manila_2015.1~rc2-0~bpo80+1.dsc)
> gbp:error: 'sbuild -v --no-apt-update' failed: it exited with 1
> HEAD is now at c583895 Change package version in changelog
> There was an error when bop called git-buildpackage: exiting.

The relevant part is:
 > for this project requires either an sdist tarball, or access to an
 > upstream git repository. Are you sure that git is installed?

You need to add:
export OSLO_PACKAGE_VERSION=$(VERSION)

just after the line:
include /usr/share/openstack-pkg-tools/pkgos.make

so that pbr knows which version we're packaging. Otherwise, it tries to 
gess it using Git, which doesn't work.

> I'm trying to solve this problem.
> Indeed your help would be most welcome :)

This one is a though one, and I don't think you could guess! :)
The env var above exists because I discussed it with upstream. Ubuntu 
people don't have the issue, because they are using tarballs with bzr 
instead of git packaging, and then PBR detect things differently. The 
OSLO_PACKAGE_VERSION just overrides it...

BTW, you will have another issue if you don't move python-pbr from 
Build-Depends-Indep to Build-Depends (which IMO is a mistake in the 
Ubuntu package), so do that before you attempt another build.

Cheers,

Thomas Goirand (zigo)



More information about the Openstack-devel mailing list