1 |
commit: e8b395c0fdfdf896fb6d3168dd1cf9a130b20796 |
2 |
Author: Fabian Groffen <grobian <AT> gentoo <DOT> org> |
3 |
AuthorDate: Tue Jun 2 18:54:23 2020 +0000 |
4 |
Commit: Fabian Groffen <grobian <AT> gentoo <DOT> org> |
5 |
CommitDate: Tue Jun 2 18:54:23 2020 +0000 |
6 |
URL: https://gitweb.gentoo.org/proj/portage.git/commit/?id=e8b395c0 |
7 |
|
8 |
Merge remote-tracking branch 'overlays-gentoo-org/master' into prefix |
9 |
|
10 |
Signed-off-by: Fabian Groffen <grobian <AT> gentoo.org> |
11 |
|
12 |
.travis.yml | 7 +- |
13 |
MANIFEST.in | 5 + |
14 |
NEWS | 17 + |
15 |
RELEASE-NOTES | 122 +++++ |
16 |
bin/ebuild-helpers/dosym | 13 +- |
17 |
bin/ecompress | 16 +- |
18 |
bin/isolated-functions.sh | 4 +- |
19 |
bin/misc-functions.sh | 12 +- |
20 |
bin/phase-functions.sh | 4 - |
21 |
bin/phase-helpers.sh | 10 +- |
22 |
bin/socks5-server.py | 36 +- |
23 |
cnf/make.globals | 9 +- |
24 |
doc/api/.gitignore | 1 + |
25 |
doc/api/Makefile | 32 ++ |
26 |
doc/api/conf.py | 66 +++ |
27 |
doc/api/index.rst | 18 + |
28 |
doc/qa.docbook | 98 ++++ |
29 |
lib/_emerge/AbstractEbuildProcess.py | 2 +- |
30 |
lib/_emerge/AbstractPollTask.py | 3 - |
31 |
lib/_emerge/AsynchronousTask.py | 75 +-- |
32 |
lib/_emerge/CompositeTask.py | 7 +- |
33 |
lib/_emerge/EbuildFetcher.py | 12 +- |
34 |
lib/_emerge/EbuildMetadataPhase.py | 3 +- |
35 |
lib/_emerge/EbuildPhase.py | 66 ++- |
36 |
lib/_emerge/FifoIpcDaemon.py | 3 - |
37 |
lib/_emerge/Scheduler.py | 43 +- |
38 |
lib/_emerge/SequentialTaskQueue.py | 19 +- |
39 |
lib/_emerge/SubProcess.py | 15 +- |
40 |
lib/_emerge/actions.py | 40 +- |
41 |
lib/_emerge/create_world_atom.py | 11 +- |
42 |
lib/_emerge/depgraph.py | 65 ++- |
43 |
lib/portage/_compat_upgrade/binpkg_compression.py | 40 ++ |
44 |
lib/portage/_emirrordist/FetchTask.py | 9 - |
45 |
lib/portage/_selinux.py | 9 +- |
46 |
lib/portage/cache/ebuild_xattr.py | 5 +- |
47 |
lib/portage/cache/template.py | 2 +- |
48 |
lib/portage/const.py | 1 + |
49 |
lib/portage/data.py | 10 - |
50 |
lib/portage/dbapi/cpv_expand.py | 4 +- |
51 |
lib/portage/dbapi/porttree.py | 9 +- |
52 |
lib/portage/dbapi/vartree.py | 9 +- |
53 |
lib/portage/dep/dep_check.py | 93 ++-- |
54 |
lib/portage/dep/soname/SonameAtom.py | 9 +- |
55 |
lib/portage/dispatch_conf.py | 9 - |
56 |
lib/portage/emaint/modules/sync/sync.py | 2 +- |
57 |
lib/portage/locks.py | 67 ++- |
58 |
.../package/ebuild/_config/KeywordsManager.py | 16 +- |
59 |
.../package/ebuild/_config/special_env_vars.py | 6 +- |
60 |
.../package/ebuild/deprecated_profile_check.py | 2 +- |
61 |
lib/portage/package/ebuild/doebuild.py | 41 +- |
62 |
lib/portage/package/ebuild/fetch.py | 148 ++++-- |
63 |
lib/portage/package/ebuild/prepare_build_dirs.py | 21 +- |
64 |
lib/portage/process.py | 29 +- |
65 |
lib/portage/tests/dbapi/test_auxdb.py | 77 +++ |
66 |
lib/portage/tests/dep/test_soname_atom_pickle.py | 26 + |
67 |
lib/portage/tests/ebuild/test_doebuild_spawn.py | 4 +- |
68 |
lib/portage/tests/emerge/test_simple.py | 69 ++- |
69 |
lib/portage/tests/locks/test_lock_nonblock.py | 16 +- |
70 |
lib/portage/tests/resolver/ResolverPlayground.py | 99 ++-- |
71 |
.../tests/resolver/test_circular_choices.py | 44 +- |
72 |
lib/portage/tests/resolver/test_depth.py | 18 +- |
73 |
lib/portage/tests/resolver/test_multirepo.py | 8 +- |
74 |
lib/portage/tests/resolver/test_or_choices.py | 572 +++++++++++++++++++-- |
75 |
.../tests/resolver/test_or_upgrade_installed.py | 70 +++ |
76 |
.../resolver/test_slot_operator_reverse_deps.py | 93 +++- |
77 |
.../tests/util/futures/test_compat_coroutine.py | 29 +- |
78 |
.../util/futures/test_done_callback_after_exit.py | 44 ++ |
79 |
lib/portage/util/__init__.py | 8 - |
80 |
lib/portage/util/_async/AsyncFunction.py | 5 +- |
81 |
lib/portage/util/_async/FileDigester.py | 5 +- |
82 |
lib/portage/util/_desktop_entry.py | 8 - |
83 |
lib/portage/util/_dyn_libs/LinkageMapELF.py | 84 ++- |
84 |
lib/portage/util/_dyn_libs/NeededEntry.py | 5 + |
85 |
lib/portage/util/_dyn_libs/soname_deps_qa.py | 98 ++++ |
86 |
lib/portage/util/_eventloop/asyncio_event_loop.py | 31 +- |
87 |
lib/portage/util/compression_probe.py | 10 +- |
88 |
lib/portage/util/futures/_asyncio/__init__.py | 8 +- |
89 |
lib/portage/util/futures/compat_coroutine.py | 19 +- |
90 |
lib/portage/xml/metadata.py | 22 +- |
91 |
lib/portage/xpak.py | 5 +- |
92 |
man/emerge.1 | 6 +- |
93 |
man/make.conf.5 | 8 +- |
94 |
repoman/RELEASE-NOTES | 11 + |
95 |
repoman/cnf/linechecks/linechecks.yaml | 1 - |
96 |
repoman/cnf/repository/repository.yaml | 1 - |
97 |
repoman/lib/repoman/_subprocess.py | 18 - |
98 |
repoman/lib/repoman/gpg.py | 9 - |
99 |
repoman/lib/repoman/metadata.py | 51 +- |
100 |
.../modules/linechecks/deprecated/inherit.py | 5 + |
101 |
.../modules/linechecks/workaround/__init__.py | 6 - |
102 |
.../modules/linechecks/workaround/workarounds.py | 7 - |
103 |
repoman/lib/repoman/modules/vcs/git/changes.py | 22 +- |
104 |
repoman/runtests | 8 +- |
105 |
repoman/setup.py | 2 +- |
106 |
runtests | 8 +- |
107 |
setup.py | 37 +- |
108 |
tox.ini | 4 +- |
109 |
97 files changed, 2391 insertions(+), 665 deletions(-) |
110 |
|
111 |
diff --cc bin/ebuild-helpers/dosym |
112 |
index da15fe397,abd4da4f0..681e198c5 |
113 |
--- a/bin/ebuild-helpers/dosym |
114 |
+++ b/bin/ebuild-helpers/dosym |
115 |
@@@ -1,5 -1,5 +1,5 @@@ |
116 |
-#!/bin/bash |
117 |
+#!@PORTAGE_BASH@ |
118 |
- # Copyright 1999-2018 Gentoo Foundation |
119 |
+ # Copyright 1999-2020 Gentoo Authors |
120 |
# Distributed under the terms of the GNU General Public License v2 |
121 |
|
122 |
source "${PORTAGE_BIN_PATH}"/isolated-functions.sh || exit 1 |
123 |
diff --cc bin/isolated-functions.sh |
124 |
index efc377575,fde684013..7840d6012 |
125 |
--- a/bin/isolated-functions.sh |
126 |
+++ b/bin/isolated-functions.sh |
127 |
@@@ -1,5 -1,5 +1,5 @@@ |
128 |
-#!/bin/bash |
129 |
+#!@PORTAGE_BASH@ |
130 |
- # Copyright 1999-2019 Gentoo Authors |
131 |
+ # Copyright 1999-2020 Gentoo Authors |
132 |
# Distributed under the terms of the GNU General Public License v2 |
133 |
|
134 |
source "${PORTAGE_BIN_PATH}/eapi.sh" || exit 1 |
135 |
diff --cc bin/phase-helpers.sh |
136 |
index d0ab03712,9495465f9..c4ab51d78 |
137 |
--- a/bin/phase-helpers.sh |
138 |
+++ b/bin/phase-helpers.sh |
139 |
@@@ -1,5 -1,5 +1,5 @@@ |
140 |
-#!/bin/bash |
141 |
+#!@PORTAGE_BASH@ |
142 |
- # Copyright 1999-2019 Gentoo Authors |
143 |
+ # Copyright 1999-2020 Gentoo Authors |
144 |
# Distributed under the terms of the GNU General Public License v2 |
145 |
|
146 |
if ___eapi_has_DESTTREE_INSDESTTREE; then |
147 |
diff --cc cnf/make.globals |
148 |
index 25678ee82,dd3f28f70..d3ba98513 |
149 |
--- a/cnf/make.globals |
150 |
+++ b/cnf/make.globals |
151 |
@@@ -27,13 -27,17 +27,17 @@@ ACCEPT_PROPERTIES="* |
152 |
ACCEPT_RESTRICT="*" |
153 |
|
154 |
# Miscellaneous paths |
155 |
-DISTDIR="/var/cache/distfiles" |
156 |
-PKGDIR="/var/cache/binpkgs" |
157 |
-RPMDIR="/var/cache/rpm" |
158 |
+DISTDIR="@PORTAGE_EPREFIX@/var/cache/distfiles" |
159 |
+PKGDIR="@PORTAGE_EPREFIX@/var/cache/binpkgs" |
160 |
+RPMDIR="@PORTAGE_EPREFIX@/var/cache/rpm" |
161 |
|
162 |
# Temporary build directory |
163 |
-PORTAGE_TMPDIR="/var/tmp" |
164 |
+PORTAGE_TMPDIR="@PORTAGE_EPREFIX@/var/tmp" |
165 |
|
166 |
+ # The compression used for binary packages. Defaults to zstd except for |
167 |
+ # existing installs where bzip2 is used for backward compatibility. |
168 |
+ BINPKG_COMPRESS="zstd" |
169 |
+ |
170 |
# Fetching command (3 tries, passive ftp for firewall compatibility) |
171 |
FETCHCOMMAND="wget -t 3 -T 60 --passive-ftp -O \"\${DISTDIR}/\${FILE}\" \"\${URI}\"" |
172 |
RESUMECOMMAND="wget -c -t 3 -T 60 --passive-ftp -O \"\${DISTDIR}/\${FILE}\" \"\${URI}\"" |
173 |
diff --cc lib/portage/package/ebuild/_config/special_env_vars.py |
174 |
index c8131f5b2,440dd00b2..12d701c9a |
175 |
--- a/lib/portage/package/ebuild/_config/special_env_vars.py |
176 |
+++ b/lib/portage/package/ebuild/_config/special_env_vars.py |
177 |
@@@ -78,12 -78,9 +78,12 @@@ environ_whitelist += |
178 |
"PORTAGE_VERBOSE", "PORTAGE_WORKDIR_MODE", "PORTAGE_XATTR_EXCLUDE", |
179 |
"PORTDIR", "PORTDIR_OVERLAY", "PREROOTPATH", "PYTHONDONTWRITEBYTECODE", |
180 |
"REPLACING_VERSIONS", "REPLACED_BY_VERSION", |
181 |
- "ROOT", "ROOTPATH", "SYSROOT", "T", "TMP", "TMPDIR", |
182 |
+ "ROOT", "ROOTPATH", "SANDBOX_LOG", "SYSROOT", "T", "TMP", "TMPDIR", |
183 |
"USE_EXPAND", "USE_ORDER", "WORKDIR", |
184 |
"XARGS", "__PORTAGE_TEST_HARDLINK_LOCKS", |
185 |
+ # PREFIX LOCAL |
186 |
+ "EXTRA_PATH", "PORTAGE_GROUP", "PORTAGE_USER", |
187 |
+ # END PREFIX LOCAL |
188 |
] |
189 |
|
190 |
# user config variables |
191 |
diff --cc lib/portage/package/ebuild/fetch.py |
192 |
index 5f6c40146,9682fea89..11b13fe56 |
193 |
--- a/lib/portage/package/ebuild/fetch.py |
194 |
+++ b/lib/portage/package/ebuild/fetch.py |
195 |
@@@ -46,8 -51,7 +51,8 @@@ from portage.checksum import (get_valid |
196 |
checksum_str) |
197 |
from portage.const import BASH_BINARY, CUSTOM_MIRRORS_FILE, \ |
198 |
GLOBAL_CONFIG_PATH |
199 |
+from portage.const import rootgid |
200 |
- from portage.data import portage_gid, portage_uid, secpass, userpriv_groups |
201 |
+ from portage.data import portage_gid, portage_uid, userpriv_groups |
202 |
from portage.exception import FileNotFound, OperationNotPermitted, \ |
203 |
PortageException, TryAgain |
204 |
from portage.localization import _ |
205 |
@@@ -153,6 -188,59 +189,59 @@@ def _userpriv_test_write_file(settings |
206 |
_userpriv_test_write_file_cache[file_path] = rval |
207 |
return rval |
208 |
|
209 |
+ |
210 |
+ def _ensure_distdir(settings, distdir): |
211 |
+ """ |
212 |
+ Ensure that DISTDIR exists with appropriate permissions. |
213 |
+ |
214 |
+ @param settings: portage config |
215 |
+ @type settings: portage.package.ebuild.config.config |
216 |
+ @param distdir: DISTDIR path |
217 |
+ @type distdir: str |
218 |
+ @raise PortageException: portage.exception wrapper exception |
219 |
+ """ |
220 |
+ global _userpriv_test_write_file_cache |
221 |
+ dirmode = 0o070 |
222 |
+ filemode = 0o60 |
223 |
+ modemask = 0o2 |
224 |
+ dir_gid = portage_gid |
225 |
+ if "FAKED_MODE" in settings: |
226 |
+ # When inside fakeroot, directories with portage's gid appear |
227 |
+ # to have root's gid. Therefore, use root's gid instead of |
228 |
+ # portage's gid to avoid spurrious permissions adjustments |
229 |
+ # when inside fakeroot. |
230 |
- dir_gid = 0 |
231 |
++ dir_gid = rootgid |
232 |
+ |
233 |
+ userfetch = portage.data.secpass >= 2 and "userfetch" in settings.features |
234 |
+ userpriv = portage.data.secpass >= 2 and "userpriv" in settings.features |
235 |
+ write_test_file = os.path.join(distdir, ".__portage_test_write__") |
236 |
+ |
237 |
+ try: |
238 |
+ st = os.stat(distdir) |
239 |
+ except OSError: |
240 |
+ st = None |
241 |
+ |
242 |
+ if st is not None and stat.S_ISDIR(st.st_mode): |
243 |
+ if not (userfetch or userpriv): |
244 |
+ return |
245 |
+ if _userpriv_test_write_file(settings, write_test_file): |
246 |
+ return |
247 |
+ |
248 |
+ _userpriv_test_write_file_cache.pop(write_test_file, None) |
249 |
+ if ensure_dirs(distdir, gid=dir_gid, mode=dirmode, mask=modemask): |
250 |
+ if st is None: |
251 |
+ # The directory has just been created |
252 |
+ # and therefore it must be empty. |
253 |
+ return |
254 |
+ writemsg(_("Adjusting permissions recursively: '%s'\n") % distdir, |
255 |
+ noiselevel=-1) |
256 |
+ if not apply_recursive_permissions(distdir, |
257 |
+ gid=dir_gid, dirmode=dirmode, dirmask=modemask, |
258 |
+ filemode=filemode, filemask=modemask, onerror=_raise_exc): |
259 |
+ raise OperationNotPermitted( |
260 |
+ _("Failed to apply recursive permissions for the portage group.")) |
261 |
+ |
262 |
+ |
263 |
def _checksum_failure_temp_file(settings, distdir, basename): |
264 |
""" |
265 |
First try to find a duplicate temp file with the same checksum and return |
266 |
diff --cc man/make.conf.5 |
267 |
index 683ce26c2,a3bd662ae..ab00cb7d7 |
268 |
--- a/man/make.conf.5 |
269 |
+++ b/man/make.conf.5 |
270 |
@@@ -610,11 -607,12 +610,15 @@@ If \fIcollision\-protect\fR is enabled |
271 |
Output a verbose trace of python execution to stderr when a command's |
272 |
\-\-debug option is enabled. |
273 |
.TP |
274 |
+ .B qa\-unresolved\-soname\-deps |
275 |
+ Trigger a QA warning when a package installs files with unresolved soname |
276 |
+ dependencies. |
277 |
+ .TP |
278 |
.B sandbox |
279 |
Enable sandbox\-ing when running \fBemerge\fR(1) and \fBebuild\fR(1). |
280 |
+On Mac OS X platforms that have /usr/bin/sandbox-exec available (10.5 |
281 |
+and later), this particular sandbox implementation is used instead of |
282 |
+sys-apps/sandbox. |
283 |
.TP |
284 |
.B sesandbox |
285 |
Enable SELinux sandbox\-ing. Do not toggle this \fBFEATURE\fR yourself. |