CONFIG_PROTECT

From Gentoo Wiki
Jump to:navigation Jump to:search
This page is a translated version of the page CONFIG PROTECT and the translation is 8% complete.
Outdated translations are marked like this.

Warning: Display title "CONFIG_PROTECT" overrides earlier display title "CONFIG PROTECT".

The CONFIG_PROTECT variable contains a space-delimited list of files and/or directories that Portage will protect from automatic modification. Proposed changes to protected configuration locations will require manual merge(s) from the system administrator (see dispatch-conf or similar merge tools).

A current list of presently protected locations can be displayed with portageq:

user $portageq envvar CONFIG_PROTECT
/etc /usr/share/config /usr/share/gnupg/qualified.txt

Using portageq is a short hand alternative to running a regular expression search on verbose, informational output from the emerge command:

user $emerge --verbose --info | grep -E '^CONFIG_PROTECT='
CONFIG_PROTECT="/etc /usr/share/config /usr/share/gnupg/qualified.txt"

Files or subdirectories defined within the CONFIG_PROTECT can be excluded from protection through the CONFIG_PROTECT_MASK variable. Masking is useful when a parent directory should be protected, but a certain child directory beneath it.

The variable has a sane default setting handled by the Portage installation and the users' Gentoo profile. It can be extended through the system environment (which is often used by applications that update the variable through their /etc/env.d file) and the users' /etc/portage/make.conf setting.

FILE /etc/portage/make.confPrzykładowy CONFIG_PROTECT w make.conf
CONFIG_PROTECT="/var/bind"

Zobacz również rozdział Zmienne środowiskowe w Podręczniku Gentoo.

See also

  • CONFIG_PROTECT_MASK — contains a list of files or subdirectories which will be excluded from the overwrite protection offered by the CONFIG_PROTECT variable.
  • savedconfig — a USE flag that preserves the saved configuration files upon package updates.
  • /etc/portage/make.conf — główny plik konfiguracyjny używany do dostosowywania środowiska Portage na poziomie globalnym.