* any *compelling* reasons to whitelist env vars for an OE build? @ 2021-03-25 14:08 Robert P. J. Day 2021-03-25 14:15 ` [OE-core] " Mark Hatle [not found] ` <1b153bce-a66a-45ee-a5c6-963ea6fb1c82.949ef384-8293-46b8-903f-40a477c056ae.437c1374-0ed0-4179-b9f8-331319118723@emailsignatures365.codetwo.com> 0 siblings, 2 replies; 5+ messages in thread From: Robert P. J. Day @ 2021-03-25 14:08 UTC (permalink / raw) To: OE Core mailing list kind of a philosophical question, but i'm having a discussion with some new colleagues about how to customize an OE (actually, wind river linux) build, and these colleagues have, until now, used (whitelisted) environment variables to pass info to the build, that info being used to specify things like a development versus manufacturing build, and so on. i suggested that i didn't think there was any really persuasive reasons to use environment variables this way, as there are more than enough configuration files to customize a build. i mentioned things like: * machine config files * distro config files * defining packagegroup files * defining image files and on and on and on. my point was that there are more than enough ways to support all the customization you might need, that taking advantage of shell environment variables strikes me as unnecessarily messy and, for that matter, dangerous if you forget so set the environment. thoughts? am i out of line in advising them to use what OE offers them, and not extract stuff from the environment? rday ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [OE-core] any *compelling* reasons to whitelist env vars for an OE build? 2021-03-25 14:08 any *compelling* reasons to whitelist env vars for an OE build? Robert P. J. Day @ 2021-03-25 14:15 ` Mark Hatle [not found] ` <1b153bce-a66a-45ee-a5c6-963ea6fb1c82.949ef384-8293-46b8-903f-40a477c056ae.437c1374-0ed0-4179-b9f8-331319118723@emailsignatures365.codetwo.com> 1 sibling, 0 replies; 5+ messages in thread From: Mark Hatle @ 2021-03-25 14:15 UTC (permalink / raw) To: openembedded-core On 3/25/21 9:08 AM, Robert P. J. Day wrote: > > kind of a philosophical question, but i'm having a discussion with > some new colleagues about how to customize an OE (actually, wind river > linux) build, and these colleagues have, until now, used (whitelisted) > environment variables to pass info to the build, that info being used > to specify things like a development versus manufacturing build, and > so on. > > i suggested that i didn't think there was any really persuasive > reasons to use environment variables this way, as there are more than > enough configuration files to customize a build. i mentioned things > like: > > * machine config files > * distro config files > * defining packagegroup files > * defining image files > > and on and on and on. > > my point was that there are more than enough ways to support all the > customization you might need, that taking advantage of shell > environment variables strikes me as unnecessarily messy and, for that > matter, dangerous if you forget so set the environment. > > thoughts? am i out of line in advising them to use what OE offers > them, and not extract stuff from the environment? I _always_ do builds like: MACHINE=zynqmp-generic DISTRO=petalinux bitbake core-image-minimal I don't want to have to update any configuration files to pass basic values into the system. This is also used heavily on my build systems so we can have a common configuration for all builds, but built across a wide breadth of components. I also occasionally use BB_ENV_EXTRAWHITE to add additional variables I might want to override. For instance, sometimes I want TMPDIR to go to a different location, instead of having to modify local.conf (and then remember to put it back the way it was) I can just add to the EXTRAWHITE, and call passing in TMPDIR. --Mark > rday > > > > > ^ permalink raw reply [flat|nested] 5+ messages in thread
[parent not found: <1b153bce-a66a-45ee-a5c6-963ea6fb1c82.949ef384-8293-46b8-903f-40a477c056ae.437c1374-0ed0-4179-b9f8-331319118723@emailsignatures365.codetwo.com>]
[parent not found: <1b153bce-a66a-45ee-a5c6-963ea6fb1c82.0d2bd5fa-15cc-4b27-b94e-83614f9e5b38.1ce5b84f-c798-4314-b673-c5072a296141@emailsignatures365.codetwo.com>]
* Re: [OE-core] any *compelling* reasons to whitelist env vars for an OE build? [not found] ` <1b153bce-a66a-45ee-a5c6-963ea6fb1c82.0d2bd5fa-15cc-4b27-b94e-83614f9e5b38.1ce5b84f-c798-4314-b673-c5072a296141@emailsignatures365.codetwo.com> @ 2021-03-25 14:30 ` Mike Looijmans 2021-03-25 14:50 ` Robert P. J. Day 0 siblings, 1 reply; 5+ messages in thread From: Mike Looijmans @ 2021-03-25 14:30 UTC (permalink / raw) To: openembedded-core I for one use a whitelist env vars daily, both hobby and work. We tend to build for multiple machines, so in general we'd have something like this running on the build server: for machine in mach1 mach2 mach3 mach4 ... mach40 do MACHINE=$machine bitbake image1 image2 image3 done Being able to pass the MACHINE through the environment is a big win. We could alter a config file in the shell script, but that would change a file that we'd want under version control, and I really don't like it when builds change files under version control. (The "40" machines is not exaggerated, I'm really involved in projects that build for that many targets) Come to think of it, MACHINE is the one and only environment we ever pass to bitbake. For release/test/production/debug/... etcetera I tend to use a different image, so you'd see: MACHINE=mach1 bitbake interesting-image interesting-image-dev So "interesting-image" would be the product, while the "dev" version would apply debug tweaks that make the rootfs writeable and enable the serial console for login and things like that. Met vriendelijke groet / kind regards, Mike Looijmans System Expert TOPIC Embedded Products B.V. Materiaalweg 4, 5681 RJ Best The Netherlands T: +31 (0) 499 33 69 69 E: mike.looijmans@topicproducts.com W: www.topic.nl Please consider the environment before printing this e-mail On 25-03-2021 15:08, Robert P. J. Day via lists.openembedded.org wrote: > > kind of a philosophical question, but i'm having a discussion with > some new colleagues about how to customize an OE (actually, wind river > linux) build, and these colleagues have, until now, used (whitelisted) > environment variables to pass info to the build, that info being used > to specify things like a development versus manufacturing build, and > so on. > > i suggested that i didn't think there was any really persuasive > reasons to use environment variables this way, as there are more than > enough configuration files to customize a build. i mentioned things > like: > > * machine config files > * distro config files > * defining packagegroup files > * defining image files > > and on and on and on. > > my point was that there are more than enough ways to support all the > customization you might need, that taking advantage of shell > environment variables strikes me as unnecessarily messy and, for that > matter, dangerous if you forget so set the environment. > > thoughts? am i out of line in advising them to use what OE offers > them, and not extract stuff from the environment? > > rday > > > > > ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [OE-core] any *compelling* reasons to whitelist env vars for an OE build? 2021-03-25 14:30 ` Mike Looijmans @ 2021-03-25 14:50 ` Robert P. J. Day 2021-03-25 16:02 ` Christopher Larson 0 siblings, 1 reply; 5+ messages in thread From: Robert P. J. Day @ 2021-03-25 14:50 UTC (permalink / raw) To: Mike Looijmans; +Cc: openembedded-core On Thu, 25 Mar 2021, Mike Looijmans wrote: > I for one use a whitelist env vars daily, both hobby and work. > > We tend to build for multiple machines, so in general we'd have > something like this running on the build server: > > for machine in mach1 mach2 mach3 mach4 ... mach40 > do > MACHINE=$machine bitbake image1 image2 image3 > done > > Being able to pass the MACHINE through the environment is a big win. We could > alter a config file in the shell script, but that would change a file that > we'd want under version control, and I really don't like it when builds change > files under version control. > > (The "40" machines is not exaggerated, I'm really involved in projects that > build for that many targets) > > Come to think of it, MACHINE is the one and only environment we ever pass to > bitbake. > > For release/test/production/debug/... etcetera I tend to use a different > image, so you'd see: > > MACHINE=mach1 bitbake interesting-image interesting-image-dev you and mark are right, i was being a bit too draconian -- being able to select MACHINE and DISTRO on the bitbake invocation line are obvious benefits. just to refresh my memory, what is it that identifies the env vars that are by default passed through without any need for extra whitelisting? is that BB_ENV_EXTRAWHITE? i recall that contains MACHINE and DISTRO already, so that might be all i care about. rday ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [OE-core] any *compelling* reasons to whitelist env vars for an OE build? 2021-03-25 14:50 ` Robert P. J. Day @ 2021-03-25 16:02 ` Christopher Larson 0 siblings, 0 replies; 5+ messages in thread From: Christopher Larson @ 2021-03-25 16:02 UTC (permalink / raw) To: Robert P. J. Day Cc: Mike Looijmans, Patches and discussions about the oe-core layer [-- Attachment #1: Type: text/plain, Size: 1933 bytes --] Just a quick note that you *can* script config file alterations without having to alter files that may be under source control, that's what auto.conf is for :) On Thu, Mar 25, 2021 at 7:51 AM Robert P. J. Day <rpjday@crashcourse.ca> wrote: > On Thu, 25 Mar 2021, Mike Looijmans wrote: > > > I for one use a whitelist env vars daily, both hobby and work. > > > > We tend to build for multiple machines, so in general we'd have > > something like this running on the build server: > > > > for machine in mach1 mach2 mach3 mach4 ... mach40 > > do > > MACHINE=$machine bitbake image1 image2 image3 > > done > > > > Being able to pass the MACHINE through the environment is a big win. We > could > > alter a config file in the shell script, but that would change a file > that > > we'd want under version control, and I really don't like it when builds > change > > files under version control. > > > > (The "40" machines is not exaggerated, I'm really involved in projects > that > > build for that many targets) > > > > Come to think of it, MACHINE is the one and only environment we ever > pass to > > bitbake. > > > > For release/test/production/debug/... etcetera I tend to use a different > > image, so you'd see: > > > > MACHINE=mach1 bitbake interesting-image interesting-image-dev > > you and mark are right, i was being a bit too draconian -- being > able to select MACHINE and DISTRO on the bitbake invocation line are > obvious benefits. > > just to refresh my memory, what is it that identifies the env vars > that are by default passed through without any need for extra > whitelisting? is that BB_ENV_EXTRAWHITE? i recall that contains > MACHINE and DISTRO already, so that might be all i care about. > > rday > > > > -- Christopher Larson kergoth at gmail dot com Founder - BitBake, OpenEmbedded, OpenZaurus Senior Software Engineer, Mentor Graphics [-- Attachment #2: Type: text/html, Size: 2523 bytes --] ^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2021-03-25 16:02 UTC | newest] Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2021-03-25 14:08 any *compelling* reasons to whitelist env vars for an OE build? Robert P. J. Day 2021-03-25 14:15 ` [OE-core] " Mark Hatle [not found] ` <1b153bce-a66a-45ee-a5c6-963ea6fb1c82.949ef384-8293-46b8-903f-40a477c056ae.437c1374-0ed0-4179-b9f8-331319118723@emailsignatures365.codetwo.com> [not found] ` <1b153bce-a66a-45ee-a5c6-963ea6fb1c82.0d2bd5fa-15cc-4b27-b94e-83614f9e5b38.1ce5b84f-c798-4314-b673-c5072a296141@emailsignatures365.codetwo.com> 2021-03-25 14:30 ` Mike Looijmans 2021-03-25 14:50 ` Robert P. J. Day 2021-03-25 16:02 ` Christopher Larson
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.