summaryrefslogtreecommitdiffstats
path: root/bitbake
diff options
context:
space:
mode:
Diffstat (limited to 'bitbake')
-rwxr-xr-xbitbake/bin/toaster2
-rw-r--r--bitbake/doc/bitbake-user-manual/bitbake-user-manual-execution.rst4
-rw-r--r--bitbake/doc/bitbake-user-manual/bitbake-user-manual-metadata.rst18
-rw-r--r--bitbake/doc/bitbake-user-manual/bitbake-user-manual-ref-variables.rst25
-rw-r--r--bitbake/lib/bb/data_smart.py2
-rw-r--r--bitbake/lib/bb/tests/runqueue.py4
-rw-r--r--bitbake/lib/bb/utils.py20
7 files changed, 39 insertions, 36 deletions
diff --git a/bitbake/bin/toaster b/bitbake/bin/toaster
index 6b90ee187e..8711014cfe 100755
--- a/bitbake/bin/toaster
+++ b/bitbake/bin/toaster
@@ -248,7 +248,7 @@ fi
248# 3) the sqlite db if that is being used. 248# 3) the sqlite db if that is being used.
249# 4) pid's we need to clean up on exit/shutdown 249# 4) pid's we need to clean up on exit/shutdown
250export TOASTER_DIR=$TOASTERDIR 250export TOASTER_DIR=$TOASTERDIR
251export BB_ENV_EXTRAWHITE="$BB_ENV_EXTRAWHITE TOASTER_DIR" 251export BB_ENV_PASSTHROUGH_ADDITIONS="$BB_ENV_PASSTHROUGH_ADDITIONS TOASTER_DIR"
252 252
253# Determine the action. If specified by arguments, fine, if not, toggle it 253# Determine the action. If specified by arguments, fine, if not, toggle it
254if [ "$CMD" = "start" ] ; then 254if [ "$CMD" = "start" ] ; then
diff --git a/bitbake/doc/bitbake-user-manual/bitbake-user-manual-execution.rst b/bitbake/doc/bitbake-user-manual/bitbake-user-manual-execution.rst
index f99001bc76..31ee4e349e 100644
--- a/bitbake/doc/bitbake-user-manual/bitbake-user-manual-execution.rst
+++ b/bitbake/doc/bitbake-user-manual/bitbake-user-manual-execution.rst
@@ -79,8 +79,8 @@ directives.
79Prior to parsing configuration files, BitBake looks at certain 79Prior to parsing configuration files, BitBake looks at certain
80variables, including: 80variables, including:
81 81
82- :term:`BB_ENV_WHITELIST` 82- :term:`BB_ENV_PASSTHROUGH`
83- :term:`BB_ENV_EXTRAWHITE` 83- :term:`BB_ENV_PASSTHROUGH_ADDITIONS`
84- :term:`BB_PRESERVE_ENV` 84- :term:`BB_PRESERVE_ENV`
85- :term:`BB_ORIGENV` 85- :term:`BB_ORIGENV`
86- :term:`BITBAKE_UI` 86- :term:`BITBAKE_UI`
diff --git a/bitbake/doc/bitbake-user-manual/bitbake-user-manual-metadata.rst b/bitbake/doc/bitbake-user-manual/bitbake-user-manual-metadata.rst
index 8496e1da53..174cac7818 100644
--- a/bitbake/doc/bitbake-user-manual/bitbake-user-manual-metadata.rst
+++ b/bitbake/doc/bitbake-user-manual/bitbake-user-manual-metadata.rst
@@ -1343,8 +1343,8 @@ the build machine cannot influence the build.
1343.. note:: 1343.. note::
1344 1344
1345 By default, BitBake cleans the environment to include only those 1345 By default, BitBake cleans the environment to include only those
1346 things exported or listed in its whitelist to ensure that the build 1346 things exported or listed in its passthrough list to ensure that the
1347 environment is reproducible and consistent. You can prevent this 1347 build environment is reproducible and consistent. You can prevent this
1348 "cleaning" by setting the :term:`BB_PRESERVE_ENV` variable. 1348 "cleaning" by setting the :term:`BB_PRESERVE_ENV` variable.
1349 1349
1350Consequently, if you do want something to get passed into the build task 1350Consequently, if you do want something to get passed into the build task
@@ -1352,14 +1352,14 @@ environment, you must take these two steps:
1352 1352
1353#. Tell BitBake to load what you want from the environment into the 1353#. Tell BitBake to load what you want from the environment into the
1354 datastore. You can do so through the 1354 datastore. You can do so through the
1355 :term:`BB_ENV_WHITELIST` and 1355 :term:`BB_ENV_PASSTHROUGH` and
1356 :term:`BB_ENV_EXTRAWHITE` variables. For 1356 :term:`BB_ENV_PASSTHROUGH_ADDITIONS` variables. For
1357 example, assume you want to prevent the build system from accessing 1357 example, assume you want to prevent the build system from accessing
1358 your ``$HOME/.ccache`` directory. The following command "whitelists" 1358 your ``$HOME/.ccache`` directory. The following command adds the
1359 the environment variable ``CCACHE_DIR`` causing BitBake to allow that 1359 the environment variable ``CCACHE_DIR`` to BitBake's passthrough
1360 variable into the datastore:: 1360 list to allow that variable into the datastore::
1361 1361
1362 export BB_ENV_EXTRAWHITE="$BB_ENV_EXTRAWHITE CCACHE_DIR" 1362 export BB_ENV_PASSTHROUGH_ADDITIONS="$BB_ENV_PASSTHROUGH_ADDITIONS CCACHE_DIR"
1363 1363
1364#. Tell BitBake to export what you have loaded into the datastore to the 1364#. Tell BitBake to export what you have loaded into the datastore to the
1365 task environment of every running task. Loading something from the 1365 task environment of every running task. Loading something from the
@@ -1376,7 +1376,7 @@ environment, you must take these two steps:
1376 A side effect of the previous steps is that BitBake records the 1376 A side effect of the previous steps is that BitBake records the
1377 variable as a dependency of the build process in things like the 1377 variable as a dependency of the build process in things like the
1378 setscene checksums. If doing so results in unnecessary rebuilds of 1378 setscene checksums. If doing so results in unnecessary rebuilds of
1379 tasks, you can whitelist the variable so that the setscene code 1379 tasks, you can also flag the variable so that the setscene code
1380 ignores the dependency when it creates checksums. 1380 ignores the dependency when it creates checksums.
1381 1381
1382Sometimes, it is useful to be able to obtain information from the 1382Sometimes, it is useful to be able to obtain information from the
diff --git a/bitbake/doc/bitbake-user-manual/bitbake-user-manual-ref-variables.rst b/bitbake/doc/bitbake-user-manual/bitbake-user-manual-ref-variables.rst
index bdd4127a48..b2379e62af 100644
--- a/bitbake/doc/bitbake-user-manual/bitbake-user-manual-ref-variables.rst
+++ b/bitbake/doc/bitbake-user-manual/bitbake-user-manual-ref-variables.rst
@@ -236,23 +236,23 @@ overview of their function and contents.
236 based on the interval occur each time a respective interval is 236 based on the interval occur each time a respective interval is
237 reached beyond the initial warning (i.e. 1 Gbytes and 100 Kbytes). 237 reached beyond the initial warning (i.e. 1 Gbytes and 100 Kbytes).
238 238
239 :term:`BB_ENV_EXTRAWHITE` 239 :term:`BB_ENV_PASSTHROUGH_ADDITIONS`
240 Specifies an additional set of variables to allow through (whitelist) 240 Specifies an additional set of variables to allow through from the
241 from the external environment into BitBake's datastore. This list of 241 external environment into BitBake's datastore. This list of variables
242 variables are on top of the internal list set in 242 are on top of the internal list set in
243 :term:`BB_ENV_WHITELIST`. 243 :term:`BB_ENV_PASSTHROUGH`.
244 244
245 .. note:: 245 .. note::
246 246
247 You must set this variable in the external environment in order 247 You must set this variable in the external environment in order
248 for it to work. 248 for it to work.
249 249
250 :term:`BB_ENV_WHITELIST` 250 :term:`BB_ENV_PASSTHROUGH`
251 Specifies the internal whitelist of variables to allow through from 251 Specifies the internal list of variables to allow through from
252 the external environment into BitBake's datastore. If the value of 252 the external environment into BitBake's datastore. If the value of
253 this variable is not specified (which is the default), the following 253 this variable is not specified (which is the default), the following
254 list is used: :term:`BBPATH`, :term:`BB_PRESERVE_ENV`, 254 list is used: :term:`BBPATH`, :term:`BB_PRESERVE_ENV`,
255 :term:`BB_ENV_WHITELIST`, and :term:`BB_ENV_EXTRAWHITE`. 255 :term:`BB_ENV_PASSTHROUGH`, and :term:`BB_ENV_PASSTHROUGH_ADDITIONS`.
256 256
257 .. note:: 257 .. note::
258 258
@@ -452,8 +452,9 @@ overview of their function and contents.
452 452
453 :term:`BB_ORIGENV` 453 :term:`BB_ORIGENV`
454 Contains a copy of the original external environment in which BitBake 454 Contains a copy of the original external environment in which BitBake
455 was run. The copy is taken before any whitelisted variable values are 455 was run. The copy is taken before any variable values configured to
456 filtered into BitBake's datastore. 456 pass through from the external environment are filtered into BitBake's
457 datastore.
457 458
458 .. note:: 459 .. note::
459 460
@@ -461,8 +462,8 @@ overview of their function and contents.
461 queried using the normal datastore operations. 462 queried using the normal datastore operations.
462 463
463 :term:`BB_PRESERVE_ENV` 464 :term:`BB_PRESERVE_ENV`
464 Disables whitelisting and instead allows all variables through from 465 Disables environment filtering and instead allows all variables through
465 the external environment into BitBake's datastore. 466 from the external environment into BitBake's datastore.
466 467
467 .. note:: 468 .. note::
468 469
diff --git a/bitbake/lib/bb/data_smart.py b/bitbake/lib/bb/data_smart.py
index 7cf17b0057..97da43fff4 100644
--- a/bitbake/lib/bb/data_smart.py
+++ b/bitbake/lib/bb/data_smart.py
@@ -34,6 +34,8 @@ __whitespace_split__ = re.compile(r'(\s)')
34__override_regexp__ = re.compile(r'[a-z0-9]+') 34__override_regexp__ = re.compile(r'[a-z0-9]+')
35 35
36bitbake_renamed_vars = { 36bitbake_renamed_vars = {
37 "BB_ENV_WHITELIST": "BB_ENV_PASSTHROUGH",
38 "BB_ENV_EXTRAWHITE": "BB_ENV_PASSTHROUGH_ADDITIONS",
37 "BB_HASHBASE_WHITELIST": "BB_BASEHASH_IGNORE_VARS", 39 "BB_HASHBASE_WHITELIST": "BB_BASEHASH_IGNORE_VARS",
38 "BB_HASHTASK_WHITELIST": "BB_TASKHASH_IGNORE_TASKS", 40 "BB_HASHTASK_WHITELIST": "BB_TASKHASH_IGNORE_TASKS",
39} 41}
diff --git a/bitbake/lib/bb/tests/runqueue.py b/bitbake/lib/bb/tests/runqueue.py
index 35d5a843ff..79b79b5a7c 100644
--- a/bitbake/lib/bb/tests/runqueue.py
+++ b/bitbake/lib/bb/tests/runqueue.py
@@ -29,14 +29,14 @@ class RunQueueTests(unittest.TestCase):
29 def run_bitbakecmd(self, cmd, builddir, sstatevalid="", slowtasks="", extraenv=None, cleanup=False): 29 def run_bitbakecmd(self, cmd, builddir, sstatevalid="", slowtasks="", extraenv=None, cleanup=False):
30 env = os.environ.copy() 30 env = os.environ.copy()
31 env["BBPATH"] = os.path.realpath(os.path.join(os.path.dirname(__file__), "runqueue-tests")) 31 env["BBPATH"] = os.path.realpath(os.path.join(os.path.dirname(__file__), "runqueue-tests"))
32 env["BB_ENV_EXTRAWHITE"] = "SSTATEVALID SLOWTASKS TOPDIR" 32 env["BB_ENV_PASSTHROUGH_ADDITIONS"] = "SSTATEVALID SLOWTASKS TOPDIR"
33 env["SSTATEVALID"] = sstatevalid 33 env["SSTATEVALID"] = sstatevalid
34 env["SLOWTASKS"] = slowtasks 34 env["SLOWTASKS"] = slowtasks
35 env["TOPDIR"] = builddir 35 env["TOPDIR"] = builddir
36 if extraenv: 36 if extraenv:
37 for k in extraenv: 37 for k in extraenv:
38 env[k] = extraenv[k] 38 env[k] = extraenv[k]
39 env["BB_ENV_EXTRAWHITE"] = env["BB_ENV_EXTRAWHITE"] + " " + k 39 env["BB_ENV_PASSTHROUGH_ADDITIONS"] = env["BB_ENV_PASSTHROUGH_ADDITIONS"] + " " + k
40 try: 40 try:
41 output = subprocess.check_output(cmd, env=env, stderr=subprocess.STDOUT,universal_newlines=True, cwd=builddir) 41 output = subprocess.check_output(cmd, env=env, stderr=subprocess.STDOUT,universal_newlines=True, cwd=builddir)
42 print(output) 42 print(output)
diff --git a/bitbake/lib/bb/utils.py b/bitbake/lib/bb/utils.py
index c07d19cfae..2e8256101a 100644
--- a/bitbake/lib/bb/utils.py
+++ b/bitbake/lib/bb/utils.py
@@ -589,8 +589,8 @@ def preserved_envvars():
589 v = [ 589 v = [
590 'BBPATH', 590 'BBPATH',
591 'BB_PRESERVE_ENV', 591 'BB_PRESERVE_ENV',
592 'BB_ENV_WHITELIST', 592 'BB_ENV_PASSTHROUGH',
593 'BB_ENV_EXTRAWHITE', 593 'BB_ENV_PASSTHROUGH_ADDITIONS',
594 ] 594 ]
595 return v + preserved_envvars_exported() 595 return v + preserved_envvars_exported()
596 596
@@ -621,21 +621,21 @@ def filter_environment(good_vars):
621 621
622def approved_variables(): 622def approved_variables():
623 """ 623 """
624 Determine and return the list of whitelisted variables which are approved 624 Determine and return the list of variables which are approved
625 to remain in the environment. 625 to remain in the environment.
626 """ 626 """
627 if 'BB_PRESERVE_ENV' in os.environ: 627 if 'BB_PRESERVE_ENV' in os.environ:
628 return os.environ.keys() 628 return os.environ.keys()
629 approved = [] 629 approved = []
630 if 'BB_ENV_WHITELIST' in os.environ: 630 if 'BB_ENV_PASSTHROUGH' in os.environ:
631 approved = os.environ['BB_ENV_WHITELIST'].split() 631 approved = os.environ['BB_ENV_PASSTHROUGH'].split()
632 approved.extend(['BB_ENV_WHITELIST']) 632 approved.extend(['BB_ENV_PASSTHROUGH'])
633 else: 633 else:
634 approved = preserved_envvars() 634 approved = preserved_envvars()
635 if 'BB_ENV_EXTRAWHITE' in os.environ: 635 if 'BB_ENV_PASSTHROUGH_ADDITIONS' in os.environ:
636 approved.extend(os.environ['BB_ENV_EXTRAWHITE'].split()) 636 approved.extend(os.environ['BB_ENV_PASSTHROUGH_ADDITIONS'].split())
637 if 'BB_ENV_EXTRAWHITE' not in approved: 637 if 'BB_ENV_PASSTHROUGH_ADDITIONS' not in approved:
638 approved.extend(['BB_ENV_EXTRAWHITE']) 638 approved.extend(['BB_ENV_PASSTHROUGH_ADDITIONS'])
639 return approved 639 return approved
640 640
641def clean_environment(): 641def clean_environment():