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

Thomas Goirand thomas at goirand.fr
Sat May 2 22:34:01 UTC 2015


On 05/02/2015 09:56 AM, Malihe Asemani wrote:
> Firstly, I should say I installed *openstack-pkg-tools* from Experimental
> Repository, but there was not /usr/bin/pkgos-pob on system after installing
> the package. After a little search I found out Thomas has added a link for
> openstack-package-tools on *http://openstack.alioth.debian.org/
> <http://openstack.alioth.debian.org/>*
> So, I did 'wget' on "
> http://kilo-jessie.pkgs.mirantis.com/debian/pool/jessie-kilo-backports/main/o/openstack-pkg-tools",
> then installed the package and its dependencies.
>
> The result of running pkgso-bop on Manila in this state was:
>
> mali at buildEnv:/home/mali/manila$ pkgos-bop
> ===> Cleaning-up old builds
> 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'

There we go.. Please remove the get-orig-source from the debian/rules 
file. This comes from Ubuntu, and we don't want it there, since we're 
using openstack-pkg-tools.

> git tag -v 2015.1_b2 || true
> error: tag '2015.1_b2' not found.
> if [ ! -f ../manila_2015.1~b2.orig.tar.xz ] ; then \
>          git archive --prefix=manila-2015.1~b2/ 2015.1_b2 | xz
>> ../manila_2015.1~b2.orig.tar.xz ; \
> fi
> [ ! -e ../build-area ] && mkdir ../build-area || true
> [ ! -e ../build-area/manila_2015.1~b2.orig.tar.xz ] && cp
> ../manila_2015.1~b2.orig.tar.xz ../build-area

First, please start with a *blank* debian/changelog. That is, something 
like this:

manila (2015.1.0-1) unstable; urgency=medium

   * Initial release (Closes: #XXXXXX).

  -- Malihe Asemani <ml.asemani at gmail.com>  Thu, 19 Mar 2015 14:35:23 +0000

Then, make sure that the version describe on top of your 
debian/changelog matches the tag which you want to package (otherwise, 
the tarball creation will *not* work).


> I noticed to 3 part of the result:
>
>     - 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' : I checked pkgos.make and
>     found "get-orig-source recipe". I wondered if it is better to remove
>     'get-orig-source' from manila/debian/rule or not?

Yes, do that.

>     - error: tag '2015.1_b2' not found. reading pkgos.make, I found out the
>     code finds the last tag of package from last entry of changelog. The lasts
>     entry on changelog was some s/th like "manila (2015.1~b2-0ubuntu1) " so the
>     script try to find tag 2015.1_b2. Therefore, I added an entry to
>     changelog like this "manila (2015.1~rc2-0)" (BTW, It seems the
>     tag 2015.1.0rc2 should be re-tagged by  2015.1_rc2 instead
>     of  2015.1.0_rc2. Do u agree?)

Yes, but debian/changelog is describing changes in Debian, not in Ubuntu 
(and it's intent is to inform Debian users, who probably don't care much 
about what happened before the package was introduced in Debian). So 
please rip-off entries prior the one you're doing.

>     - Unmet build dependencies: so, I installed the proposed packages to
>     resolve dependency issues.

If you're using pkgos-bop, this means you're using sbuild, and therefor, 
you shouldn't care much about build-dependencies which will be installed 
by sbuild.

I strongly suggest that you follow the instructions in the chapter 
"tl;dr: I just want to build an OpenStack package" at the same URL: 
http://openstack.alioth.debian.org/

This will tell you how to setup sbuild for building packages.

> E: Unable to locate package python-manilaclient
> E: Unable to locate package python-oslo-concurrency
> E: Package 'python-oslo-config' has no installation candidate
> E: Unable to locate package python-oslo-context
> E: Unable to locate package python-oslo-db
> E: Unable to locate package python-oslo-i18n
> E: Unable to locate package python-oslo-messaging
> E: Unable to locate package python-oslo-rootwrap
> E: Unable to locate package python-oslo-serialization
> E: Unable to locate package python-oslo-utils
>
> I removed the packages which were not on the repository, from list of
> packaged that should be installed, and installed the other packages.

You should *not* remove the above packages from build-depends, they are 
needed. But at the same time, you shouldn't just trust what is done in 
Ubuntu. In here, it's quite wrong. The tool "pkgos-reqsdiff" that I 
created reads requirements.txt and test-requirements.txt from upstream, 
and generates a diff (note: you need to run "wrap-and-sort -t -a" to 
reformat debian/control and for the output of pkgos-reqsdiff to be 
correct). Here's its output:

# pkgos-reqsdiff
--- /tmp/pkgos-reqsdiff1.sh3OVS	2015-05-03 00:24:49.431254768 +0200
+++ /tmp/pkgos-reqsdiff1.TB3rjb	2015-05-03 00:24:52.771240568 +0200
@@ -1,86 +1,86 @@
-Build-Depends: debhelper (>= 9~),
+Build-Depends: debhelper (>= 9),
                 dh-python,
                 dh-systemd,
-               openstack-pkg-tools (>= 21ubuntu5~),
-               python-all (>= 2.6),
+               openstack-pkg-tools (>= 23~),
+               python-all,
+               python-pbr,
+               python-setuptools,
+               python-sphinx,
  Build-Depends-Indep: alembic (>= 0.7.2),
-                     python-amqplib,
-                     python-anyjson,
-                     python-babel (>= 1.3),
-                     python-cinderclient,
-                     python-ddt (>= 1.0.0),
+                     python-babel,
+                     python-bashate,
+                     python-cinderclient (>= 1:1.1.0),
+                     python-coverage,
+                     python-ddt,
                       python-eventlet (>= 0.16.1),
-                     python-glanceclient,
-                     python-greenlet (>= 0.3.2),
+                     python-fixtures,
+                     python-greenlet,
                       python-hacking,
-                     python-hp3parclient,
-                     python-httplib2 (>= 0.7.5),
+                     python-httplib2,
                       python-iso8601,
-                     python-keystoneclient,
+                     python-keystonemiddleware (>= 1.5.0),
                       python-lxml,
-                     python-manilaclient,
-                     python-migrate,
                       python-mock,
-                     python-mox,
-                     python-neutronclient,
-                     python-nose,
-                     python-novaclient,
-                     python-oslo-concurrency (>= 1.4.1),
-                     python-oslo-config (>= 1.6.0),
-                     python-oslo-context (>= 0.1.0),
-                     python-oslo-db (>= 1.4.1),
-                     python-oslo-i18n (>= 1.3.0),
-                     python-oslo-messaging (>= 1.4.0),
-                     python-oslo-rootwrap (>= 1.3.0),
-                     python-oslo-serialization (>= 1.2.0),
-                     python-oslo-utils (>= 1.2.0),
-                     python-oslotest,
+                     python-mysqldb,
+                     python-netaddr,
+                     python-neutronclient (>= 2.3.11),
+                     python-novaclient (>= 2:2.22.0),
+                     python-oslo.concurrency (>= 1.8.0),
+                     python-oslo.config (>= 1:1.9.3),
+                     python-oslo.context (>= 0.2.0),
+                     python-oslo.db (>= 1.7.0),
+                     python-oslo.i18n (>= 1.5.0),
+                     python-oslo.log (>= 1.0.0),
+                     python-oslo.messaging (>= 1.8.0),
+                     python-oslo.rootwrap (>= 1.6.0),
+                     python-oslo.serialization (>= 1.4.0),
+                     python-oslo.utils (>= 1.4.0),
+                     python-oslosphinx (>= 2.5.0),
+                     python-oslotest (>= 1.5.1),
                       python-paramiko,
                       python-paste,
                       python-pastedeploy,
-                     python-pbr,
+                     python-psycopg2,
+                     python-requests,
+                     python-requests-mock (>= 0.6.0),
                       python-routes,
-                     python-six,
+                     python-six (>= 1.9.0),
                       python-sqlalchemy,
-                     python-stevedore,
-                     python-swiftclient,
-                     python-testresources,
+                     python-stevedore (>= 1.3.0),
                       python-testtools,
                       python-webob,
                       subunit,
                       testrepository,
-Depends: python-amqplib,
-         python-anyjson,
+Depends: alembic (>= 0.7.2),
           python-babel,
-         python-eventlet,
-         python-glanceclient,
+         python-cinderclient (>= 1:1.1.0),
+         python-eventlet (>= 0.16.1),
           python-greenlet,
+         python-httplib2,
           python-iso8601,
-         python-keystoneclient,
-         python-kombu,
-         python-lockfile,
+         python-keystonemiddleware (>= 1.5.0),
           python-lxml,
-         python-manilaclient,
-         python-migrate,
-         python-neutronclient,
-         python-novaclient,
-         python-oslo-concurrency (>= 1.4.1),
-         python-oslo-config (>= 1.6.0),
-         python-oslo-context (>= 0.1.0),
-         python-oslo-db (>= 1.4.1),
-         python-oslo-i18n (>= 1.3.0),
-         python-oslo-messaging (>= 1.4.0),
-         python-oslo-rootwrap (>= 1.3.0),
-         python-oslo-serialization (>= 1.2.0),
-         python-oslo-utils (>= 1.2.0),
+         python-netaddr,
+         python-neutronclient (>= 2.3.11),
+         python-novaclient (>= 2:2.22.0),
+         python-oslo.concurrency (>= 1.8.0),
+         python-oslo.config (>= 1:1.9.3),
+         python-oslo.context (>= 0.2.0),
+         python-oslo.db (>= 1.7.0),
+         python-oslo.i18n (>= 1.5.0),
+         python-oslo.log (>= 1.0.0),
+         python-oslo.messaging (>= 1.8.0),
+         python-oslo.rootwrap (>= 1.6.0),
+         python-oslo.serialization (>= 1.4.0),
+         python-oslo.utils (>= 1.4.0),
           python-paramiko,
           python-paste,
           python-pastedeploy,
+         python-requests,
           python-routes,
+         python-six (>= 1.9.0),
           python-sqlalchemy,
-         python-stevedore,
-         python-suds,
-         python-swiftclient,
+         python-stevedore (>= 1.3.0),
           python-webob,
           ${misc:Depends},
           ${python:Depends},

As you see, there's lots of changes that needs to happen, and Chuck 
Short seems to have done some obvious mistakes, like putting python-pbr 
in Build-Depends-Indep when it should be in Build-Depends (as it's 
needed by the clean target), adding version for python-babel depends 
when it's not needed even in Trusty, and much more...

So please don't just trust blindly what's done in Ubuntu, it's sometimes 
not right.

> dpkg-buildpackage: warning: (Use -d flag to override.)
> debuild: fatal error at line 1376:
> dpkg-buildpackage -rfakeroot -D -us -uc -i -I failed
> gbp:error: 'debuild -i -I' failed: it exited with 29
> HEAD is now at 73cc358 Add gbp.conf
> There was an error when bop called git-buildpackage: exiting.
>
> I don t know how can I resolve the remained dependencies problems.

You haven't setup your environment with pkgos-setup-sbuild, so pkgos-bop 
doesn't work...

> After doing these steps, I checked '*http://openstack.alioth.debian.org/
> <http://openstack.alioth.debian.org/>*' page again. Thomas has mentioned
> there that before doing a build for openstack packges, run
> 'pkgos-setup-sbuild dev USER_NAME'. So, I did it. But I had different
> problems with this script every time that i tried to run it.

Please let me know what issue.

> I guess I should read about sbuild and how it works. I am doing packaging
> on a debootstrap-ed jessie. It seems sbuild do a debootstrap too.

Yes, and you wont need to use your debootstrap-ed jessie env anymore.

> I need to
> know what does 'setup-sbuild dev USER_NAME' do, exactly, to be able to
> resolve its issue.

You can just read the script...

> Or I can just forget setup-sbuild for now, and continue resolving
> dependencies problems when run 'pkos-bop' in manila dir.
> which one is better to be selected as next step, in ur mind?

It's IMO much better if you succeed using sbuild, because it will ensure 
you always have a clean env for building.

Cheers,

Thomas Goirand (zigo)



More information about the Openstack-devel mailing list