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

Thomas Goirand zigo at debian.org
Wed May 27 08:25:50 UTC 2015


On 05/26/2015 10:20 PM, Malihe Asemani wrote:
> Hi All,
> 
> On Tue, May 12, 2015 at 2:16 AM, Thomas Goirand <thomas at goirand.fr
> <mailto:thomas at goirand.fr>> wrote:
>> 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, 
> 
> Renaming of which libraries? I did not get how the last sentence is
> related to python-oslo.* ! would you please explain it a little bit more?

It is unfortunate that Ubuntu renamed python-oslo.<something> into
python-oslo-<something> (dash instead of dot). After discussing with
them, they will go back on this during the Liberty development cycle.
Anyway, in Debian, we use the dot, not the dash. So if you're importing
from Ubuntu, you have to rename these.

>> so I do understand how Canonical team may have done a mistake here.
> 
> Why renaming python-oslo.* to python-oslo-* can be a mistake?   

Because upstream names this as python-oslo.*, and the calculated
dependencies by dh_python is using a dot. So overriding it can be really
painful.

> You mean we should create manila.conf manually(using
> oslo-config-generator)

Yes, and store it in /usr/share/manila-common/manila.conf. The during
the postinst, we install it under /etc/manila.

> set its variables using debconf, and correct its
> permissions?

Well, we first copy the file, THEN modify it, but yes.

> Is this all of the process that should be done for config
> files?

Yes, because /etc/manila/manila.conf should *not* be marked as CONFFILE
if we modify it in a postinst script.

> Another question, from where can I find if I need some other directories
> like /var/lib/manila/cache (as an example) or not?

No idea. The only way is to actually run Manila and see. I have no
experience with Manila myself.

> what about needed
> config files like api-paste.ini for manila? 

If they don't hold passwords, it's fine to leave them as-is, world
readable. If they do, then you should use the pkgos_write_new_conf
function from openstack-pkg-tools which handles everything from you
(copying from /usr/share/manila-common/<some-config-file> to /etc/manila
using the BSD "install" program and taking care of the /etc/manila
folder creation with correct Unix rights).

> One more question, I don't know any thing about the mentioned namespaces
> in oslo-config-generator. Do I need to know about them for next steps?

Like many things, you should read what's in the tox.ini. For Manila, you
can read:

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

In the etc/oslo-config-generator/manila.conf, you can read:

output_file = etc/manila/manila.conf.sample
namespace = manila
namespace = oslo.messaging
namespace = oslo.db
namespace = oslo.db.concurrency
namespace = keystonemiddleware.auth_token

that's how you can know the --namespace parameters to write in your
debian/rules file.

> Where can I find some explanation about these?  hmm... maybe it is
> necessary for me to read Developer's Guide of Openstack (to be able to
> continue this work). Is it? 

Not really.

I hope the above helps.
Cheers,

Thomas Goirand (zigo)




More information about the Openstack-devel mailing list