Date   

[PATCH][autobuilder-helper][warrior 18/41] scripts/run-config: Handle quoting issues in buildtools environment files

Richard Purdie
 

Signed-off-by: Richard Purdie <richard.purdie@...>
---
scripts/run-config | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/scripts/run-config b/scripts/run-config
index ce1f36f..b4f1d58 100755
--- a/scripts/run-config
+++ b/scripts/run-config
@@ -111,9 +111,11 @@ if bttarball:
with open(btenv[0], "r") as f:
for line in f.readlines():
if line.startswith("export "):
- line = line.split(" ", 1)[1].split("=", 1)
+ line = line.strip().split(" ", 1)[1].split("=", 1)
if "$PATH" in line[1]:
line[1] = line[1].replace("$PATH", os.environ["PATH"])
+ if line[1].startswith(("'", '"')):
+ line[1] = line[1][1:-1]
os.environ[line[0]] = line[1]

finalret = 0
--
2.25.1


[PATCH][autobuilder-helper][warrior 17/41] scripts/run-config: Handle multiple builds racing with lockfile for buildtools

Richard Purdie
 

Signed-off-by: Richard Purdie <richard.purdie@...>
---
scripts/run-config | 12 +++++++++---
1 file changed, 9 insertions(+), 3 deletions(-)

diff --git a/scripts/run-config b/scripts/run-config
index cbfe073..ce1f36f 100755
--- a/scripts/run-config
+++ b/scripts/run-config
@@ -10,6 +10,7 @@ import subprocess
import errno
import fnmatch
import glob
+import fcntl

import utils

@@ -95,10 +96,15 @@ if bttarball:
btdir = args.builddir + "/../buildtools"
if not os.path.exists(btdir):
btdlpath = utils.getconfig("BASE_SHAREDDIR", ourconfig) + "/buildtools/" + os.path.basename(bttarball)
- if not os.path.exists(btdlpath):
+ btlock = btdlpath + ".lock"
+ if not os.path.exists(os.path.dirname(btdlpath)):
os.makedirs(os.path.dirname(btdlpath), exist_ok=True)
- subprocess.check_call(["wget", "-O", btdlpath, bttarball])
- os.chmod(btdlpath, 0o775)
+ with open(btlock, 'a+') as lf:
+ fileno = lf.fileno()
+ fcntl.flock(fileno, fcntl.LOCK_EX)
+ if not os.path.exists(btdlpath):
+ subprocess.check_call(["wget", "-O", btdlpath, bttarball])
+ os.chmod(btdlpath, 0o775)
subprocess.check_call(["bash", btdlpath, "-d", btdir, "-y"])
btenv = glob.glob(btdir + "/environment-setup*")
# We either parse or wrap all our execution calls, rock and a hard place :(
--
2.25.1


[PATCH][autobuilder-helper][warrior 16/41] send-qa-email: Limit results clone to shallow depth to avoid timeouts

Richard Purdie
 

Signed-off-by: Richard Purdie <richard.purdie@...>
---
scripts/send-qa-email | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/scripts/send-qa-email b/scripts/send-qa-email
index d2f4574..7dbc290 100755
--- a/scripts/send-qa-email
+++ b/scripts/send-qa-email
@@ -61,7 +61,7 @@ if 'poky' in repos and os.path.exists(resulttool) and args.results_dir:

tempdir = tempfile.mkdtemp(prefix='sendqaemail.')
try:
- subprocess.check_call(["git", "clone", "git@...:yocto-testresults", tempdir])
+ subprocess.check_call(["git", "clone", "git@...:yocto-testresults", tempdir, "--depth", "5"])

# If the base comparision branch isn't present regression comparision won't work
# at least until we can tell the tool to ignore internal branch information
--
2.25.1


[PATCH][autobuilder-helper][warrior 15/41] scripts/run-config: Fix buildtools path

Richard Purdie
 

Signed-off-by: Richard Purdie <richard.purdie@...>
---
scripts/run-config | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/scripts/run-config b/scripts/run-config
index e946e90..cbfe073 100755
--- a/scripts/run-config
+++ b/scripts/run-config
@@ -92,7 +92,7 @@ if "buildtools" in ourconfig and args.workername:

btenv = None
if bttarball:
- btdir = args.builddir + "../buildtools"
+ btdir = args.builddir + "/../buildtools"
if not os.path.exists(btdir):
btdlpath = utils.getconfig("BASE_SHAREDDIR", ourconfig) + "/buildtools/" + os.path.basename(bttarball)
if not os.path.exists(btdlpath):
--
2.25.1


[PATCH][autobuilder-helper][warrior 14/41] config.json: Disable buildtools tarball on centos7 as its missing crypt.h

Richard Purdie
 

Signed-off-by: Richard Purdie <richard.purdie@...>
---
config.json | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/config.json b/config.json
index 3e69544..49a26e7 100644
--- a/config.json
+++ b/config.json
@@ -872,6 +872,6 @@
}
},
"buildtools" : {
- "centos7*" : "${BUILDTOOLS_URL}"
+ "disabled-centos7*" : "${BUILDTOOLS_URL}"
}
}
--
2.25.1


[PATCH][autobuilder-helper][warrior 13/41] config.json: Enable buildtools for centos7 workers (as a test for now)

Richard Purdie
 

Signed-off-by: Richard Purdie <richard.purdie@...>
---
config.json | 5 +++++
1 file changed, 5 insertions(+)

diff --git a/config.json b/config.json
index e7c7b55..3e69544 100644
--- a/config.json
+++ b/config.json
@@ -8,6 +8,8 @@
"BUILD_HISTORY_DIRECTPUSH" : ["poky:morty", "poky:pyro", "poky:rocko", "poky:sumo", "poky:thud", "poky:warrior", "poky:zeus", "poky:master"],
"BUILD_HISTORY_FORKPUSH" : {"poky-contrib:ross/mut" : "poky:master", "poky:master-next" : "poky:master"},

+ "BUILDTOOLS_URL" : "http://downloads.yoctoproject.org/releases/yocto/milestones/yocto-3.1_M2/buildtools/x86_64-buildtools-extended-nativesdk-standalone-3.0%2Bsnapshot-20200122.sh",
+
"REPO_STASH_DIR" : "${BASE_HOMEDIR}/git/mirror",
"TRASH_DIR" : "${BASE_HOMEDIR}/git/trash",

@@ -868,5 +870,8 @@
"branch" : "master",
"revision" : "HEAD"
}
+ },
+ "buildtools" : {
+ "centos7*" : "${BUILDTOOLS_URL}"
}
}
--
2.25.1


[PATCH][autobuilder-helper][warrior 12/41] run-config: Add support for wrapping builds in a buildtools tarball

Richard Purdie
 

Signed-off-by: Richard Purdie <richard.purdie@...>
---
scripts/run-config | 30 ++++++++++++++++++++++++++++++
1 file changed, 30 insertions(+)

diff --git a/scripts/run-config b/scripts/run-config
index b7540a5..e946e90 100755
--- a/scripts/run-config
+++ b/scripts/run-config
@@ -8,6 +8,8 @@ import os
import sys
import subprocess
import errno
+import fnmatch
+import glob

import utils

@@ -80,6 +82,34 @@ if args.target in ourconfig['overrides']:

hp.printheader("Target task %s has %d steps" % (args.target, maxsteps))

+bttarball = None
+if "buildtools" in ourconfig and args.workername:
+ btcfg = utils.getconfig("buildtools", ourconfig)
+ for entry in btcfg:
+ if fnmatch.fnmatch(args.workername, entry):
+ bttarball = btcfg[entry]
+ break
+
+btenv = None
+if bttarball:
+ btdir = args.builddir + "../buildtools"
+ if not os.path.exists(btdir):
+ btdlpath = utils.getconfig("BASE_SHAREDDIR", ourconfig) + "/buildtools/" + os.path.basename(bttarball)
+ if not os.path.exists(btdlpath):
+ os.makedirs(os.path.dirname(btdlpath), exist_ok=True)
+ subprocess.check_call(["wget", "-O", btdlpath, bttarball])
+ os.chmod(btdlpath, 0o775)
+ subprocess.check_call(["bash", btdlpath, "-d", btdir, "-y"])
+ btenv = glob.glob(btdir + "/environment-setup*")
+ # We either parse or wrap all our execution calls, rock and a hard place :(
+ with open(btenv[0], "r") as f:
+ for line in f.readlines():
+ if line.startswith("export "):
+ line = line.split(" ", 1)[1].split("=", 1)
+ if "$PATH" in line[1]:
+ line[1] = line[1].replace("$PATH", os.environ["PATH"])
+ os.environ[line[0]] = line[1]
+
finalret = 0

def flush():
--
2.25.1


[PATCH][autobuilder-helper][warrior 11/41] run-config: Preface log output with auto.conf settings to aid debugging

Richard Purdie
 

Signed-off-by: Richard Purdie <richard.purdie@...>
---
scripts/run-config | 8 ++++++++
1 file changed, 8 insertions(+)

diff --git a/scripts/run-config b/scripts/run-config
index 0097f97..b7540a5 100755
--- a/scripts/run-config
+++ b/scripts/run-config
@@ -121,6 +121,14 @@ def bitbakecmd(builddir, cmd, report, stepnum, logsuffix, oeenv=True):
print("Running '%s' with output to %s" % (cmd, log))
flush()

+ autoconf = builddir + "/conf/auto.conf"
+ if os.path.exists(autoconf):
+ with open(autoconf, "r") as inf, open(log, "a") as outf:
+ outf.write("auto.conf settings:\n")
+ for line in inf.readlines():
+ outf.write(line)
+ outf.write("\n")
+
with subprocess.Popen(cmd, shell=True, cwd=builddir + "/..", stdout=subprocess.PIPE, stderr=subprocess.STDOUT, bufsize=1) as p, open(log, 'ab') as f:
for line in p.stdout:
if not args.quietlogging:
--
2.25.1


[PATCH][autobuilder-helper][warrior 10/41] shared-repo-unpack: suppressing exception, returning exit code

Richard Purdie
 

From: Thomas Goodwin <btgoodwin@...>

The preceeding errors that would be shown should be enough to
identify the problem since it would have been a problem
running bitbake-layers add-layer, indicating a misconfiguration
of config.json.

Signed-off-by: Thomas Goodwin <btgoodwin@...>
Signed-off-by: Richard Purdie <richard.purdie@...>
---
scripts/shared-repo-unpack | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/scripts/shared-repo-unpack b/scripts/shared-repo-unpack
index 92f0ccf..4a2b1c9 100755
--- a/scripts/shared-repo-unpack
+++ b/scripts/shared-repo-unpack
@@ -61,4 +61,7 @@ for repo in sorted(repos.keys()):
if args.publish_dir:
utils.publishrepo(targetsubdir, repo, args.publish_dir)

-subprocess.check_call([scriptsdir + "/layer-config", args.abworkdir, args.target])
+try:
+ subprocess.check_call([scriptsdir + "/layer-config", args.abworkdir, args.target])
+except subprocess.CalledProcessError as e:
+ sys.exit(e.returncode)
--
2.25.1


[PATCH][autobuilder-helper][warrior 09/41] config.json: Replaced occurrencies of /home/pokybuild with ${BASE_HOMEDIR}

Richard Purdie
 

From: Marco Cavallini <m.cavallini@...>

Signed-off-by: Marco Cavallini <m.cavallini@...>
Signed-off-by: Richard Purdie <richard.purdie@...>
---
config.json | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/config.json b/config.json
index 43526de..e7c7b55 100644
--- a/config.json
+++ b/config.json
@@ -16,8 +16,8 @@
"WEBPUBLISH_DIR" : "${BASE_SHAREDDIR}/",
"WEBPUBLISH_URL" : "https://autobuilder.yocto.io/",

- "BUILDPERF_STATEDIR" : "/home/pokybuild/buildperf",
- "BUILDPERF_RESULTSDIR" : "/home/pokybuild/buildperf-results",
+ "BUILDPERF_STATEDIR" : "${BASE_HOMEDIR}/buildperf",
+ "BUILDPERF_RESULTSDIR" : "${BASE_HOMEDIR}/buildperf-results",

"defaults" : {
"NEEDREPOS" : ["poky"],
@@ -109,7 +109,7 @@
"SSTATEDIR_RELEASE" : ["SSTATE_DIR ?= '${HELPERBUILDDIR}/sstate'"],
"PACKAGE_CLASSES" : "package_rpm",
"EXTRAPLAINCMDS" : [
- "${SCRIPTSDIR}/build-perf-test-wrapper -r ${BUILDPERF_RESULTSDIR} -E yocto-perf@... -d ${BUILDPERF_STATEDIR}/downloads -w /home/pokybuild/build-perf-test -p ${HELPERRESULTSDIR}/${HELPERTARGET} -R ${HELPERREPONAME} -b ${HELPERBRANCHNAME} --push git@...:yocto-buildstats"
+ "${SCRIPTSDIR}/build-perf-test-wrapper -r ${BUILDPERF_RESULTSDIR} -E yocto-perf@... -d ${BUILDPERF_STATEDIR}/downloads -w ${BASE_HOMEDIR}/build-perf-test -p ${HELPERRESULTSDIR}/${HELPERTARGET} -R ${HELPERREPONAME} -b ${HELPERBRANCHNAME} --push git@...:yocto-buildstats"
],
"extravars" : [
"BB_NUMBER_THREADS = '24'",
--
2.25.1


[PATCH][autobuilder-helper][warrior 08/41] prepare-shared-repos: Really fix shell globbing

Richard Purdie
 

Signed-off-by: Richard Purdie <richard.purdie@...>
---
scripts/prepare-shared-repos | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/scripts/prepare-shared-repos b/scripts/prepare-shared-repos
index 2a2b343..8400d09 100755
--- a/scripts/prepare-shared-repos
+++ b/scripts/prepare-shared-repos
@@ -39,4 +39,4 @@ with tempfile.TemporaryDirectory(prefix="shared-repo-temp-", dir="/tmp") as temp
if args.publish_dir:
utils.publishrepo(tempdir, repo, args.publish_dir)

- subprocess.check_call(["rsync", "-a", tempdir + "/*", args.sharedsrcdir], shell=True)
+ subprocess.check_call("rsync -a " + tempdir + "/* " + args.sharedsrcdir, shell=True)
--
2.25.1


[PATCH][autobuilder-helper][warrior 07/41] prepare-shared-repos: UAllow shell globing to fix failure

Richard Purdie
 

Signed-off-by: Richard Purdie <richard.purdie@...>
---
scripts/prepare-shared-repos | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/scripts/prepare-shared-repos b/scripts/prepare-shared-repos
index 9ed0772..2a2b343 100755
--- a/scripts/prepare-shared-repos
+++ b/scripts/prepare-shared-repos
@@ -39,4 +39,4 @@ with tempfile.TemporaryDirectory(prefix="shared-repo-temp-", dir="/tmp") as temp
if args.publish_dir:
utils.publishrepo(tempdir, repo, args.publish_dir)

- subprocess.check_call(["rsync", "-a", tempdir + "/*", args.sharedsrcdir])
+ subprocess.check_call(["rsync", "-a", tempdir + "/*", args.sharedsrcdir], shell=True)
--
2.25.1


[PATCH][autobuilder-helper][warrior 06/41] prepare-shared-repos: Use temporary non-NFS directory for layer clones for speed

Richard Purdie
 

Signed-off-by: Richard Purdie <richard.purdie@...>
---
scripts/prepare-shared-repos | 14 +++++++++-----
1 file changed, 9 insertions(+), 5 deletions(-)

diff --git a/scripts/prepare-shared-repos b/scripts/prepare-shared-repos
index eb89f5b..9ed0772 100755
--- a/scripts/prepare-shared-repos
+++ b/scripts/prepare-shared-repos
@@ -8,6 +8,7 @@ import os
import sys
import subprocess
import errno
+import tempfile

import utils

@@ -31,8 +32,11 @@ with open(args.repojson) as f:

stashdir = utils.getconfig("REPO_STASH_DIR", ourconfig)

-for repo in sorted(repos.keys()):
- utils.printheader("Intially fetching repo %s" % repo)
- utils.fetchgitrepo(args.sharedsrcdir, repo, repos[repo], stashdir)
- if args.publish_dir:
- utils.publishrepo(args.sharedsrcdir, repo, args.publish_dir)
+with tempfile.TemporaryDirectory(prefix="shared-repo-temp-", dir="/tmp") as tempdir:
+ for repo in sorted(repos.keys()):
+ utils.printheader("Intially fetching repo %s" % repo)
+ utils.fetchgitrepo(tempdir, repo, repos[repo], stashdir)
+ if args.publish_dir:
+ utils.publishrepo(tempdir, repo, args.publish_dir)
+
+ subprocess.check_call(["rsync", "-a", tempdir + "/*", args.sharedsrcdir])
--
2.25.1


[PATCH][autobuilder-helper][warrior 05/41] layer-config, shared-repo-unpack: Sub-repos in NEEDREPOS

Richard Purdie
 

From: Thomas Goodwin <btgoodwin@...>

The previous fixes requires the user to set "no-layer-add"
for a repo and then use ADDLAYER to insert the sub-repos
(e.g., meta-openmbedded/meta-oe) as a two-part process.
This means that you would also have to specify that flag
if a repo that is a layer with dependencies is in the
list so that it can be inserted in the correct order later
via ADDLAYER to avoid parsing problems. This fix allows
for specifying a NEEDREPOS with the subdirectory of the
target layer (e.g., meta-openembedded/meta-oe) so that
there is no need for the "no-layer-add" followed by
ADDLAYER combination. The entire meta-openembedded
repo would be moved into place, and the sublayer added
to bblayers.conf.

Signed-off-by: Thomas Goodwin <btgoodwin@...>
Signed-off-by: Richard Purdie <richard.purdie@...>
---
scripts/layer-config | 24 +++++++++++++++---------
scripts/shared-repo-unpack | 4 ++--
2 files changed, 17 insertions(+), 11 deletions(-)

diff --git a/scripts/layer-config b/scripts/layer-config
index 286451a..bb1b681 100755
--- a/scripts/layer-config
+++ b/scripts/layer-config
@@ -33,21 +33,27 @@ callinit = False
repos = utils.getconfig("repo-defaults", ourconfig)

for repo in needrepos:
- checkdir = repo
- if repo in repos:
- if "call-init" in repos[repo] and repos[repo]["call-init"]:
+ repo_basename = repo.split('/')[0]
+ checkdir = repo_basename
+ if repo_basename in repos:
+ if "call-init" in repos[repo_basename] and repos[repo_basename]["call-init"]:
callinit = True
- if "checkout-dirname" in repos[repo]:
- checkdir = repos[repo]["checkout-dirname"]
- utils.mkdir(args.abworkdir + "/" + checkdir)
- for f in os.listdir(args.abworkdir + "/repos/" + repo):
- subprocess.check_call(['mv', args.abworkdir + "/repos/" + repo + "/" + f, args.abworkdir + "/" + checkdir + "/"])
+ if "checkout-dirname" in repos[repo_basename]:
+ checkdir = repos[repo_basename]["checkout-dirname"]
+
+ source = args.abworkdir + "/repos/" + repo_basename
+ destination = args.abworkdir + "/" + checkdir
+ if not os.path.isdir(destination) or callinit:
+ utils.mkdir(destination)
+ for f in os.listdir(source):
+ subprocess.check_call(['mv', source + "/" + f, destination + "/"])

if callinit:
subprocess.check_call(". ./oe-init-build-env", shell=True, cwd=args.abworkdir)

for repo in needrepos:
- if repo in repos and "no-layer-add" in repos[repo] and repos[repo]["no-layer-add"]:
+ repo_basename = repo.split('/')[0]
+ if repo_basename in repos and "no-layer-add" in repos[repo_basename] and repos[repo_basename]["no-layer-add"]:
continue
try:
bitbakecmd(args.abworkdir, "bitbake-layers add-layer %s" % (args.abworkdir + "/" + repo))
diff --git a/scripts/shared-repo-unpack b/scripts/shared-repo-unpack
index a281897..92f0ccf 100755
--- a/scripts/shared-repo-unpack
+++ b/scripts/shared-repo-unpack
@@ -46,9 +46,9 @@ with open(args.repojson) as f:
repos = json.load(f)

targetsubdir = args.abworkdir + "/repos"
-
+needrepos_baseddirs = [r.split('/')[0] for r in needrepos]
for repo in sorted(repos.keys()):
- if repo not in needrepos:
+ if repo not in needrepos_baseddirs:
continue
targetrepodir = "%s/%s" % (targetsubdir, repo)
if args.cache_dir:
--
2.25.1


[PATCH][autobuilder-helper][warrior 04/41] layer-config: fixing silent failures from always exiting '0'

Richard Purdie
 

From: Thomas Goodwin <btgoodwin@...>

The return value from bitbakecmd was not being returned when
errors occurred which allowed shared-repo-unpack to succeed
despite the failure. This fix changes to check_call and a
try-catch when attempting to add repos that fail for whatever
reason during add-layer, like a missing conf/layer.conf at
the top level or a previously-added layer breaks parsing
because of missing dependencies.

Signed-off-by: Thomas Goodwin <btgoodwin@...>
Signed-off-by: Richard Purdie <richard.purdie@...>
---
scripts/layer-config | 11 ++++++-----
1 file changed, 6 insertions(+), 5 deletions(-)

diff --git a/scripts/layer-config b/scripts/layer-config
index bfc62da..286451a 100755
--- a/scripts/layer-config
+++ b/scripts/layer-config
@@ -24,9 +24,7 @@ args = parser.parse_args()
ourconfig = utils.loadconfig()

def bitbakecmd(targetdir, cmd):
- ret = subprocess.call(". ./oe-init-build-env; %s" % cmd, shell=True, cwd=targetdir)
- if ret:
- utils.printheader("ERROR: Command %s failed with exit code %d, see errors above." % (cmd, ret))
+ subprocess.check_call(". ./oe-init-build-env; %s" % cmd, shell=True, cwd=targetdir)

needrepos = utils.getconfigvar("NEEDREPOS", ourconfig, args.target, None)

@@ -51,5 +49,8 @@ if callinit:
for repo in needrepos:
if repo in repos and "no-layer-add" in repos[repo] and repos[repo]["no-layer-add"]:
continue
- bitbakecmd(args.abworkdir, "bitbake-layers add-layer %s" % (args.abworkdir + "/" + repo))
-
+ try:
+ bitbakecmd(args.abworkdir, "bitbake-layers add-layer %s" % (args.abworkdir + "/" + repo))
+ except subprocess.CalledProcessError as e:
+ utils.printheader("ERROR: Command %s failed with exit code %d, see errors above." % (e.cmd, e.returncode))
+ sys.exit(e.returncode)
--
2.25.1


[PATCH][autobuilder-helper][warrior 03/41] README: Add pointer to the mailing list for patches

Richard Purdie
 

Signed-off-by: Richard Purdie <richard.purdie@...>
---
README | 5 +++++
1 file changed, 5 insertions(+)

diff --git a/README b/README
index a6c4f1d..2747510 100644
--- a/README
+++ b/README
@@ -25,3 +25,8 @@ would also allow customisation.
Authors:
Richard Purdie <richard.purdie@...>
Joshua Lock <joshua.g.lock@...>
+
+Contributions:
+
+Patches for this code should be sent to the yocto@... mailing list
+with [yocto-autobuilder-helper] in the subject.
--
2.25.1


[PATCH][autobuilder-helper][warrior 02/41] config.json: Hide WARNINGS we don't care about for meta-gplv2 testing

Richard Purdie
 

We're not interested in these warnings, the license incompatibility is
expected. By hiding these, we'll notice when warnings we do care about
appear.

Signed-off-by: Richard Purdie <richard.purdie@...>
---
config.json | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/config.json b/config.json
index 90b78f3..43526de 100644
--- a/config.json
+++ b/config.json
@@ -553,7 +553,8 @@
"MACHINE" : "qemux86",
"BBTARGETS" : "core-image-minimal core-image-full-cmdline",
"extravars" : [
- "INCOMPATIBLE_LICENSE = '*GPLv3'"
+ "INCOMPATIBLE_LICENSE = '*GPLv3'",
+ "WARN_QA_remove = 'incompatible-license'"
],
"EXTRACMDS" : [
"../../yocto-autobuilder-helper/scripts/check-gplv3"
--
2.25.1


[PATCH][autobuilder-helper][warrior 01/41] config.json: Disable PRSERV

Richard Purdie
 

This was copied from the old autobuilder configuration without much thought.
It would only be effective if we had a common PRSERV or saved the database
but we don't. It therefore makes sense to disable it.

One problem it was causing was inconsistency in the buildhistory output as
PKGR would change "r0" to "r0.0" and vice versa. The issue depended on whether
the build has coming from sstate or not and the settings the sstate had been
built with.

Signed-off-by: Richard Purdie <richard.purdie@...>
---
config.json | 6 ------
1 file changed, 6 deletions(-)

diff --git a/config.json b/config.json
index 573082a..90b78f3 100644
--- a/config.json
+++ b/config.json
@@ -24,7 +24,6 @@
"DISTRO" : "poky",
"SDKMACHINE" : "i686",
"PACKAGE_CLASSES" : "package_rpm package_deb package_ipk",
- "PRSERV" : "PRSERV_HOST = 'localhost:0'",
"DLDIR" : "DL_DIR = '${BASE_SHAREDDIR}/current_sources'",
"SSTATEDIR" : ["SSTATE_DIR ?= '${BASE_SHAREDDIR}/pub/sstate-warrior'"],
"SSTATEDIR_RELEASE" : ["SSTATE_MIRRORS += 'file://.* file://${BASE_SHAREDDIR}/pub/sstate/PATH'", "SSTATE_DIR ?= '${BASE_PUBLISHDIR}/sstate/@RELEASENUM@'"],
@@ -67,7 +66,6 @@
"SANITYTARGETS" : "core-image-sato:do_testsdk core-image-minimal:do_testsdkext core-image-sato:do_testsdkext"
},
"step3" : {
- "PRSERV" : false,
"BUILDHISTORY" : false,
"EXTRACMDS" : ["${SCRIPTSDIR}/checkvnc; DISPLAY=:1 oe-selftest -r runqemu meta_ide -j 15"],
"ADDLAYER" : ["${BUILDDIR}/../meta-selftest"]
@@ -124,7 +122,6 @@
"MACHINE" : "qemux86-64",
"SDKMACHINE" : "x86_64",
"PACKAGE_CLASSES" : "package_rpm",
- "PRSERV" : false,
"extravars" : [
"RPM_GPG_SIGN_CHUNK = '1'"
],
@@ -142,7 +139,6 @@
"trigger-build" : {
"SDKMACHINE" : "x86_64",
"MACHINE" : "qemux86",
- "PRSERV" : false,
"step1" : {
"BBTARGETS" : "universe -c fetch -k",
"extravars" : [
@@ -235,7 +231,6 @@
"MACHINE" : "qemux86-64",
"SDKMACHINE" : "x86_64",
"PACKAGE_CLASSES" : "package_rpm",
- "PRSERV" : false,
"extravars" : [
"RPM_GPG_SIGN_CHUNK = '1'"
],
@@ -596,7 +591,6 @@
"MACHINE" : "qemux86",
"SDKMACHINE" : "x86_64",
"BBTARGETS" : "universe:do_checkuri",
- "PRSERV" : false,
"extravars" : [
"SOURCE_MIRROR_FETCH = '1'",
"BB_NUMBER_THREADS = '1'",
--
2.25.1


Re: #sdk #yocto Appears SDK searching host for files that are only present on target side #sdk #yocto

Monsees, Steven C (US)
 


fyi...

I am using CMake with GNU, that is what is required for the build.

I do source the SDK environment script prior to attempting build.

Here is my current environment-setup-corei7-64-poky-linux script created by SDK:

# Check for LD_LIBRARY_PATH being set, which can break SDK and generally is a bad practice
# http://tldp.org/HOWTO/Program-Library-HOWTO/shared-libraries.html#AEN80
# http://xahlee.info/UnixResource_dir/_/ldpath.html
# Only disable this check if you are absolutely know what you are doing!
if [ ! -z "$LD_LIBRARY_PATH" ]; then
    echo "Your environment is misconfigured, you probably need to 'unset LD_LIBRARY_PATH'"
    echo "but please check why this was set in the first place and that it's safe to unset."
    echo "The SDK will not operate correctly in most cases when LD_LIBRARY_PATH is set."
    echo "For more references see:"
    echo "  http://tldp.org/HOWTO/Program-Library-HOWTO/shared-libraries.html#AEN80"
    echo "  http://xahlee.info/UnixResource_dir/_/ldpath.html"
    return 1
fi
export SYSROOTS=/ede/smonsees/yocto/testSDK/sysroots
export SDKTARGETSYSROOT=/disk0/scratch/smonsees/yocto/testSDK/sysroots/corei7-64-poky-linux
export PATH=/disk0/scratch/smonsees/yocto/testSDK/sysroots/x86_64-pokysdk-linux/usr/bin:/disk0/scratch/smonsees/yocto/testSDK/sysroots/x86_64-pokysdk-linux/usr/sbin:/disk0/scratch/smonsees/yocto/testSDK/sysroots/x86_64-pokysdk-linux/bin:/disk0/scratch/smonsees/yocto/testSDK/sysroots/x86_64-pokysdk-linux/sbin:/disk0/scratch/smonsees/yocto/testSDK/sysroots/x86_64-pokysdk-linux/usr/bin/../x86_64-pokysdk-linux/bin:/disk0/scratch/smonsees/yocto/testSDK/sysroots/x86_64-pokysdk-linux/usr/bin/x86_64-poky-linux:/disk0/scratch/smonsees/yocto/testSDK/sysroots/x86_64-pokysdk-linux/usr/bin/x86_64-poky-linux-musl:/disk0/scratch/smonsees/yocto/testSDK/sysroots/corei7-64-poky-linux/usr/lib/../lib/:/disk0/scratch/smonsees/yocto/testSDK/sysroots/corei7-64-poky-linux/usr/lib/../lib/x86_64-poky-linux/7.3.0/:$PATH
export PKG_CONFIG_SYSROOT_DIR=$SDKTARGETSYSROOT
export PKG_CONFIG_PATH=$SDKTARGETSYSROOT/usr/lib/pkgconfig:$SDKTARGETSYSROOT/usr/share/pkgconfig
export CONFIG_SITE=/disk0/scratch/smonsees/yocto/testSDK/site-config-corei7-64-poky-linux
export OECORE_NATIVE_SYSROOT="/disk0/scratch/smonsees/yocto/testSDK/sysroots/x86_64-pokysdk-linux"
export OECORE_TARGET_SYSROOT="$SDKTARGETSYSROOT"
export OECORE_ACLOCAL_OPTS="-I /disk0/scratch/smonsees/yocto/testSDK/sysroots/x86_64-pokysdk-linux/usr/share/aclocal"
unset command_not_found_handle
export CC="x86_64-poky-linux-gcc  -v -m64 -march=corei7 -mtune=corei7 -mfpmath=sse -msse4.2 --sysroot=$SDKTARGETSYSROOT"
export CXX="x86_64-poky-linux-g++  -v -m64 -march=corei7 -mtune=corei7 -mfpmath=sse -msse4.2 --sysroot=$SDKTARGETSYSROOT"
export CPP="x86_64-poky-linux-gcc -v -E  -m64 -march=corei7 -mtune=corei7 -mfpmath=sse -msse4.2 --sysroot=$SDKTARGETSYSROOT"
export AS="x86_64-poky-linux-as  "
export LD="x86_64-poky-linux-ld  --sysroot=$SDKTARGETSYSROOT"
export GDB=x86_64-poky-linux-gdb
export STRIP=x86_64-poky-linux-strip
export RANLIB=x86_64-poky-linux-ranlib
export OBJCOPY=x86_64-poky-linux-objcopy
export OBJDUMP=x86_64-poky-linux-objdump
export AR=x86_64-poky-linux-ar
export NM=x86_64-poky-linux-nm
export M4=m4
export TARGET_PREFIX=x86_64-poky-linux-
export CONFIGURE_FLAGS="--target=x86_64-poky-linux --host=x86_64-poky-linux --build=x86_64-linux --with-libtool-sysroot=$SDKTARGETSYSROOT"
export CFLAGS=" --sysroot=$SDKTARGETSYSROOT -O2 -pipe -g -feliminate-unused-debug-types"
export CXXFLAGS=" --sysroot=$SDKTARGETSYSROOT -O2 -pipe -g -feliminate-unused-debug-types"
export LDFLAGS=" -Wl,-O1 -Wl,--hash-style=gnu -Wl,--as-needed"
export CPPFLAGS=""
export KCFLAGS="--sysroot=$SDKTARGETSYSROOT"
export OECORE_DISTRO_VERSION="2.4.1"
export OECORE_SDK_VERSION="2.4.1"
export ARCH=x86
export CROSS_COMPILE=x86_64-poky-linux-

# Append environment subscripts
if [ -d "$OECORE_TARGET_SYSROOT/environment-setup.d" ]; then
    for envfile in $OECORE_TARGET_SYSROOT/environment-setup.d/*.sh; do
     . $envfile
    done
fi
if [ -d "$OECORE_NATIVE_SYSROOT/environment-setup.d" ]; then
    for envfile in $OECORE_NATIVE_SYSROOT/environment-setup.d/*.sh; do
     . $envfile
    done
fi
export CLANGCC="x86_64-poky-linux-clang -m64 -march=corei7 -mtune=corei7 -mfpmath=sse -msse4.2 -mlittle-endian --sysroot=$SDKTARGETSYSROOT"
export CLANGCXX="x86_64-poky-linux-clang++ -m64 -march=corei7 -mtune=corei7 -mfpmath=sse -msse4.2 -mlittle-endian --sysroot=$SDKTARGETSYSROOT"
export CLANGCPP="x86_64-poky-linux-clang -E -m64 -march=corei7 -mtune=corei7 -mfpmath=sse -msse4.2 -mlittle-endian --sysroot=$SDKTARGETSYSROOT"


 and


Re: Compiling and packaging libraries

Mike Looijmans
 

The simplest solution is to use autotools or Cmake for your project. That will automatically "do the right thing" to get the library properly installed and registered.

Even if your project is just one C file and a header, putting that in autotools or cmake is less work than getting all the nitty bits in a hand-crafted Makefile right.



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@...
W: www.topicproducts.com

Please consider the environment before printing this e-mail

On 06-09-2020 10:53, majid.nasiry65 via lists.yoctoproject.org wrote:
Hi
I wrote a recipe for adding a library to my image it compile correctly but I have issues in installing it and I got "-dev package contains non-symlink .so" error.
I know default method for install libraries is versioned mode and I need to make symbolic links, but I don't know how?
Another question is what is difference between -dev and -dbg output?

8101 - 8120 of 58636