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

Thomas Goirand thomas at goirand.fr
Mon May 11 21:46:45 UTC 2015



On 05/07/2015 01:43 PM, Malihe Asemani wrote:
> Hey All,
>
> Thank you Thomas and Andreas. The comments were very helpful.
> Andreas, I renamed manila_Mali to manila on server. I tried to create a
> list of task based on your and Thomas's comments. They are:
>
>     1.  Merge new upstream version to current git
>     2. rip-off Ubuntu part of changelog, and create just one entry as first
>     debian members work on Manila
>     3. Update Uploades field in Control file
>     4. Remove Orig Recipe from rules file
>     5. add OSLO_PACKAGE_VERSION to rule file
>     6. Move python-pbr from Build-Depends-Indep to Build-Depends in control
>     file
>     7. adapt watch file in such a way to be compatible with
>     tag-base-packaging
>     8. Use pkgos-reqsdiff to check and correct Manila dependencies

pkgos-reqsdiff wouldn't work because you didn't run
# wrap-and-sort -t -a

Once I did, pkgos-reqsdiff worked perfectly, and showed numerous issues 
in the dependencies, like lack of version numbers in some the 
dependencies. It also shows the difference when packaging Oslo 
libraries, with Canonical using python-oslo-* instead of python-oslo. 
(ie: dash instead of dot). This has to be fixed. Note that this is due 
to upstream OpenStack project doing lots of funny things with renaming 
of libraries, namespace fun and so on, so I do understand how Canonical 
team may have done a mistake here.

Some are just errors which shall be corrected: wrong version, or missing 
build-dependencies, or (build-)depends on python-migrate when only 
Alembic is in use, etc.

Last, it pkgos-reqsdiff also shows versions which you don't need as 
Jessie was released. For example, Jessie has python-babel 1.3, so you 
don't need the "(>= 1.3)" bits of the (build-)depends. Maybe Canonical 
is maintaining this to retain support for Precise, I don't know... but 
for Debian, we currently only care about Jessie from now on.

Another thing which shall be done, is providing a correct default 
configuration file for Manila. To generate the file, you should look at 
how its done in the tox.ini. In there, you'll see:

oslo-config-generator --config-file etc/oslo-config-generator/manila.conf

This translates into:

mkdir -p $(CURDIR)/debian/manila-common/usr/share/manila-common
oslo-config-generator \
	--output-file \
	$(CURDIR)/debian/manila-common/usr/share/manila-common \
	--namespace manila \
	--namespace oslo.messaging \
	--namespace oslo.db \
	--namespace oslo.db.concurrency \
	--namespace keystonemiddleware.auth_token

then in debian/manila-common.postinst.in, you should so something like this:

pkgos_write_new_conf manila manila.conf

Again, have a look into the cinder package to see how we're using 
/usr/share/openstack-pkg-tools/pkgos_insert_include pkgos_func 
cinder-common.postinst in the debian/rules file, and how the 
cinder-common.postinst is done (ie: having a #PKGOS-INCLUDE# which will 
be replaced by a set of shell functions from openstack-pkg-tools). You 
have to do this way to make sure /etc/manila/manila.conf has the correct 
unix rights (ie: owned by the manila user, not world readable...). I'm 
not sure if Ubuntu packages care about this or not... I believe they don't.

So as I wrote: don't just trust blindly what comes from Canonical. We 
don't do things the same way.

> Until now, I have done the first 7 steps, and pushed the results on git.

Please run "wrap-and-sort -t -a" and try pkgos-reqsdiff. Remember that 
this tool shouldn't be trusted blindly. Some dependencies that aren't in 
the requirements.txt / test-requirements.txt will not appear, and often, 
upstream does mistakes (just today, I've fixed a missing WebOb 
dependency in upstream oslo.versionnedobjects ...).

> The current result of pkgos-bop on Manila is attached. An error related to
> pyversions is still remained:
> "...
> pyversions: missing X(S)-Python-Version in control file, fall back to
> debian/pyversions
> pyversions: missing debian/pyversions file, fall back to supported versions
> running clean
> 'build/lib.linux-x86_64-2.7' does not exist -- can't clean it ...."

These are warning which you should ignore.

> And another noticeable part is:
> "...
> E: Core build dependencies not satisfied; skipping
> gbp:error: 'sbuild -v --no-apt-update' failed: it exited with 3
> ..."
>
> I guess I should do step 8 (I mean pkgos-reqsdiff), to be able to resolve
> this dependency issue. What do you think?

Correct. You should start to rename all oslo- (dash) to oslo. (dot).

> BTW, cinder watch file reads from https://github.com/openstack/*nova*/tags.
> I think it should be changed to https://github.com/openstack/*cinder*/tags

Thanks, I've fixed it in the Git repo for Cinder.

Cheers,

Thomas Goirand (zigo)



More information about the Openstack-devel mailing list