All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] base/patch: Disable network for unpack/patch/configure/compile/install
@ 2021-12-22 23:20 Richard Purdie
  2021-12-23  5:28 ` [OE-core] " Alexander Kanavin
                   ` (2 more replies)
  0 siblings, 3 replies; 28+ messages in thread
From: Richard Purdie @ 2021-12-22 23:20 UTC (permalink / raw)
  To: openembedded-core

Use the newly added nonetwork task flag to disable network access where
possible in unpack/patch/configure/compile/install tasks.

We can't disable networking in sstate tasks due to sstate downloads and
also so we can report hash equivalence to the server.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
---
 meta/classes/base.bbclass  | 4 ++++
 meta/classes/patch.bbclass | 1 +
 2 files changed, 5 insertions(+)

diff --git a/meta/classes/base.bbclass b/meta/classes/base.bbclass
index b709777f243..e4c6c983b59 100644
--- a/meta/classes/base.bbclass
+++ b/meta/classes/base.bbclass
@@ -214,6 +214,7 @@ python create_source_date_epoch_stamp() {
     oe.reproducible.epochfile_write(source_date_epoch, d.getVar('SDE_FILE'), d)
 }
 do_unpack[postfuncs] += "create_source_date_epoch_stamp"
+do_unpack[nonetwork] = "1"
 
 def get_source_date_epoch_value(d):
     return oe.reproducible.epochfile_read(d.getVar('SDE_FILE'), d)
@@ -358,6 +359,7 @@ base_do_configure() {
 		echo ${BB_TASKHASH} > ${CONFIGURESTAMPFILE}
 	fi
 }
+do_configure[nonetwork] = "1"
 
 addtask compile after do_configure
 do_compile[dirs] = "${B}"
@@ -368,11 +370,13 @@ base_do_compile() {
 		bbnote "nothing to compile"
 	fi
 }
+do_compile[nonetwork] = "1"
 
 addtask install after do_compile
 do_install[dirs] = "${B}"
 # Remove and re-create ${D} so that is it guaranteed to be empty
 do_install[cleandirs] = "${D}"
+do_install[nonetwork] = "1"
 
 base_do_install() {
 	:
diff --git a/meta/classes/patch.bbclass b/meta/classes/patch.bbclass
index 8de70254919..57aaf7c31d1 100644
--- a/meta/classes/patch.bbclass
+++ b/meta/classes/patch.bbclass
@@ -164,6 +164,7 @@ patch_do_patch[vardepsexclude] = "PATCHRESOLVE"
 
 addtask patch after do_unpack
 do_patch[dirs] = "${WORKDIR}"
+do_patch[nonetwork] = "1"
 do_patch[depends] = "${PATCHDEPENDENCY}"
 
 EXPORT_FUNCTIONS do_patch
-- 
2.32.0



^ permalink raw reply related	[flat|nested] 28+ messages in thread

end of thread, other threads:[~2021-12-27 15:47 UTC | newest]

Thread overview: 28+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-12-22 23:20 [PATCH] base/patch: Disable network for unpack/patch/configure/compile/install Richard Purdie
2021-12-23  5:28 ` [OE-core] " Alexander Kanavin
2021-12-23 13:12   ` Richard Purdie
2021-12-23 10:49 ` Peter Kjellerstedt
2021-12-23 11:31   ` Konrad Weihmann
2021-12-23 13:11     ` Richard Purdie
2021-12-23 13:19       ` Konrad Weihmann
2021-12-23 14:52         ` Andreas Müller
2021-12-23 15:01           ` Konrad Weihmann
2021-12-23 15:54       ` Alexander Kanavin
2021-12-23 15:11   ` Jose Quaresma
2021-12-24  6:00 ` Khem Raj
2021-12-24  8:30   ` Richard Purdie
2021-12-24 10:36     ` Konrad Weihmann
2021-12-25 19:32       ` Stefan Herbrechtsmeier
2021-12-25 19:41         ` Alexander Kanavin
2021-12-25 20:43           ` Konrad Weihmann
2021-12-27 12:54             ` Stefan Herbrechtsmeier
2021-12-27 13:22               ` Konrad Weihmann
     [not found]           ` <16C41A407A5C2599.27787@lists.openembedded.org>
2021-12-25 21:09             ` Konrad Weihmann
2021-12-27 13:38           ` Stefan Herbrechtsmeier
2021-12-27 14:05             ` Alexander Kanavin
2021-12-27 14:54             ` Eero Aaltonen
2021-12-27 15:47               ` Stefan Herbrechtsmeier
2021-12-25 20:58         ` Konrad Weihmann
2021-12-27 13:13           ` Stefan Herbrechtsmeier
2021-12-25 19:41       ` Khem Raj
2021-12-25 19:25     ` Stefan Herbrechtsmeier

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.