Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 99744 - Feature request: Ability to flag config files to never be overwritten, or always be overwritten
Summary: Feature request: Ability to flag config files to never be overwritten, or alw...
Status: RESOLVED DUPLICATE of bug 14321
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: High enhancement (vote)
Assignee: Gentoo Linux bug wranglers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-07-20 20:22 UTC by Daniel Lawson
Modified: 2005-07-21 01:08 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Daniel Lawson 2005-07-20 20:22:19 UTC
There are some config files that are specifically site-local and should never be
touched by portage. CONFIG_PROTECT stops them being automatically updated now,
however in many cases there should not even be an option to modify these files.

A classic example is /etc/fstab. This config file contains very site specific
information, and portage quite simply should not touch it. Ever.

I've noticed a few files that I think should qualify for the ability to flag as
site-local and never have portage touch. I'm aware that my list isn't
exhaustive, and some people might be happy to have portage touch them, which is
why I am suggesting a way of flagging specific files as untouchable by portage.

Some other files which I believe should not be touched by portage:
in baselayout:
/etc/modules.autoload.d/kernel-2.4
/etc/modules.autoload.d/kernel-2.6
/etc/services

There are certain cases in which even files like /etc/fstab must be touched, eg
a major kernel upgrade (2.6 wants a /sys mount, for example) but these can be
managed with a ewarn from the package that requires the update. It should *not*
be pushed out with baselayout or similar.

Conversely, there are files that as a system administrator, I would like to
always be overwritten. With CONFIG_PROTECT_MASK I can set this on a
per-directory basis, but it would be nice to flag a file as 'never modified'.


There are a number of possibilities here:

To acheive the first goal, a list of files never to be touched is sufficient. 

For the second goal, you could again have a  list of files always to be updated.
Another simple way is storing the MD5 of a config file. When a package is
updated, the MD5 of the live file is compared with the value saved with the
original package - if they are the same, the config file is updated without asking. 

Reproducible: Always
Steps to Reproduce:
Comment 1 Jakub Moc (RETIRED) gentoo-dev 2005-07-21 01:08:58 UTC
(In reply to comment #0)
> A classic example is /etc/fstab. This config file contains very site specific
> information, and portage quite simply should not touch it. Ever.

baselayout does not install /etc/fstab any more if one already exists.

> Some other files which I believe should not be touched by portage:
> in baselayout:
> /etc/modules.autoload.d/kernel-2.4
> /etc/modules.autoload.d/kernel-2.6

Hmm, probably - see the other bug.

> /etc/services

Don't know what's so critical about this one... Some ebuilds also need to
install additional entries there.

> There are certain cases in which even files like /etc/fstab must be touched, eg
> a major kernel upgrade (2.6 wants a /sys mount, for example) but these can be
> managed with a ewarn from the package that requires the update. It should *not*
> be pushed out with baselayout or similar.

See above.

> Conversely, there are files that as a system administrator, I would like to
> always be overwritten. With CONFIG_PROTECT_MASK I can set this on a
> per-directory basis, but it would be nice to flag a file as 'never modified'.

See the other bug.
 
> For the second goal, you could again have a  list of files always to be updated.
> Another simple way is storing the MD5 of a config file. When a package is
> updated, the MD5 of the live file is compared with the value saved with the
> original package - if they are the same, the config file is updated without
asking. 

It is already possible to set dispatch-conf to automatically update unmodified
files etc., see dispatch-conf.conf.


*** This bug has been marked as a duplicate of 14321 ***