On Thu, Sep 24, 2015 at 04:25:31PM +0200, Thomas Goirand wrote: > Hi, > > It's about the 3rd time just this week, that I'm repairing an OpenStack > component which is trying to write config files in /usr/etc. Could this > non-sense stop please?
So I'm almost 100% that the intent for everyone doing this is for the files to be written to /etc when system installing the packaging. It's being caused by data_file lines in the setup.cfg putting things in etc/foo. Like in neutron: http://git.openstack.org/cgit/openstack/neutron/tree/setup.cfg#n23 The PBR docs [1] say this will go to /etc if installing it in the system python which obviously isn't the case. The are instead being installed to sys.prefix/etc which works well for the venv case but not so much for system installing a package. The issue is with the use of data_files. I'm sure dstufft can elaborate on all the prickly bits, but IIRC it's the use of setuptools of distutils depending on how the package is being installed. (either via a wheel or sdist) I think the distutils behavior is to install relative to sys.prefix and setuptools puts it relative to site-packages. But, neither of those are really the desired behavior... > > FYI, this time, it's with os-brick... but it happened with so many > components already: > - bandit (with an awesome reply from upstream to my launchpad bug, > basically saying he doesn't care about downstream distros...) > - neutron > - neutron-fwaas > - tempest > - lots of Neutron drivers (ie: networking-FOO) > - pycadf > - and probably more which I forgot. > > Yes, I can repair things at the packaging level, but I just hope I wont > have to do this for each and every OpenStack component, and I suppose > everyone understands how frustrating it is... It's an issue with python packaging that we need to fix, likely in PBR first. But, I doubt this is isolated to PBR, we'll probably have to work on fixes to distutils and/or setuptools too. > > I also wonder where this /usr/etc is coming from. If it was > /usr/local/etc, I could somehow get it. But here... ?!? IIRC if you set the python sys.prefix to /usr/local it'll put the etc files in /usr/local. -Matt Treinish [1] http://docs.openstack.org/developer/pbr/#files
signature.asc
Description: PGP signature
__________________________________________________________________________ OpenStack Development Mailing List (not for usage questions) Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev