[openstack-dev] [all][packaging] Adding files to /etc in a package

Perry, Sean sean.perry at hp.com
Thu Jul 2 00:42:13 UTC 2015



> -----Original Message-----
> From: Tony Breeds [mailto:tony at bakeyournoodle.com]
> Sent: Wednesday, July 01, 2015 5:08 PM
> To: OpenStack Development Mailing List (not for usage questions)
> Subject: Re: [openstack-dev] [all][packaging] Adding files to /etc in a package
> 
> On Wed, Jul 01, 2015 at 11:07:30PM +0000, Perry, Sean wrote:
> > BTW, see dh_bash-completion from the debhelper package. When in
> doubt about packaging on a deb based distro look at the debhelper tools
> source (which is perl).
> >
> > -----Original Message-----
> > From: Perry, Sean
> > Sent: Wednesday, July 01, 2015 4:04 PM
> > To: OpenStack Development Mailing List (not for usage questions)
> > Subject: RE: [openstack-dev] [all][packaging] Adding files to /etc in
> > a package
> >
> > According to Debian standards (which Ubuntu follows mostly) if a
> > package ships bash completion information that file belongs in
> > /etc/bash_completion.d with a file named after the package. You can
> > look in that dir on an Ubuntu/debian box and see the setup.
> 
> Right, but I'm talking about python packaging.  Which is certainly closely
> related to system/distribution packaging, but lacks a lot of the machinery to
> get it right.
> 
> What I'm trying to do is:
> 1) make it simple for the 'developer' comsumers of the python package to
> use
>    bash completions (witghout needing the system packages)
> 2) Help the system/distribution packagers or at the very least not make thier
>    life more difficult.
> 
> Yours Tony.

Sorry Tony, the comment about lintian threw me off.

Well you could
* use /usr/share/bash-completion/completions. This is the canonical location for completions. Eventually Debian and others will go here instead of /etc/bash_completions.d. This will work for users without packages and should not cause too much pain for packagers.
* place a file in /etc/bash_completions.d that sources your /where/ever/you/put/it. This gives you flexibility but may be problematic for packagers down the line. One possibility is putting the files in /usr/local/share/<python package name> and having a /etc/bash_completion.d/<python package name> that sources the /usr/local file. This is keeping with the rest of OpenStack so the packagers will be used to the pain :-)
* as a twist on the previous choice you can leave off the /etc/bash_completion.d file but document how the users can source these files from their own ~/.bash_completion or whatever.

Hope this helps.


More information about the OpenStack-dev mailing list