From: "Markos Chandras" <hwoarang@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] proj/devmanual:master commit in: ebuild-writing/functions/
Date: Sat, 18 Oct 2014 17:35:59 +0000 (UTC) [thread overview]
Message-ID: <1409759463.2a7d19973f0713e66b38b7af04a263ae248fe7ca.hwoarang@gentoo> (raw)
commit: 2a7d19973f0713e66b38b7af04a263ae248fe7ca
Author: W. Trevor King <wking <AT> tremily <DOT> us>
AuthorDate: Wed Sep 3 01:15:44 2014 +0000
Commit: Markos Chandras <hwoarang <AT> gentoo <DOT> org>
CommitDate: Wed Sep 3 15:51:03 2014 +0000
URL: http://sources.gentoo.org/gitweb/?p=proj/devmanual.git;a=commit;h=2a7d1997
ebuild-writing/functions: Don't allow network access
There have been a number of bugs filed to remove network access from
ebuild phases [1,2,...], but until now this policy was undocumented
here. We'll have to relax this restriction if the src_fetch [3,4,5] or
pkg_fetch [6] proposals being discussed for EAPI-6 are accepted, but
neither is currently mentioned in either the PMS [7] or Portage [8].
Portage *does* have a network-sandbox feature [9,10], which applies to
all src_* phases except src_unpack (for live ebuilds). I think it
should be applied to pkg_* phases too, but Michał thinks they may need
networking "for some kind of IPC" [11]. Alexis pointed out that a
strict network-sandbox will break distcc [12], but since that network
access is the result of enabling a Portage feature (and not initiated
by the ebuild or package itself), it falls outside the scope of this
policy.
[1]: https://bugs.gentoo.org/show_bug.cgi?id=315403
Summary: media-video/jubler fails to build without network
[2]: https://bugs.gentoo.org/show_bug.cgi?id=336771
Summary: dev-libs/libevent tests require network access
[3]: https://bugs.gentoo.org/show_bug.cgi?id=182028
Summary: [Future EAPI] About managing CVS/SUBVERSION version of
software
[4]: http://thread.gmane.org/gmane.linux.gentoo.devel/47645/focus=52918
From: Marijn Schouten <hkBst <AT> gentoo.org>
Subject: src_fetch (was Re: EAPI 1 (Was: Re: Monthly Gentoo
Council Reminder for April))
Date: 2007-11-09 17:41:38 GMT
[5]: http://thread.gmane.org/gmane.linux.gentoo.devel/87869
From: Michał Górny <mgorny <AT> gentoo.org>
Subject: [EAPI 6] src_fetch() for fetching live sources
Date: 2013-08-27 10:01:27 GMT
[6]: http://thread.gmane.org/gmane.linux.gentoo.devel/87869/focus=878773
From: Ian Stakenvicius <axs <AT> gentoo.org>
Subject: Re: [EAPI 6] src_fetch() for fetching live sources
Date: 2013-08-27 14:33:27 GMT
[7]: git://git.overlays.gentoo.org/proj/pms.git
[8]: git://git.overlays.gentoo.org/proj/portage.git
[9]: http://thread.gmane.org/gmane.linux.gentoo.devel/87641
From: Michał Górny <mgorny <AT> gentoo.org>
Subject: New developer features in portage: cgroup,
network-sandbox, ipc-sandbox
Date: 2013-08-20 10:26:03 GMT
[10]: http://thread.gmane.org/gmane.linux.gentoo.devel/91131
From: Michał Górny <mgorny <AT> gentoo.org>
Subject: RFC: enabling ipc-sandbox & network-sandbox by default
Date: 2014-05-11 21:42:38 GMT
[11]: http://article.gmane.org/gmane.linux.gentoo.devel/87641
From: Michał Górny <mgorny <AT> gentoo.org>
Subject: New developer features in portage: cgroup,
network-sandbox, ipc-sandbox
Date: 2013-08-20 10:26:03 GMT
[12]: http://thread.gmane.org/gmane.linux.gentoo.devel/87641/focus=87658
From: Alexis Ballier <aballier <AT> gentoo.org>
Subject: Re: New developer features in portage: cgroup,
network-sandbox, ipc-sandbox
Date: 2013-08-20 15:04:35 GMT
---
ebuild-writing/functions/text.xml | 13 +++++++++++++
1 file changed, 13 insertions(+)
diff --git a/ebuild-writing/functions/text.xml b/ebuild-writing/functions/text.xml
index 09a910e..d10a51f 100644
--- a/ebuild-writing/functions/text.xml
+++ b/ebuild-writing/functions/text.xml
@@ -35,6 +35,19 @@ When testing or debugging, you can instruct Portage to execute a specific functi
from an ebuild by using the <c>ebuild</c> command, see the <c>ebuild(1)</c> manual
page for further information.
</p>
+
+<p>
+Downloading a package's source happens before any of these phases, so
+<c>emerge --fetchonly</c> should perform all the network access you
+need (unless you're using live ebuilds). Network access outside of
+this would not be cached locally (e.g. in <c>${DISTDIR}</c>, see
+<uri link="::ebuild-writing/variables#Predefined Read-Only Variables."/>),
+which makes it hard to have reproducible builds (see
+<uri link="::ebuild-writing/functions/src_unpack/cvs-sources#Disadvantages of CVS Sources"/>).
+Avoid network access in any phase by using local files, extending
+<c>SRC_URI</c> (see
+<uri link="::ebuild-writing/variables#Ebuild-defined Variables"/>), etc.
+</p>
</body>
<section>
next reply other threads:[~2014-10-18 17:36 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-10-18 17:35 Markos Chandras [this message]
-- strict thread matches above, loose matches on Subject: below --
2015-09-12 10:58 [gentoo-commits] proj/devmanual:master commit in: ebuild-writing/functions/ Markos Chandras
2016-02-23 7:17 Ulrich Müller
2016-06-05 12:43 Göktürk Yüksek
2019-11-12 17:18 Göktürk Yüksek
2019-11-12 17:18 Göktürk Yüksek
2020-12-29 22:08 Göktürk Yüksek
2021-06-18 5:10 Sam James
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1409759463.2a7d19973f0713e66b38b7af04a263ae248fe7ca.hwoarang@gentoo \
--to=hwoarang@gentoo.org \
--cc=gentoo-commits@lists.gentoo.org \
--cc=gentoo-dev@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox