View previous topic :: View next topic |
Author |
Message |
huuan Apprentice
Joined: 19 Feb 2007 Posts: 265 Location: California
|
Posted: Fri Jan 04, 2013 8:15 am Post subject: [SOLVED] portage overwriting protected files? |
|
|
One of the things I really love about Gentoo is CONFIG_PROTECT and dispatch-conf
This evening when updating php 5.3 and php 5.4 I noticed the message at the end that said
Quote: | * Configuration file installed as
* /etc/apache2/modules.d/70_mod_php5.conf
|
I found that a little disturbing as I'm used to messages after emerge telling me there are config files that need updating and then I run dispatch-conf for the updates.
so I took a look at what was changed in /etc/php
and found this as well
Code: | $ ls -rlt apache2-php5.4/php.ini
-rw-r--r-- 1 root root 66953 Jan 3 22:17 apache2-php5.4/php.ini |
Using diff on saved versions of these I don't see any actual differences from before and perhaps I'm being paranoid but my CONFIG_PROTECT should be preventing portage from overwriting /etc/apache2/* and /etc/php/apache2-php5.4/php.ini as far as I can tell:
here the pertinent excerpt from my emerge --info
Code: | CONFIG_PROTECT="/etc /usr/share/gnupg/qualified.txt"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/gconf /etc/gentoo-release /etc/php/apache2-php5.3/ext-active/ /etc/php/apache2-php5.4/ext-active/ /etc/php/cgi-php5.3/ext-active/ /etc/php/cgi-php5.4/ext-active/ /etc/php/cli-php5.3/ext-active/ /etc/php/cli-php5.4/ext-active/ /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/udev/rules.d"
|
So how come portage is touching those files even though CONFIG_PROTECT says it shouldn't?
Last edited by huuan on Sat Jan 05, 2013 5:54 am; edited 2 times in total |
|
Back to top |
|
|
zmedico Developer
Joined: 02 Jan 2004 Posts: 352 Location: California USA
|
Posted: Fri Jan 04, 2013 8:53 am Post subject: |
|
|
Maybe it's related to the config-protect-if-modified FEATURES setting. _________________ Zac |
|
Back to top |
|
|
mv Watchman
Joined: 20 Apr 2005 Posts: 6747
|
Posted: Fri Jan 04, 2013 1:17 pm Post subject: |
|
|
Another possibility could be that some of the path elements is a symlink. |
|
Back to top |
|
|
huuan Apprentice
Joined: 19 Feb 2007 Posts: 265 Location: California
|
Posted: Sat Jan 05, 2013 4:59 am Post subject: |
|
|
That might be it. Guess I never understood the implications of this before.
Quote: | This causes the CONFIG_PROTECT behavior to be skipped
for files that have not been modified since they were installed. |
Does this mean it is OK to overwrite a config file that has never been modified?
It leaves me to wonder what was wrong with the previous behavior. I was very happy with the way portage worked but I guess it wasn't doing something and so causing some problem.
Thanks for your insight. |
|
Back to top |
|
|
zmedico Developer
Joined: 02 Jan 2004 Posts: 352 Location: California USA
|
Posted: Sat Jan 05, 2013 5:06 am Post subject: |
|
|
huuan wrote: |
That might be it. Guess I never understood the implications of this before.
Quote: | This causes the CONFIG_PROTECT behavior to be skipped
for files that have not been modified since they were installed. |
Does this mean it is OK to overwrite a config file that has never been modified? |
Right.
huuan wrote: | It leaves me to wonder what was wrong with the previous behavior. I was very happy with the way portage worked but I guess it wasn't doing something and so causing some problem. |
If you disable config-protect-if-modified then CONFIG_PROTECT will trigger for lots of files that you may not care about. To most people, those config updates are mostly just a bunch of useless noise. _________________ Zac |
|
Back to top |
|
|
Hu Moderator
Joined: 06 Mar 2007 Posts: 21607
|
Posted: Sat Jan 05, 2013 5:39 am Post subject: |
|
|
To elaborate on zmedico's statement, with the old behavior, if the upstream project changed the defaults in their configuration file, you would be prompted to accept or reject those changes, even if you had never even opened the file before and you were perfectly happy to use whatever defaults upstream had picked. Now, you are only notified if there is a chance that silently overwriting would erase local customizations. |
|
Back to top |
|
|
huuan Apprentice
Joined: 19 Feb 2007 Posts: 265 Location: California
|
Posted: Sat Jan 05, 2013 5:47 am Post subject: |
|
|
Thanks Zac and Hu for the lucid explanations. |
|
Back to top |
|
|
|