[ptest-runner 3/5] mem: Simplify memory management
?ukasz Majewski
From: Adrian Freihofer <adrian.freihofer@...>
Removes the following warnings thrown by make && valgrind -s --leak-check=3Dfull ./ptest-runner -d tests/data2 =3D=3D4154390=3D=3D Invalid write of size 8 =3D=3D4154390=3D=3D at 0x40360D: run_child (utils.c:357) =3D=3D4154390=3D=3D by 0x403C5B: run_ptests (utils.c:534) =3D=3D4154390=3D=3D by 0x402C4D: main (main.c:223) =3D=3D4154390=3D=3D Address 0x4a66440 is 0 bytes inside a block of size = 2 alloc'd =3D=3D4154390=3D=3D at 0x4839809: malloc (vg_replace_malloc.c:307) =3D=3D4154390=3D=3D by 0x4035E4: run_child (utils.c:354) =3D=3D4154390=3D=3D by 0x403C5B: run_ptests (utils.c:534) =3D=3D4154390=3D=3D by 0x402C4D: main (main.c:223) =3D=3D4154390=3D=3D =3D=3D4154390=3D=3D Invalid write of size 8 =3D=3D4154390=3D=3D at 0x403618: run_child (utils.c:358) =3D=3D4154390=3D=3D by 0x403C5B: run_ptests (utils.c:534) =3D=3D4154390=3D=3D by 0x402C4D: main (main.c:223) =3D=3D4154390=3D=3D Address 0x4a66448 is 6 bytes after a block of size 2= alloc'd =3D=3D4154390=3D=3D at 0x4839809: malloc (vg_replace_malloc.c:307) =3D=3D4154390=3D=3D by 0x4035E4: run_child (utils.c:354) =3D=3D4154390=3D=3D by 0x403C5B: run_ptests (utils.c:534) =3D=3D4154390=3D=3D by 0x402C4D: main (main.c:223) =3D=3D4154390=3D=3D =3D=3D4154390=3D=3D Syscall param execve(argv) points to unaddressable by= te(s) =3D=3D4154390=3D=3D at 0x4955C2B: execve (in /usr/lib64/libc-2.32.so) =3D=3D4154390=3D=3D by 0x40365E: run_child (utils.c:368) =3D=3D4154390=3D=3D by 0x403C5B: run_ptests (utils.c:534) =3D=3D4154390=3D=3D by 0x402C4D: main (main.c:223) =3D=3D4154390=3D=3D Address 0x4a66442 is 0 bytes after a block of size 2= alloc'd =3D=3D4154390=3D=3D at 0x4839809: malloc (vg_replace_malloc.c:307) =3D=3D4154390=3D=3D by 0x4035E4: run_child (utils.c:354) =3D=3D4154390=3D=3D by 0x403C5B: run_ptests (utils.c:534) =3D=3D4154390=3D=3D by 0x402C4D: main (main.c:223) Signed-off-by: Adrian Freihofer <adrian.freihofer@...> --- utils.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/utils.c b/utils.c index bce9808..a23679a 100644 --- a/utils.c +++ b/utils.c @@ -351,12 +351,9 @@ read_child(void *arg) static inline void run_child(char *run_ptest, int fd_stdout, int fd_stderr) { - char **argv =3D malloc(sizeof(char) * 2); + char *const argv[2] =3D {run_ptest, NULL}; chdir(dirname(strdup(run_ptest))); =20 - argv[0] =3D run_ptest; - argv[1] =3D NULL; - dup2(fd_stdout, STDOUT_FILENO); // XXX: Redirect stderr to stdout to avoid buffer ordering problems. dup2(fd_stdout, STDERR_FILENO); --=20 2.20.1 |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
[ptest-runner 2/5] mem: Fix memleak for ptest_opts
?ukasz Majewski
From: Adrian Freihofer <adrian.freihofer@...>
make && valgrind -s --leak-check=3Dfull ./ptest-runner -d tests/data2 =3D=3D4154029=3D=3D HEAP SUMMARY: =3D=3D4154029=3D=3D in use at exit: 20 bytes in 2 blocks =3D=3D4154029=3D=3D total heap usage: 45 allocs, 43 frees, 42,909 bytes= allocated =3D=3D4154029=3D=3D =3D=3D4154029=3D=3D 20 (8 direct, 12 indirect) bytes in 1 blocks are defi= nitely lost in loss record 2 of 2 =3D=3D4154029=3D=3D at 0x4839809: malloc (vg_replace_malloc.c:307) =3D=3D4154029=3D=3D by 0x40252D: str2array (main.c:70) =3D=3D4154029=3D=3D by 0x402768: main (main.c:119) =3D=3D4154029=3D=3D =3D=3D4154029=3D=3D LEAK SUMMARY: =3D=3D4154029=3D=3D definitely lost: 8 bytes in 1 blocks =3D=3D4154029=3D=3D indirectly lost: 12 bytes in 1 blocks =3D=3D4154029=3D=3D possibly lost: 0 bytes in 0 blocks =3D=3D4154029=3D=3D still reachable: 0 bytes in 0 blocks =3D=3D4154029=3D=3D suppressed: 0 bytes in 0 blocks =3D=3D4154029=3D=3D =3D=3D4154029=3D=3D ERROR SUMMARY: 1 errors from 1 contexts (suppressed: = 0 from 0) With this patch valgrind reports 0 errors. Signed-off-by: Adrian Freihofer <adrian.freihofer@...> --- main.c | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/main.c b/main.c index 467548e..e73626c 100644 --- a/main.c +++ b/main.c @@ -84,6 +84,25 @@ str2array(char *str, const char *delim, int *num) return array; } =20 +void cleanup_ptest_opts(struct ptest_options *opts) +{ + for (int i=3D0; i < opts->dirs_no; i++) + free(opts->dirs[i]); + + free(opts->dirs); + opts->dirs =3D NULL; + + if (opts->ptests) { + free(opts->ptests); + opts->ptests =3D NULL; + } + + if (opts->xml_filename) { + free(opts->xml_filename); + opts->xml_filename =3D NULL; + } +} + int main(int argc, char *argv[]) { @@ -98,7 +117,7 @@ main(int argc, char *argv[]) #endif =20 struct ptest_list *head, *run; - struct ptest_options opts; + __attribute__ ((__cleanup__(cleanup_ptest_opts))) struct ptest_options = opts; =20 opts.dirs =3D malloc(sizeof(char **) * 1); CHECK_ALLOCATION(opts.dirs, 1, 1); --=20 2.20.1 |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
[ptest-runner 1/5] git: Extend the gitignore
?ukasz Majewski
From: Adrian Freihofer <adrian.freihofer@...>
Signed-off-by: Adrian Freihofer <adrian.freihofer@...> --- .gitignore | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 .gitignore diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..ef07e6a --- /dev/null +++ b/.gitignore @@ -0,0 +1,3 @@ +*.o +ptest-runner +ptest-runner-test --=20 2.20.1 |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
[ptest-runner 0/5] ptest: Various memory fixes and enhancements
?ukasz Majewski
This patch series provides some memory management fixes and corrected
return code handling for ptest-runner2. Adrian Freihofer (4): git: Extend the gitignore mem: Fix memleak for ptest_opts mem: Simplify memory management mem: Refactor ptest_list cleanup Lukasz Majewski (1): main: Do not return number of failed tests when calling ptest-runner .gitignore | 3 +++ main.c | 33 ++++++++++++++++++++++++++++----- ptest_list.c | 13 ++++--------- ptest_list.h | 8 +------- tests/ptest_list.c | 13 +++++++------ tests/utils.c | 22 +++++++++++----------- utils.c | 11 ++++------- 7 files changed, 58 insertions(+), 45 deletions(-) create mode 100644 .gitignore --=20 2.20.1 |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
QA notification for completed autobuilder build (yocto-3.4_M2.rc1)
Richard Purdie
A build flagged for QA (yocto-3.4_M2.rc1) was completed on the autobuilder and is available at:
https://autobuilder.yocto.io/pub/releases/yocto-3.4_M2.rc1 Build hash information: bitbake: 13e2855bff6a6ead6dbd33c5be4b988aafcd4afa meta-arm: 9efa3b5683a5dd7ebbf63ff31b889ed589ff7a9a meta-gplv2: b3fa26bc777ec0136ce189d90123b50f6ee567b9 meta-intel: 94c097a82cf9167fa567c2af80d5e39a3fbbc11f meta-mingw: 8f3b6e3772879dc2caec8fe249ce277fbb1aa55f oecore: c4fc226c2e3856b942bb4f57ead21a64c3dc8c0d poky: 1ad79313a5c3e6a453fbeb44caac5c5bbad46d3c [RP sending manually as the original failed to get through] This is an automated message from the Yocto Project Autobuilder Git: git://git.yoctoproject.org/yocto-autobuilder2 Email: richard.purdie@... |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Re: [yocto-kernel-cache] [yocto-5.10] nxp-imx8: Enable IMX_SCU_SOC config
Bruce Ashfield
In message: RE: [yocto-kernel-cache] [yocto-5.10] nxp-imx8: Enable IMX_SCU_SOC config
on 16/07/2021 Wang, Xiaolei wrote: Hi bruceThe original patch didn't have a branch specified, so it somehow managed to miss my filters. this is now merged Bruce
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Re: c++ dmalloc library versions not building for Rocko
On Tue, Jul 20, 2021 at 8:25 AM forstevers via lists.yoctoproject.org
<steve=echodyne.com@...> wrote: there should be a config.log generated in this component's build directory which should have more information on what check failed and perhaps some more errors to tell what went wrong. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Re: [layerindex-web][PATCH 00/15] Upgrade to Django 3.2.5 LTS and Celery 5
Richard Purdie
On Sun, 2021-07-18 at 16:07 -0700, Tim Orling wrote:
The current code base uses Django 2.2.x which will go out of extendedI don't have the skills to review this in detail but it sounds like a good step forward for many different reasons, thanks! Cheers, Richard |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
eSDK generation problem
saurabhdaga@...
I am generating eSDK for my image which includes meta-qt layer for graphics.
meta-qt uses python3 where as my meta layer uses python2 my meta layer uses python2-mako where as meta-qt layer uses python3-mako. While generating eSDK both meta layers tries to install mako-render in /usr/bin which generate build error for eSDK generation. Any suggestion how to resolve this issue. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
c++ dmalloc library versions not building for Rocko
forstevers
Trying to produce c++ versions of dmalloc libraries.The dmalloc recipe dmalloc_5.5.2.bb looks to be configured to build the c++ versions with:
'EXTRA_OECONF += "--enable-threads --enable-cxx --enable-shlib"' But in the log.do_configure I see that the autoconf fails to find a c++ compiler, and I end up with the 'c' versions of the dmalloc library. configure: configurations for the dmalloc library configure: build utilities checking for aarch64-xilinx-linux-gcc... aarch64-xilinx-linux-gcc --sysroot=/extra_disk/home/ECHODYNE.INT/steve/projects/develop/jup-bsp/build/tmp/work/aarch64-xilinx-linux/dmalloc/5.5.2-r0/recipe-sysroot checking whether the C compiler works... yes checking for C compiler default output file name... a.out checking for suffix of executables... checking whether we are cross compiling... yes checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether aarch64-xilinx-linux-gcc --sysroot=/extra_disk/home/ECHODYNE.INT/steve/projects/develop/jup-bsp/build/tmp/work/aarch64-xilinx-linux/dmalloc/5.5.2-r0/recipe-sysroot accepts -g... yes checking for aarch64-xilinx-linux-gcc --sysroot=/extra_disk/home/ECHODYNE.INT/steve/projects/develop/jup-bsp/build/tmp/work/aarch64-xilinx-linux/dmalloc/5.5.2-r0/recipe-sysroot option to accept ISO C89... none needed checking whether we are using the GNU C++ compiler... yes checking whether aarch64-xilinx-linux-g++ --sysroot=/extra_disk/home/ECHODYNE.INT/steve/projects/develop/jup-bsp/build/tmp/work/aarch64-xilinx-linux/dmalloc/5.5.2-r0/recipe-sysroot accepts -g... yes configure: WARNING: could not find C++ compiler Any suggestions on how to get this recipe to build the requested c++ versions. Is there a dependency I can add in an append file to force it to recognize the compiler? |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Yocto Project Status WW29`21
Stephen Jolley
Current Dev Position: YP 3.4 M2 Next Deadline: 12th July 2021 YP 3.4 M2 build
Next Team Meetings:
Key Status/Updates:
Ways to contribute:
YP 3.4 Milestone Dates:
Planned upcoming dot releases:
Tracking Metrics:
The Yocto Project’s technical governance is through its Technical Steering Committee, more information is available at: https://wiki.yoctoproject.org/wiki/TSC
The Status reports are now stored on the wiki at: https://wiki.yoctoproject.org/wiki/Weekly_Status
[If anyone has suggestions for other information you’d like to see on this weekly status update, let us know!]
Thanks,
Stephen K. Jolley Yocto Project Program Manager ( Cell: (208) 244-4460 * Email: sjolley.yp.pm@...
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Re: #yocto
#yocto
Monsees, Steven C (US)
Thanks...
toggle quoted message
Show quoted text
-----Original Message-----
From: Ross Burton <ross@...> Sent: Tuesday, July 20, 2021 5:03 AM To: Monsees, Steven C (US) <steven.monsees@...> Cc: yocto@... Subject: Re: [yocto] #yocto External Email Alert This email has been sent from an account outside of the BAE Systems network. Please treat the email with caution, especially if you are requested to click on a link, decrypt/open an attachment, or enable macros. For further information on how to spot phishing, access “Cybersecurity OneSpace Page” and report phishing by clicking the button “Report Phishing” on the Outlook toolbar. Not deleting the source tree is the default behaviour. It sounds like you've inherited rm_work, so if you want to not delete build trees after completion then add the recipe name to RM_WORK_EXCLUDE. Ross On Mon, 19 Jul 2021 at 15:22, Monsees, Steven C (US) via lists.yoctoproject.org <steven.monsees=baesystems.com@...> wrote:
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Re: #yocto
#yocto
Ross Burton <ross@...>
Not deleting the source tree is the default behaviour. It sounds like
toggle quoted message
Show quoted text
you've inherited rm_work, so if you want to not delete build trees after completion then add the recipe name to RM_WORK_EXCLUDE. Ross On Mon, 19 Jul 2021 at 15:22, Monsees, Steven C (US) via lists.yoctoproject.org <steven.monsees=baesystems.com@...> wrote:
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Re: Exception: NotADirectoryError building Hardknott
Simon Haines <simon.haines@...>
On Mon, 19 Jul 2021 at 01:17, Richard Purdie <richard.purdie@...> wrote: How is your container filesystem setup/configured? It looks like the filesystem Thanks Richard, I suspect you're right. I'm using fuse-overlayfs which I'm mounting with the 'noxattrs' option because the host is Fedora and its SELinux configuration interferes with yocto in other ways. It looks like overlayfs uses xattrs in some cases for hard link resolution. I'll have to dig in deeper there, thanks for the pointer. Cheers, Simon. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Re: [poky] [PATCH] local.conf.sample: disable prelink
Hi Alex, RP, Mark,
I did some research on the subject in order to try to figure out what is going on. 1) I come to a similar conclusion with what found, but tried to look a bit deeper for the reason. 1.1) The reason that cross-prelink is not prelinking is, that for a quite some time by default everything is built with PIE mode by default and cross-prelink does not seem to be able to work on exe/libs compiled with PIE mode. So seeing the same behavior with and without prelinking is what I would expect as long as everything is compiled with PIE mode. A more detailed analysis of my tests can be found on my not yet officially published site: https://rlbl.me/prelink-1 https://rlbl.me/prelink-2 Alex: Can you please rebuild your test images without PIE mode and re-run the tests? Then we should have the 4 test cases: prelinked-with-pie no-prelink-with-pie prelink-no-pie no-prelink-no-pie I guess then we can discuss what are the next steps. In my opinion the current default settings, which compile close to everything in PIE mode, but invoke also cross-prelink do not make much sense. The question is: "Do we want to drop cross-prelink, or do we want to drag it along and come up more fine-grained configuration options?" We could e.g. exclude certain files from pre-linking. IMHO cross-prelink still works, but not on exe/libs which were compiled in PIE mode. Regards, Robert |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
M+ & H bugs with Milestone Movements WW29
Stephen Jolley
All,
Thanks,
Stephen K. Jolley Yocto Project Program Manager ( Cell: (208) 244-4460 * Email: sjolley.yp.pm@...
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Enhancements/Bugs closed WW29!
Stephen Jolley
All,
Thanks,
Stephen K. Jolley Yocto Project Program Manager ( Cell: (208) 244-4460 * Email: sjolley.yp.pm@...
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Current high bug count owners for Yocto Project 3.4
Stephen Jolley
All,
Thanks,
Stephen K. Jolley Yocto Project Program Manager ( Cell: (208) 244-4460 * Email: sjolley.yp.pm@...
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Yocto Project Newcomer & Unassigned Bugs - Help Needed
Stephen Jolley
All,
The triage team is starting to try and collect up and classify bugs which a newcomer to the project would be able to work on in a way which means people can find them. They're being listed on the triage page under the appropriate heading: https://wiki.yoctoproject.org/wiki/Bug_Triage#Newcomer_Bugs Also please review: https://www.openembedded.org/wiki/How_to_submit_a_patch_to_OpenEmbedded and how to create a bugzilla account at: https://bugzilla.yoctoproject.org/createaccount.cgi The idea is these bugs should be straight forward for a person to help work on who doesn't have deep experience with the project. If anyone can help, please take ownership of the bug and send patches! If anyone needs help/advice there are people on irc who can likely do so, or some of the more experienced contributors will likely be happy to help too.
Also, the triage team meets weekly and does its best to handle the bugs reported into the Bugzilla. The number of people attending that meeting has fallen, as have the number of people available to help fix bugs. One of the things we hear users report is they don't know how to help. We (the triage team) are therefore going to start reporting out the currently 364 unassigned or newcomer bugs.
We're hoping people may be able to spare some time now and again to help out with these. Bugs are split into two types, "true bugs" where things don't work as they should and "enhancements" which are features we'd want to add to the system. There are also roughly four different "priority" classes right now, “3.2”, “3.3, "3.99" and "Future", the more pressing/urgent issues being in "3.2" and then “3.3”.
Please review this link and if a bug is something you would be able to help with either take ownership of the bug, or send me (sjolley.yp.pm@...) an e-mail with the bug number you would like and I will assign it to you (please make sure you have a Bugzilla account). The list is at: https://wiki.yoctoproject.org/wiki/Bug_Triage_Archive#Unassigned_or_Newcomer_Bugs
Thanks,
Stephen K. Jolley Yocto Project Program Manager ( Cell: (208) 244-4460 * Email: sjolley.yp.pm@...
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
[PATCH v2] Add a new variable:'BB_FETCH_ENV' to export Fetcher env
Mingrui Ren
From 59ed46416217e0c0b44203bc58e472e4068dba83 Mon Sep 17 00:00:00 2001
From: Mingrui Ren <jiladahe1997@...> Date: Mon, 19 Jul 2021 23:02:19 +0800 Subject: [PATCH v2] Add a new variable:'BB_FETCH_ENV' to export Fetcher env The environment variables used by Fetcher are hard-coded, and are obtained from HOST env instead of bitbake datastore This patch add a new variable 'BB_FETCH_ENV',and modify the default BB_ENV_EXTRAWHITE_OE for backwards compatibility, trying to fix the problems above. Signed-off-by: Mingrui Ren <jiladahe1997@...> --- changes in v2: a.changes the variable name from 'FETCH_ENV_WHITELIST' to 'BB_FETCH_ENV'. b.add 'BB_FETCH_ENV' in local.conf, rather than export it in host enviroment. c.modify existing BB_ENV_EXTRAWHITE_OE for backwards compatibility. bitbake/lib/bb/fetch2/__init__.py | 19 ++----------------- meta-poky/conf/local.conf.sample | 11 +++++++++++ scripts/oe-buildenv-internal | 3 ++- 3 files changed, 15 insertions(+), 18 deletions(-) diff --git a/bitbake/lib/bb/fetch2/__init__.py b/bitbake/lib/bb/fetch2/__init__.py index c8e91262a9..3e779fa78d 100644 --- a/bitbake/lib/bb/fetch2/__init__.py +++ b/bitbake/lib/bb/fetch2/__init__.py @@ -820,21 +820,7 @@ def runfetchcmd(cmd, d, quiet=False, cleanup=None, log=None, workdir=None): # rather than host provided # Also include some other variables. # FIXME: Should really include all export varaiables? - exportvars = ['HOME', 'PATH', - 'HTTP_PROXY', 'http_proxy', - 'HTTPS_PROXY', 'https_proxy', - 'FTP_PROXY', 'ftp_proxy', - 'FTPS_PROXY', 'ftps_proxy', - 'NO_PROXY', 'no_proxy', - 'ALL_PROXY', 'all_proxy', - 'GIT_PROXY_COMMAND', - 'GIT_SSH', - 'GIT_SSL_CAINFO', - 'GIT_SMART_HTTP', - 'SSH_AUTH_SOCK', 'SSH_AGENT_PID', - 'SOCKS5_USER', 'SOCKS5_PASSWD', - 'DBUS_SESSION_BUS_ADDRESS', - 'P4CONFIG'] + exportvars = (d.getVar("BB_FETCH_ENV") or "").split() if not cleanup: cleanup = [] @@ -850,9 +836,8 @@ def runfetchcmd(cmd, d, quiet=False, cleanup=None, log=None, workdir=None): d.setVar("PV", "fetcheravoidrecurse") d.setVar("PR", "fetcheravoidrecurse") - origenv = d.getVar("BB_ORIGENV", False) for var in exportvars: - val = d.getVar(var) or (origenv and origenv.getVar(var)) + val = d.getVar(var) if val: cmd = 'export ' + var + '=\"%s\"; %s' % (val, cmd) diff --git a/meta-poky/conf/local.conf.sample b/meta-poky/conf/local.conf.sample index fb14379d28..b01a04a1a6 100644 --- a/meta-poky/conf/local.conf.sample +++ b/meta-poky/conf/local.conf.sample @@ -272,3 +272,14 @@ PACKAGECONFIG_append_pn-qemu-system-native = " sdl" # track the version of this file when it was generated. This can safely be ignored if # this doesn't mean anything to you. CONF_VERSION = "1" + +# Bitbake Fetcher Environment Variables +# +# Specific which environment variables in bitbake datastore used by fetcher when +# executing fetch task. +# NOTE: You may need to modify BB_ENV_EXTRAWHITE, in order to add environment +# variable into bitbake datastore first. +BB_FETCH_ENV ?= "HOME PATH HTTP_PROXY http_proxy HTTPS_PROXY https_proxy \ +FTP_PROXY ftp_proxy FTPS_PROXY ftps_proxy NO_PROXY no_proxy ALL_PROXY all_proxy \ +GIT_PROXY_COMMAND GIT_SSH GIT_SSL_CAINFO GIT_SMART_HTTP SSH_AUTH_SOCK SSH_AGENT_PID \ +SOCKS5_USER SOCKS5_PASSWD DBUS_SESSION_BUS_ADDRESS P4CONFIG" \ No newline at end of file diff --git a/scripts/oe-buildenv-internal b/scripts/oe-buildenv-internal index e0d920f2fc..7abb4af593 100755 --- a/scripts/oe-buildenv-internal +++ b/scripts/oe-buildenv-internal @@ -111,7 +111,8 @@ HTTPS_PROXY https_proxy FTP_PROXY ftp_proxy FTPS_PROXY ftps_proxy ALL_PROXY \ all_proxy NO_PROXY no_proxy SSH_AGENT_PID SSH_AUTH_SOCK BB_SRCREV_POLICY \ SDKMACHINE BB_NUMBER_THREADS BB_NO_NETWORK PARALLEL_MAKE GIT_PROXY_COMMAND \ SOCKS5_PASSWD SOCKS5_USER SCREENDIR STAMPS_DIR BBPATH_EXTRA BB_SETSCENE_ENFORCE \ -BB_LOGCONFIG" +BB_LOGCONFIG HOME PATH GIT_SSH GIT_SSL_CAINFO GIT_SMART_HTTP DBUS_SESSION_BUS_ADDRESS \ +P4CONFIG" BB_ENV_EXTRAWHITE="$(echo $BB_ENV_EXTRAWHITE $BB_ENV_EXTRAWHITE_OE | tr ' ' '\n' | LC_ALL=C sort --unique | tr '\n' ' ')" -- 2.20.1 |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|