[openstack-dev] [packaging][all] Sample Config Files in setup.cfg
Jesse.Pretorius at rackspace.co.uk
Tue Oct 10 11:16:37 UTC 2017
On 10/9/17, 4:08 PM, "Thomas Goirand" <zigo at debian.org> wrote:
> So yeah, you can push files in /usr/share/nova, but then we'll have to
> actually *delete* them in the packaging, because it doesn't fit our use
> case. So in fact, best would be if this could be overridden, for example
> using an environment variable. Something like:
> export OSLO_CONFIG_FILE_DEST=/usr/share/nova-common
> This way, I wouldn't have to manually move/copy/delete/regenerate config
> files by hand in debian/rules.
Using an env var to override behavior does seem like something that could be useful. For example if I could use an env var to say that data_files destined for etc/nova should go to /etc/nova instead of /usr/etc/nova then that’d be good. However it appears that’s possible without an env var as noted in http://lists.openstack.org/pipermail/openstack-dev/2017-October/123346.html
In the Debian case it seems that the need would be to do some sort of search and replace, because the suffix changes. How would you implement an env var in such a way that you can map a path in setup.cfg to a replacement path set in an env var?
Regardless, given that this is not functionality currently available for setuptools, distutils or pbr it would seem that this functionality (or another applicable workaround) would have to be carried by Debian packaging until such time that such a facility exists in the python tooling.
More information about the OpenStack-dev