-
Notifications
You must be signed in to change notification settings - Fork 39
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[WIP] OXT-1736 : do-build.sh zeus uprev and usability improvements #365
base: master
Are you sure you want to change the base?
[WIP] OXT-1736 : do-build.sh zeus uprev and usability improvements #365
Conversation
If /bin/sh is not symlinked to bash, some packages in the OpenXT build will fail with non-obvious error messages. Before starting the build, confirm that the default non-interactive shell is bash. In Debian/Devuan, the default is dash. Future improvement: identify and patch each offending package to explicitly require bash in shell scripts. This would avoid imposing the overhead of bash on all build scripts, at the cost of OpenXT carrying patches until they could be upstreamed. OXT-1736 Signed-off-by: Rich Persaud <[email protected]>
Since bitbake is called multiple times by do_build, keeping it memory resident for 30 seconds will reduce recipe parsing. OXT-1736 Signed-off-by: Rich Persaud <[email protected]>
For faster interactive use, retain bitbake interactive status display instead of piping output to cumulative build log. Skip release-oriented steps such as source ISO generation generation and log compression. OXT-1736 Signed-off-by: Rich Persaud <[email protected]>
Remove logic for syncui and nilf/vpn vm, which are no longer built. OXT-1736 Signed-off-by: Rich Persaud <[email protected]>
Create a symlink (build-output/_do_build_latest) to the most recent build output directory. This can be used to specify the location of an HTTP package repository for PXE installs. OXT-1736 Signed-off-by: Rich Persaud <[email protected]>
local.conf contains version information that is embedded in the OpenXT installer. It must be generated for each build. Define filename as variable. OXT-1736 Signed-off-by: Rich Persaud <[email protected]>
Other OpenXT repos have been moved to OE zeus, do the same here. OXT-1736 Signed-off-by: Rich Persaud <[email protected]>
On build machines with multiple cores, bitbake can execute build tasks in parallel. These defaults should be modified to match the number of cores on the build machine. OXT-1736 Signed-off-by: Rich Persaud <[email protected]>
Initialize some undefined variables identified by set -u. Future work: document original feature purpose, current relevance and whether to remove or test/fix. OXT-1736 Signed-off-by: Rich Persaud <[email protected]>
d099bda
to
6436d4e
Compare
@@ -1,5 +1,9 @@ | |||
CONF_VERSION = "1" | |||
|
|||
# Enable parallel builds on multi-core machines | |||
BB_NUMBER_THREADS ?= "4" | |||
PARALLEL_MAKE ?= "-j 4" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These were removed in c6b7942 since bitbake sets a default.
# OpenXT build requires system shell to be bash | ||
SYSTEM_SHELL=$(basename $(readlink -f /bin/sh)) | ||
[[ ${SYSTEM_SHELL} == "bash" ]] || \ | ||
{ echo "OpenXT build requires bash as system shell. Please symlink /bin/sh to bash"; exit 1; } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
build-scripts/oe/setup.sh suggests this which seems more debian friendly:
# Use bash instead of dash for /bin/sh
echo "dash dash/sh boolean false" > /tmp/preseed.txt
debconf-set-selections /tmp/preseed.txt
dpkg-reconfigure -f noninteractive dash
@@ -24,6 +24,9 @@ SYSTEM_SHELL=$(basename $(readlink -f /bin/sh)) | |||
# Keep bitbake memory-resident between invocations | |||
export BB_SERVER_TIMEOUT=30 | |||
|
|||
# Optional interactive use: set to 1 to disable logs | |||
INTERACTIVE=0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This seems weird - just run MACHINE=... ./bb <recipe>
from openxt/build
manually? I expected to see a cli flag to enable this option.
@@ -100,16 +102,18 @@ do_oe_setup() | |||
mkdir -p conf | |||
fi | |||
|
|||
if [ ! -f "conf/local.conf" -o "conf/local.conf" -ot "conf/local.conf-dist" ]; then | |||
cp conf/local.conf-dist conf/local.conf | |||
# Force generation of local.conf with latest build version |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
whitespace
if [ ! -f "conf/local.conf" -o "conf/local.conf" -ot "conf/local.conf-dist" ]; then | ||
cp conf/local.conf-dist conf/local.conf | ||
# Force generation of local.conf with latest build version | ||
rm -f ${CONF_LOCAL} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Clobber local.conf every time will lose customization. If you want changing build info, then many do something like bordel generating and including a separate file:
https://github.com/apertussolutions/bordel/blob/fed91e907435072ceab1309bcc8ab46454b93041/cmds/build#L24
https://github.com/apertussolutions/bordel/blob/008cf2793b229ad9b138ea12f6e450436f29cc8a/templates/master/local.conf#L97
This is a collection of usability improvements for the non-container build script. This is a precursor to adding support for OE multiconfig builds.
OXT-1736