From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id B113E138334 for ; Tue, 30 Jul 2019 07:09:42 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id CC22EE0817; Tue, 30 Jul 2019 07:09:41 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id B2BACE0817 for ; Tue, 30 Jul 2019 07:09:41 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id AFD84348FB2 for ; Tue, 30 Jul 2019 07:09:40 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 3BDF170D for ; Tue, 30 Jul 2019 07:09:38 +0000 (UTC) From: "Ulrich Müller" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Ulrich Müller" Message-ID: <1564470430.4fea794c94932a63942c0722183e1c2dffd6ecd2.ulm@gentoo> Subject: [gentoo-commits] proj/portage:master commit in: lib/portage/package/ebuild/ X-VCS-Repository: proj/portage X-VCS-Files: lib/portage/package/ebuild/doebuild.py X-VCS-Directories: lib/portage/package/ebuild/ X-VCS-Committer: ulm X-VCS-Committer-Name: Ulrich Müller X-VCS-Revision: 4fea794c94932a63942c0722183e1c2dffd6ecd2 X-VCS-Branch: master Date: Tue, 30 Jul 2019 07:09:38 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: 7b712d37-a903-4250-83a7-d229ef00823b X-Archives-Hash: 5f5beda15e4823c0a86fba1e1031e96e commit: 4fea794c94932a63942c0722183e1c2dffd6ecd2 Author: Ulrich Müller gentoo org> AuthorDate: Mon Jul 29 12:22:57 2019 +0000 Commit: Ulrich Müller gentoo org> CommitDate: Tue Jul 30 07:07:10 2019 +0000 URL: https://gitweb.gentoo.org/proj/portage.git/commit/?id=4fea794c doebuild.py: Override network-sandbox in unpack only for live ebuilds. Suggested-by: Michał Górny gentoo.org> Reviewed-by: Zac Medico gentoo.org> Signed-off-by: Ulrich Müller gentoo.org> lib/portage/package/ebuild/doebuild.py | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/lib/portage/package/ebuild/doebuild.py b/lib/portage/package/ebuild/doebuild.py index 67867d33e..6f980f87d 100644 --- a/lib/portage/package/ebuild/doebuild.py +++ b/lib/portage/package/ebuild/doebuild.py @@ -115,13 +115,6 @@ _ipc_phases = frozenset([ _global_pid_phases = frozenset([ 'config', 'depend', 'preinst', 'prerm', 'postinst', 'postrm']) -# phases in which networking access is allowed -_networked_phases = frozenset([ - # for VCS fetching - "unpack", - # + for network-bound IPC -] + list(_ipc_phases)) - _phase_func_map = { "config": "pkg_config", "setup": "pkg_setup", @@ -156,7 +149,9 @@ def _doebuild_spawn(phase, settings, actionmap=None, **kwargs): phase in _ipc_phases kwargs['mountns'] = 'mount-sandbox' in settings.features kwargs['networked'] = 'network-sandbox' not in settings.features or \ - phase in _networked_phases or \ + (phase == 'unpack' and \ + 'live' in settings.configdict['pkg'].get('PROPERTIES', '').split()) or \ + phase in _ipc_phases or \ 'network-sandbox' in settings['PORTAGE_RESTRICT'].split() kwargs['pidns'] = ('pid-sandbox' in settings.features and phase not in _global_pid_phases)