Lines 2874-2880
Link Here
|
2874 |
return flatten([[myarch, "~" + myarch] \ |
2874 |
return flatten([[myarch, "~" + myarch] \ |
2875 |
for myarch in self["PORTAGE_ARCHLIST"].split()]) |
2875 |
for myarch in self["PORTAGE_ARCHLIST"].split()]) |
2876 |
|
2876 |
|
2877 |
def selinux_enabled(self): |
2877 |
def selinux_enabled(self, warn=True): |
2878 |
if getattr(self, "_selinux_enabled", None) is None: |
2878 |
if getattr(self, "_selinux_enabled", None) is None: |
2879 |
self._selinux_enabled = 0 |
2879 |
self._selinux_enabled = 0 |
2880 |
if "selinux" in self["USE"].split(): |
2880 |
if "selinux" in self["USE"].split(): |
Lines 2884-2892
Link Here
|
2884 |
else: |
2884 |
else: |
2885 |
self._selinux_enabled = 0 |
2885 |
self._selinux_enabled = 0 |
2886 |
else: |
2886 |
else: |
2887 |
writemsg("!!! SELinux module not found. Please verify that it was installed.\n", |
2887 |
if warn: |
2888 |
noiselevel=-1) |
2888 |
writemsg("!!! SELinux module not found. Please verify that it was installed.\n", |
2889 |
self._selinux_enabled = 0 |
2889 |
noiselevel=-1) |
|
|
2890 |
self._selinux_enabled = 0 |
2891 |
else: |
2892 |
# We're just checking for SELinux, we don't actually |
2893 |
# need it yet, so no need to warn that it's not loaded. |
2894 |
pass |
2890 |
if self._selinux_enabled == 0: |
2895 |
if self._selinux_enabled == 0: |
2891 |
try: |
2896 |
try: |
2892 |
del sys.modules["selinux"] |
2897 |
del sys.modules["selinux"] |
Lines 4850-4856
Link Here
|
4850 |
# When sesandbox is enabled, only log if PORT_LOGDIR is explicitly |
4855 |
# When sesandbox is enabled, only log if PORT_LOGDIR is explicitly |
4851 |
# enabled since it is possible that local SELinux security policies |
4856 |
# enabled since it is possible that local SELinux security policies |
4852 |
# do not allow ouput to be piped out of the sesandbox domain. |
4857 |
# do not allow ouput to be piped out of the sesandbox domain. |
4853 |
if not (mysettings.selinux_enabled() and \ |
4858 |
if not (mysettings.selinux_enabled(False) and \ |
4854 |
"sesandbox" in mysettings.features): |
4859 |
"sesandbox" in mysettings.features): |
4855 |
mysettings["PORTAGE_LOG_FILE"] = os.path.join( |
4860 |
mysettings["PORTAGE_LOG_FILE"] = os.path.join( |
4856 |
mysettings["T"], "build.log") |
4861 |
mysettings["T"], "build.log") |
Lines 7198-7204
Link Here
|
7198 |
features = settings.features |
7203 |
features = settings.features |
7199 |
groups = settings["ACCEPT_KEYWORDS"].split() |
7204 |
groups = settings["ACCEPT_KEYWORDS"].split() |
7200 |
pkglines = settings.packages |
7205 |
pkglines = settings.packages |
7201 |
selinux_enabled = settings.selinux_enabled() |
7206 |
selinux_enabled = settings.selinux_enabled(False) |
7202 |
thirdpartymirrors = settings.thirdpartymirrors() |
7207 |
thirdpartymirrors = settings.thirdpartymirrors() |
7203 |
usedefaults = settings.use_defs |
7208 |
usedefaults = settings.use_defs |
7204 |
profiledir = None |
7209 |
profiledir = None |