[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: metapackages and setting config files in /etc and /home/dir



On Mon, Jan 11, 2016 at 11:38:10PM -0500, Stephan Foley wrote:
> Hello, let's say I have the following install:
> 
> my_metapackage -> depends on windows_manager -> depends on lightdm ->
> depends on xorg
> 
> So, I am forcing the following:
> 
> - xorg
> - lightdm
> - windows_manager
> 
> can I set the configuration files? For instance, can I set the lightdm
> config in /etc or the windows_manager's config in /home/user? Or can
> only the original package set this?

That depends to a large extent on what you want to do with it once
you've built the package.

If you want to upload the package to Debian, then the answer is a clear
no. Debian Policy forbids touching other packages' files in /etc with
the strongest wording, as well as doing anything to /home other than
ensuring it exists. The former is because it would cause confusion who
is responsible when things go wrong, the latter is because /home is
meant for local use and we shouldn't touch it as a distribution, period.

If you want to share the package with other people to allow them to
rebuild your environment, you could probably get away with it, although
I would recommend against it for the very same reasons as to why it's
not allowed in Debian.

If, on the other hand, this is just a package for you to easily build
a machine for your own use (and I suspect that it is), then yeah, sure,
you can do so. However, if you want to do this, you should *not* ship
the files that you want to modify in /etc; doing so will not work
reliably, due to how dpkg works. Instead, you should make sure that the
modifications you wish to make are made by your postinst script, either
by adding the necessary sed (or whatever) calls to that script, or by
shipping them in a different location (/usr/share/metapackage is a good
bet) and copying them to their /etc location in postinst.

Regards,

-- 
It is easy to love a country that is famous for chocolate and beer

  -- Barack Obama, speaking in Brussels, Belgium, 2014-03-26


Reply to: