diff options
Diffstat (limited to 'poky')
511 files changed, 10373 insertions, 7624 deletions
diff --git a/poky/bitbake/bin/bitbake-worker b/poky/bitbake/bin/bitbake-worker index 6776cadda..1e641e81c 100755 --- a/poky/bitbake/bin/bitbake-worker +++ b/poky/bitbake/bin/bitbake-worker @@ -195,9 +195,6 @@ def fork_off_task(cfg, data, databuilder, workerdata, fn, task, taskname, taskha global worker_pipe_lock pipein.close() - signal.signal(signal.SIGTERM, sigterm_handler) - # Let SIGHUP exit as SIGTERM - signal.signal(signal.SIGHUP, sigterm_handler) bb.utils.signal_on_parent_exit("SIGTERM") # Save out the PID so that the event can include it the @@ -212,6 +209,11 @@ def fork_off_task(cfg, data, databuilder, workerdata, fn, task, taskname, taskha # This ensures signals sent to the controlling terminal like Ctrl+C # don't stop the child processes. os.setsid() + + signal.signal(signal.SIGTERM, sigterm_handler) + # Let SIGHUP exit as SIGTERM + signal.signal(signal.SIGHUP, sigterm_handler) + # No stdin newsi = os.open(os.devnull, os.O_RDWR) os.dup2(newsi, sys.stdin.fileno()) diff --git a/poky/bitbake/contrib/vim/indent/bitbake.vim b/poky/bitbake/contrib/vim/indent/bitbake.vim new file mode 100644 index 000000000..138103409 --- /dev/null +++ b/poky/bitbake/contrib/vim/indent/bitbake.vim @@ -0,0 +1,343 @@ +" Vim indent file +" Language: BitBake +" Copyright: Copyright (C) 2019 Agilent Technologies, Inc. +" Maintainer: Chris Laplante <chris.laplante@agilent.com> +" License: You may redistribute this under the same terms as Vim itself + + +if exists("b:did_indent") + finish +endif + +if exists("*BitbakeIndent") + finish +endif + +runtime! indent/sh.vim +unlet b:did_indent + +setlocal indentexpr=BitbakeIndent(v:lnum) +setlocal autoindent nolisp + +function s:is_bb_python_func_def(lnum) + let stack = synstack(a:lnum, 1) + if len(stack) == 0 + return 0 + endif + + let top = synIDattr(stack[0], "name") + echo top + + return synIDattr(stack[0], "name") == "bbPyFuncDef" +endfunction + +"""" begin modified from indent/python.vim, upstream commit 7a9bd7c1e0ce1baf5a02daf36eeae3638aa315c7 +"""" This copied code is licensed the same as Vim itself. +setlocal indentkeys+=<:>,=elif,=except + +let s:keepcpo= &cpo +set cpo&vim + +let s:maxoff = 50 " maximum number of lines to look backwards for () + +function GetPythonIndent(lnum) + + " If this line is explicitly joined: If the previous line was also joined, + " line it up with that one, otherwise add two 'shiftwidth' + if getline(a:lnum - 1) =~ '\\$' + if a:lnum > 1 && getline(a:lnum - 2) =~ '\\$' + return indent(a:lnum - 1) + endif + return indent(a:lnum - 1) + (exists("g:pyindent_continue") ? eval(g:pyindent_continue) : (shiftwidth() * 2)) + endif + + " If the start of the line is in a string don't change the indent. + if has('syntax_items') + \ && synIDattr(synID(a:lnum, 1, 1), "name") =~ "String$" + return -1 + endif + + " Search backwards for the previous non-empty line. + let plnum = prevnonblank(v:lnum - 1) + + if plnum == 0 + " This is the first non-empty line, use zero indent. + return 0 + endif + + call cursor(plnum, 1) + + " Identing inside parentheses can be very slow, regardless of the searchpair() + " timeout, so let the user disable this feature if he doesn't need it + let disable_parentheses_indenting = get(g:, "pyindent_disable_parentheses_indenting", 0) + + if disable_parentheses_indenting == 1 + let plindent = indent(plnum) + let plnumstart = plnum + else + " searchpair() can be slow sometimes, limit the time to 150 msec or what is + " put in g:pyindent_searchpair_timeout + let searchpair_stopline = 0 + let searchpair_timeout = get(g:, 'pyindent_searchpair_timeout', 150) + + " If the previous line is inside parenthesis, use the indent of the starting + " line. + " Trick: use the non-existing "dummy" variable to break out of the loop when + " going too far back. + let parlnum = searchpair('(\|{\|\[', '', ')\|}\|\]', 'nbW', + \ "line('.') < " . (plnum - s:maxoff) . " ? dummy :" + \ . " synIDattr(synID(line('.'), col('.'), 1), 'name')" + \ . " =~ '\\(Comment\\|Todo\\|String\\)$'", + \ searchpair_stopline, searchpair_timeout) + if parlnum > 0 + " We may have found the opening brace of a BitBake Python task, e.g. 'python do_task {' + " If so, ignore it here - it will be handled later. + if s:is_bb_python_func_def(parlnum) + let parlnum = 0 + let plindent = indent(plnum) + let plnumstart = plnum + else + let plindent = indent(parlnum) + let plnumstart = parlnum + endif + else + let plindent = indent(plnum) + let plnumstart = plnum + endif + + " When inside parenthesis: If at the first line below the parenthesis add + " two 'shiftwidth', otherwise same as previous line. + " i = (a + " + b + " + c) + call cursor(a:lnum, 1) + let p = searchpair('(\|{\|\[', '', ')\|}\|\]', 'bW', + \ "line('.') < " . (a:lnum - s:maxoff) . " ? dummy :" + \ . " synIDattr(synID(line('.'), col('.'), 1), 'name')" + \ . " =~ '\\(Comment\\|Todo\\|String\\)$'", + \ searchpair_stopline, searchpair_timeout) + if p > 0 + if s:is_bb_python_func_def(p) + " Handle first non-empty line inside a BB Python task + if p == plnum + return shiftwidth() + endif + + " Handle the user actually trying to close a BitBake Python task + let line = getline(a:lnum) + if line =~ '^\s*}' + return -2 + endif + + " Otherwise ignore the brace + let p = 0 + else + if p == plnum + " When the start is inside parenthesis, only indent one 'shiftwidth'. + let pp = searchpair('(\|{\|\[', '', ')\|}\|\]', 'bW', + \ "line('.') < " . (a:lnum - s:maxoff) . " ? dummy :" + \ . " synIDattr(synID(line('.'), col('.'), 1), 'name')" + \ . " =~ '\\(Comment\\|Todo\\|String\\)$'", + \ searchpair_stopline, searchpair_timeout) + if pp > 0 + return indent(plnum) + (exists("g:pyindent_nested_paren") ? eval(g:pyindent_nested_paren) : shiftwidth()) + endif + return indent(plnum) + (exists("g:pyindent_open_paren") ? eval(g:pyindent_open_paren) : (shiftwidth() * 2)) + endif + if plnumstart == p + return indent(plnum) + endif + return plindent + endif + endif + + endif + + + " Get the line and remove a trailing comment. + " Use syntax highlighting attributes when possible. + let pline = getline(plnum) + let pline_len = strlen(pline) + if has('syntax_items') + " If the last character in the line is a comment, do a binary search for + " the start of the comment. synID() is slow, a linear search would take + " too long on a long line. + if synIDattr(synID(plnum, pline_len, 1), "name") =~ "\\(Comment\\|Todo\\)$" + let min = 1 + let max = pline_len + while min < max + let col = (min + max) / 2 + if synIDattr(synID(plnum, col, 1), "name") =~ "\\(Comment\\|Todo\\)$" + let max = col + else + let min = col + 1 + endif + endwhile + let pline = strpart(pline, 0, min - 1) + endif + else + let col = 0 + while col < pline_len + if pline[col] == '#' + let pline = strpart(pline, 0, col) + break + endif + let col = col + 1 + endwhile + endif + + " If the previous line ended with a colon, indent this line + if pline =~ ':\s*$' + return plindent + shiftwidth() + endif + + " If the previous line was a stop-execution statement... + " TODO: utilize this logic to deindent when ending a bbPyDefRegion + if getline(plnum) =~ '^\s*\(break\|continue\|raise\|return\|pass\|bb\.fatal\)\>' + " See if the user has already dedented + if indent(a:lnum) > indent(plnum) - shiftwidth() + " If not, recommend one dedent + return indent(plnum) - shiftwidth() + endif + " Otherwise, trust the user + return -1 + endif + + " If the current line begins with a keyword that lines up with "try" + if getline(a:lnum) =~ '^\s*\(except\|finally\)\>' + let lnum = a:lnum - 1 + while lnum >= 1 + if getline(lnum) =~ '^\s*\(try\|except\)\>' + let ind = indent(lnum) + if ind >= indent(a:lnum) + return -1 " indent is already less than this + endif + return ind " line up with previous try or except + endif + let lnum = lnum - 1 + endwhile + return -1 " no matching "try"! + endif + + " If the current line begins with a header keyword, dedent + if getline(a:lnum) =~ '^\s*\(elif\|else\)\>' + + " Unless the previous line was a one-liner + if getline(plnumstart) =~ '^\s*\(for\|if\|try\)\>' + return plindent + endif + + " Or the user has already dedented + if indent(a:lnum) <= plindent - shiftwidth() + return -1 + endif + + return plindent - shiftwidth() + endif + + " When after a () construct we probably want to go back to the start line. + " a = (b + " + c) + " here + if parlnum > 0 + return plindent + endif + + return -1 + +endfunction + +let &cpo = s:keepcpo +unlet s:keepcpo + +""" end of stuff from indent/python.vim + + +let b:did_indent = 1 +setlocal indentkeys+=0\" + + +function BitbakeIndent(lnum) + if !has('syntax_items') + return -1 + endif + + let stack = synstack(a:lnum, 1) + if len(stack) == 0 + return -1 + endif + + let name = synIDattr(stack[0], "name") + + " TODO: support different styles of indentation for assignments. For now, + " we only support like this: + " VAR = " \ + " value1 \ + " value2 \ + " " + " + " i.e. each value indented by shiftwidth(), with the final quote " completely unindented. + if name == "bbVarValue" + " Quote handling is tricky. kernel.bbclass has this line for instance: + " EXTRA_OEMAKE = " HOSTCC="${BUILD_CC} ${BUILD_CFLAGS} ${BUILD_LDFLAGS}" " HOSTCPP="${BUILD_CPP}"" + " Instead of trying to handle crazy cases like that, just assume that a + " double-quote on a line by itself (following an assignment) means the + " user is closing the assignment, and de-dent. + if getline(a:lnum) =~ '^\s*"$' + return 0 + endif + + let prevstack = synstack(a:lnum - 1, 1) + if len(prevstack) == 0 + return -1 + endif + + let prevname = synIDattr(prevstack[0], "name") + + " Only indent if there was actually a continuation character on + " the previous line, to avoid misleading indentation. + let prevlinelastchar = synIDattr(synID(a:lnum - 1, col([a:lnum - 1, "$"]) - 1, 1), "name") + let prev_continued = prevlinelastchar == "bbContinue" + + " Did the previous line introduce an assignment? + if index(["bbVarDef", "bbVarFlagDef"], prevname) != -1 + if prev_continued + return shiftwidth() + endif + endif + + if !prev_continued + return 0 + endif + + " Autoindent can take it from here + return -1 + endif + + if index(["bbPyDefRegion", "bbPyFuncRegion"], name) != -1 + let ret = GetPythonIndent(a:lnum) + " Should normally always be indented by at least one shiftwidth; but allow + " return of -1 (defer to autoindent) or -2 (force indent to 0) + if ret == 0 + return shiftwidth() + elseif ret == -2 + return 0 + endif + return ret + endif + + " TODO: GetShIndent doesn't detect tasks prepended with 'fakeroot' + " Need to submit a patch upstream to Vim to provide an extension point. + " Unlike the Python indenter, the Sh indenter is way too large to copy and + " modify here. + if name == "bbShFuncRegion" + return GetShIndent() + endif + + " TODO: + " + heuristics for de-denting out of a bbPyDefRegion? e.g. when the user + " types an obvious BB keyword like addhandler or addtask, or starts + " writing a shell task. Maybe too hard to implement... + + return -1 +endfunction diff --git a/poky/bitbake/lib/bb/cooker.py b/poky/bitbake/lib/bb/cooker.py index 20ef04d3f..e6442bff9 100644 --- a/poky/bitbake/lib/bb/cooker.py +++ b/poky/bitbake/lib/bb/cooker.py @@ -371,10 +371,6 @@ class BBCooker: self.data.setVar('BB_CMDLINE', self.ui_cmdline) - # - # Copy of the data store which has been expanded. - # Used for firing events and accessing variables where expansion needs to be accounted for - # if CookerFeatures.BASEDATASTORE_TRACKING in self.featureset: self.disableDataTracking() diff --git a/poky/bitbake/lib/bb/fetch2/__init__.py b/poky/bitbake/lib/bb/fetch2/__init__.py index 1f5f8f1f1..07de6c269 100644 --- a/poky/bitbake/lib/bb/fetch2/__init__.py +++ b/poky/bitbake/lib/bb/fetch2/__init__.py @@ -1593,7 +1593,7 @@ class Fetch(object): fn = d.getVar('FILE') mc = d.getVar('__BBMULTICONFIG') or "" if cache and fn and mc + fn in urldata_cache: - self.ud = urldata_cache[mc + fn] + self.ud = urldata_cache[mc + fn + str(id(d))] for url in urls: if url not in self.ud: @@ -1605,7 +1605,7 @@ class Fetch(object): pass if fn and cache: - urldata_cache[mc + fn] = self.ud + urldata_cache[mc + fn + str(id(d))] = self.ud def localpath(self, url): if url not in self.urls: diff --git a/poky/bitbake/lib/bb/fetch2/clearcase.py b/poky/bitbake/lib/bb/fetch2/clearcase.py index 3dd93ad6b..e2934ef9f 100644 --- a/poky/bitbake/lib/bb/fetch2/clearcase.py +++ b/poky/bitbake/lib/bb/fetch2/clearcase.py @@ -145,18 +145,18 @@ class ClearCase(FetchMethod): basecmd = "%s %s" % (ud.basecmd, command) - if command is 'mkview': + if command == 'mkview': if not "rcleartool" in ud.basecmd: # Cleartool needs a -snapshot view options.append("-snapshot") options.append("-tag %s" % ud.viewname) options.append(ud.viewdir) - elif command is 'rmview': + elif command == 'rmview': options.append("-force") options.append("%s" % ud.viewdir) - elif command is 'setcs': + elif command == 'setcs': options.append("-overwrite") options.append(ud.configspecfile) diff --git a/poky/bitbake/lib/bb/fetch2/git.py b/poky/bitbake/lib/bb/fetch2/git.py index 2d1d2cabd..fa41b078f 100644 --- a/poky/bitbake/lib/bb/fetch2/git.py +++ b/poky/bitbake/lib/bb/fetch2/git.py @@ -292,11 +292,21 @@ class Git(FetchMethod): def clonedir_need_update(self, ud, d): if not os.path.exists(ud.clonedir): return True + if ud.shallow and ud.write_shallow_tarballs and self.clonedir_need_shallow_revs(ud, d): + return True for name in ud.names: if not self._contains_ref(ud, d, name, ud.clonedir): return True return False + def clonedir_need_shallow_revs(self, ud, d): + for rev in ud.shallow_revs: + try: + runfetchcmd('%s rev-parse -q --verify %s' % (ud.basecmd, rev), d, quiet=True, workdir=ud.clonedir) + except bb.fetch2.FetchError: + return rev + return None + def shallow_tarball_need_update(self, ud): return ud.shallow and ud.write_shallow_tarballs and not os.path.exists(ud.fullshallow) @@ -339,13 +349,7 @@ class Git(FetchMethod): runfetchcmd(clone_cmd, d, log=progresshandler) # Update the checkout if needed - needupdate = False - for name in ud.names: - if not self._contains_ref(ud, d, name, ud.clonedir): - needupdate = True - break - - if needupdate: + if self.clonedir_need_update(ud, d): output = runfetchcmd("%s remote" % ud.basecmd, d, quiet=True, workdir=ud.clonedir) if "origin" in output: runfetchcmd("%s remote rm origin" % ud.basecmd, d, workdir=ud.clonedir) @@ -369,6 +373,11 @@ class Git(FetchMethod): if not self._contains_ref(ud, d, name, ud.clonedir): raise bb.fetch2.FetchError("Unable to find revision %s in branch %s even from upstream" % (ud.revisions[name], ud.branches[name])) + if ud.shallow and ud.write_shallow_tarballs: + missing_rev = self.clonedir_need_shallow_revs(ud, d) + if missing_rev: + raise bb.fetch2.FetchError("Unable to find revision %s even from upstream" % missing_rev) + def build_mirror_data(self, ud, d): if ud.shallow and ud.write_shallow_tarballs: if not os.path.exists(ud.fullshallow): diff --git a/poky/bitbake/lib/bb/fetch2/hg.py b/poky/bitbake/lib/bb/fetch2/hg.py index 15d729e7b..e21115deb 100644 --- a/poky/bitbake/lib/bb/fetch2/hg.py +++ b/poky/bitbake/lib/bb/fetch2/hg.py @@ -54,13 +54,6 @@ class Hg(FetchMethod): else: ud.proto = "hg" - ud.setup_revisions(d) - - if 'rev' in ud.parm: - ud.revision = ud.parm['rev'] - elif not ud.revision: - ud.revision = self.latest_revision(ud, d) - # Create paths to mercurial checkouts hgsrcname = '%s_%s_%s' % (ud.module.replace('/', '.'), \ ud.host, ud.path.replace('/', '.')) @@ -74,6 +67,13 @@ class Hg(FetchMethod): ud.localfile = ud.moddir ud.basecmd = d.getVar("FETCHCMD_hg") or "/usr/bin/env hg" + ud.setup_revisions(d) + + if 'rev' in ud.parm: + ud.revision = ud.parm['rev'] + elif not ud.revision: + ud.revision = self.latest_revision(ud, d) + ud.write_tarballs = d.getVar("BB_GENERATE_MIRROR_TARBALLS") def need_update(self, ud, d): @@ -139,7 +139,7 @@ class Hg(FetchMethod): cmd = "%s --config auth.default.prefix=* --config auth.default.username=%s --config auth.default.password=%s --config \"auth.default.schemes=%s\" pull" % (ud.basecmd, ud.user, ud.pswd, proto) else: cmd = "%s pull" % (ud.basecmd) - elif command == "update": + elif command == "update" or command == "up": if ud.user and ud.pswd: cmd = "%s --config auth.default.prefix=* --config auth.default.username=%s --config auth.default.password=%s --config \"auth.default.schemes=%s\" update -C %s" % (ud.basecmd, ud.user, ud.pswd, proto, " ".join(options)) else: @@ -247,12 +247,19 @@ class Hg(FetchMethod): scmdata = ud.parm.get("scmdata", "") if scmdata != "nokeep": + proto = ud.parm.get('protocol', 'http') if not os.access(os.path.join(codir, '.hg'), os.R_OK): logger.debug(2, "Unpack: creating new hg repository in '" + codir + "'") runfetchcmd("%s init %s" % (ud.basecmd, codir), d) logger.debug(2, "Unpack: updating source in '" + codir + "'") - runfetchcmd("%s pull %s" % (ud.basecmd, ud.moddir), d, workdir=codir) - runfetchcmd("%s up -C %s" % (ud.basecmd, revflag), d, workdir=codir) + if ud.user and ud.pswd: + runfetchcmd("%s --config auth.default.prefix=* --config auth.default.username=%s --config auth.default.password=%s --config \"auth.default.schemes=%s\" pull %s" % (ud.basecmd, ud.user, ud.pswd, proto, ud.moddir), d, workdir=codir) + else: + runfetchcmd("%s pull %s" % (ud.basecmd, ud.moddir), d, workdir=codir) + if ud.user and ud.pswd: + runfetchcmd("%s --config auth.default.prefix=* --config auth.default.username=%s --config auth.default.password=%s --config \"auth.default.schemes=%s\" up -C %s" % (ud.basecmd, ud.user, ud.pswd, proto, revflag), d, workdir=codir) + else: + runfetchcmd("%s up -C %s" % (ud.basecmd, revflag), d, workdir=codir) else: logger.debug(2, "Unpack: extracting source to '" + codir + "'") runfetchcmd("%s archive -t files %s %s" % (ud.basecmd, revflag, codir), d, workdir=ud.moddir) diff --git a/poky/bitbake/lib/bb/parse/parse_py/ConfHandler.py b/poky/bitbake/lib/bb/parse/parse_py/ConfHandler.py index 2e84b913d..af64d3446 100644 --- a/poky/bitbake/lib/bb/parse/parse_py/ConfHandler.py +++ b/poky/bitbake/lib/bb/parse/parse_py/ConfHandler.py @@ -119,30 +119,30 @@ def handle(fn, data, include): oldfile = data.getVar('FILE', False) abs_fn = resolve_file(fn, data) - f = open(abs_fn, 'r') - - statements = ast.StatementGroup() - lineno = 0 - while True: - lineno = lineno + 1 - s = f.readline() - if not s: - break - w = s.strip() - # skip empty lines - if not w: - continue - s = s.rstrip() - while s[-1] == '\\': - s2 = f.readline().rstrip() + with open(abs_fn, 'r') as f: + + statements = ast.StatementGroup() + lineno = 0 + while True: lineno = lineno + 1 - if (not s2 or s2 and s2[0] != "#") and s[0] == "#" : - bb.fatal("There is a confusing multiline, partially commented expression on line %s of file %s (%s).\nPlease clarify whether this is all a comment or should be parsed." % (lineno, fn, s)) - s = s[:-1] + s2 - # skip comments - if s[0] == '#': - continue - feeder(lineno, s, abs_fn, statements) + s = f.readline() + if not s: + break + w = s.strip() + # skip empty lines + if not w: + continue + s = s.rstrip() + while s[-1] == '\\': + s2 = f.readline().rstrip() + lineno = lineno + 1 + if (not s2 or s2 and s2[0] != "#") and s[0] == "#" : + bb.fatal("There is a confusing multiline, partially commented expression on line %s of file %s (%s).\nPlease clarify whether this is all a comment or should be parsed." % (lineno, fn, s)) + s = s[:-1] + s2 + # skip comments + if s[0] == '#': + continue + feeder(lineno, s, abs_fn, statements) # DONE WITH PARSING... time to evaluate data.setVar('FILE', abs_fn) diff --git a/poky/bitbake/lib/bb/runqueue.py b/poky/bitbake/lib/bb/runqueue.py index 18049436f..26492e708 100644 --- a/poky/bitbake/lib/bb/runqueue.py +++ b/poky/bitbake/lib/bb/runqueue.py @@ -1397,7 +1397,7 @@ class RunQueue: cache[tid] = iscurrent return iscurrent - def validate_hashes(self, tocheck, data, currentcount=0, siginfo=False): + def validate_hashes(self, tocheck, data, currentcount=0, siginfo=False, summary=True): valid = set() if self.hashvalidate: sq_data = {} @@ -1410,15 +1410,15 @@ class RunQueue: sq_data['hashfn'][tid] = self.rqdata.dataCaches[mc].hashfn[taskfn] sq_data['unihash'][tid] = self.rqdata.runtaskentries[tid].unihash - valid = self.validate_hash(sq_data, data, siginfo, currentcount) + valid = self.validate_hash(sq_data, data, siginfo, currentcount, summary) return valid - def validate_hash(self, sq_data, d, siginfo, currentcount): - locs = {"sq_data" : sq_data, "d" : d, "siginfo" : siginfo, "currentcount" : currentcount} + def validate_hash(self, sq_data, d, siginfo, currentcount, summary): + locs = {"sq_data" : sq_data, "d" : d, "siginfo" : siginfo, "currentcount" : currentcount, "summary" : summary} # Metadata has **kwargs so args can be added, sq_data can also gain new fields - call = self.hashvalidate + "(sq_data, d, siginfo=siginfo, currentcount=currentcount)" + call = self.hashvalidate + "(sq_data, d, siginfo=siginfo, currentcount=currentcount, summary=summary)" return bb.utils.better_eval(call, locs) @@ -1605,7 +1605,7 @@ class RunQueue: tocheck.add(tid) - valid_new = self.validate_hashes(tocheck, self.cooker.data, 0, True) + valid_new = self.validate_hashes(tocheck, self.cooker.data, 0, True, summary=False) # Tasks which are both setscene and noexec never care about dependencies # We therefore find tasks which are setscene and noexec and mark their @@ -1986,7 +1986,7 @@ class RunQueueExecute: continue logger.debug(1, "Task %s no longer deferred" % nexttask) del self.sq_deferred[nexttask] - valid = self.rq.validate_hashes(set([nexttask]), self.cooker.data, 0, False) + valid = self.rq.validate_hashes(set([nexttask]), self.cooker.data, 0, False, summary=False) if not valid: logger.debug(1, "%s didn't become valid, skipping setscene" % nexttask) self.sq_task_failoutright(nexttask) @@ -2303,16 +2303,22 @@ class RunQueueExecute: for tid in changed: if tid not in self.rqdata.runq_setscene_tids: continue + if tid not in self.pending_migrations: + self.pending_migrations.add(tid) + + for tid in self.pending_migrations.copy(): if tid in self.runq_running: + # Too late, task already running, not much we can do now + self.pending_migrations.remove(tid) continue - if tid in self.scenequeue_covered: + + if tid in self.scenequeue_covered or tid in self.sq_live: + # Already ran this setscene task or it running # Potentially risky, should we report this hash as a match? logger.info("Already covered setscene for %s so ignoring rehash" % (tid)) + self.pending_migrations.remove(tid) continue - if tid not in self.pending_migrations: - self.pending_migrations.add(tid) - for tid in self.pending_migrations.copy(): valid = True # Check no tasks this covers are running for dep in self.sqdata.sq_covered_tasks[tid]: @@ -2361,9 +2367,13 @@ class RunQueueExecute: if tid in self.build_stamps: del self.build_stamps[tid] - logger.info("Setscene task %s now valid and being rerun" % tid) + origvalid = False + if tid in self.sqdata.valid: + origvalid = True self.sqdone = False - update_scenequeue_data([tid], self.sqdata, self.rqdata, self.rq, self.cooker, self.stampcache, self) + update_scenequeue_data([tid], self.sqdata, self.rqdata, self.rq, self.cooker, self.stampcache, self, summary=False) + if tid in self.sqdata.valid and not origvalid: + logger.info("Setscene task %s became valid" % tid) if changed: self.holdoff_need_update = True @@ -2692,9 +2702,9 @@ def build_scenequeue_data(sqdata, rqdata, rq, cooker, stampcache, sqrq): sqdata.stamppresent = set() sqdata.valid = set() - update_scenequeue_data(sqdata.sq_revdeps, sqdata, rqdata, rq, cooker, stampcache, sqrq) + update_scenequeue_data(sqdata.sq_revdeps, sqdata, rqdata, rq, cooker, stampcache, sqrq, summary=True) -def update_scenequeue_data(tids, sqdata, rqdata, rq, cooker, stampcache, sqrq): +def update_scenequeue_data(tids, sqdata, rqdata, rq, cooker, stampcache, sqrq, summary=True): tocheck = set() @@ -2728,7 +2738,7 @@ def update_scenequeue_data(tids, sqdata, rqdata, rq, cooker, stampcache, sqrq): tocheck.add(tid) - sqdata.valid |= rq.validate_hashes(tocheck, cooker.data, len(sqdata.stamppresent), False) + sqdata.valid |= rq.validate_hashes(tocheck, cooker.data, len(sqdata.stamppresent), False, summary=summary) sqdata.hashes = {} for mc in sorted(sqdata.multiconfigs): diff --git a/poky/bitbake/lib/bb/tests/fetch.py b/poky/bitbake/lib/bb/tests/fetch.py index a0b656b61..83fad3ff0 100644 --- a/poky/bitbake/lib/bb/tests/fetch.py +++ b/poky/bitbake/lib/bb/tests/fetch.py @@ -1863,6 +1863,26 @@ class GitShallowTest(FetcherTest): with self.assertRaises(bb.fetch2.FetchError): self.fetch() + def test_shallow_fetch_missing_revs(self): + self.add_empty_file('a') + self.add_empty_file('b') + fetcher, ud = self.fetch(self.d.getVar('SRC_URI')) + self.git('tag v0.0 master', cwd=self.srcdir) + self.d.setVar('BB_GIT_SHALLOW_DEPTH', '0') + self.d.setVar('BB_GIT_SHALLOW_REVS', 'v0.0') + self.fetch_shallow() + + def test_shallow_fetch_missing_revs_fails(self): + self.add_empty_file('a') + self.add_empty_file('b') + fetcher, ud = self.fetch(self.d.getVar('SRC_URI')) + self.d.setVar('BB_GIT_SHALLOW_DEPTH', '0') + self.d.setVar('BB_GIT_SHALLOW_REVS', 'v0.0') + + with self.assertRaises(bb.fetch2.FetchError), self.assertLogs("BitBake.Fetcher", level="ERROR") as cm: + self.fetch_shallow() + self.assertIn("Unable to find revision v0.0 even from upstream", cm.output[0]) + @skipIfNoNetwork() def test_bitbake(self): self.git('remote add --mirror=fetch origin git://github.com/openembedded/bitbake', cwd=self.srcdir) diff --git a/poky/bitbake/lib/bb/tests/utils.py b/poky/bitbake/lib/bb/tests/utils.py index f4adf1d44..5c910b4b8 100644 --- a/poky/bitbake/lib/bb/tests/utils.py +++ b/poky/bitbake/lib/bb/tests/utils.py @@ -103,6 +103,32 @@ class Path(unittest.TestCase): result = bb.utils._check_unsafe_delete_path(arg1) self.assertEqual(result, correctresult, '_check_unsafe_delete_path("%s") != %s' % (arg1, correctresult)) +class Checksum(unittest.TestCase): + filler = b"Shiver me timbers square-rigged spike Gold Road galleon bilge water boatswain wherry jack pirate. Mizzenmast rum lad Privateer jack salmagundi hang the jib piracy Pieces of Eight Corsair. Parrel marooned black spot yawl provost quarterdeck cable no prey, no pay spirits lateen sail." + + def test_md5(self): + import hashlib + with tempfile.NamedTemporaryFile() as f: + f.write(self.filler) + f.flush() + checksum = bb.utils.md5_file(f.name) + self.assertEqual(checksum, "bd572cd5de30a785f4efcb6eaf5089e3") + + def test_sha1(self): + import hashlib + with tempfile.NamedTemporaryFile() as f: + f.write(self.filler) + f.flush() + checksum = bb.utils.sha1_file(f.name) + self.assertEqual(checksum, "249eb8fd654732ea836d5e702d7aa567898eca71") + + def test_sha256(self): + import hashlib + with tempfile.NamedTemporaryFile() as f: + f.write(self.filler) + f.flush() + checksum = bb.utils.sha256_file(f.name) + self.assertEqual(checksum, "fcfbae8bf6b721dbb9d2dc6a9334a58f2031a9a9b302999243f99da4d7f12d0f") class EditMetadataFile(unittest.TestCase): _origfile = """ diff --git a/poky/bitbake/lib/bb/utils.py b/poky/bitbake/lib/bb/utils.py index d035949b3..8d40bcdf8 100644 --- a/poky/bitbake/lib/bb/utils.py +++ b/poky/bitbake/lib/bb/utils.py @@ -520,22 +520,26 @@ def unlockfile(lf): fcntl.flock(lf.fileno(), fcntl.LOCK_UN) lf.close() -def md5_file(filename): - """ - Return the hex string representation of the MD5 checksum of filename. - """ - import hashlib, mmap +def _hasher(method, filename): + import mmap with open(filename, "rb") as f: - m = hashlib.md5() try: with mmap.mmap(f.fileno(), 0, access=mmap.ACCESS_READ) as mm: for chunk in iter(lambda: mm.read(8192), b''): - m.update(chunk) + method.update(chunk) except ValueError: # You can't mmap() an empty file so silence this exception pass - return m.hexdigest() + return method.hexdigest() + + +def md5_file(filename): + """ + Return the hex string representation of the MD5 checksum of filename. + """ + import hashlib + return _hasher(hashlib.md5(), filename) def sha256_file(filename): """ @@ -543,24 +547,14 @@ def sha256_file(filename): filename. """ import hashlib - - s = hashlib.sha256() - with open(filename, "rb") as f: - for line in f: - s.update(line) - return s.hexdigest() + return _hasher(hashlib.sha256(), filename) def sha1_file(filename): """ Return the hex string representation of the SHA1 checksum of the filename """ import hashlib - - s = hashlib.sha1() - with open(filename, "rb") as f: - for line in f: - s.update(line) - return s.hexdigest() + return _hasher(hashlib.sha1(), filename) def preserved_envvars_exported(): """Variables which are taken from the environment and placed in and exported diff --git a/poky/bitbake/lib/prserv/serv.py b/poky/bitbake/lib/prserv/serv.py index be3acec36..b854ba14b 100644 --- a/poky/bitbake/lib/prserv/serv.py +++ b/poky/bitbake/lib/prserv/serv.py @@ -243,6 +243,7 @@ class PRServer(SimpleXMLRPCServer): try: pid = os.fork() if pid > 0: + self.socket.close() # avoid ResourceWarning in parent return pid except OSError as e: raise Exception("%s [%d]" % (e.strerror, e.errno)) @@ -379,9 +380,8 @@ def stop_daemon(host, port): ip = socket.gethostbyname(host) pidfile = PIDPREFIX % (ip, port) try: - pf = open(pidfile,'r') - pid = int(pf.readline().strip()) - pf.close() + with open(pidfile) as pf: + pid = int(pf.readline().strip()) except IOError: pid = None diff --git a/poky/documentation/bsp-guide/bsp-guide.xml b/poky/documentation/bsp-guide/bsp-guide.xml index addb42118..dd0c76add 100644 --- a/poky/documentation/bsp-guide/bsp-guide.xml +++ b/poky/documentation/bsp-guide/bsp-guide.xml @@ -132,9 +132,9 @@ <revremark>Released with the Yocto Project 2.7 Release.</revremark> </revision> <revision> - <revnumber>2.8</revnumber> + <revnumber>3.0</revnumber> <date>&REL_MONTH_YEAR;</date> - <revremark>Released with the Yocto Project 2.8 Release.</revremark> + <revremark>Released with the Yocto Project 3.0 Release.</revremark> </revision> </revhistory> diff --git a/poky/documentation/dev-manual/dev-manual-common-tasks.xml b/poky/documentation/dev-manual/dev-manual-common-tasks.xml index f72f81f55..00741ee45 100644 --- a/poky/documentation/dev-manual/dev-manual-common-tasks.xml +++ b/poky/documentation/dev-manual/dev-manual-common-tasks.xml @@ -2349,7 +2349,7 @@ Most software provides some means of setting build-time configuration options before compilation. Typically, setting these options is accomplished by running a - configure script with some options, or by modifying a build + configure script with options, or by modifying a build configuration file. <note> As of Yocto Project Release 1.7, some of the core recipes @@ -2389,6 +2389,7 @@ software is built using Autotools. If this is the case, you just need to worry about modifying the configuration.</para> + <para>When using Autotools, your recipe needs to inherit the <ulink url='&YOCTO_DOCS_REF_URL;#ref-classes-autotools'><filename>autotools</filename></ulink> @@ -2401,13 +2402,15 @@ or <ulink url='&YOCTO_DOCS_REF_URL;#var-PACKAGECONFIG_CONFARGS'><filename>PACKAGECONFIG_CONFARGS</filename></ulink> to pass any needed configure options that are specific - to the recipe.</para></listitem> + to the recipe. + </para></listitem> <listitem><para><emphasis>CMake:</emphasis> If your source files have a <filename>CMakeLists.txt</filename> file, then your software is built using CMake. If this is the case, you just need to worry about modifying the configuration.</para> + <para>When you use CMake, your recipe needs to inherit the <ulink url='&YOCTO_DOCS_REF_URL;#ref-classes-cmake'><filename>cmake</filename></ulink> @@ -2417,7 +2420,16 @@ You can make some adjustments by setting <ulink url='&YOCTO_DOCS_REF_URL;#var-EXTRA_OECMAKE'><filename>EXTRA_OECMAKE</filename></ulink> to pass any needed configure options that are specific - to the recipe.</para></listitem> + to the recipe. + <note> + If you need to install one or more custom CMake + toolchain files that are supplied by the + application you are building, install the files to + <filename>${D}${datadir}/cmake/</filename> Modules + during + <ulink url='&YOCTO_DOCS_REF_URL;#ref-tasks-install'><filename>do_install</filename></ulink>. + </note> + </para></listitem> <listitem><para><emphasis>Other:</emphasis> If your source files do not have a <filename>configure.ac</filename> or @@ -2780,6 +2792,14 @@ <ulink url='&YOCTO_DOCS_REF_URL;#var-PARALLEL_MAKEINST'><filename>PARALLEL_MAKEINST</filename></ulink> for additional information. </para></listitem> + <listitem><para> + If you need to install one or more custom CMake + toolchain files that are supplied by the + application you are building, install the files to + <filename>${D}${datadir}/cmake/</filename> Modules + during + <ulink url='&YOCTO_DOCS_REF_URL;#ref-tasks-install'><filename>do_install</filename></ulink>. + </para></listitem> </itemizedlist> </note> </section> @@ -5420,12 +5440,16 @@ <literallayout class='monospaced'> BBMULTICONFIG = "x86 arm" </literallayout> - </para> - - <para>Please note, that a "default" configuration already exists by definition, - this configuration is named: "" (empty string) and is defined by the variables - coming from your local.conf file. So, the previous example actually adds two - additional configurations to your build "arm" and "x86" along with "". + <note> + A "default" configuration already exists by + definition. + This configuration is named: "" (i.e. empty + string) and is defined by the variables coming + from your <filename>local.conf</filename> file. + Consequently, the previous example actually + adds two additional configurations to your + build: "arm" and "x86" along with "". + </note> </para></listitem> <listitem><para> <emphasis>Launch BitBake</emphasis>: @@ -5445,9 +5469,10 @@ <filename>x86.conf</filename> configuration file, a <filename>core-image-sato</filename> image that is configured through the - <filename>arm.conf</filename> configuration file and a - <filename>core-image-base</filename> that is configured - through your <filename>local.conf</filename> configuration file. + <filename>arm.conf</filename> configuration file + and a <filename>core-image-base</filename> that is + configured through your + <filename>local.conf</filename> configuration file. </para></listitem> </itemizedlist> <note> @@ -10820,6 +10845,47 @@ </para> <para> + By default, the Yocto Project uses SysVinit as the initialization + manager. + However, support also exists for systemd, + which is a full replacement for init with + parallel starting of services, reduced shell overhead and other + features that are used by many distributions. + </para> + + <para> + Within the system, SysVinit treats system components as services. + These services are maintained as shell scripts stored in the + <filename>/etc/init.d/</filename> directory. + Services organize into different run levels. + This organization is maintained by putting links to the services + in the <filename>/etc/rcN.d/</filename> directories, where + <replaceable>N/</replaceable> is one of the following options: + "S", "0", "1", "2", "3", "4", "5", or "6". + <note> + Each runlevel has a dependency on the previous runlevel. + This dependency allows the services to work properly. + </note> + </para> + + <para> + In comparison, systemd treats components as units. + Using units is a broader concept as compared to using a service. + A unit includes several different types of entities. + Service is one of the types of entities. + The runlevel concept in SysVinit corresponds to the concept of a + target in systemd, where target is also a type of supported unit. + </para> + + <para> + In a SysVinit-based system, services load sequentially (i.e. one + by one) during and parallelization is not supported. + With systemd, services start in parallel. + Needless to say, the method can have an impact on system startup + performance. + </para> + + <para> If you want to use SysVinit, you do not have to do anything. But, if you want to use systemd, you must diff --git a/poky/documentation/dev-manual/dev-manual.xml b/poky/documentation/dev-manual/dev-manual.xml index 42deff102..04fa1e4f9 100644 --- a/poky/documentation/dev-manual/dev-manual.xml +++ b/poky/documentation/dev-manual/dev-manual.xml @@ -117,9 +117,9 @@ <revremark>Released with the Yocto Project 2.7 Release.</revremark> </revision> <revision> - <revnumber>2.8</revnumber> + <revnumber>3.0</revnumber> <date>&REL_MONTH_YEAR;</date> - <revremark>Released with the Yocto Project 2.8 Release.</revremark> + <revremark>Released with the Yocto Project 3.0 Release.</revremark> </revision> </revhistory> diff --git a/poky/documentation/kernel-dev/kernel-dev.xml b/poky/documentation/kernel-dev/kernel-dev.xml index c43330a31..4c5881b07 100644 --- a/poky/documentation/kernel-dev/kernel-dev.xml +++ b/poky/documentation/kernel-dev/kernel-dev.xml @@ -102,9 +102,9 @@ <revremark>Released with the Yocto Project 2.7 Release.</revremark> </revision> <revision> - <revnumber>2.8</revnumber> + <revnumber>3.0</revnumber> <date>&REL_MONTH_YEAR;</date> - <revremark>Released with the Yocto Project 2.8 Release.</revremark> + <revremark>Released with the Yocto Project 3.0 Release.</revremark> </revision> </revhistory> diff --git a/poky/documentation/mega-manual/mega-manual.xml b/poky/documentation/mega-manual/mega-manual.xml index b66b9334f..cd9a3da8f 100644 --- a/poky/documentation/mega-manual/mega-manual.xml +++ b/poky/documentation/mega-manual/mega-manual.xml @@ -88,9 +88,9 @@ <revremark>Released with the Yocto Project 2.7 Release.</revremark> </revision> <revision> - <revnumber>2.8</revnumber> + <revnumber>3.0</revnumber> <date>&REL_MONTH_YEAR;</date> - <revremark>Released with the Yocto Project 2.8 Release.</revremark> + <revremark>Released with the Yocto Project 3.0 Release.</revremark> </revision> </revhistory> @@ -332,22 +332,22 @@ </para> <xi:include - xmlns:xi="http://www.w3.org/2003/XInclude" href="../../../bitbake/doc/bitbake-user-manual/bitbake-user-manual-intro.xml"/> + xmlns:xi="http://www.w3.org/2003/XInclude" href="../../bitbake/doc/bitbake-user-manual/bitbake-user-manual-intro.xml"/> <xi:include - xmlns:xi="http://www.w3.org/2003/XInclude" href="../../../bitbake/doc/bitbake-user-manual/bitbake-user-manual-execution.xml"/> + xmlns:xi="http://www.w3.org/2003/XInclude" href="../../bitbake/doc/bitbake-user-manual/bitbake-user-manual-execution.xml"/> <xi:include - xmlns:xi="http://www.w3.org/2003/XInclude" href="../../../bitbake/doc/bitbake-user-manual/bitbake-user-manual-metadata.xml"/> + xmlns:xi="http://www.w3.org/2003/XInclude" href="../../bitbake/doc/bitbake-user-manual/bitbake-user-manual-metadata.xml"/> <xi:include - xmlns:xi="http://www.w3.org/2003/XInclude" href="../../../bitbake/doc/bitbake-user-manual/bitbake-user-manual-fetching.xml"/> + xmlns:xi="http://www.w3.org/2003/XInclude" href="../../bitbake/doc/bitbake-user-manual/bitbake-user-manual-fetching.xml"/> <xi:include - xmlns:xi="http://www.w3.org/2003/XInclude" href="../../../bitbake/doc/bitbake-user-manual/bitbake-user-manual-ref-variables.xml"/> + xmlns:xi="http://www.w3.org/2003/XInclude" href="../../bitbake/doc/bitbake-user-manual/bitbake-user-manual-ref-variables.xml"/> <xi:include - xmlns:xi="http://www.w3.org/2003/XInclude" href="../../../bitbake/doc/bitbake-user-manual/bitbake-user-manual-hello.xml"/> + xmlns:xi="http://www.w3.org/2003/XInclude" href="../../bitbake/doc/bitbake-user-manual/bitbake-user-manual-hello.xml"/> </book> diff --git a/poky/documentation/overview-manual/overview-manual.xml b/poky/documentation/overview-manual/overview-manual.xml index 728cad57f..c7716e460 100644 --- a/poky/documentation/overview-manual/overview-manual.xml +++ b/poky/documentation/overview-manual/overview-manual.xml @@ -47,9 +47,9 @@ <revremark>Released with the Yocto Project 2.7 Release.</revremark> </revision> <revision> - <revnumber>2.8</revnumber> + <revnumber>3.0</revnumber> <date>&REL_MONTH_YEAR;</date> - <revremark>Released with the Yocto Project 2.8 Release.</revremark> + <revremark>Released with the Yocto Project 3.0 Release.</revremark> </revision> </revhistory> diff --git a/poky/documentation/poky.ent b/poky/documentation/poky.ent index 192b9418f..7af47df72 100644 --- a/poky/documentation/poky.ent +++ b/poky/documentation/poky.ent @@ -1,14 +1,14 @@ -<!ENTITY DISTRO "2.8"> -<!ENTITY DISTRO_COMPRESSED "28"> +<!ENTITY DISTRO "3.0"> +<!ENTITY DISTRO_COMPRESSED "30"> <!ENTITY DISTRO_NAME_NO_CAP "zeus"> <!ENTITY DISTRO_NAME "Zeus"> <!ENTITY DISTRO_NAME_NO_CAP_MINUS_ONE "warrior"> <!ENTITY DISTRO_NAME_MINUS_ONE "Warrior"> -<!ENTITY YOCTO_DOC_VERSION "2.8"> +<!ENTITY YOCTO_DOC_VERSION "3.0"> <!ENTITY YOCTO_DOC_VERSION_MINUS_ONE "2.7"> -<!ENTITY DISTRO_REL_TAG "yocto-2.8"> +<!ENTITY DISTRO_REL_TAG "yocto-3.0"> <!ENTITY METAINTELVERSION "9.0"> -<!ENTITY REL_MONTH_YEAR "TBD"> +<!ENTITY REL_MONTH_YEAR "October 2019"> <!ENTITY META_INTEL_REL_TAG "&METAINTELVERSION;-&DISTRO_NAME_NO_CAP;-&YOCTO_DOC_VERSION;"> <!ENTITY POKYVERSION "22.0.0"> <!ENTITY POKYVERSION_COMPRESSED "2200"> diff --git a/poky/documentation/profile-manual/profile-manual.xml b/poky/documentation/profile-manual/profile-manual.xml index c6e8baf02..c1f461f43 100644 --- a/poky/documentation/profile-manual/profile-manual.xml +++ b/poky/documentation/profile-manual/profile-manual.xml @@ -102,9 +102,9 @@ <revremark>Released with the Yocto Project 2.7 Release.</revremark> </revision> <revision> - <revnumber>2.8</revnumber> + <revnumber>3.0</revnumber> <date>&REL_MONTH_YEAR;</date> - <revremark>Released with the Yocto Project 2.8 Release.</revremark> + <revremark>Released with the Yocto Project 3.0 Release.</revremark> </revision> </revhistory> diff --git a/poky/documentation/ref-manual/migration.xml b/poky/documentation/ref-manual/migration.xml index ade8787b4..8d50ab913 100644 --- a/poky/documentation/ref-manual/migration.xml +++ b/poky/documentation/ref-manual/migration.xml @@ -2103,10 +2103,9 @@ </para> <para> - Additionally, a - <link linkend='ref-classes-bluetooth'><filename>bluetooth</filename></link> - class has been added to make selection of the appropriate bluetooth - support within a recipe a little easier. + Additionally, a <filename>bluetooth</filename> class has been added + to make selection of the appropriate bluetooth support within a + recipe a little easier. If you wish to make use of this class in a recipe, add something such as the following: <literallayout class='monospaced'> @@ -4740,7 +4739,7 @@ id=f4d4f99cfbc2396e49c1613a7d237b9e57f06f81'>commit message</ulink>. <para> This section provides information about packaging changes that have - ocurred: + occurred: <itemizedlist> <listitem><para> <emphasis><filename>python3</filename> Changes:</emphasis> @@ -6597,6 +6596,505 @@ id=f4d4f99cfbc2396e49c1613a7d237b9e57f06f81'>commit message</ulink>. </para> </section> </section> + +<section id='moving-to-the-yocto-project-3.0-release'> + <title>Moving to the Yocto Project 3.0 Release</title> + + <para> + This section provides migration information for moving to the + Yocto Project 3.0 Release from the prior release. + </para> + + <section id='migration-3.0-init-system-selection'> + <title>Init System Selection</title> + + <para> + Changing the init system manager previously required setting a + number of different variables. + You can now change the manager by setting the + <filename>INIT_MANAGER</filename> variable and the corresponding + include files + (i.e. <filename>conf/distro/include/init-manager-*.conf</filename>). + Include files are provided for four values: "none", "sysvinit", + "systemd", and "mdev-busybox". + The default value, "none", for <filename>INIT_MANAGER</filename> + should allow your current settings to continue working. + However, it is advisable to explicitly set + <filename>INIT_MANAGER</filename>. + </para> + </section> + + <section id='migration-3.0-lsb-support-removed'> + <title>LSB Support Removed</title> + + <para> + Linux Standard Base (LSB) as a standard is not current, and + is not well suited for embedded applications. + Support can be continued in a separate layer if needed. + However, presently LSB support has been removed from the core. + </para> + + <para> + As a result of this change, the <filename>poky-lsb</filename> + derivative distribution configuration that was also used for + testing alternative configurations has been replaced with a + <filename>poky-altcfg</filename> distribution that has LSB + parts removed. + </para> + </section> + + <section id='migration-3.0-removed-recipes'> + <title>Removed Recipes</title> + + <para> + The following recipes have been removed. + <itemizedlist> + <listitem><para> + <filename>core-image-lsb-dev</filename>: Part of removed + LSB support. + </para></listitem> + <listitem><para> + <filename>core-image-lsb</filename>: Part of removed + LSB support. + </para></listitem> + <listitem><para> + <filename>core-image-lsb-sdk</filename>: Part of removed + LSB support. + </para></listitem> + <listitem><para> + <filename>cve-check-tool</filename>: Functionally replaced + by the <filename>cve-update-db</filename> recipe and + <filename>cve-check</filename> class. + </para></listitem> + <listitem><para> + <filename>eglinfo</filename>: No longer maintained. + <filename>eglinfo</filename> from + <filename>mesa-demos</filename> is an adequate and + maintained alternative. + </para></listitem> + <listitem><para> + <filename>gcc-8.3</filename>: Version 8.3 removed. + Replaced by 9.2. + </para></listitem> + <listitem><para> + <filename>gnome-themes-standard</filename>: Only needed + by gtk+ 2.x, which has been removed. + </para></listitem> + <listitem><para> + <filename>gtk+</filename>: GTK+ 2 is obsolete and has been + replaced by gtk+3. + </para></listitem> + <listitem><para> + <filename>irda-utils</filename>: Has become obsolete. + IrDA support has been removed from the Linux kernel in + version 4.17 and later. + </para></listitem> + <listitem><para> + <filename>libnewt-python</filename>: + <filename>libnewt</filename> Python support merged into + main <filename>libnewt</filename> recipe. + </para></listitem> + <listitem><para> + <filename>libsdl</filename>: Replaced by newer + <filename>libsdl2</filename>. + </para></listitem> + <listitem><para> + <filename>libx11-diet</filename>: Became obsolete. + </para></listitem> + <listitem><para> + <filename>libxx86dga</filename>: Removed obsolete client + library. + </para></listitem> + <listitem><para> + <filename>libxx86misc</filename>: Removed. Library is + redundant. + </para></listitem> + <listitem><para> + <filename>linux-yocto</filename>: Version 5.0 removed, + which is now redundant (5.2 / 4.19 present). + </para></listitem> + <listitem><para> + <filename>lsbinitscripts</filename>: Part of removed LSB + support. + </para></listitem> + <listitem><para> + <filename>lsb</filename>: Part of removed LSB support. + </para></listitem> + <listitem><para> + <filename>lsbtest</filename>: Part of removed LSB support. + </para></listitem> + <listitem><para> + <filename>openssl10</filename>: Replaced by newer + <filename>openssl</filename> version 1.1. + </para></listitem> + <listitem><para> + <filename>packagegroup-core-lsb</filename>: Part of removed + LSB support. + </para></listitem> + <listitem><para> + <filename>python-nose</filename>: Removed the Python 2.x + version of the recipe. + </para></listitem> + <listitem><para> + <filename>python-numpy</filename>: Removed the Python 2.x + version of the recipe. + </para></listitem> + <listitem><para> + <filename>python-scons</filename>: Removed the Python 2.x + version of the recipe. + </para></listitem> + <listitem><para> + <filename>source-highlight</filename>: No longer needed. + </para></listitem> + <listitem><para> + <filename>stress</filename>: Replaced by + <filename>stress-ng</filename>. + </para></listitem> + <listitem><para> + <filename>vulkan</filename>: Split into + <filename>vulkan-loader</filename>, + <filename>vulkan-headers</filename>, and + <filename>vulkan-tools</filename>. + </para></listitem> + <listitem><para> + <filename>weston-conf</filename>: Functionality moved to + <filename>weston-init</filename>. + </para></listitem> + </itemizedlist> + </para> + </section> + + <section id='migration-3.0-packaging-changes'> + <title>Packaging Changes</title> + + <para> + The following packaging changes have occurred. + <itemizedlist> + <listitem><para> + The + <ulink url='https://en.wikipedia.org/wiki/GNOME_Web'>Epiphany</ulink> + browser has been dropped from + <filename>packagegroup-self-hosted</filename> as it has + not been needed inside + <filename>build-appliance-image</filename> for + quite some time and was causing resource problems. + </para></listitem> + <listitem><para> + <filename>libcap-ng</filename> Python support has been + moved to a separate <filename>libcap-ng-python</filename> + recipe to streamline the build process when the Python + bindings are not needed. + </para></listitem> + <listitem><para> + <filename>libdrm</filename> now packages the file + <filename>amdgpu.ids</filename> into a separate + <filename>libdrm-amdgpu</filename> package. + </para></listitem> + <listitem><para> + <filename>python3</filename>: The + <filename>runpy</filename> module is now in the + <filename>python3-core</filename> package as it is + required to support the common "python3 -m" command usage. + </para></listitem> + <listitem><para> + <filename>distcc</filename> now provides separate + <filename>distcc-client</filename> and + <filename>distcc-server</filename> packages as typically + one or the other are needed, rather than both. + </para></listitem> + <listitem><para> + <filename>python*-setuptools</filename> recipes now + separately package the <filename>pkg_resources</filename> + module in a <filename>python-pkg-resources</filename> / + <filename>python3-pkg-resources</filename> package as + the module is useful independent of the rest of the + setuptools package. + The main <filename>python-setuptools</filename> / + <filename>python3-setuptools</filename> package depends + on this new package so you should only need to update + dependencies unless you want to take advantage of the + increased granularity. + </para></listitem> + </itemizedlist> + </para> + </section> + + <section id='migration-3.0-cve-checking'> + <title>CVE Checking</title> + + <para> + <filename>cve-check-tool</filename> has been functionally replaced + by a new <filename>cve-update-db</filename> recipe and + functionality built into the <filename>cve-check</filename> class. + The result uses NVD JSON data feeds rather than the deprecated + XML feeds that <filename>cve-check-tool</filename> was using, + supports CVSSv3 scoring, and makes other improvements. + </para> + + <para> + Additionally, the <filename>CVE_CHECK_CVE_WHITELIST</filename> + variable has been replaced by + <filename>CVE_CHECK_WHITELIST</filename>. + </para> + </section> + + <section id='migration-3.0-bitbake-changes'> + <title>Bitbake Changes</title> + + <para> + The following BitBake changes have occurred. + <itemizedlist> + <listitem><para> + <filename>addtask</filename> statements now properly + validate dependent tasks. + Previously, an invalid task was silently ignored. + With this change, the invalid task generates a warning. + </para></listitem> + <listitem><para> + Other invalid <filename>addtask</filename> and + <filename>deltask</filename> usages now trigger these + warnings: "multiple target tasks arguments with + addtask / deltask", and "multiple before/after clauses". + </para></listitem> + <listitem><para> + The "multiconfig" prefix is now shortened to "mc". + "multiconfig" will continue to work, however it may be + removed in a future release. + </para></listitem> + <listitem><para> + The <filename>bitbake -g</filename> command no longer + generates a <filename>recipe-depends.dot</filename> file + as the contents (i.e. a reprocessed version of + <filename>task-depends.dot</filename>) were confusing. + </para></listitem> + <listitem><para> + The <filename>bb.build.FuncFailed</filename> exception, + previously raised by + <filename>bb.build.exec_func()</filename> when certain + other exceptions have occurred, has been removed. + The real underlying exceptions will be raised instead. + If you have calls to + <filename>bb.build.exec_func()</filename> in custom classes + or <filename>tinfoil-using</filename> scripts, any + references to <filename>bb.build.FuncFailed</filename> + should be cleaned up. + </para></listitem> + <listitem><para> + Additionally, the + <filename>bb.build.exec_func()</filename> no longer accepts + the "pythonexception" parameter. + The function now always raises exceptions. + Remove this argument in any calls to + <filename>bb.build.exec_func()</filename> in custom classes + or scripts. + </para></listitem> + <listitem><para> + The + <ulink url='&YOCTO_DOCS_BB_URL;#var-bb-BB_SETSCENE_VERIFY_FUNCTION2'><filename>BB_SETSCENE_VERIFY_FUNCTION2</filename></ulink> + is no longer used. + In the unlikely event that you have any references to it, + they should be removed. + </para></listitem> + <listitem><para> + The <filename>RunQueueExecuteScenequeue</filename> and + <filename>RunQueueExecuteTasks</filename> events have been + removed since setscene tasks are now executed as part of + the normal runqueue. + Any event handling code in custom classes or scripts that + handles these two events need to be updated. + </para></listitem> + <listitem><para> + The arguments passed to functions used with + <ulink url='&YOCTO_DOCS_BB_URL;#var-bb-BB_HASHCHECK_FUNCTION'><filename>BB_HASHCHECK_FUNCTION</filename></ulink> + have changed. + If you are using your own custom hash check function, see + <ulink url='http://git.yoctoproject.org/cgit/cgit.cgi/poky/commit/?id=40a5e193c4ba45c928fccd899415ea56b5417725'></ulink> + for details. + </para></listitem> + <listitem><para> + Task specifications in <filename>BB_TASKDEPDATA</filename> + and class implementations used in signature generator + classes now use "<fn>:<task>" everywhere rather than + the "." delimiter that was being used in some places. + This change makes it consistent with all areas in the code. + Custom signature generator classes and code that reads + <filename>BB_TASKDEPDATA</filename> need to be updated to + use ':' as a separator rather than '.'. + </para></listitem> + </itemizedlist> + </para> + </section> + + <section id='migration-3.0-sanity-checks'> + <title>Sanity Checks</title> + + <para> + The following sanity check changes occurred. + <itemizedlist> + <listitem><para> + <link linkend='var-SRC_URI'><filename>SRC_URI</filename></link> + is now checked for usage of two problematic items: + <itemizedlist> + <listitem><para> + "${PN}" prefix/suffix use - Warnings always appear + if ${PN} is used. + You must fix the issue regardless of whether + multiconfig or anything else that would cause + prefixing/suffixing to happen. + </para></listitem> + <listitem><para> + Github archive tarballs - these are not guaranteed + to be stable. + Consequently, it is likely that the tarballs will + be refreshed and thus the SRC_URI checksums + will fail to apply. + It is recommended that you fetch either an official + release tarball or a specific revision from the + actual Git repository instead. + </para></listitem> + </itemizedlist> + Either one of these items now trigger a warning by default. + If you wish to disable this check, remove + <filename>src-uri-bad</filename> from + <link linkend='var-WARN_QA'><filename>WARN_QA</filename></link>. + </para></listitem> + <listitem><para> + The <filename>file-rdeps</filename> runtime dependency + check no longer expands + <link linkend='var-RDEPENDS'><filename>RDEPENDS</filename></link> + recursively as there is no mechanism to ensure they can be + fully computed, and thus races sometimes result in errors + either showing up or not. + Thus, you might now see errors for missing runtime + dependencies that were previously satisfied recursively. + Here is an example: package A contains a shell script + starting with <filename>#!/bin/bash</filename> but has no + dependency on bash. + However, package A depends on package B, which does depend + on bash. + You need to add the missing dependency or dependencies to + resolve the warning. + </para></listitem> + <listitem><para> + Setting <filename>DEPENDS_${PN}</filename> anywhere + (i.e. typically in a recipe) now triggers an error. + The error is triggered because + <link linkend='var-DEPENDS'><filename>DEPENDS</filename></link> + is not a package-specific variable unlike RDEPENDS. + You should set <filename>DEPENDS</filename> instead. + </para></listitem> + <listitem><para> + systemd currently does not work well with the musl C + library because only upstream officially supports linking + the library with glibc. + Thus, a warning is shown when building systemd in + conjunction with musl. + </para></listitem> + </itemizedlist> + </para> + </section> + + <section id='migration-3.0-miscellaneous-changes'> + <title>Miscellaneous Changes</title> + + <para> + The following miscellaneous changes have occurred. + <itemizedlist> + <listitem><para> + The <filename>gnome</filename> + class has been removed because it now does very little. + You should update recipes that previously inherited this + class to do the following: + <literallayout class='monospaced'> + inherit gnomebase gtk-icon-cache gconf mime + </literallayout> + </para></listitem> + <listitem><para> + The + <filename>meta/recipes-kernel/linux/linux-dtb.inc</filename> + file has been removed. + This file was previously deprecated in favor of setting + <link linkend='var-KERNEL_DEVICETREE'><filename>KERNEL_DEVICETREE</filename></link> + in any kernel recipe and only produced a warning. + Remove any <filename>include</filename> or + <filename>require</filename> statements pointing to this + file. + </para></listitem> + <listitem><para> + <link linkend='var-TARGET_CFLAGS'><filename>TARGET_CFLAGS</filename></link>, + <link linkend='var-TARGET_CPPFLAGS'><filename>TARGET_CPPFLAGS</filename></link>, + <link linkend='var-TARGET_CXXFLAGS'><filename>TARGET_CXXFLAGS</filename></link>, + and + <link linkend='var-TARGET_LDFLAGS'><filename>TARGET_LDFLAGS</filename></link> + are no longer exported to the external environment. + This change did not require any changes to core recipes, + which is a good indicator that no changes will be + required. + However, if for some reason the software being built by one + of your recipes is expecting these variables to be set, + then building the recipe will fail. + In such cases, you must either export the variable or + variables in the recipe or change the scripts so that + exporting is not necessary. + </para></listitem> + <listitem><para> + You must change the host distro identifier used in + <link linkend='var-NATIVELSBSTRING'><filename>NATIVELSBSTRING</filename></link> + to use all lowercase characters even if it does not contain + a version number. + This change is necessary only if you are not using + <filename>uninative</filename> and + <link linkend='var-SANITY_TESTED_DISTROS'><filename>SANITY_TESTED_DISTROS</filename></link>. + </para></listitem> + <listitem><para> + In the <filename>base-files</filename> recipe, writing the + hostname into <filename>/etc/hosts</filename> and + <filename>/etc/hostname</filename> is now done within the + main + <link linkend='ref-tasks-install'><filename>do_install</filename></link> + function rather than in the + <filename>do_install_basefilesissue</filename> function. + The reason for the change is because + <filename>do_install_basefilesissue</filename> is more + easily overridden without having to duplicate the hostname + functionality. + If you have done the latter (e.g. in a + <filename>base-files</filename> bbappend), then you should + remove it from your customized + <filename>do_install_basefilesissue</filename> function. + </para></listitem> + <listitem><para> + The <filename>wic --expand</filename> command now uses + commas to separate "key:value" pairs rather than hyphens. + <note> + The wic command-line help is not updated. + </note> + You must update any scripts or commands where you use + <filename>wic --expand</filename> with multiple + "key:value" pairs. + </para></listitem> + <listitem><para> + UEFI image variable settings have been moved from various + places to a central + <filename>conf/image-uefi.conf</filename>. + This change should not influence any existing configuration + as the <filename>meta/conf/image-uefi.conf</filename> + in the core metadata sets defaults that can be overridden + in the same manner as before. + </para></listitem> + <listitem><para> + <filename>conf/distro/include/world-broken.inc</filename> + has been removed. + For cases where certain recipes need to be disabled when + using the musl C library, these recipes now have + <filename>COMPATIBLE_HOST_libc-musl</filename> set with a + comment that explains why. + </para></listitem> + </itemizedlist> + </para> + </section> +</section> + </chapter> <!-- vim: expandtab tw=80 ts=4 diff --git a/poky/documentation/ref-manual/ref-classes.xml b/poky/documentation/ref-manual/ref-classes.xml index 5403f20b6..f9bbddd72 100644 --- a/poky/documentation/ref-manual/ref-classes.xml +++ b/poky/documentation/ref-manual/ref-classes.xml @@ -428,6 +428,14 @@ variable to specify additional configuration options to be passed using the <filename>cmake</filename> command line. </para> + + <para> + On the occasion that you would be installing custom CMake toolchain + files supplied by the application being built, you should install them + to the preferred CMake Module directory: + <filename>${D}${datadir}/cmake/</filename> Modules during + <ulink url='&YOCTO_DOCS_REF_URL;#ref-tasks-install'><filename>do_install</filename></ulink>. + </para> </section> <section id='ref-classes-cml1'> diff --git a/poky/documentation/ref-manual/ref-manual.xml b/poky/documentation/ref-manual/ref-manual.xml index fc4319773..b442f709a 100644 --- a/poky/documentation/ref-manual/ref-manual.xml +++ b/poky/documentation/ref-manual/ref-manual.xml @@ -133,9 +133,9 @@ <revremark>Released with the Yocto Project 2.7 Release.</revremark> </revision> <revision> - <revnumber>2.8</revnumber> + <revnumber>3.0</revnumber> <date>&REL_MONTH_YEAR;</date> - <revremark>Released with the Yocto Project 2.8 Release.</revremark> + <revremark>Released with the Yocto Project 3.0 Release.</revremark> </revision> </revhistory> diff --git a/poky/documentation/ref-manual/ref-variables.xml b/poky/documentation/ref-manual/ref-variables.xml index 8ad3f9b3c..02abc590c 100644 --- a/poky/documentation/ref-manual/ref-variables.xml +++ b/poky/documentation/ref-manual/ref-variables.xml @@ -1349,8 +1349,8 @@ <glossdef> <para role="glossdeffirst"> <!-- <para role="glossdeffirst"><imagedata fileref="figures/define-generic.png" /> --> - Specifies each additional separate configuration when you are - building targets with multiple configurations. + Specifies each additional separate configuration when you + are building targets with multiple configurations. Use this variable in your <filename>conf/local.conf</filename> configuration file. Specify a <replaceable>multiconfigname</replaceable> for @@ -2182,9 +2182,10 @@ <para> The <filename>BUSYBOX_SPLIT_SUID</filename> variable - defaults to "1", which results in a single output + defaults to "1", which results in splitting the output executable file. - Set the variable to "0" to split the output file. + Set the variable to "0" to get a single output executable + file. </para> </glossdef> </glossentry> diff --git a/poky/documentation/sdk-manual/sdk-manual.xml b/poky/documentation/sdk-manual/sdk-manual.xml index 7edd2c46a..8d5f6ec4d 100644 --- a/poky/documentation/sdk-manual/sdk-manual.xml +++ b/poky/documentation/sdk-manual/sdk-manual.xml @@ -67,9 +67,9 @@ <revremark>Released with the Yocto Project 2.7 Release.</revremark> </revision> <revision> - <revnumber>2.8</revnumber> + <revnumber>3.0</revnumber> <date>&REL_MONTH_YEAR;</date> - <revremark>Released with the Yocto Project 2.8 Release.</revremark> + <revremark>Released with the Yocto Project 3.0 Release.</revremark> </revision> </revhistory> diff --git a/poky/documentation/toaster-manual/toaster-manual.xml b/poky/documentation/toaster-manual/toaster-manual.xml index b31659ffb..d7b4bcee6 100644 --- a/poky/documentation/toaster-manual/toaster-manual.xml +++ b/poky/documentation/toaster-manual/toaster-manual.xml @@ -77,9 +77,9 @@ <revremark>Released with the Yocto Project 2.7 Release.</revremark> </revision> <revision> - <revnumber>2.8</revnumber> + <revnumber>3.0</revnumber> <date>&REL_MONTH_YEAR;</date> - <revremark>Released with the Yocto Project 2.8 Release.</revremark> + <revremark>Released with the Yocto Project 3.0 Release.</revremark> </revision> </revhistory> diff --git a/poky/documentation/tools/mega-manual.sed b/poky/documentation/tools/mega-manual.sed index 9c4f4e2ed..374d8e7b0 100644 --- a/poky/documentation/tools/mega-manual.sed +++ b/poky/documentation/tools/mega-manual.sed @@ -1,36 +1,36 @@ # Processes bitbake-user-manual (<word>-<word>-<word> style). # This style is for manual three-word folders, which currently is only the BitBake User Manual. # We used to have the "yocto-project-qs" and "poky-ref-manual" folders but no longer do. -# s@"ulink" href="http://www.yoctoproject.org/docs/2.8/[a-z]*-[a-z]*-[a-z]*/[a-z]*-[a-z]*-[a-z]*.html#@"link" href="#@g -s@"ulink" href="http://www.yoctoproject.org/docs/2.8/bitbake-user-manual/bitbake-user-manual.html#@"link" href="#@g +# s@"ulink" href="http://www.yoctoproject.org/docs/3.0/[a-z]*-[a-z]*-[a-z]*/[a-z]*-[a-z]*-[a-z]*.html#@"link" href="#@g +s@"ulink" href="http://www.yoctoproject.org/docs/3.0/bitbake-user-manual/bitbake-user-manual.html#@"link" href="#@g # Processes all other manuals (<word>-<word> style). # This style is for manual folders that use two word, which is the standard now (e.g. "ref-manual"). # Here is the one-liner: -# s@"ulink" href="http://www.yoctoproject.org/docs/2.8/[a-z]*-[a-z]*/[a-z]*-[a-z]*.html#@"link" href="#@g +# s@"ulink" href="http://www.yoctoproject.org/docs/3.0/[a-z]*-[a-z]*/[a-z]*-[a-z]*.html#@"link" href="#@g -s@"ulink" href="http://www.yoctoproject.org/docs/2.8/sdk-manual/sdk-manual.html#@"link" href="#@g -s@"ulink" href="http://www.yoctoproject.org/docs/2.8/bsp-guide/bsp-guide.html#@"link" href="#@g -s@"ulink" href="http://www.yoctoproject.org/docs/2.8/dev-manual/dev-manual.html#@"link" href="#@g -s@"ulink" href="http://www.yoctoproject.org/docs/2.8/overview-manual/overview-manual.html#@"link" href="#@g -s@"ulink" href="http://www.yoctoproject.org/docs/2.8/brief-yoctoprojectqs/brief-yoctoprojectqs.html#@"link" href="#@g -s@"ulink" href="http://www.yoctoproject.org/docs/2.8/kernel-dev/kernel-dev.html#@"link" href="#@g -s@"ulink" href="http://www.yoctoproject.org/docs/2.8/profile-manual/profile-manual.html#@"link" href="#@g -s@"ulink" href="http://www.yoctoproject.org/docs/2.8/ref-manual/ref-manual.html#@"link" href="#@g -s@"ulink" href="http://www.yoctoproject.org/docs/2.8/toaster-manual/toaster-manual.html#@"link" href="#@g +s@"ulink" href="http://www.yoctoproject.org/docs/3.0/sdk-manual/sdk-manual.html#@"link" href="#@g +s@"ulink" href="http://www.yoctoproject.org/docs/3.0/bsp-guide/bsp-guide.html#@"link" href="#@g +s@"ulink" href="http://www.yoctoproject.org/docs/3.0/dev-manual/dev-manual.html#@"link" href="#@g +s@"ulink" href="http://www.yoctoproject.org/docs/3.0/overview-manual/overview-manual.html#@"link" href="#@g +s@"ulink" href="http://www.yoctoproject.org/docs/3.0/brief-yoctoprojectqs/brief-yoctoprojectqs.html#@"link" href="#@g +s@"ulink" href="http://www.yoctoproject.org/docs/3.0/kernel-dev/kernel-dev.html#@"link" href="#@g +s@"ulink" href="http://www.yoctoproject.org/docs/3.0/profile-manual/profile-manual.html#@"link" href="#@g +s@"ulink" href="http://www.yoctoproject.org/docs/3.0/ref-manual/ref-manual.html#@"link" href="#@g +s@"ulink" href="http://www.yoctoproject.org/docs/3.0/toaster-manual/toaster-manual.html#@"link" href="#@g # Process cases where just an external manual is referenced without an id anchor -s@<a class="ulink" href="http://www.yoctoproject.org/docs/2.8/brief-yoctoprojectqs/brief-yoctoprojectqs.html" target="_top">Yocto Project Quick Build</a>@Yocto Project Quick Build@g -s@<a class="ulink" href="http://www.yoctoproject.org/docs/2.8/bitbake-user-manual/bitbake-user-manual.html" target="_top">BitBake User Manual</a>@BitBake User Manual@g -s@<a class="ulink" href="http://www.yoctoproject.org/docs/2.8/dev-manual/dev-manual.html" target="_top">Yocto Project Development Tasks Manual</a>@Yocto Project Development Tasks Manual@g -s@<a class="ulink" href="http://www.yoctoproject.org/docs/2.8/overview-manual/overview-manual.html" target="_top">Yocto Project Overview and Concepts Manual</a>@Yocto project Overview and Concepts Manual@g -s@<a class="ulink" href="http://www.yoctoproject.org/docs/2.8/sdk-manual/sdk-manual.html" target="_top">Yocto Project Application Development and the Extensible Software Development Kit (eSDK)</a>@Yocto Project Application Development and the Extensible Software Development Kit (eSDK)@g -s@<a class="ulink" href="http://www.yoctoproject.org/docs/2.8/bsp-guide/bsp-guide.html" target="_top">Yocto Project Board Support Package (BSP) Developer's Guide</a>@Yocto Project Board Support Package (BSP) Developer's Guide@g -s@<a class="ulink" href="http://www.yoctoproject.org/docs/2.8/profile-manual/profile-manual.html" target="_top">Yocto Project Profiling and Tracing Manual</a>@Yocto Project Profiling and Tracing Manual@g -s@<a class="ulink" href="http://www.yoctoproject.org/docs/2.8/kernel-dev/kernel-dev.html" target="_top">Yocto Project Linux Kernel Development Manual</a>@Yocto Project Linux Kernel Development Manual@g -s@<a class="ulink" href="http://www.yoctoproject.org/docs/2.8/ref-manual/ref-manual.html" target="_top">Yocto Project Reference Manual</a>@Yocto Project Reference Manual@g -s@<a class="ulink" href="http://www.yoctoproject.org/docs/2.8/toaster-manual/toaster-manual.html" target="_top">Toaster User Manual</a>@Toaster User Manual@g +s@<a class="ulink" href="http://www.yoctoproject.org/docs/3.0/brief-yoctoprojectqs/brief-yoctoprojectqs.html" target="_top">Yocto Project Quick Build</a>@Yocto Project Quick Build@g +s@<a class="ulink" href="http://www.yoctoproject.org/docs/3.0/bitbake-user-manual/bitbake-user-manual.html" target="_top">BitBake User Manual</a>@BitBake User Manual@g +s@<a class="ulink" href="http://www.yoctoproject.org/docs/3.0/dev-manual/dev-manual.html" target="_top">Yocto Project Development Tasks Manual</a>@Yocto Project Development Tasks Manual@g +s@<a class="ulink" href="http://www.yoctoproject.org/docs/3.0/overview-manual/overview-manual.html" target="_top">Yocto Project Overview and Concepts Manual</a>@Yocto project Overview and Concepts Manual@g +s@<a class="ulink" href="http://www.yoctoproject.org/docs/3.0/sdk-manual/sdk-manual.html" target="_top">Yocto Project Application Development and the Extensible Software Development Kit (eSDK)</a>@Yocto Project Application Development and the Extensible Software Development Kit (eSDK)@g +s@<a class="ulink" href="http://www.yoctoproject.org/docs/3.0/bsp-guide/bsp-guide.html" target="_top">Yocto Project Board Support Package (BSP) Developer's Guide</a>@Yocto Project Board Support Package (BSP) Developer's Guide@g +s@<a class="ulink" href="http://www.yoctoproject.org/docs/3.0/profile-manual/profile-manual.html" target="_top">Yocto Project Profiling and Tracing Manual</a>@Yocto Project Profiling and Tracing Manual@g +s@<a class="ulink" href="http://www.yoctoproject.org/docs/3.0/kernel-dev/kernel-dev.html" target="_top">Yocto Project Linux Kernel Development Manual</a>@Yocto Project Linux Kernel Development Manual@g +s@<a class="ulink" href="http://www.yoctoproject.org/docs/3.0/ref-manual/ref-manual.html" target="_top">Yocto Project Reference Manual</a>@Yocto Project Reference Manual@g +s@<a class="ulink" href="http://www.yoctoproject.org/docs/3.0/toaster-manual/toaster-manual.html" target="_top">Toaster User Manual</a>@Toaster User Manual@g # Process a single, rouge occurrence of a linked reference to the Mega-Manual. -s@<a class="ulink" href="http://www.yoctoproject.org/docs/2.8/mega-manual/mega-manual.html" target="_top">Yocto Project Mega-Manual</a>@Yocto Project Mega-Manual@g +s@<a class="ulink" href="http://www.yoctoproject.org/docs/3.0/mega-manual/mega-manual.html" target="_top">Yocto Project Mega-Manual</a>@Yocto Project Mega-Manual@g diff --git a/poky/meta-selftest/lib/oeqa/runtime/cases/virgl.py b/poky/meta-selftest/lib/oeqa/runtime/cases/virgl.py index d301a19fa..c0abfd1b1 100644 --- a/poky/meta-selftest/lib/oeqa/runtime/cases/virgl.py +++ b/poky/meta-selftest/lib/oeqa/runtime/cases/virgl.py @@ -13,11 +13,6 @@ class VirglTest(OERuntimeTestCase): @OETestDepends(['virgl.VirglTest.test_kernel_driver']) def test_kmscube(self): - - distro = oe.lsb.distro_identifier() - if distro and distro == 'centos-7': - self.skipTest('kmscube is not working when centos 7 is the host OS') - status, output = self.target.run('kmscube', timeout=30) self.assertEqual(status, 0, "kmscube exited with non-zero status %d and output:\n%s" %(status, output)) self.assertIn('renderer: "virgl"', output, "kmscube does not seem to use virgl:\n%s" %(output)) diff --git a/poky/meta-selftest/recipes-test/aspell/aspell_0.60.7.bbappend b/poky/meta-selftest/recipes-test/aspell/aspell_0.60.8.bbappend index 205720982..205720982 100644 --- a/poky/meta-selftest/recipes-test/aspell/aspell_0.60.7.bbappend +++ b/poky/meta-selftest/recipes-test/aspell/aspell_0.60.8.bbappend diff --git a/poky/meta-selftest/recipes-test/devtool/devtool-upgrade-test1-1.5.3/backported.patch b/poky/meta-selftest/recipes-test/devtool/devtool-upgrade-test1-1.5.3/backported.patch new file mode 100644 index 000000000..c4f3f1266 --- /dev/null +++ b/poky/meta-selftest/recipes-test/devtool/devtool-upgrade-test1-1.5.3/backported.patch @@ -0,0 +1,37 @@ +commit ced2ec32b657a7f52604b2e16e5d5881041c517a +Author: OpenEmbedded <oe.patch@oe> +Date: Mon Nov 18 18:43:15 2019 +0100 + + Backport of the NEWS file from version 1.6.0 + +diff --git a/doc/NEWS b/doc/NEWS +index 69793fc..fd49b1c 100644 +--- a/doc/NEWS ++++ b/doc/NEWS +@@ -1,3 +1,26 @@ ++1.6.0 - 15 March 2015 ++ - fix lstat64 support when unavailable - separate patches supplied by ++ Ganael Laplanche and Peter Korsgaard ++ - (#1506) new option "-D" / "--delay-start" to only show bar after N ++ seconds (Damon Harper) ++ - new option "--fineta" / "-I" to show ETA as time of day rather than time ++ remaining - patch supplied by Erkki Seppälä (r147) ++ - (#1509) change ETA (--eta / -e) so that days are given if the hours ++ remaining are 24 or more (Jacek Wielemborek) ++ - (#1499) repeat read and write attempts on partial buffer fill/empty to ++ work around post-signal transfer rate drop reported by Ralf Ramsauer ++ - (#1507) do not try to calculate total size in line mode, due to bug ++ reported by Jacek Wielemborek and Michiel Van Herwegen ++ - cleanup: removed defunct RATS comments and unnecessary copyright notices ++ - clean up displayed lines when using --watchfd PID, when PID exits ++ - output errors on a new line to avoid overwriting transfer bar ++ ++1.5.7 - 26 August 2014 ++ - show KiB instead of incorrect kiB (Debian bug #706175) ++ - (#1284) do not gzip man page, for non-Linux OSes (Bob Friesenhahn) ++ - work around "awk" bug in tests/016-numeric-timer in decimal "," locales ++ - fix "make rpm" and "make srpm", extend "make release" to sign releases ++ + 1.5.3 - 4 May 2014 + - remove SPLICE_F_NONBLOCK to fix problem with slow splice() (Jan Seda) + diff --git a/poky/meta-selftest/recipes-test/devtool/devtool-upgrade-test1_1.5.3.bb b/poky/meta-selftest/recipes-test/devtool/devtool-upgrade-test1_1.5.3.bb index 333ecac7e..fee5bee73 100644 --- a/poky/meta-selftest/recipes-test/devtool/devtool-upgrade-test1_1.5.3.bb +++ b/poky/meta-selftest/recipes-test/devtool/devtool-upgrade-test1_1.5.3.bb @@ -3,7 +3,9 @@ LICENSE = "Artistic-2.0" LIC_FILES_CHKSUM = "file://doc/COPYING;md5=9c50db2589ee3ef10a9b7b2e50ce1d02" SRC_URI = "http://www.ivarch.com/programs/sources/pv-${PV}.tar.gz \ - file://0001-Add-a-note-line-to-the-quick-reference.patch" + file://0001-Add-a-note-line-to-the-quick-reference.patch \ + file://backported.patch \ + " UPSTREAM_CHECK_URI = "http://www.ivarch.com/programs/pv.shtml" RECIPE_NO_UPDATE_REASON = "This recipe is used to test devtool upgrade feature" diff --git a/poky/meta-selftest/recipes-test/devtool/devtool-upgrade-test1_1.5.3.bb.upgraded b/poky/meta-selftest/recipes-test/devtool/devtool-upgrade-test1_1.5.3.bb.upgraded index 9d94f671d..66e45c7e8 100644 --- a/poky/meta-selftest/recipes-test/devtool/devtool-upgrade-test1_1.5.3.bb.upgraded +++ b/poky/meta-selftest/recipes-test/devtool/devtool-upgrade-test1_1.5.3.bb.upgraded @@ -3,7 +3,9 @@ LICENSE = "Artistic-2.0" LIC_FILES_CHKSUM = "file://doc/COPYING;md5=9c50db2589ee3ef10a9b7b2e50ce1d02" SRC_URI = "http://www.ivarch.com/programs/sources/pv-${PV}.tar.gz \ - file://0001-Add-a-note-line-to-the-quick-reference.patch" + file://0001-Add-a-note-line-to-the-quick-reference.patch \ + file://backported.patch \ + " UPSTREAM_CHECK_URI = "http://www.ivarch.com/programs/pv.shtml" RECIPE_NO_UPDATE_REASON = "This recipe is used to test devtool upgrade feature" diff --git a/poky/meta-selftest/recipes-test/recipeutils/recipeutils-test_1.2.bb b/poky/meta-selftest/recipes-test/recipeutils/recipeutils-test_1.2.bb index 7c20d9a68..0cd0494da 100644 --- a/poky/meta-selftest/recipes-test/recipeutils/recipeutils-test_1.2.bb +++ b/poky/meta-selftest/recipes-test/recipeutils/recipeutils-test_1.2.bb @@ -4,7 +4,7 @@ require recipeutils-test.inc LICENSE = "Proprietary" LIC_FILES_CHKSUM = "file://${WORKDIR}/somefile;md5=d41d8cd98f00b204e9800998ecf8427e" -DEPENDS += "virtual/libx11" +DEPENDS += "zlib" BBCLASSEXTEND = "native nativesdk" diff --git a/poky/meta/classes/archiver.bbclass b/poky/meta/classes/archiver.bbclass index 093e2d95a..7c46cff91 100644 --- a/poky/meta/classes/archiver.bbclass +++ b/poky/meta/classes/archiver.bbclass @@ -441,9 +441,10 @@ python do_ar_recipe () { incfile = include_re.match(line).group(1) if incfile: incfile = d.expand(incfile) + if incfile: incfile = bb.utils.which(bbpath, incfile) - if incfile: - shutil.copy(incfile, outdir) + if incfile: + shutil.copy(incfile, outdir) create_tarball(d, outdir, 'recipe', d.getVar('ARCHIVER_OUTDIR')) bb.utils.remove(outdir, recurse=True) diff --git a/poky/meta/classes/base.bbclass b/poky/meta/classes/base.bbclass index d3184ecf7..1cea3a221 100644 --- a/poky/meta/classes/base.bbclass +++ b/poky/meta/classes/base.bbclass @@ -482,6 +482,7 @@ python () { # If we're building a target package we need to use fakeroot (pseudo) # in order to capture permissions, owners, groups and special files if not bb.data.inherits_class('native', d) and not bb.data.inherits_class('cross', d): + d.appendVarFlag('do_prepare_recipe_sysroot', 'depends', ' virtual/fakeroot-native:do_populate_sysroot') d.setVarFlag('do_unpack', 'umask', '022') d.setVarFlag('do_configure', 'umask', '022') d.setVarFlag('do_compile', 'umask', '022') diff --git a/poky/meta/classes/buildhistory.bbclass b/poky/meta/classes/buildhistory.bbclass index f986f7c79..affdf272d 100644 --- a/poky/meta/classes/buildhistory.bbclass +++ b/poky/meta/classes/buildhistory.bbclass @@ -280,7 +280,7 @@ python buildhistory_emit_pkghistory() { last_pkgr = lastversion.pkgr r = bb.utils.vercmp((pkge, pkgv, pkgr), (last_pkge, last_pkgv, last_pkgr)) if r < 0: - msg = "Package version for package %s went backwards which would break package feeds from (%s:%s-%s to %s:%s-%s)" % (pkg, last_pkge, last_pkgv, last_pkgr, pkge, pkgv, pkgr) + msg = "Package version for package %s went backwards which would break package feeds (from %s:%s-%s to %s:%s-%s)" % (pkg, last_pkge, last_pkgv, last_pkgr, pkge, pkgv, pkgr) package_qa_handle_error("version-going-backwards", msg, d) pkginfo = PackageInfo(pkg) diff --git a/poky/meta/classes/cmake.bbclass b/poky/meta/classes/cmake.bbclass index 2b317c832..291f1e8d4 100644 --- a/poky/meta/classes/cmake.bbclass +++ b/poky/meta/classes/cmake.bbclass @@ -106,11 +106,12 @@ set( CMAKE_CXX_LINK_FLAGS "${OECMAKE_CXX_LINK_FLAGS}" CACHE STRING "LDFLAGS" ) # only search in the paths provided so cmake doesnt pick # up libraries and tools from the native build machine -set( CMAKE_FIND_ROOT_PATH ${STAGING_DIR_HOST} ${STAGING_DIR_NATIVE} ${CROSS_DIR} ${OECMAKE_PERLNATIVE_DIR} ${OECMAKE_EXTRA_ROOT_PATH} ${EXTERNAL_TOOLCHAIN}) +set( CMAKE_FIND_ROOT_PATH ${STAGING_DIR_HOST} ${STAGING_DIR_NATIVE} ${CROSS_DIR} ${OECMAKE_PERLNATIVE_DIR} ${OECMAKE_EXTRA_ROOT_PATH} ${EXTERNAL_TOOLCHAIN} ${HOSTTOOLS_DIR}) set( CMAKE_FIND_ROOT_PATH_MODE_PACKAGE ONLY ) set( CMAKE_FIND_ROOT_PATH_MODE_PROGRAM ${OECMAKE_FIND_ROOT_PATH_MODE_PROGRAM} ) set( CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY ) set( CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY ) +set( CMAKE_PROGRAM_PATH "/" ) # Use qt.conf settings set( ENV{QT_CONF_PATH} ${WORKDIR}/qt.conf ) diff --git a/poky/meta/classes/cve-check.bbclass b/poky/meta/classes/cve-check.bbclass index c00d2910b..19ed5548b 100644 --- a/poky/meta/classes/cve-check.bbclass +++ b/poky/meta/classes/cve-check.bbclass @@ -62,7 +62,7 @@ python do_cve_check () { } -addtask cve_check after do_unpack before do_build +addtask cve_check before do_build do_cve_check[depends] = "cve-update-db-native:do_populate_cve_db" do_cve_check[nostamp] = "1" @@ -70,7 +70,6 @@ python cve_check_cleanup () { """ Delete the file used to gather all the CVE information. """ - bb.utils.remove(e.data.getVar("CVE_CHECK_TMP_FILE")) } @@ -166,7 +165,6 @@ def check_cves(d, patched_cves): """ Connect to the NVD database and find unpatched cves. """ - import ast, csv, tempfile, subprocess, io from distutils.version import LooseVersion cves_unpatched = [] @@ -188,63 +186,74 @@ def check_cves(d, patched_cves): cve_whitelist = d.getVar("CVE_CHECK_WHITELIST").split() import sqlite3 - db_file = d.getVar("CVE_CHECK_DB_FILE") - conn = sqlite3.connect(db_file) + db_file = d.expand("file:${CVE_CHECK_DB_FILE}?mode=ro") + conn = sqlite3.connect(db_file, uri=True) + # For each of the known product names (e.g. curl has CPEs using curl and libcurl)... for product in products: - c = conn.cursor() if ":" in product: vendor, product = product.split(":", 1) - c.execute("SELECT * FROM PRODUCTS WHERE PRODUCT IS ? AND VENDOR IS ?", (product, vendor)) else: - c.execute("SELECT * FROM PRODUCTS WHERE PRODUCT IS ?", (product,)) + vendor = "%" - for row in c: - cve = row[0] - version_start = row[3] - operator_start = row[4] - version_end = row[5] - operator_end = row[6] + # Find all relevant CVE IDs. + for cverow in conn.execute("SELECT DISTINCT ID FROM PRODUCTS WHERE PRODUCT IS ? AND VENDOR LIKE ?", (product, vendor)): + cve = cverow[0] if cve in cve_whitelist: bb.note("%s-%s has been whitelisted for %s" % (product, pv, cve)) + # TODO: this should be in the report as 'whitelisted' + patched_cves.add(cve) + continue elif cve in patched_cves: bb.note("%s has been patched" % (cve)) - else: - to_append = False + continue + + vulnerable = False + for row in conn.execute("SELECT * FROM PRODUCTS WHERE ID IS ? AND PRODUCT IS ? AND VENDOR LIKE ?", (cve, product, vendor)): + (_, _, _, version_start, operator_start, version_end, operator_end) = row + #bb.debug(2, "Evaluating row " + str(row)) + if (operator_start == '=' and pv == version_start): - cves_unpatched.append(cve) + vulnerable = True else: if operator_start: try: - to_append_start = (operator_start == '>=' and LooseVersion(pv) >= LooseVersion(version_start)) - to_append_start |= (operator_start == '>' and LooseVersion(pv) > LooseVersion(version_start)) + vulnerable_start = (operator_start == '>=' and LooseVersion(pv) >= LooseVersion(version_start)) + vulnerable_start |= (operator_start == '>' and LooseVersion(pv) > LooseVersion(version_start)) except: - bb.note("%s: Failed to compare %s %s %s for %s" % + bb.warn("%s: Failed to compare %s %s %s for %s" % (product, pv, operator_start, version_start, cve)) - to_append_start = False + vulnerable_start = False else: - to_append_start = False + vulnerable_start = False if operator_end: try: - to_append_end = (operator_end == '<=' and LooseVersion(pv) <= LooseVersion(version_end)) - to_append_end |= (operator_end == '<' and LooseVersion(pv) < LooseVersion(version_end)) + vulnerable_end = (operator_end == '<=' and LooseVersion(pv) <= LooseVersion(version_end)) + vulnerable_end |= (operator_end == '<' and LooseVersion(pv) < LooseVersion(version_end)) except: - bb.note("%s: Failed to compare %s %s %s for %s" % + bb.warn("%s: Failed to compare %s %s %s for %s" % (product, pv, operator_end, version_end, cve)) - to_append_end = False + vulnerable_end = False else: - to_append_end = False + vulnerable_end = False if operator_start and operator_end: - to_append = to_append_start and to_append_end + vulnerable = vulnerable_start and vulnerable_end else: - to_append = to_append_start or to_append_end + vulnerable = vulnerable_start or vulnerable_end - if to_append: + if vulnerable: + bb.note("%s-%s is vulnerable to %s" % (product, pv, cve)) cves_unpatched.append(cve) - bb.debug(2, "%s-%s is not patched for %s" % (product, pv, cve)) + break + + if not vulnerable: + bb.note("%s-%s is not vulnerable to %s" % (product, pv, cve)) + # TODO: not patched but not vulnerable + patched_cves.add(cve) + conn.close() return (list(patched_cves), cves_unpatched) @@ -252,31 +261,23 @@ def check_cves(d, patched_cves): def get_cve_info(d, cves): """ Get CVE information from the database. - - Unfortunately the only way to get CVE info is set the output to - html (hard to parse) or query directly the database. """ - try: - import sqlite3 - except ImportError: - from pysqlite2 import dbapi2 as sqlite3 + import sqlite3 cve_data = {} - db_file = d.getVar("CVE_CHECK_DB_FILE") - placeholder = ",".join("?" * len(cves)) - query = "SELECT * FROM NVD WHERE id IN (%s)" % placeholder - conn = sqlite3.connect(db_file) - cur = conn.cursor() - for row in cur.execute(query, tuple(cves)): - cve_data[row[0]] = {} - cve_data[row[0]]["summary"] = row[1] - cve_data[row[0]]["scorev2"] = row[2] - cve_data[row[0]]["scorev3"] = row[3] - cve_data[row[0]]["modified"] = row[4] - cve_data[row[0]]["vector"] = row[5] - conn.close() + conn = sqlite3.connect(d.getVar("CVE_CHECK_DB_FILE")) + + for cve in cves: + for row in conn.execute("SELECT * FROM NVD WHERE ID IS ?", (cve,)): + cve_data[row[0]] = {} + cve_data[row[0]]["summary"] = row[1] + cve_data[row[0]]["scorev2"] = row[2] + cve_data[row[0]]["scorev3"] = row[3] + cve_data[row[0]]["modified"] = row[4] + cve_data[row[0]]["vector"] = row[5] + conn.close() return cve_data def cve_write_data(d, patched, unpatched, cve_data): diff --git a/poky/meta/classes/devtool-source.bbclass b/poky/meta/classes/devtool-source.bbclass index a8110006f..280d6009f 100644 --- a/poky/meta/classes/devtool-source.bbclass +++ b/poky/meta/classes/devtool-source.bbclass @@ -97,17 +97,15 @@ python devtool_post_unpack() { local_files = oe.recipeutils.get_recipe_local_files(d) if is_kernel_yocto: - for key in local_files.copy(): - if key.endswith('scc'): - sccfile = open(local_files[key], 'r') + for key in [f for f in local_files if f.endswith('scc')]: + with open(local_files[key], 'r') as sccfile: for l in sccfile: line = l.split() if line and line[0] in ('kconf', 'patch'): cfg = os.path.join(os.path.dirname(local_files[key]), line[-1]) - if not cfg in local_files.values(): + if cfg not in local_files.values(): local_files[line[-1]] = cfg shutil.copy2(cfg, workdir) - sccfile.close() # Ignore local files with subdir={BP} srcabspath = os.path.abspath(srcsubdir) diff --git a/poky/meta/classes/distro_features_check.bbclass b/poky/meta/classes/distro_features_check.bbclass index eeaa3b44c..8124a8ca2 100644 --- a/poky/meta/classes/distro_features_check.bbclass +++ b/poky/meta/classes/distro_features_check.bbclass @@ -1,32 +1,7 @@ -# Allow checking of required and conflicting DISTRO_FEATURES -# -# ANY_OF_DISTRO_FEATURES: ensure at least one item on this list is included -# in DISTRO_FEATURES. -# REQUIRED_DISTRO_FEATURES: ensure every item on this list is included -# in DISTRO_FEATURES. -# CONFLICT_DISTRO_FEATURES: ensure no item in this list is included in -# DISTRO_FEATURES. -# -# Copyright 2013 (C) O.S. Systems Software LTDA. +# Temporarily provide fallback to the old name of the class -python () { - # Assume at least one var is set. - distro_features = set((d.getVar('DISTRO_FEATURES') or '').split()) - - any_of_distro_features = set((d.getVar('ANY_OF_DISTRO_FEATURES') or '').split()) - if any_of_distro_features: - if set.isdisjoint(any_of_distro_features, distro_features): - raise bb.parse.SkipRecipe("one of '%s' needs to be in DISTRO_FEATURES" % ' '.join(any_of_distro_features)) - - required_distro_features = set((d.getVar('REQUIRED_DISTRO_FEATURES') or '').split()) - if required_distro_features: - missing = set.difference(required_distro_features, distro_features) - if missing: - raise bb.parse.SkipRecipe("missing required distro feature%s '%s' (not in DISTRO_FEATURES)" % ('s' if len(missing) > 1 else '', ' '.join(missing))) - - conflict_distro_features = set((d.getVar('CONFLICT_DISTRO_FEATURES') or '').split()) - if conflict_distro_features: - conflicts = set.intersection(conflict_distro_features, distro_features) - if conflicts: - raise bb.parse.SkipRecipe("conflicting distro feature%s '%s' (in DISTRO_FEATURES)" % ('s' if len(conflicts) > 1 else '', ' '.join(conflicts))) +python __anonymous() { + bb.warn("distro_features_check.bbclass is deprecated, please use features_check.bbclass instead") } + +inherit features_check diff --git a/poky/meta/classes/features_check.bbclass b/poky/meta/classes/features_check.bbclass new file mode 100644 index 000000000..391fbe1c9 --- /dev/null +++ b/poky/meta/classes/features_check.bbclass @@ -0,0 +1,85 @@ +# Allow checking of required and conflicting DISTRO_FEATURES +# +# ANY_OF_DISTRO_FEATURES: ensure at least one item on this list is included +# in DISTRO_FEATURES. +# REQUIRED_DISTRO_FEATURES: ensure every item on this list is included +# in DISTRO_FEATURES. +# CONFLICT_DISTRO_FEATURES: ensure no item in this list is included in +# DISTRO_FEATURES. +# ANY_OF_MACHINE_FEATURES: ensure at least one item on this list is included +# in MACHINE_FEATURES. +# REQUIRED_MACHINE_FEATURES: ensure every item on this list is included +# in MACHINE_FEATURES. +# CONFLICT_MACHINE_FEATURES: ensure no item in this list is included in +# MACHINE_FEATURES. +# ANY_OF_COMBINED_FEATURES: ensure at least one item on this list is included +# in COMBINED_FEATURES. +# REQUIRED_COMBINED_FEATURES: ensure every item on this list is included +# in COMBINED_FEATURES. +# CONFLICT_COMBINED_FEATURES: ensure no item in this list is included in +# COMBINED_FEATURES. +# +# Copyright 2019 (C) Texas Instruments Inc. +# Copyright 2013 (C) O.S. Systems Software LTDA. + +python () { + # Assume at least one var is set. + distro_features = set((d.getVar('DISTRO_FEATURES') or '').split()) + + any_of_distro_features = set((d.getVar('ANY_OF_DISTRO_FEATURES') or '').split()) + if any_of_distro_features: + if set.isdisjoint(any_of_distro_features, distro_features): + raise bb.parse.SkipRecipe("one of '%s' needs to be in DISTRO_FEATURES" % ' '.join(any_of_distro_features)) + + required_distro_features = set((d.getVar('REQUIRED_DISTRO_FEATURES') or '').split()) + if required_distro_features: + missing = set.difference(required_distro_features, distro_features) + if missing: + raise bb.parse.SkipRecipe("missing required distro feature%s '%s' (not in DISTRO_FEATURES)" % ('s' if len(missing) > 1 else '', ' '.join(missing))) + + conflict_distro_features = set((d.getVar('CONFLICT_DISTRO_FEATURES') or '').split()) + if conflict_distro_features: + conflicts = set.intersection(conflict_distro_features, distro_features) + if conflicts: + raise bb.parse.SkipRecipe("conflicting distro feature%s '%s' (in DISTRO_FEATURES)" % ('s' if len(conflicts) > 1 else '', ' '.join(conflicts))) + + # Assume at least one var is set. + machine_features = set((d.getVar('MACHINE_FEATURES') or '').split()) + + any_of_machine_features = set((d.getVar('ANY_OF_MACHINE_FEATURES') or '').split()) + if any_of_machine_features: + if set.isdisjoint(any_of_machine_features, machine_features): + raise bb.parse.SkipRecipe("one of '%s' needs to be in MACHINE_FEATURES" % ' '.join(any_of_machine_features)) + + required_machine_features = set((d.getVar('REQUIRED_MACHINE_FEATURES') or '').split()) + if required_machine_features: + missing = set.difference(required_machine_features, machine_features) + if missing: + raise bb.parse.SkipRecipe("missing required machine feature%s '%s' (not in MACHINE_FEATURES)" % ('s' if len(missing) > 1 else '', ' '.join(missing))) + + conflict_machine_features = set((d.getVar('CONFLICT_MACHINE_FEATURES') or '').split()) + if conflict_machine_features: + conflicts = set.intersection(conflict_machine_features, machine_features) + if conflicts: + raise bb.parse.SkipRecipe("conflicting machine feature%s '%s' (in MACHINE_FEATURES)" % ('s' if len(conflicts) > 1 else '', ' '.join(conflicts))) + + # Assume at least one var is set. + combined_features = set((d.getVar('COMBINED_FEATURES') or '').split()) + + any_of_combined_features = set((d.getVar('ANY_OF_COMBINED_FEATURES') or '').split()) + if any_of_combined_features: + if set.isdisjoint(any_of_combined_features, combined_features): + raise bb.parse.SkipRecipe("one of '%s' needs to be in COMBINED_FEATURES" % ' '.join(any_of_combined_features)) + + required_combined_features = set((d.getVar('REQUIRED_COMBINED_FEATURES') or '').split()) + if required_combined_features: + missing = set.difference(required_combined_features, combined_features) + if missing: + raise bb.parse.SkipRecipe("missing required machine feature%s '%s' (not in COMBINED_FEATURES)" % ('s' if len(missing) > 1 else '', ' '.join(missing))) + + conflict_combined_features = set((d.getVar('CONFLICT_COMBINED_FEATURES') or '').split()) + if conflict_combined_features: + conflicts = set.intersection(conflict_combined_features, combined_features) + if conflicts: + raise bb.parse.SkipRecipe("conflicting machine feature%s '%s' (in COMBINED_FEATURES)" % ('s' if len(conflicts) > 1 else '', ' '.join(conflicts))) +} diff --git a/poky/meta/classes/icecc.bbclass b/poky/meta/classes/icecc.bbclass index 4376aa37d..bc3d6f4cc 100644 --- a/poky/meta/classes/icecc.bbclass +++ b/poky/meta/classes/icecc.bbclass @@ -356,17 +356,6 @@ set_icecc_env() { return fi - # Create symlinks to icecc in the recipe-sysroot directory - mkdir -p ${ICE_PATH} - if [ -n "${KERNEL_CC}" ]; then - compilers="${@get_cross_kernel_cc(bb,d)}" - else - compilers="${HOST_PREFIX}gcc ${HOST_PREFIX}g++" - fi - for compiler in $compilers; do - ln -sf ${ICECC_BIN} ${ICE_PATH}/$compiler - done - ICECC_CC="${@icecc_get_and_check_tool(bb, d, "gcc")}" ICECC_CXX="${@icecc_get_and_check_tool(bb, d, "g++")}" # cannot use icecc_get_and_check_tool here because it assumes as without target_sys prefix @@ -385,6 +374,26 @@ set_icecc_env() { return fi + # Create symlinks to icecc and wrapper-scripts in the recipe-sysroot directory + mkdir -p $ICE_PATH/symlinks + if [ -n "${KERNEL_CC}" ]; then + compilers="${@get_cross_kernel_cc(bb,d)}" + else + compilers="${HOST_PREFIX}gcc ${HOST_PREFIX}g++" + fi + for compiler in $compilers; do + ln -sf $ICECC_BIN $ICE_PATH/symlinks/$compiler + rm -f $ICE_PATH/$compiler + cat <<-__EOF__ > $ICE_PATH/$compiler + #!/bin/sh -e + export ICECC_VERSION=$ICECC_VERSION + export ICECC_CC=$ICECC_CC + export ICECC_CXX=$ICECC_CXX + $ICE_PATH/symlinks/$compiler "\$@" + __EOF__ + chmod 775 $ICE_PATH/$compiler + done + ICECC_AS="`${ICECC_CC} -print-prog-name=as`" # for target recipes should return something like: # /OE/tmp-eglibc/sysroots/x86_64-linux/usr/libexec/arm920tt-oe-linux-gnueabi/gcc/arm-oe-linux-gnueabi/4.8.2/as @@ -417,7 +426,6 @@ set_icecc_env() { export CCACHE_PATH="$PATH" export CCACHE_DISABLE="1" - export ICECC_VERSION ICECC_CC ICECC_CXX export PATH="$ICE_PATH:$PATH" bbnote "Using icecc path: $ICE_PATH" diff --git a/poky/meta/classes/image.bbclass b/poky/meta/classes/image.bbclass index f4633da3d..c2824395c 100644 --- a/poky/meta/classes/image.bbclass +++ b/poky/meta/classes/image.bbclass @@ -124,7 +124,7 @@ python () { def rootfs_variables(d): from oe.rootfs import variable_depends variables = ['IMAGE_DEVICE_TABLE','IMAGE_DEVICE_TABLES','BUILD_IMAGES_FROM_FEEDS','IMAGE_TYPES_MASKED','IMAGE_ROOTFS_ALIGNMENT','IMAGE_OVERHEAD_FACTOR','IMAGE_ROOTFS_SIZE','IMAGE_ROOTFS_EXTRA_SPACE', - 'IMAGE_ROOTFS_MAXSIZE','IMAGE_NAME','IMAGE_LINK_NAME','IMAGE_MANIFEST','DEPLOY_DIR_IMAGE','IMAGE_FSTYPES','IMAGE_INSTALL_COMPLEMENTARY','IMAGE_LINGUAS', + 'IMAGE_ROOTFS_MAXSIZE','IMAGE_NAME','IMAGE_LINK_NAME','IMAGE_MANIFEST','DEPLOY_DIR_IMAGE','IMAGE_FSTYPES','IMAGE_INSTALL_COMPLEMENTARY','IMAGE_LINGUAS', 'IMAGE_LINGUAS_COMPLEMENTARY', 'MULTILIBRE_ALLOW_REP','MULTILIB_TEMP_ROOTFS','MULTILIB_VARIANTS','MULTILIBS','ALL_MULTILIB_PACKAGE_ARCHS','MULTILIB_GLOBAL_VARIANTS','BAD_RECOMMENDATIONS','NO_RECOMMENDATIONS', 'PACKAGE_ARCHS','PACKAGE_CLASSES','TARGET_VENDOR','TARGET_ARCH','TARGET_OS','OVERRIDES','BBEXTENDVARIANT','FEED_DEPLOYDIR_BASE_URI','INTERCEPT_DIR','USE_DEVFS', 'CONVERSIONTYPES', 'IMAGE_GEN_DEBUGFS', 'ROOTFS_RO_UNNEEDED', 'IMGDEPLOYDIR', 'PACKAGE_EXCLUDE_COMPLEMENTARY', 'REPRODUCIBLE_TIMESTAMP_ROOTFS', 'IMAGE_INSTALL_DEBUGFS'] diff --git a/poky/meta/classes/insane.bbclass b/poky/meta/classes/insane.bbclass index 9605ac2ba..f856cf6a2 100644 --- a/poky/meta/classes/insane.bbclass +++ b/poky/meta/classes/insane.bbclass @@ -340,9 +340,11 @@ def package_qa_textrel(path, name, d, elf, messages): for line in phdrs.split("\n"): if textrel_re.match(line): sane = False + break if not sane: - package_qa_add_message(messages, "textrel", "ELF binary '%s' has relocations in .text" % path) + path = package_qa_clean_path(path, d, name) + package_qa_add_message(messages, "textrel", "%s: ELF binary %s has relocations in .text" % (name, path)) QAPATHTEST[ldflags] = "package_qa_hash_style" def package_qa_hash_style(path, name, d, elf, messages): diff --git a/poky/meta/classes/kernel-devicetree.bbclass b/poky/meta/classes/kernel-devicetree.bbclass index 8a81c850f..522c46575 100644 --- a/poky/meta/classes/kernel-devicetree.bbclass +++ b/poky/meta/classes/kernel-devicetree.bbclass @@ -71,23 +71,23 @@ do_deploy_append() { dtb=`normalize_dtb "$dtbf"` dtb_ext=${dtb##*.} dtb_base_name=`basename $dtb .$dtb_ext` - install -d ${DEPLOYDIR} - install -m 0644 ${D}/${KERNEL_IMAGEDEST}/$dtb_base_name.$dtb_ext ${DEPLOYDIR}/$dtb_base_name-${KERNEL_DTB_NAME}.$dtb_ext - ln -sf $dtb_base_name-${KERNEL_DTB_NAME}.$dtb_ext ${DEPLOYDIR}/$dtb_base_name.$dtb_ext - ln -sf $dtb_base_name-${KERNEL_DTB_NAME}.$dtb_ext ${DEPLOYDIR}/$dtb_base_name-${KERNEL_DTB_LINK_NAME}.$dtb_ext + install -d $deployDir + install -m 0644 ${D}/${KERNEL_IMAGEDEST}/$dtb_base_name.$dtb_ext $deployDir/$dtb_base_name-${KERNEL_DTB_NAME}.$dtb_ext + ln -sf $dtb_base_name-${KERNEL_DTB_NAME}.$dtb_ext $deployDir/$dtb_base_name.$dtb_ext + ln -sf $dtb_base_name-${KERNEL_DTB_NAME}.$dtb_ext $deployDir/$dtb_base_name-${KERNEL_DTB_LINK_NAME}.$dtb_ext for type in ${KERNEL_IMAGETYPE_FOR_MAKE}; do if [ "$type" = "zImage" ] && [ "${KERNEL_DEVICETREE_BUNDLE}" = "1" ]; then cat ${D}/${KERNEL_IMAGEDEST}/$type \ - ${DEPLOYDIR}/$dtb_base_name-${KERNEL_DTB_NAME}.$dtb_ext \ - > ${DEPLOYDIR}/$type-$dtb_base_name-${KERNEL_DTB_NAME}.$dtb_ext.bin + $deployDir/$dtb_base_name-${KERNEL_DTB_NAME}.$dtb_ext \ + > $deployDir/$type-$dtb_base_name-${KERNEL_DTB_NAME}.$dtb_ext.bin ln -sf $type-$dtb_base_name-${KERNEL_DTB_NAME}.$dtb_ext.bin \ - ${DEPLOYDIR}/$type-$dtb_base_name-${KERNEL_DTB_LINK_NAME}.$dtb_ext.bin + $deployDir/$type-$dtb_base_name-${KERNEL_DTB_LINK_NAME}.$dtb_ext.bin if [ -e "${KERNEL_OUTPUT_DIR}/${type}.initramfs" ]; then cat ${KERNEL_OUTPUT_DIR}/${type}.initramfs \ - ${DEPLOYDIR}/$dtb_base_name-${KERNEL_DTB_NAME}.$dtb_ext \ - > ${DEPLOYDIR}/${type}-${INITRAMFS_NAME}-$dtb_base_name-${KERNEL_DTB_NAME}.$dtb_ext.bin + $deployDir/$dtb_base_name-${KERNEL_DTB_NAME}.$dtb_ext \ + > $deployDir/${type}-${INITRAMFS_NAME}-$dtb_base_name-${KERNEL_DTB_NAME}.$dtb_ext.bin ln -sf ${type}-${INITRAMFS_NAME}-$dtb_base_name-${KERNEL_DTB_NAME}.$dtb_ext.bin \ - ${DEPLOYDIR}/${type}-${INITRAMFS_NAME}-$dtb_base_name-${KERNEL_DTB_LINK_NAME}.$dtb_ext.bin + $deployDir/${type}-${INITRAMFS_NAME}-$dtb_base_name-${KERNEL_DTB_LINK_NAME}.$dtb_ext.bin fi fi done diff --git a/poky/meta/classes/kernel-fitimage.bbclass b/poky/meta/classes/kernel-fitimage.bbclass index 1bcb09c59..ec18a3d69 100644 --- a/poky/meta/classes/kernel-fitimage.bbclass +++ b/poky/meta/classes/kernel-fitimage.bbclass @@ -53,6 +53,9 @@ UBOOT_MKIMAGE_DTCOPTS ??= "" # fitImage Hash Algo FIT_HASH_ALG ?= "sha256" +# fitImage Signature Algo +FIT_SIGN_ALG ?= "rsa2048" + # # Emit the fitImage ITS header # @@ -246,6 +249,7 @@ EOF fitimage_emit_section_config() { conf_csum="${FIT_HASH_ALG}" + conf_sign_algo="${FIT_SIGN_ALG}" if [ -n "${UBOOT_SIGN_ENABLE}" ] ; then conf_sign_keyname="${UBOOT_SIGN_KEYNAME}" fi @@ -327,7 +331,7 @@ EOF cat << EOF >> ${1} signature@1 { - algo = "${conf_csum},rsa2048"; + algo = "${conf_csum},${conf_sign_algo}"; key-name-hint = "${conf_sign_keyname}"; ${sign_line} }; @@ -500,27 +504,27 @@ kernel_do_deploy_append() { # Update deploy directory if echo ${KERNEL_IMAGETYPES} | grep -wq "fitImage"; then echo "Copying fit-image.its source file..." - install -m 0644 ${B}/fit-image.its ${DEPLOYDIR}/fitImage-its-${KERNEL_FIT_NAME}.its - ln -snf fitImage-its-${KERNEL_FIT_NAME}.its ${DEPLOYDIR}/fitImage-its-${KERNEL_FIT_LINK_NAME} + install -m 0644 ${B}/fit-image.its "$deployDir/fitImage-its-${KERNEL_FIT_NAME}.its" + ln -snf fitImage-its-${KERNEL_FIT_NAME}.its "$deployDir/fitImage-its-${KERNEL_FIT_LINK_NAME}" echo "Copying linux.bin file..." - install -m 0644 ${B}/linux.bin ${DEPLOYDIR}/fitImage-linux.bin-${KERNEL_FIT_NAME}.bin - ln -snf fitImage-linux.bin-${KERNEL_FIT_NAME}.bin ${DEPLOYDIR}/fitImage-linux.bin-${KERNEL_FIT_LINK_NAME} + install -m 0644 ${B}/linux.bin $deployDir/fitImage-linux.bin-${KERNEL_FIT_NAME}.bin + ln -snf fitImage-linux.bin-${KERNEL_FIT_NAME}.bin "$deployDir/fitImage-linux.bin-${KERNEL_FIT_LINK_NAME}" if [ -n "${INITRAMFS_IMAGE}" ]; then echo "Copying fit-image-${INITRAMFS_IMAGE}.its source file..." - install -m 0644 ${B}/fit-image-${INITRAMFS_IMAGE}.its ${DEPLOYDIR}/fitImage-its-${INITRAMFS_IMAGE_NAME}-${KERNEL_FIT_NAME}.its - ln -snf fitImage-its-${INITRAMFS_IMAGE_NAME}-${KERNEL_FIT_NAME}.its ${DEPLOYDIR}/fitImage-its-${INITRAMFS_IMAGE_NAME}-${KERNEL_FIT_LINK_NAME} + install -m 0644 ${B}/fit-image-${INITRAMFS_IMAGE}.its "$deployDir/fitImage-its-${INITRAMFS_IMAGE_NAME}-${KERNEL_FIT_NAME}.its" + ln -snf fitImage-its-${INITRAMFS_IMAGE_NAME}-${KERNEL_FIT_NAME}.its "$deployDir/fitImage-its-${INITRAMFS_IMAGE_NAME}-${KERNEL_FIT_LINK_NAME}" echo "Copying fitImage-${INITRAMFS_IMAGE} file..." - install -m 0644 ${B}/arch/${ARCH}/boot/fitImage-${INITRAMFS_IMAGE} ${DEPLOYDIR}/fitImage-${INITRAMFS_IMAGE_NAME}-${KERNEL_FIT_NAME}.bin - ln -snf fitImage-${INITRAMFS_IMAGE_NAME}-${KERNEL_FIT_NAME}.bin ${DEPLOYDIR}/fitImage-${INITRAMFS_IMAGE_NAME}-${KERNEL_FIT_LINK_NAME} + install -m 0644 ${B}/arch/${ARCH}/boot/fitImage-${INITRAMFS_IMAGE} "$deployDir/fitImage-${INITRAMFS_IMAGE_NAME}-${KERNEL_FIT_NAME}.bin" + ln -snf fitImage-${INITRAMFS_IMAGE_NAME}-${KERNEL_FIT_NAME}.bin "$deployDir/fitImage-${INITRAMFS_IMAGE_NAME}-${KERNEL_FIT_LINK_NAME}" fi if [ "${UBOOT_SIGN_ENABLE}" = "1" -a -n "${UBOOT_DTB_BINARY}" ] ; then # UBOOT_DTB_IMAGE is a realfile, but we can't use # ${UBOOT_DTB_IMAGE} since it contains ${PV} which is aimed # for u-boot, but we are in kernel env now. - install -m 0644 ${B}/u-boot-${MACHINE}*.dtb ${DEPLOYDIR}/ + install -m 0644 ${B}/u-boot-${MACHINE}*.dtb "$deployDir/" fi fi } diff --git a/poky/meta/classes/libc-package.bbclass b/poky/meta/classes/libc-package.bbclass index a66e54088..de816bcec 100644 --- a/poky/meta/classes/libc-package.bbclass +++ b/poky/meta/classes/libc-package.bbclass @@ -346,14 +346,13 @@ python package_do_split_gconvs () { if use_bin == "compile": makefile = oe.path.join(d.getVar("WORKDIR"), "locale-tree", "Makefile") - m = open(makefile, "w") - m.write("all: %s\n\n" % " ".join(commands.keys())) - total = len(commands) - for i, cmd in enumerate(commands): - m.write(cmd + ":\n") - m.write("\t@echo 'Progress %d/%d'\n" % (i, total)) - m.write("\t" + commands[cmd] + "\n\n") - m.close() + with open(makefile, "w") as m: + m.write("all: %s\n\n" % " ".join(commands.keys())) + total = len(commands) + for i, (maketarget, makerecipe) in enumerate(commands.items()): + m.write(maketarget + ":\n") + m.write("\t@echo 'Progress %d/%d'\n" % (i, total)) + m.write("\t" + makerecipe + "\n\n") d.setVar("EXTRA_OEMAKE", "-C %s ${PARALLEL_MAKE}" % (os.path.dirname(makefile))) d.setVarFlag("oe_runmake", "progress", "outof:Progress\s(\d+)/(\d+)") bb.note("Executing binary locale generation makefile") diff --git a/poky/meta/classes/package.bbclass b/poky/meta/classes/package.bbclass index d8bef3afb..e0d6ff670 100644 --- a/poky/meta/classes/package.bbclass +++ b/poky/meta/classes/package.bbclass @@ -826,8 +826,9 @@ python fixup_perms () { # Now we actually load from the configuration files for conf in get_fs_perms_list(d).split(): - if os.path.exists(conf): - f = open(conf) + if not os.path.exists(conf): + continue + with open(conf) as f: for line in f: if line.startswith('#'): continue @@ -848,7 +849,6 @@ python fixup_perms () { fs_perms_table[entry.path] = entry if entry.path in fs_link_table: fs_link_table.pop(entry.path) - f.close() # Debug -- list out in-memory table #for dir in fs_perms_table: @@ -1424,10 +1424,9 @@ fi pkgdest = d.getVar('PKGDEST') pkgdatadir = d.getVar('PKGDESTWORK') - data_file = pkgdatadir + d.expand("/${PN}" ) - f = open(data_file, 'w') - f.write("PACKAGES: %s\n" % packages) - f.close() + data_file = pkgdatadir + d.expand("/${PN}") + with open(data_file, 'w') as fd: + fd.write("PACKAGES: %s\n" % packages) pn = d.getVar('PN') global_variants = (d.getVar('MULTILIB_GLOBAL_VARIANTS') or "").split() @@ -1732,8 +1731,6 @@ python package_do_shlibs() { else: snap_symlinks = False - use_ldconfig = bb.utils.contains('DISTRO_FEATURES', 'ldconfig', True, False, d) - needed = {} shlib_provider = oe.package.read_shlib_providers(d) @@ -1778,22 +1775,21 @@ python package_do_shlibs() { bb.note("Renaming %s to %s" % (old, new)) os.rename(old, new) pkgfiles[pkg].remove(old) - + shlibs_file = os.path.join(shlibswork_dir, pkg + ".list") if len(sonames): - fd = open(shlibs_file, 'w') - for s in sonames: - if s[0] in shlib_provider and s[1] in shlib_provider[s[0]]: - (old_pkg, old_pkgver) = shlib_provider[s[0]][s[1]] - if old_pkg != pkg: - bb.warn('%s-%s was registered as shlib provider for %s, changing it to %s-%s because it was built later' % (old_pkg, old_pkgver, s[0], pkg, pkgver)) - bb.debug(1, 'registering %s-%s as shlib provider for %s' % (pkg, pkgver, s[0])) - fd.write(s[0] + ':' + s[1] + ':' + s[2] + '\n') - if s[0] not in shlib_provider: - shlib_provider[s[0]] = {} - shlib_provider[s[0]][s[1]] = (pkg, pkgver) - fd.close() - if needs_ldconfig and use_ldconfig: + with open(shlibs_file, 'w') as fd: + for s in sonames: + if s[0] in shlib_provider and s[1] in shlib_provider[s[0]]: + (old_pkg, old_pkgver) = shlib_provider[s[0]][s[1]] + if old_pkg != pkg: + bb.warn('%s-%s was registered as shlib provider for %s, changing it to %s-%s because it was built later' % (old_pkg, old_pkgver, s[0], pkg, pkgver)) + bb.debug(1, 'registering %s-%s as shlib provider for %s' % (pkg, pkgver, s[0])) + fd.write(s[0] + ':' + s[1] + ':' + s[2] + '\n') + if s[0] not in shlib_provider: + shlib_provider[s[0]] = {} + shlib_provider[s[0]][s[1]] = (pkg, pkgver) + if needs_ldconfig: bb.debug(1, 'adding ldconfig call to postinst for %s' % pkg) postinst = d.getVar('pkg_postinst_%s' % pkg) if not postinst: @@ -1864,11 +1860,10 @@ python package_do_shlibs() { deps_file = os.path.join(pkgdest, pkg + ".shlibdeps") if os.path.exists(deps_file): os.remove(deps_file) - if len(deps): - fd = open(deps_file, 'w') - for dep in sorted(deps): - fd.write(dep + '\n') - fd.close() + if deps: + with open(deps_file, 'w') as fd: + for dep in sorted(deps): + fd.write(dep + '\n') } python package_do_pkgconfig () { @@ -1898,9 +1893,8 @@ python package_do_pkgconfig () { pkgconfig_provided[pkg].append(name) if not os.access(file, os.R_OK): continue - f = open(file, 'r') - lines = f.readlines() - f.close() + with open(file, 'r') as f: + lines = f.readlines() for l in lines: m = var_re.match(l) if m: @@ -1918,10 +1912,9 @@ python package_do_pkgconfig () { for pkg in packages.split(): pkgs_file = os.path.join(shlibswork_dir, pkg + ".pclist") if pkgconfig_provided[pkg] != []: - f = open(pkgs_file, 'w') - for p in pkgconfig_provided[pkg]: - f.write('%s\n' % p) - f.close() + with open(pkgs_file, 'w') as f: + for p in pkgconfig_provided[pkg]: + f.write('%s\n' % p) # Go from least to most specific since the last one found wins for dir in reversed(shlibs_dirs): @@ -1931,9 +1924,8 @@ python package_do_pkgconfig () { m = re.match(r'^(.*)\.pclist$', file) if m: pkg = m.group(1) - fd = open(os.path.join(dir, file)) - lines = fd.readlines() - fd.close() + with open(os.path.join(dir, file)) as fd: + lines = fd.readlines() pkgconfig_provided[pkg] = [] for l in lines: pkgconfig_provided[pkg].append(l.rstrip()) @@ -1951,10 +1943,9 @@ python package_do_pkgconfig () { bb.note("couldn't find pkgconfig module '%s' in any package" % n) deps_file = os.path.join(pkgdest, pkg + ".pcdeps") if len(deps): - fd = open(deps_file, 'w') - for dep in deps: - fd.write(dep + '\n') - fd.close() + with open(deps_file, 'w') as fd: + for dep in deps: + fd.write(dep + '\n') } def read_libdep_files(d): @@ -1965,9 +1956,8 @@ def read_libdep_files(d): for extension in ".shlibdeps", ".pcdeps", ".clilibdeps": depsfile = d.expand("${PKGDEST}/" + pkg + extension) if os.access(depsfile, os.R_OK): - fd = open(depsfile) - lines = fd.readlines() - fd.close() + with open(depsfile) as fd: + lines = fd.readlines() for l in lines: l.rstrip() deps = bb.utils.explode_dep_versions2(l) diff --git a/poky/meta/classes/package_ipk.bbclass b/poky/meta/classes/package_ipk.bbclass index 9f9da2f91..4f2397703 100644 --- a/poky/meta/classes/package_ipk.bbclass +++ b/poky/meta/classes/package_ipk.bbclass @@ -154,7 +154,6 @@ def ipk_write_pkg(pkg, d): ctrlfile.write('%s\n' % textwrap.fill(description, width=74, initial_indent=' ', subsequent_indent=' ')) else: ctrlfile.write(c % tuple(pullData(fs, localdata))) - # more fields custom_fields_chunk = get_package_additional_metadata("ipk", localdata) if custom_fields_chunk is not None: diff --git a/poky/meta/classes/populate_sdk_ext.bbclass b/poky/meta/classes/populate_sdk_ext.bbclass index 9fda1c9e7..05cfc1cc1 100644 --- a/poky/meta/classes/populate_sdk_ext.bbclass +++ b/poky/meta/classes/populate_sdk_ext.bbclass @@ -21,6 +21,7 @@ SDK_EXT_TYPE ?= "full" SDK_INCLUDE_PKGDATA ?= "0" SDK_INCLUDE_TOOLCHAIN ?= "${@'1' if d.getVar('SDK_EXT_TYPE') == 'full' else '0'}" SDK_INCLUDE_NATIVESDK ?= "0" +SDK_INCLUDE_BUILDTOOLS ?= '1' SDK_RECRDEP_TASKS ?= "" @@ -94,6 +95,7 @@ python write_target_sdk_ext_manifest () { real_target_multimach = d.getVar('REAL_MULTIMACH_TARGET_SYS') pkgs = {} + os.makedirs(os.path.dirname(d.getVar('SDK_EXT_TARGET_MANIFEST')), exist_ok=True) with open(d.getVar('SDK_EXT_TARGET_MANIFEST'), 'w') as f: for fn in extra_info['filesizes']: info = fn.split(':') @@ -535,8 +537,12 @@ def get_sdk_required_utilities(buildtools_fn, d): sanity_required_utilities = (d.getVar('SANITY_REQUIRED_UTILITIES') or '').split() sanity_required_utilities.append(d.expand('${BUILD_PREFIX}gcc')) sanity_required_utilities.append(d.expand('${BUILD_PREFIX}g++')) - buildtools_installer = os.path.join(d.getVar('SDK_DEPLOY'), buildtools_fn) - filelist, _ = bb.process.run('%s -l' % buildtools_installer) + if buildtools_fn: + buildtools_installer = os.path.join(d.getVar('SDK_DEPLOY'), buildtools_fn) + filelist, _ = bb.process.run('%s -l' % buildtools_installer) + else: + buildtools_installer = None + filelist = "" localdata = bb.data.createCopy(d) localdata.setVar('SDKPATH', '.') sdkpathnative = localdata.getVar('SDKPATHNATIVE') @@ -579,7 +585,9 @@ install_tools() { touch ${SDK_OUTPUT}/${SDKPATH}/.devtoolbase # find latest buildtools-tarball and install it - install ${SDK_DEPLOY}/${SDK_BUILDTOOLS_INSTALLER} ${SDK_OUTPUT}/${SDKPATH} + if [ -n "${SDK_BUILDTOOLS_INSTALLER}" ]; then + install ${SDK_DEPLOY}/${SDK_BUILDTOOLS_INSTALLER} ${SDK_OUTPUT}/${SDKPATH} + fi install -m 0644 ${COREBASE}/meta/files/ext-sdk-prepare.py ${SDK_OUTPUT}/${SDKPATH} } @@ -629,16 +637,18 @@ sdk_ext_postinst() { printf "\nExtracting buildtools...\n" cd $target_sdk_dir env_setup_script="$target_sdk_dir/environment-setup-${REAL_MULTIMACH_TARGET_SYS}" - printf "buildtools\ny" | ./${SDK_BUILDTOOLS_INSTALLER} > buildtools.log || { printf 'ERROR: buildtools installation failed:\n' ; cat buildtools.log ; echo "printf 'ERROR: this SDK was not fully installed and needs reinstalling\n'" >> $env_setup_script ; exit 1 ; } + if [ -n "${SDK_BUILDTOOLS_INSTALLER}" ]; then + printf "buildtools\ny" | ./${SDK_BUILDTOOLS_INSTALLER} > buildtools.log || { printf 'ERROR: buildtools installation failed:\n' ; cat buildtools.log ; echo "printf 'ERROR: this SDK was not fully installed and needs reinstalling\n'" >> $env_setup_script ; exit 1 ; } - # Delete the buildtools tar file since it won't be used again - rm -f ./${SDK_BUILDTOOLS_INSTALLER} - # We don't need the log either since it succeeded - rm -f buildtools.log + # Delete the buildtools tar file since it won't be used again + rm -f ./${SDK_BUILDTOOLS_INSTALLER} + # We don't need the log either since it succeeded + rm -f buildtools.log - # Make sure when the user sets up the environment, they also get - # the buildtools-tarball tools in their path. - echo ". $target_sdk_dir/buildtools/environment-setup*" >> $env_setup_script + # Make sure when the user sets up the environment, they also get + # the buildtools-tarball tools in their path. + echo ". $target_sdk_dir/buildtools/environment-setup*" >> $env_setup_script + fi # Allow bitbake environment setup to be ran as part of this sdk. echo "export OE_SKIP_SDK_CHECK=1" >> $env_setup_script @@ -654,7 +664,7 @@ sdk_ext_postinst() { # Warn if trying to use external bitbake and the ext SDK together echo "(which bitbake > /dev/null 2>&1 && echo 'WARNING: attempting to use the extensible SDK in an environment set up to run bitbake - this may lead to unexpected results. Please source this script in a new shell session instead.') || true" >> $env_setup_script - if [ "$prepare_buildsystem" != "no" ]; then + if [ "$prepare_buildsystem" != "no" -a -n "${SDK_BUILDTOOLS_INSTALLER}" ]; then printf "Preparing build system...\n" # dash which is /bin/sh on Ubuntu will not preserve the # current working directory when first ran, nor will it set $1 when @@ -680,7 +690,10 @@ fakeroot python do_populate_sdk_ext() { bb.fatal('The extensible SDK can currently only be built for the same architecture as the machine being built on - SDK_ARCH is set to %s (likely via setting SDKMACHINE) which is different from the architecture of the build machine (%s). Unable to continue.' % (d.getVar('SDK_ARCH'), d.getVar('BUILD_ARCH'))) d.setVar('SDK_INSTALL_TARGETS', get_sdk_install_targets(d)) - buildtools_fn = get_current_buildtools(d) + if d.getVar('SDK_INCLUDE_BUILDTOOLS') == '1': + buildtools_fn = get_current_buildtools(d) + else: + buildtools_fn = None d.setVar('SDK_REQUIRED_UTILITIES', get_sdk_required_utilities(buildtools_fn, d)) d.setVar('SDK_BUILDTOOLS_INSTALLER', buildtools_fn) d.setVar('SDKDEPLOYDIR', '${SDKEXTDEPLOYDIR}') @@ -731,7 +744,7 @@ def get_sdk_ext_rdepends(d): do_populate_sdk_ext[dirs] = "${@d.getVarFlag('do_populate_sdk', 'dirs', False)}" do_populate_sdk_ext[depends] = "${@d.getVarFlag('do_populate_sdk', 'depends', False)} \ - buildtools-tarball:do_populate_sdk \ + ${@'buildtools-tarball:do_populate_sdk' if d.getVar('SDK_INCLUDE_BUILDTOOLS') == '1' else ''} \ ${@'meta-world-pkgdata:do_collect_packagedata' if d.getVar('SDK_INCLUDE_PKGDATA') == '1' else ''} \ ${@'meta-extsdk-toolchain:do_locked_sigs' if d.getVar('SDK_INCLUDE_TOOLCHAIN') == '1' else ''}" diff --git a/poky/meta/classes/report-error.bbclass b/poky/meta/classes/report-error.bbclass index ea043b23e..1a12db120 100644 --- a/poky/meta/classes/report-error.bbclass +++ b/poky/meta/classes/report-error.bbclass @@ -78,19 +78,15 @@ python errorreport_handler () { taskdata['task'] = task if log: try: - logFile = codecs.open(log, 'r', 'utf-8') - logdata = logFile.read() - + with codecs.open(log, encoding='utf-8') as logFile: + logdata = logFile.read() # Replace host-specific paths so the logs are cleaner for d in ("TOPDIR", "TMPDIR"): s = e.data.getVar(d) if s: logdata = logdata.replace(s, d) - - logFile.close() except: logdata = "Unable to read log file" - else: logdata = "No Log" diff --git a/poky/meta/classes/rm_work.bbclass b/poky/meta/classes/rm_work.bbclass index a6bd3f719..01c2ab1c7 100644 --- a/poky/meta/classes/rm_work.bbclass +++ b/poky/meta/classes/rm_work.bbclass @@ -47,30 +47,26 @@ do_rm_work () { cd `dirname ${STAMP}` for i in `basename ${STAMP}`* do - # By default we'll delete the stamp, unless $i is changed by the inner loop - # (i=dummy does this) - case $i in *sigdata*|*sigbasedata*) # Save/skip anything that looks like a signature data file. - i=dummy ;; - *do_image_complete_setscene*) - # Ensure we don't 'stack' setscene extensions to this stamp with the section below - i=dummy + *do_image_complete_setscene*|*do_image_qa_setscene*) + # Ensure we don't 'stack' setscene extensions to these stamps with the sections below ;; *do_image_complete*) # Promote do_image_complete stamps to setscene versions (ahead of *do_image* below) mv $i `echo $i | sed -e "s#do_image_complete#do_image_complete_setscene#"` - i=dummy + ;; + *do_image_qa*) + # Promote do_image_qa stamps to setscene versions (ahead of *do_image* below) + mv $i `echo $i | sed -e "s#do_image_qa#do_image_qa_setscene#"` ;; *do_package_write*|*do_rootfs*|*do_image*|*do_bootimg*|*do_write_qemuboot_conf*|*do_build*) - i=dummy ;; *do_addto_recipe_sysroot*) # Preserve recipe-sysroot-native if do_addto_recipe_sysroot has been used excludes="$excludes recipe-sysroot-native" - i=dummy ;; *do_package|*do_package.*|*do_package_setscene.*) # We remove do_package entirely, including any @@ -78,30 +74,24 @@ do_rm_work () { # such as 'packages' and 'packages-split' and these can be large. No end # of chain tasks depend directly on do_package anymore. rm -f $i; - i=dummy ;; *_setscene*) # Skip stamps which are already setscene versions - i=dummy ;; + *) + # For everything else: if suitable, promote the stamp to a setscene + # version, otherwise remove it + for j in ${SSTATETASKS} do_shared_workdir + do + case $i in + *$j|*$j.*) + mv $i `echo $i | sed -e "s#${j}#${j}_setscene#"` + break + ;; + esac + done + rm -f $i esac - - for j in ${SSTATETASKS} do_shared_workdir - do - case $i in - dummy) - break - ;; - *$j|*$j.*) - # Promote the stamp to a setscene version - mv $i `echo $i | sed -e "s#${j}#${j}_setscene#"` - i=dummy - break - ;; - esac - done - - rm -f $i done cd ${WORKDIR} diff --git a/poky/meta/classes/sanity.bbclass b/poky/meta/classes/sanity.bbclass index 2d3f49eb1..63ab6cf3d 100644 --- a/poky/meta/classes/sanity.bbclass +++ b/poky/meta/classes/sanity.bbclass @@ -523,6 +523,7 @@ def check_wsl(d): # Tar version 1.24 and onwards handle overwriting symlinks correctly # but earlier versions do not; this needs to work properly for sstate +# Version 1.28 is needed so opkg-build works correctly when reproducibile builds are enabled def check_tar_version(sanity_data): from distutils.version import LooseVersion import subprocess @@ -532,7 +533,9 @@ def check_tar_version(sanity_data): return "Unable to execute tar --version, exit code %d\n%s\n" % (e.returncode, e.output) version = result.split()[3] if LooseVersion(version) < LooseVersion("1.24"): - return "Your version of tar is older than 1.24 and has bugs which will break builds. Please install a newer version of tar.\n" + return "Your version of tar is older than 1.24 and has bugs which will break builds. Please install a newer version of tar (1.28+).\n" + if LooseVersion(version) < LooseVersion("1.28"): + return "Your version of tar is older than 1.28 and does not have the support needed to enable reproducible builds. Please install a newer version of tar (you could use the projects buildtools-tarball from our last release).\n" return None # We use git parameters and functionality only found in 1.7.8 or later @@ -622,13 +625,14 @@ def check_sanity_version_change(status, d): # In other words, these tests run once in a given build directory and then # never again until the sanity version or host distrubution id/version changes. - # Check the python install is complete. glib-2.0-natives requries - # xml.parsers.expat + # Check the python install is complete. Examples that are often removed in + # minimal installations: glib-2.0-natives requries # xml.parsers.expat and icu + # requires distutils.sysconfig. try: import xml.parsers.expat - except ImportError: - status.addresult('Your python is not a full install. Please install the module xml.parsers.expat (python-xml on openSUSE and SUSE Linux).\n') - import stat + import distutils.sysconfig + except ImportError as e: + status.addresult('Your Python 3 is not a full install. Please install the module %s (see the Getting Started guide for further information).\n' % e.name) status.addresult(check_make_version(d)) status.addresult(check_patch_version(d)) @@ -664,6 +668,7 @@ def check_sanity_version_change(status, d): status.addresult('Please use ASSUME_PROVIDED +=, not ASSUME_PROVIDED = in your local.conf\n') # Check that TMPDIR isn't on a filesystem with limited filename length (eg. eCryptFS) + import stat tmpdir = d.getVar('TMPDIR') status.addresult(check_create_long_filename(tmpdir, "TMPDIR")) tmpdirmode = os.stat(tmpdir).st_mode @@ -798,6 +803,11 @@ def check_sanity_everybuild(status, d): elif d.getVar('SDK_ARCH', False) == "${BUILD_ARCH}": status.addresult('SDKMACHINE is set, but SDK_ARCH has not been changed as a result - SDKMACHINE may have been set too late (e.g. in the distro configuration)\n') + # If SDK_VENDOR looks like "-my-sdk" then the triples are badly formed so fail early + sdkvendor = d.getVar("SDK_VENDOR") + if not (sdkvendor.startswith("-") and sdkvendor.count("-") == 1): + status.addresult("SDK_VENDOR should be of the form '-foosdk' with a single dash\n") + check_supported_distro(d) omask = os.umask(0o022) diff --git a/poky/meta/classes/sstate.bbclass b/poky/meta/classes/sstate.bbclass index b47b9c23b..64808f8e1 100644 --- a/poky/meta/classes/sstate.bbclass +++ b/poky/meta/classes/sstate.bbclass @@ -818,7 +818,7 @@ sstate_unpack_package () { BB_HASHCHECK_FUNCTION = "sstate_checkhashes" -def sstate_checkhashes(sq_data, d, siginfo=False, currentcount=0, **kwargs): +def sstate_checkhashes(sq_data, d, siginfo=False, currentcount=0, summary=True, **kwargs): found = set() missed = set() extension = ".tgz" @@ -951,16 +951,17 @@ def sstate_checkhashes(sq_data, d, siginfo=False, currentcount=0, **kwargs): evdata['found'].append((bb.runqueue.fn_from_tid(tid), bb.runqueue.taskname_from_tid(tid), gethash(tid), sstatefile ) ) bb.event.fire(bb.event.MetadataEvent("MissedSstate", evdata), d) - # Print some summary statistics about the current task completion and how much sstate - # reuse there was. Avoid divide by zero errors. - total = len(sq_data['hash']) - complete = 0 - if currentcount: - complete = (len(found) + currentcount) / (total + currentcount) * 100 - match = 0 - if total: - match = len(found) / total * 100 - bb.plain("Sstate summary: Wanted %d Found %d Missed %d Current %d (%d%% match, %d%% complete)" % (total, len(found), len(missed), currentcount, match, complete)) + if summary: + # Print some summary statistics about the current task completion and how much sstate + # reuse there was. Avoid divide by zero errors. + total = len(sq_data['hash']) + complete = 0 + if currentcount: + complete = (len(found) + currentcount) / (total + currentcount) * 100 + match = 0 + if total: + match = len(found) / total * 100 + bb.plain("Sstate summary: Wanted %d Found %d Missed %d Current %d (%d%% match, %d%% complete)" % (total, len(found), len(missed), currentcount, match, complete)) if hasattr(bb.parse.siggen, "checkhashes"): bb.parse.siggen.checkhashes(sq_data, missed, found, d) diff --git a/poky/meta/classes/staging.bbclass b/poky/meta/classes/staging.bbclass index 55a9b52ed..cca0b7e0d 100644 --- a/poky/meta/classes/staging.bbclass +++ b/poky/meta/classes/staging.bbclass @@ -449,6 +449,7 @@ python extend_recipe_sysroot() { msg_exists = [] msg_adding = [] + # Handle all removals first since files may move between recipes for dep in configuredeps: c = setscenedeps[dep][0] if c not in installed: @@ -459,7 +460,6 @@ python extend_recipe_sysroot() { if os.path.exists(depdir + "/" + c): lnk = os.readlink(depdir + "/" + c) if lnk == c + "." + taskhash and os.path.exists(depdir + "/" + c + ".complete"): - msg_exists.append(c) continue else: bb.note("%s exists in sysroot, but is stale (%s vs. %s), removing." % (c, lnk, c + "." + taskhash)) @@ -470,6 +470,20 @@ python extend_recipe_sysroot() { elif os.path.lexists(depdir + "/" + c): os.unlink(depdir + "/" + c) + # Now handle installs + for dep in configuredeps: + c = setscenedeps[dep][0] + if c not in installed: + continue + taskhash = setscenedeps[dep][5] + taskmanifest = depdir + "/" + c + "." + taskhash + + if os.path.exists(depdir + "/" + c): + lnk = os.readlink(depdir + "/" + c) + if lnk == c + "." + taskhash and os.path.exists(depdir + "/" + c + ".complete"): + msg_exists.append(c) + continue + msg_adding.append(c) os.symlink(c + "." + taskhash, depdir + "/" + c) diff --git a/poky/meta/classes/systemd.bbclass b/poky/meta/classes/systemd.bbclass index 1dca09964..9e8a82c9f 100644 --- a/poky/meta/classes/systemd.bbclass +++ b/poky/meta/classes/systemd.bbclass @@ -32,11 +32,7 @@ if type systemctl >/dev/null 2>/dev/null; then if [ "${SYSTEMD_AUTO_ENABLE}" = "enable" ]; then for service in ${SYSTEMD_SERVICE_ESCAPED}; do - case "${service}" in - *@*) - systemctl ${OPTS} enable "${service}" - ;; - esac + systemctl ${OPTS} enable "$service" done fi diff --git a/poky/meta/classes/testimage.bbclass b/poky/meta/classes/testimage.bbclass index 525c5a617..844ed8794 100644 --- a/poky/meta/classes/testimage.bbclass +++ b/poky/meta/classes/testimage.bbclass @@ -262,6 +262,24 @@ def testimage_main(d): # It would be better to find these modules using instrospection. target_kwargs['target_modules_path'] = d.getVar('BBPATH') + # hardware controlled targets might need further access + target_kwargs['powercontrol_cmd'] = d.getVar("TEST_POWERCONTROL_CMD") or None + target_kwargs['powercontrol_extra_args'] = d.getVar("TEST_POWERCONTROL_EXTRA_ARGS") or "" + target_kwargs['serialcontrol_cmd'] = d.getVar("TEST_SERIALCONTROL_CMD") or None + target_kwargs['serialcontrol_extra_args'] = d.getVar("TEST_SERIALCONTROL_EXTRA_ARGS") or "" + + def export_ssh_agent(d): + import os + + variables = ['SSH_AGENT_PID', 'SSH_AUTH_SOCK'] + for v in variables: + if v not in os.environ.keys(): + val = d.getVar(v) + if val is not None: + os.environ[v] = val + + export_ssh_agent(d) + # runtime use network for download projects for build export_proxies(d) diff --git a/poky/meta/classes/tinderclient.bbclass b/poky/meta/classes/tinderclient.bbclass deleted file mode 100644 index 00f453cec..000000000 --- a/poky/meta/classes/tinderclient.bbclass +++ /dev/null @@ -1,368 +0,0 @@ -def tinder_http_post(server, selector, content_type, body): - import httplib - # now post it - for i in range(0,5): - try: - h = httplib.HTTP(server) - h.putrequest('POST', selector) - h.putheader('content-type', content_type) - h.putheader('content-length', str(len(body))) - h.endheaders() - h.send(body) - errcode, errmsg, headers = h.getreply() - #print(errcode, errmsg, headers) - return (errcode,errmsg, headers, h.file) - except: - print("Error sending the report!") - # try again - pass - - # return some garbage - return (-1, "unknown", "unknown", None) - -def tinder_form_data(bound, dict, log): - output = [] - # for each key in the dictionary - for name in dict: - assert dict[name] - output.append( "--" + bound ) - output.append( 'Content-Disposition: form-data; name="%s"' % name ) - output.append( "" ) - output.append( dict[name] ) - if log: - output.append( "--" + bound ) - output.append( 'Content-Disposition: form-data; name="log"; filename="log.txt"' ) - output.append( '' ) - output.append( log ) - output.append( '--' + bound + '--' ) - output.append( '' ) - - return "\r\n".join(output) - -def tinder_time_string(): - """ - Return the time as GMT - """ - return "" - -def tinder_format_http_post(d,status,log): - """ - Format the Tinderbox HTTP post with the data needed - for the tinderbox to be happy. - """ - - import random - - # the variables we will need to send on this form post - variables = { - "tree" : d.getVar('TINDER_TREE'), - "machine_name" : d.getVar('TINDER_MACHINE'), - "os" : os.uname()[0], - "os_version" : os.uname()[2], - "compiler" : "gcc", - "clobber" : d.getVar('TINDER_CLOBBER') or "0", - "srcdate" : d.getVar('SRCDATE'), - "PN" : d.getVar('PN'), - "PV" : d.getVar('PV'), - "PR" : d.getVar('PR'), - "FILE" : d.getVar('FILE') or "N/A", - "TARGETARCH" : d.getVar('TARGET_ARCH'), - "TARGETFPU" : d.getVar('TARGET_FPU') or "Unknown", - "TARGETOS" : d.getVar('TARGET_OS') or "Unknown", - "MACHINE" : d.getVar('MACHINE') or "Unknown", - "DISTRO" : d.getVar('DISTRO') or "Unknown", - "zecke-rocks" : "sure", - } - - # optionally add the status - if status: - variables["status"] = str(status) - - # try to load the machine id - # we only need on build_status.pl but sending it - # always does not hurt - try: - f = open(d.getVar('TMPDIR')+'/tinder-machine.id', 'r') - id = f.read() - variables['machine_id'] = id - except: - pass - - # the boundary we will need - boundary = "----------------------------------%d" % int(random.random()*1000000000000) - - # now format the body - body = tinder_form_data( boundary, variables, log ) - - return ("multipart/form-data; boundary=%s" % boundary),body - - -def tinder_build_start(d): - """ - Inform the tinderbox that a build is starting. We do this - by posting our name and tree to the build_start.pl script - on the server. - """ - - # get the body and type - content_type, body = tinder_format_http_post(d,None,None) - server = d.getVar('TINDER_HOST') - url = d.getVar('TINDER_URL') - - selector = url + "/xml/build_start.pl" - - #print("selector %s and url %s" % (selector, url)) - - # now post it - errcode, errmsg, headers, h_file = tinder_http_post(server,selector,content_type, body) - #print(errcode, errmsg, headers) - report = h_file.read() - - # now let us find the machine id that was assigned to us - search = "<machine id='" - report = report[report.find(search)+len(search):] - report = report[0:report.find("'")] - - bb.note("Machine ID assigned by tinderbox: %s" % report ) - - # now we will need to save the machine number - # we will override any previous numbers - f = open(d.getVar('TMPDIR')+"/tinder-machine.id", 'w') - f.write(report) - - -def tinder_send_http(d, status, _log): - """ - Send this log as build status - """ - - # get the body and type - server = d.getVar('TINDER_HOST') - url = d.getVar('TINDER_URL') - - selector = url + "/xml/build_status.pl" - - # now post it - in chunks of 10.000 characters - new_log = _log - while len(new_log) > 0: - content_type, body = tinder_format_http_post(d,status,new_log[0:18000]) - errcode, errmsg, headers, h_file = tinder_http_post(server,selector,content_type, body) - #print(errcode, errmsg, headers) - #print(h.file.read()) - new_log = new_log[18000:] - - -def tinder_print_info(d): - """ - Print the TinderBox Info - Including informations of the BaseSystem and the Tree - we use. - """ - - # get the local vars - time = tinder_time_string() - ops = os.uname()[0] - version = os.uname()[2] - url = d.getVar('TINDER_URL') - tree = d.getVar('TINDER_TREE') - branch = d.getVar('TINDER_BRANCH') - srcdate = d.getVar('SRCDATE') - machine = d.getVar('MACHINE') - distro = d.getVar('DISTRO') - bbfiles = d.getVar('BBFILES') - tarch = d.getVar('TARGET_ARCH') - fpu = d.getVar('TARGET_FPU') - oerev = d.getVar('OE_REVISION') or "unknown" - - # there is a bug with tipple quoted strings - # i will work around but will fix the original - # bug as well - output = [] - output.append("== Tinderbox Info" ) - output.append("Time: %(time)s" ) - output.append("OS: %(ops)s" ) - output.append("%(version)s" ) - output.append("Compiler: gcc" ) - output.append("Tinderbox Client: 0.1" ) - output.append("Tinderbox Client Last Modified: yesterday" ) - output.append("Tinderbox Protocol: 0.1" ) - output.append("URL: %(url)s" ) - output.append("Tree: %(tree)s" ) - output.append("Config:" ) - output.append("branch = '%(branch)s'" ) - output.append("TARGET_ARCH = '%(tarch)s'" ) - output.append("TARGET_FPU = '%(fpu)s'" ) - output.append("SRCDATE = '%(srcdate)s'" ) - output.append("MACHINE = '%(machine)s'" ) - output.append("DISTRO = '%(distro)s'" ) - output.append("BBFILES = '%(bbfiles)s'" ) - output.append("OEREV = '%(oerev)s'" ) - output.append("== End Tinderbox Client Info" ) - - # now create the real output - return "\n".join(output) % vars() - - -def tinder_print_env(): - """ - Print the environment variables of this build - """ - time_start = tinder_time_string() - time_end = tinder_time_string() - - # build the environment - env = "" - for var in os.environ: - env += "%s=%s\n" % (var, os.environ[var]) - - output = [] - output.append( "---> TINDERBOX RUNNING env %(time_start)s" ) - output.append( env ) - output.append( "<--- TINDERBOX FINISHED (SUCCESS) %(time_end)s" ) - - return "\n".join(output) % vars() - -def tinder_tinder_start(d, event): - """ - PRINT the configuration of this build - """ - - time_start = tinder_time_string() - config = tinder_print_info(d) - #env = tinder_print_env() - time_end = tinder_time_string() - packages = " ".join( event.getPkgs() ) - - output = [] - output.append( "---> TINDERBOX PRINTING CONFIGURATION %(time_start)s" ) - output.append( config ) - #output.append( env ) - output.append( "<--- TINDERBOX FINISHED PRINTING CONFIGURATION %(time_end)s" ) - output.append( "---> TINDERBOX BUILDING '%(packages)s'" ) - output.append( "<--- TINDERBOX STARTING BUILD NOW" ) - - output.append( "" ) - - return "\n".join(output) % vars() - -def tinder_do_tinder_report(event): - """ - Report to the tinderbox: - On the BuildStart we will inform the box directly - On the other events we will write to the TINDER_LOG and - when the Task is finished we will send the report. - - The above is not yet fully implemented. Currently we send - information immediately. The caching/queuing needs to be - implemented. Also sending more or less information is not - implemented yet. - - We have two temporary files stored in the TMP directory. One file - contains the assigned machine id for the tinderclient. This id gets - assigned when we connect the box and start the build process the second - file is used to workaround an EventHandler limitation. If BitBake is ran - with the continue option we want the Build to fail even if we get the - BuildCompleted Event. In this case we have to look up the status and - send it instead of 100/success. - """ - import glob - - # variables - name = bb.event.getName(event) - log = "" - status = 1 - # Check what we need to do Build* shows we start or are done - if name == "BuildStarted": - tinder_build_start(event.data) - log = tinder_tinder_start(event.data,event) - - try: - # truncate the tinder log file - f = open(event.data.getVar('TINDER_LOG'), 'w') - f.write("") - f.close() - except: - pass - - try: - # write a status to the file. This is needed for the -k option - # of BitBake - g = open(event.data.getVar('TMPDIR')+"/tinder-status", 'w') - g.write("") - g.close() - except IOError: - pass - - # Append the Task-Log (compile,configure...) to the log file - # we will send to the server - if name == "TaskSucceeded" or name == "TaskFailed": - log_file = glob.glob("%s/log.%s.*" % (event.data.getVar('T'), event.task)) - - if len(log_file) != 0: - to_file = event.data.getVar('TINDER_LOG') - log += "".join(open(log_file[0], 'r').readlines()) - - # set the right 'HEADER'/Summary for the TinderBox - if name == "TaskStarted": - log += "---> TINDERBOX Task %s started\n" % event.task - elif name == "TaskSucceeded": - log += "<--- TINDERBOX Task %s done (SUCCESS)\n" % event.task - elif name == "TaskFailed": - log += "<--- TINDERBOX Task %s failed (FAILURE)\n" % event.task - elif name == "PkgStarted": - log += "---> TINDERBOX Package %s started\n" % event.data.getVar('PF') - elif name == "PkgSucceeded": - log += "<--- TINDERBOX Package %s done (SUCCESS)\n" % event.data.getVar('PF') - elif name == "PkgFailed": - if not event.data.getVar('TINDER_AUTOBUILD') == "0": - build.exec_task('do_clean', event.data) - log += "<--- TINDERBOX Package %s failed (FAILURE)\n" % event.data.getVar('PF') - status = 200 - # remember the failure for the -k case - h = open(event.data.getVar('TMPDIR')+"/tinder-status", 'w') - h.write("200") - elif name == "BuildCompleted": - log += "Build Completed\n" - status = 100 - # Check if we have a old status... - try: - h = open(event.data.getVar('TMPDIR')+'/tinder-status', 'r') - status = int(h.read()) - except: - pass - - elif name == "MultipleProviders": - log += "---> TINDERBOX Multiple Providers\n" - log += "multiple providers are available (%s);\n" % ", ".join(event.getCandidates()) - log += "consider defining PREFERRED_PROVIDER_%s\n" % event.getItem() - log += "is runtime: %d\n" % event.isRuntime() - log += "<--- TINDERBOX Multiple Providers\n" - elif name == "NoProvider": - log += "Error: No Provider for: %s\n" % event.getItem() - log += "Error:Was Runtime: %d\n" % event.isRuntime() - status = 200 - # remember the failure for the -k case - h = open(event.data.getVar('TMPDIR')+"/tinder-status", 'w') - h.write("200") - - # now post the log - if len(log) == 0: - return - - # for now we will use the http post method as it is the only one - log_post_method = tinder_send_http - log_post_method(event.data, status, log) - - -# we want to be an event handler -addhandler tinderclient_eventhandler -python tinderclient_eventhandler() { - if e.data is None or bb.event.getName(e) == "MsgNote": - return - - do_tinder_report = e.data.getVar('TINDER_REPORT') - if do_tinder_report and do_tinder_report == "1": - tinder_do_tinder_report(e) - - return -} diff --git a/poky/meta/classes/uninative.bbclass b/poky/meta/classes/uninative.bbclass index 3326c0db3..9f8645a36 100644 --- a/poky/meta/classes/uninative.bbclass +++ b/poky/meta/classes/uninative.bbclass @@ -45,7 +45,7 @@ python uninative_event_fetchloader() { tarballdir = os.path.join(d.getVar("UNINATIVE_DLDIR"), chksum) tarballpath = os.path.join(tarballdir, tarball) - if not os.path.exists(tarballpath): + if not os.path.exists(tarballpath + ".done"): bb.utils.mkdirhier(tarballdir) if d.getVar("UNINATIVE_URL") == "unset": bb.fatal("Uninative selected but not configured, please set UNINATIVE_URL") diff --git a/poky/meta/conf/distro/include/no-static-libs.inc b/poky/meta/conf/distro/include/no-static-libs.inc index 4141ecb76..a3a865cac 100644 --- a/poky/meta/conf/distro/include/no-static-libs.inc +++ b/poky/meta/conf/distro/include/no-static-libs.inc @@ -15,10 +15,6 @@ DISABLE_STATIC_pn-nativesdk-libcap = "" DISABLE_STATIC_pn-libpcap = "" # needed by gdb DISABLE_STATIC_pn-readline = "" -# needed by pseudo -DISABLE_STATIC_pn-sqlite3 = "" -DISABLE_STATIC_pn-sqlite3-native = "" -DISABLE_STATIC_pn-nativesdk-sqlite3 = "" # openjade/sgml-common have build issues without static libs DISABLE_STATIC_pn-sgml-common-native = "" DISABLE_STATIC_pn-openjade-native = "" diff --git a/poky/meta/conf/documentation.conf b/poky/meta/conf/documentation.conf index 550df20b0..fca36f3cf 100644 --- a/poky/meta/conf/documentation.conf +++ b/poky/meta/conf/documentation.conf @@ -113,7 +113,7 @@ COMPATIBLE_MACHINE[doc] = "A regular expression that resolves to one or more tar COMPLEMENTARY_GLOB[doc] = "Defines wildcards to match when installing a list of complementary packages for all the packages installed in an image." CONFFILES[doc] = "Identifies editable or configurable files that are part of a package." CONFIG_SITE[doc] = "A list of files that contains autoconf test results relevant to the current build. This variable is used by the Autotools utilities when running configure." -CONFLICT_DISTRO_FEATURES[doc] = "When a recipe inherits the distro_features_check class, this variable identifies distribution features that would be in conflict should the recipe be built." +CONFLICT_DISTRO_FEATURES[doc] = "When a recipe inherits the features_check class, this variable identifies distribution features that would be in conflict should the recipe be built." CORE_IMAGE_EXTRA_INSTALL[doc] = "Specifies the list of packages to be added to the image. You should only set this variable in the conf/local.conf file in the Build Directory." COREBASE[doc] = "Specifies the parent directory of the OpenEmbedded Core Metadata layer (i.e. meta)." CONF_VERSION[doc] = "Tracks the version of local.conf. Increased each time build/conf/ changes incompatibly." @@ -346,7 +346,7 @@ QMAKE_PROFILES[doc] = "Specifies your own subset of .pro files to be built for u RCONFLICTS[doc] = "The list of packages that conflict with another package. Note that the package will not be installed if the conflicting packages are not first removed." RDEPENDS[doc] = "Lists a package's runtime dependencies (i.e. other packages) that must be installed for the package to be built. They must be the names of other packages as listed in the PACKAGES variable, not recipe names (PN)." -REQUIRED_DISTRO_FEATURES[doc] = "When a recipe inherits the distro_features_check class, this variable identifies distribution features that must exist in the current configuration in order for the OpenEmbedded build system to build the recipe." +REQUIRED_DISTRO_FEATURES[doc] = "When a recipe inherits the features_check class, this variable identifies distribution features that must exist in the current configuration in order for the OpenEmbedded build system to build the recipe." RM_WORK_EXCLUDE[doc] = "With rm_work enabled, this variable specifies a list of packages whose work directories should not be removed." ROOTFS[doc] = "Indicates a filesystem image to include as the root filesystem." ROOTFS_POSTPROCESS_COMMAND[doc] = "Added by classes to run post processing commands once the OpenEmbedded build system has created the root filesystem." diff --git a/poky/meta/conf/machine/include/tune-cortexa32.inc b/poky/meta/conf/machine/include/tune-cortexa32.inc index 9c948f176..3ab1addd9 100644 --- a/poky/meta/conf/machine/include/tune-cortexa32.inc +++ b/poky/meta/conf/machine/include/tune-cortexa32.inc @@ -10,9 +10,9 @@ require conf/machine/include/arm/arch-armv8a.inc AVAILTUNES += "cortexa32 cortexa32-crypto" ARMPKGARCH_tune-cortexa32 = "cortexa32" ARMPKGARCH_tune-cortexa32-crypto = "cortexa32" -TUNE_FEATURES_tune-cortexa32 = "aarch64 cortexa32 crc" -TUNE_FEATURES_tune-cortexa32-crypto = "aarch64 cortexa32 crc crypto" +TUNE_FEATURES_tune-cortexa32 = "armv8a cortexa32 crc" +TUNE_FEATURES_tune-cortexa32-crypto = "armv8a cortexa32 crc crypto" PACKAGE_EXTRA_ARCHS_tune-cortexa32 = "${PACKAGE_EXTRA_ARCHS_tune-armv8a-crc} cortexa32" PACKAGE_EXTRA_ARCHS_tune-cortexa32-crypto = "${PACKAGE_EXTRA_ARCHS_tune-armv8a-crc-crypto} cortexa32 cortexa32-crypto" -BASE_LIB_tune-cortexa32 = "lib64" -BASE_LIB_tune-cortexa32-crypto = "lib64" +BASE_LIB_tune-cortexa32 = "lib" +BASE_LIB_tune-cortexa32-crypto = "lib" diff --git a/poky/meta/conf/machine/qemuriscv64.conf b/poky/meta/conf/machine/qemuriscv64.conf index 99b48b309..b45fdd556 100644 --- a/poky/meta/conf/machine/qemuriscv64.conf +++ b/poky/meta/conf/machine/qemuriscv64.conf @@ -5,5 +5,5 @@ require conf/machine/include/riscv/qemuriscv.inc EXTRA_IMAGEDEPENDS += "u-boot" -UBOOT_MACHINE = "qemu-riscv64_defconfig" +UBOOT_MACHINE = "qemu-riscv64_smode_defconfig" UBOOT_ELF = "u-boot" diff --git a/poky/meta/files/common-licenses/Intel b/poky/meta/files/common-licenses/Intel new file mode 100644 index 000000000..29ddf57a8 --- /dev/null +++ b/poky/meta/files/common-licenses/Intel @@ -0,0 +1,105 @@ +1. Copyright Notice + +Some or all of this work - Copyright (c) 1999 - 2017, Intel Corp. +All rights reserved. + +2. License + +2.1. This is your license from Intel Corp. under its intellectual property +rights. You may have additional license terms from the party that provided +you this software, covering your right to use that party's intellectual +property rights. + +2.2. Intel grants, free of charge, to any person ("Licensee") obtaining a +copy of the source code appearing in this file ("Covered Code") an +irrevocable, perpetual, worldwide license under Intel's copyrights in the +base code distributed originally by Intel ("Original Intel Code") to copy, +make derivatives, distribute, use and display any portion of the Covered +Code in any form, with the right to sublicense such rights; and + +2.3. Intel grants Licensee a non-exclusive and non-transferable patent +license (with the right to sublicense), under only those claims of Intel +patents that are infringed by the Original Intel Code, to make, use, sell, +offer to sell, and import the Covered Code and derivative works thereof +solely to the minimum extent necessary to exercise the above copyright +license, and in no event shall the patent license extend to any additions +to or modifications of the Original Intel Code. No other license or right +is granted directly or by implication, estoppel or otherwise; + +The above copyright and patent license is granted only if the following +conditions are met: + +3. Conditions + +3.1. Redistribution of Source with Rights to Further Distribute Source. +Redistribution of source code of any substantial portion of the Covered +Code or modification with rights to further distribute source must include +the above Copyright Notice, the above License, this list of Conditions, +and the following Disclaimer and Export Compliance provision. In addition, +Licensee must cause all Covered Code to which Licensee contributes to +contain a file documenting the changes Licensee made to create that Covered +Code and the date of any change. Licensee must include in that file the +documentation of any changes made by any predecessor Licensee. Licensee +must include a prominent statement that the modification is derived, +directly or indirectly, from Original Intel Code. + +3.2. Redistribution of Source with no Rights to Further Distribute Source. +Redistribution of source code of any substantial portion of the Covered +Code or modification without rights to further distribute source must +include the following Disclaimer and Export Compliance provision in the +documentation and/or other materials provided with distribution. In +addition, Licensee may not authorize further sublicense of source of any +portion of the Covered Code, and must include terms to the effect that the +license from Licensee to its licensee is limited to the intellectual +property embodied in the software Licensee provides to its licensee, and +not to intellectual property embodied in modifications its licensee may +make. + +3.3. Redistribution of Executable. Redistribution in executable form of any +substantial portion of the Covered Code or modification must reproduce the +above Copyright Notice, and the following Disclaimer and Export Compliance +provision in the documentation and/or other materials provided with the +distribution. + +3.4. Intel retains all right, title, and interest in and to the Original +Intel Code. + +3.5. Neither the name Intel nor any other trademark owned or controlled by +Intel shall be used in advertising or otherwise to promote the sale, use or +other dealings in products derived from or relating to the Covered Code +without prior written authorization from Intel. + +4. Disclaimer and Export Compliance + +4.1. INTEL MAKES NO WARRANTY OF ANY KIND REGARDING ANY SOFTWARE PROVIDED +HERE. ANY SOFTWARE ORIGINATING FROM INTEL OR DERIVED FROM INTEL SOFTWARE +IS PROVIDED "AS IS," AND INTEL WILL NOT PROVIDE ANY SUPPORT, ASSISTANCE, +INSTALLATION, TRAINING OR OTHER SERVICES. INTEL WILL NOT PROVIDE ANY +UPDATES, ENHANCEMENTS OR EXTENSIONS. INTEL SPECIFICALLY DISCLAIMS ANY +IMPLIED WARRANTIES OF MERCHANTABILITY, NONINFRINGEMENT AND FITNESS FOR A +PARTICULAR PURPOSE. + +4.2. IN NO EVENT SHALL INTEL HAVE ANY LIABILITY TO LICENSEE, ITS LICENSEES +OR ANY OTHER THIRD PARTY, FOR ANY LOST PROFITS, LOST DATA, LOSS OF USE OR +COSTS OF PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, OR FOR ANY INDIRECT, +SPECIAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THIS AGREEMENT, UNDER ANY +CAUSE OF ACTION OR THEORY OF LIABILITY, AND IRRESPECTIVE OF WHETHER INTEL +HAS ADVANCE NOTICE OF THE POSSIBILITY OF SUCH DAMAGES. THESE LIMITATIONS +SHALL APPLY NOTWITHSTANDING THE FAILURE OF THE ESSENTIAL PURPOSE OF ANY +LIMITED REMEDY. + +4.3. Licensee shall not export, either directly or indirectly, any of this +software or system incorporating such software without first obtaining any +required license or other approval from the U. S. Department of Commerce or +any other agency or department of the United States Government. In the +event Licensee exports any such software from the United States or +re-exports any such software from a foreign destination, Licensee shall +ensure that the distribution and export/re-export of the software is in +compliance with all laws, regulations, orders, or other restrictions of the +U.S. Export Administration Regulations. Licensee agrees that neither it nor +any of its subsidiaries will export/re-export any technical data, process, +software, or service, directly or indirectly, to any country for which the +United States government or any agency thereof requires an export license, +other governmental approval, or letter of assurance, without first obtaining +such license, approval or letter. + diff --git a/poky/meta/lib/oe/buildhistory_analysis.py b/poky/meta/lib/oe/buildhistory_analysis.py index 708e1b388..5b28774c9 100644 --- a/poky/meta/lib/oe/buildhistory_analysis.py +++ b/poky/meta/lib/oe/buildhistory_analysis.py @@ -413,7 +413,7 @@ def compare_dict_blobs(path, ablob, bblob, report_all, report_ver): if abs(percentchg) < monitor_numeric_threshold: continue elif (not report_all) and key in list_fields: - if key == "FILELIST" and path.endswith("-dbg") and bstr.strip() != '': + if key == "FILELIST" and (path.endswith("-dbg") or path.endswith("-src")) and bstr.strip() != '': continue if key in ['RPROVIDES', 'RDEPENDS', 'RRECOMMENDS', 'RSUGGESTS', 'RREPLACES', 'RCONFLICTS']: (depvera, depverb) = compare_pkg_lists(astr, bstr) diff --git a/poky/meta/lib/oe/package_manager.py b/poky/meta/lib/oe/package_manager.py index 7c373715a..4ff19cf09 100644 --- a/poky/meta/lib/oe/package_manager.py +++ b/poky/meta/lib/oe/package_manager.py @@ -217,7 +217,7 @@ class OpkgIndexer(Indexer): if not os.path.exists(pkgs_file): open(pkgs_file, "w").close() - index_cmds.add('%s -r %s -p %s -m %s' % + index_cmds.add('%s --checksum md5 --checksum sha256 -r %s -p %s -m %s' % (opkg_index_cmd, pkgs_file, pkgs_file, pkgs_dir)) index_sign_files.add(pkgs_file) @@ -298,7 +298,7 @@ class DpkgIndexer(Indexer): release.write("Label: %s\n" % arch) cmd += "PSEUDO_UNLOAD=1 %s release . >> Release" % apt_ftparchive - + index_cmds.append(cmd) deb_dirs_found = True @@ -570,6 +570,8 @@ class PackageManager(object, metaclass=ABCMeta): for lang in split_linguas: globs += " *-locale-%s" % lang + for complementary_linguas in (self.d.getVar('IMAGE_LINGUAS_COMPLEMENTARY') or "").split(): + globs += (" " + complementary_linguas) % lang if globs is None: return @@ -655,7 +657,7 @@ def create_packages_dir(d, subrepo_dir, deploydir, taskname, filterbydependencie pn = d.getVar("PN") seendirs = set() multilibs = {} - + bb.utils.remove(subrepo_dir, recurse=True) bb.utils.mkdirhier(subrepo_dir) @@ -1006,8 +1008,8 @@ class RpmPM(PackageManager): def load_old_install_solution(self): if not os.path.exists(self.solution_manifest): return [] - - return open(self.solution_manifest, 'r').read().split() + with open(self.solution_manifest, 'r') as fd: + return fd.read().split() def _script_num_prefix(self, path): files = os.listdir(path) diff --git a/poky/meta/lib/oe/packagedata.py b/poky/meta/lib/oe/packagedata.py index cbde380b0..a82085a79 100644 --- a/poky/meta/lib/oe/packagedata.py +++ b/poky/meta/lib/oe/packagedata.py @@ -17,9 +17,8 @@ def read_pkgdatafile(fn): if os.access(fn, os.R_OK): import re - f = open(fn, 'r') - lines = f.readlines() - f.close() + with open(fn, 'r') as f: + lines = f.readlines() r = re.compile("([^:]+):\s*(.*)") for l in lines: m = r.match(l) diff --git a/poky/meta/lib/oe/types.py b/poky/meta/lib/oe/types.py index 77ee7ee54..bbbabafbf 100644 --- a/poky/meta/lib/oe/types.py +++ b/poky/meta/lib/oe/types.py @@ -154,7 +154,8 @@ def path(value, relativeto='', normalize='true', mustexist='false'): if boolean(mustexist): try: - open(value, 'r') + with open(value, 'r'): + pass except IOError as exc: if exc.errno == errno.ENOENT: raise ValueError("{0}: {1}".format(value, os.strerror(errno.ENOENT))) @@ -183,4 +184,3 @@ def qemu_use_kvm(kvm, target_arch): elif build_arch == target_arch: use_kvm = True return use_kvm - diff --git a/poky/meta/lib/oeqa/core/decorator/data.py b/poky/meta/lib/oeqa/core/decorator/data.py index babc9789d..bc4939e87 100644 --- a/poky/meta/lib/oeqa/core/decorator/data.py +++ b/poky/meta/lib/oeqa/core/decorator/data.py @@ -18,6 +18,26 @@ def has_feature(td, feature): return True return False +def has_machine(td, machine): + """ + Checks for MACHINE. + """ + + if (machine in td.get('MACHINE', '')): + return True + return False + +def is_qemu(td, qemu): + """ + Checks if MACHINE is qemu. + """ + + machine = td.get('MACHINE', '') + if (qemu in td.get('MACHINE', '') or + machine.startswith('qemu')): + return True + return False + @registerDecorator class skipIfDataVar(OETestDecorator): """ @@ -113,3 +133,90 @@ class skipIfNotFeature(OETestDecorator): self.logger.debug(msg) if not has_feature(self.case.td, self.value): self.case.skipTest(self.msg) + +@registerDecorator +class skipIfFeature(OETestDecorator): + """ + Skip test based on DISTRO_FEATURES. + + value must not be in distro features or it will skip the test + with msg as the reason. + """ + + attrs = ('value', 'msg') + + def setUpDecorator(self): + msg = ('Checking if %s is not in DISTRO_FEATURES ' + 'or IMAGE_FEATURES' % (self.value)) + self.logger.debug(msg) + if has_feature(self.case.td, self.value): + self.case.skipTest(self.msg) + +@registerDecorator +class skipIfNotMachine(OETestDecorator): + """ + Skip test based on MACHINE. + + value must be match MACHINE or it will skip the test + with msg as the reason. + """ + + attrs = ('value', 'msg') + + def setUpDecorator(self): + msg = ('Checking if %s is not this MACHINE' % self.value) + self.logger.debug(msg) + if not has_machine(self.case.td, self.value): + self.case.skipTest(self.msg) + +@registerDecorator +class skipIfMachine(OETestDecorator): + """ + Skip test based on Machine. + + value must not be this machine or it will skip the test + with msg as the reason. + """ + + attrs = ('value', 'msg') + + def setUpDecorator(self): + msg = ('Checking if %s is this MACHINE' % self.value) + self.logger.debug(msg) + if has_machine(self.case.td, self.value): + self.case.skipTest(self.msg) + +@registerDecorator +class skipIfNotQemu(OETestDecorator): + """ + Skip test based on MACHINE. + + value must be a qemu MACHINE or it will skip the test + with msg as the reason. + """ + + attrs = ('value', 'msg') + + def setUpDecorator(self): + msg = ('Checking if %s is not this MACHINE' % self.value) + self.logger.debug(msg) + if not is_qemu(self.case.td, self.value): + self.case.skipTest(self.msg) + +@registerDecorator +class skipIfQemu(OETestDecorator): + """ + Skip test based on Qemu Machine. + + value must not be a qemu machine or it will skip the test + with msg as the reason. + """ + + attrs = ('value', 'msg') + + def setUpDecorator(self): + msg = ('Checking if %s is this MACHINE' % self.value) + self.logger.debug(msg) + if is_qemu(self.case.td, self.value): + self.case.skipTest(self.msg) + diff --git a/poky/meta/lib/oeqa/manual/bsp-hw.json b/poky/meta/lib/oeqa/manual/bsp-hw.json index 18cec222f..5c5b9b50b 100644 --- a/poky/meta/lib/oeqa/manual/bsp-hw.json +++ b/poky/meta/lib/oeqa/manual/bsp-hw.json @@ -1,32 +1,6 @@ [ { "test": { - "@alias": "bsps-hw.bsps-hw.rpm_-__install_dependency_package", - "author": [ - { - "email": "alexandru.c.georgescu@intel.com", - "name": "alexandru.c.georgescu@intel.com" - } - ], - "execution": { - "1": { - "action": "Get a not previously installed RPM package or build one on local machine, which should have run-time dependency.For example, \"mc\" (Midnight Commander, which is a visual file manager) should depend on \"ncurses-terminfo\". \n\n$ bitbake mc \n\n\n", - "expected_results": "" - }, - "2": { - "action": "Copy the package into a system folder (for example /home/root/rpm_packages). \n\n\n", - "expected_results": "" - }, - "3": { - "action": "Run \"rpm -ivh package_name\" and check the output, for example \"rpm -ivh mc.rpm*\" should report the dependency on \"ncurses-terminfo\".\n\n\n\n", - "expected_results": "3 . rpm command should report message when some RPM installation depends on other packages." - } - }, - "summary": "rpm_-__install_dependency_package" - } - }, - { - "test": { "@alias": "bsps-hw.bsps-hw.boot_and_install_from_USB", "author": [ { @@ -173,28 +147,6 @@ }, { "test": { - "@alias": "bsps-hw.bsps-hw.reboot_system", - "author": [ - { - "email": "alexandru.c.georgescu@intel.com", - "name": "alexandru.c.georgescu@intel.com" - } - ], - "execution": { - "1": { - "action": "boot system", - "expected_results": "" - }, - "2": { - "action": "launch terminal and run \"reboot\"", - "expected_results": "System can reboot successfully . " - } - }, - "summary": "reboot_system" - } - }, - { - "test": { "@alias": "bsps-hw.bsps-hw.switch_among_multi_applications_and_desktop", "author": [ { @@ -225,114 +177,6 @@ }, { "test": { - "@alias": "bsps-hw.bsps-hw.USB_-_mount", - "author": [ - { - "email": "alexandru.c.georgescu@intel.com", - "name": "alexandru.c.georgescu@intel.com" - } - ], - "execution": { - "1": { - "action": "Boot system \n\n", - "expected_results": "" - }, - "2": { - "action": "Plug USB stick, it should be mount in /run/media/sd(x) If X-window system does not start and show USB device, then use the terminal to mount it, following the next steps: \na. Locate the usb stick (usually it is on /dev/sdb) \nb. Create a directory with \"mkdir stick\" (so you will have such a path as: /home/root/stick). \nc. Run the command \"mount /dev/sdb /home/root/stick\" to mount USB device on it. \n\n", - "expected_results": "USB device should be mounted in /run/media/sd(x) \nor in /home/root/stick \n\n" - }, - "3": { - "action": "Then you can access USB stick (/home/root/stick) via Terminal or GUI and try various commands and actions like \"cp\", \"mv\", \"touch\" and \"rm\". Type \"dmesg\" command and check for recent mounted devices.", - "expected_results": "Basic commands work properly. The system sends a notification in \"dmesg\" command, showing that the USB stick is accessible and the device is mounted ." - } - }, - "summary": "USB_-_mount" - } - }, - { - "test": { - "@alias": "bsps-hw.bsps-hw.USB_-_read_files", - "author": [ - { - "email": "alexandru.c.georgescu@intel.com", - "name": "alexandru.c.georgescu@intel.com" - } - ], - "execution": { - "1": { - "action": "boot system", - "expected_results": "view/copy successfully" - }, - "2": { - "action": "plug usb stick", - "expected_results": "" - }, - "3": { - "action": "view files in usb by file browser", - "expected_results": "" - }, - "4": { - "action": "copy some files from usb to local hardware", - "expected_results": "" - } - }, - "summary": "USB_-_read_files" - } - }, - { - "test": { - "@alias": "bsps-hw.bsps-hw.USB_-_umount", - "author": [ - { - "email": "alexandru.c.georgescu@intel.com", - "name": "alexandru.c.georgescu@intel.com" - } - ], - "execution": { - "1": { - "action": "boot system", - "expected_results": "usb directory in file browser automatically missed" - }, - "2": { - "action": "plug usb stick", - "expected_results": "" - }, - "3": { - "action": "view files in usb by file browser \n4.unplug usb", - "expected_results": "" - } - }, - "summary": "USB_-_umount" - } - }, - { - "test": { - "@alias": "bsps-hw.bsps-hw.USB_-_write_files", - "author": [ - { - "email": "alexandru.c.georgescu@intel.com", - "name": "alexandru.c.georgescu@intel.com" - } - ], - "execution": { - "1": { - "action": "boot system", - "expected_results": "create/copy successfully" - }, - "2": { - "action": "plug usb stick", - "expected_results": "" - }, - "3": { - "action": "create files in usb \n4.copy some files from local hardware to usb", - "expected_results": "" - } - }, - "summary": "USB_-_write_files" - } - }, - { - "test": { "@alias": "bsps-hw.bsps-hw.ethernet_static_ip_set_in_connman", "author": [ { @@ -613,136 +457,6 @@ }, { "test": { - "@alias": "bsps-hw.bsps-hw.check_bash_in_image", - "author": [ - { - "email": "alexandru.c.georgescu@intel.com", - "name": "alexandru.c.georgescu@intel.com" - } - ], - "execution": { - "1": { - "action": "After system is up, check if bash command exists with command \"which bash\"", - "expected_results": "bash command should exist in image giving something as below \"/bin/bash\"" - } - }, - "summary": "check_bash_in_image" - } - }, - { - "test": { - "@alias": "bsps-hw.bsps-hw.MicroSD_-__mount", - "author": [ - { - "email": "alexandru.c.georgescu@intel.com", - "name": "alexandru.c.georgescu@intel.com" - } - ], - "execution": { - "1": { - "action": "boot system", - "expected_results": "system notify that MicroSDis accessible" - }, - "2": { - "action": "plug MicroSD card", - "expected_results": "" - } - }, - "summary": "MicroSD_-__mount" - } - }, - { - "test": { - "@alias": "bsps-hw.bsps-hw.MicroSD_-__read_files", - "author": [ - { - "email": "alexandru.c.georgescu@intel.com", - "name": "alexandru.c.georgescu@intel.com" - } - ], - "execution": { - "1": { - "action": "boot system", - "expected_results": "view/copy successfully" - }, - "2": { - "action": "plug MicroSD card", - "expected_results": "" - }, - "3": { - "action": "view files inMicroSD by file browser", - "expected_results": "" - }, - "4": { - "action": "copy some files fromMicroSD to local hardware", - "expected_results": "" - } - }, - "summary": "MicroSD_-__read_files" - } - }, - { - "test": { - "@alias": "bsps-hw.bsps-hw.MicroSD_-__umount", - "author": [ - { - "email": "alexandru.c.georgescu@intel.com", - "name": "alexandru.c.georgescu@intel.com" - } - ], - "execution": { - "1": { - "action": "boot system", - "expected_results": "MicroSD in file browser automatically missed . " - }, - "2": { - "action": "plug MicroSD card", - "expected_results": "" - }, - "3": { - "action": "view files in MicroSDby file browser", - "expected_results": "" - }, - "4": { - "action": "unplug MicroSD", - "expected_results": "" - } - }, - "summary": "MicroSD_-__umount" - } - }, - { - "test": { - "@alias": "bsps-hw.bsps-hw.MicroSD_-__write_files", - "author": [ - { - "email": "alexandru.c.georgescu@intel.com", - "name": "alexandru.c.georgescu@intel.com" - } - ], - "execution": { - "1": { - "action": "boot system", - "expected_results": "create/copy successfully" - }, - "2": { - "action": "plug MicroSD card", - "expected_results": "" - }, - "3": { - "action": "create files in MicroSD", - "expected_results": "" - }, - "4": { - "action": "copy some files from local hardware to MicroSD", - "expected_results": "" - } - }, - "summary": "MicroSD_-__write_files" - } - }, - { - "test": { "@alias": "bsps-hw.bsps-hw.video_-_libva_check_(ogg_video_play)", "author": [ { @@ -1283,4 +997,4 @@ "summary": "Boot_from_JFFS2_image" } } -]
\ No newline at end of file +] diff --git a/poky/meta/lib/oeqa/manual/bsp-qemu.json b/poky/meta/lib/oeqa/manual/bsp-qemu.json deleted file mode 100644 index cf51b6ab1..000000000 --- a/poky/meta/lib/oeqa/manual/bsp-qemu.json +++ /dev/null @@ -1,222 +0,0 @@ -[ - { - "test": { - "@alias": "bsps-qemu.bsps-tools.qemu_can_be_started_with_KVM_enabled", - "author": [ - { - "email": "alexandru.c.georgescu@intel.com", - "name": "alexandru.c.georgescu@intel.com" - } - ], - "execution": { - "1": { - "action": "Build a kernel with KVM enabled \n\nIn Local.conf add \n\nQEMU_USE_KVM = \"${@ '1' if os.access('/dev/kvm', os.R_OK|os.W_OK) else '0' }\" \n\n ", - "expected_results": "" - }, - "2": { - "action": "Start qemu with option \"kvm\" with runqemu \n a. If you start qemu with kvm failed, maybe it is because host not install kvm and vhost_net module. Follow below link to install them. \n b. vhost_test refer: https://wiki.yoctoproject.org/wiki/Running_an_x86_Yocto_Linux_image_under_QEMU_KVM \n c. kvm refer: https://wiki.yoctoproject.org/wiki/How_to_enable_KVM_for_Poky_qemu", - "expected_results": "" - }, - "3": { - "action": "Check if qemu starts up and if kvm_intel module is used", - "expected_results": "" - }, - "4": { - "action": "If kvm_intel module is not used when starting qemu, it will show 0 in \"Used by\" column when you run \"lsmod | grep kvm_intel\" ", - "expected_results": "KVM enabled with qemu \nExecute \"lsmod | grep kvm_intel\" from your host twice, before and after you \nstart the qemu with kvm option. Before start, the number should be 0, \nafter start, the number should bigger than 0." - } - }, - "summary": "qemu_can_be_started_with_KVM_enabled" - } - }, - { - "test": { - "@alias": "bsps-qemu.bsps-tools.Post-installation_logging", - "author": [ - { - "email": "yi.zhao@windriver.com", - "name": "yi.zhao@windriver.com" - } - ], - "execution": { - "1": { - "action": "Download the poky source and set environment \n", - "expected_results": "The /var/log/postinstall.log should exist in the first boot. The content of this log is like below: \n\nRunning postinst /etc/rpm-postinsts/man... \nList directory to check the output log \nbin \nboot \ndev \netc \nhome \nlib \nlost+found \nmedia \nmnt \nproc \nrun \nsbin \nsys \ntmp \nusr \nvar \nList nonexist directory to check the stderr redirection log \nls: /nonexist: No such file or directory " - }, - "2": { - "action": "Add the following lines to a .bb file. For expample, meta/recipes-connectivity/openssh/openssh_6.2p2.bb: \n\npkg_postinst_ontarget_${PN} () { \n #!/bin/sh -e \n if [ x\"$D\" = \"x\" ]; then \n echo \"List directory to check the output log\" \n ls / \n echo \"List nonexist directory to check the stderr redirection log\" \n ls /nonexist \n else \n exit 1 \n fi \n} \n\nMake sure the feature \"debug-tweaks\" is added in conf/local.conf \n", - "expected_results": "" - }, - "3": { - "action": "Add ssh-server-openssh to EXTRA_IMAGE_FEATURES in local.conf \n", - "expected_results": "" - }, - "4": { - "action": "Build core-image-minimal \n", - "expected_results": "" - }, - "5": { - "action": "Boot up the image and check the /var/log/postinstall.log ", - "expected_results": "" - } - }, - "summary": "Post-installation_logging" - } - }, - { - "test": { - "@alias": "bsps-qemu.bsps-tools.Add_user_with_cleartext_type_password_during_filesystem_construction", - "author": [ - { - "email": "ke.zou@windriver.com", - "name": "ke.zou@windriver.com" - } - ], - "execution": { - "1": { - "action": "Download the poky source and set the environment \n\n", - "expected_results": "No error during image building procedure. \n" - }, - "2": { - "action": "Add the following lines in conf/local.conf \n\nINHERIT += \"extrausers\" \n\nEXTRA_USERS_PARAMS = \"\\ \nuseradd -s /bin/sh -P 'tester3' tester3;\\ \n\" \n\nThe above settings do the following things: \na. Add a user tester3 with cleartext password 'tester3' ", - "expected_results": "Image can boot up \n" - }, - "3": { - "action": "Build the image\n ", - "expected_results": "Login with user name \"tester3\" and password \"tester3\" " - } - }, - "summary": "Add_user_with_cleartext_type_password_during_filesystem_construction" - } - }, - { - "test": { - "@alias": "bsps-qemu.bsps-tools.rpm_-__install_dependency_package", - "author": [ - { - "email": "alexandru.c.georgescu@intel.com", - "name": "alexandru.c.georgescu@intel.com" - } - ], - "execution": { - "1": { - "action": "Get a not previously installed RPM package or build one on local machine, which should have run-time dependency.For example, \"mc\" (Midnight Commander, which is a visual file manager) should depend on \"ncurses-terminfo\". \n\n$ bitbake mc \n\n\n", - "expected_results": "" - }, - "2": { - "action": "Copy the package into a system folder (for example /home/root/rpm_packages). \n\n\n", - "expected_results": "" - }, - "3": { - "action": "Run \"rpm -ivh package_name\" and check the output, for example \"rpm -ivh mc.rpm*\" should report the dependency on \"ncurses-terminfo\".\n\n\n\n", - "expected_results": "3 . rpm command should report message when some RPM installation depends on other packages." - } - }, - "summary": "rpm_-__install_dependency_package" - } - }, - { - "test": { - "@alias": "bsps-qemu.bsps-tools.Check_rpm_install/removal_log_file_size(auto)", - "author": [ - { - "email": "alexandru.c.georgescu@intel.com", - "name": "alexandru.c.georgescu@intel.com" - } - ], - "execution": { - "1": { - "action": "Get some rpm or other kind of installation packages. \n\n", - "expected_results": "Steps 1- 4 (more than 2.3) \nEach file will occupy around 10MB, and there should be some method to keep rpm log in a small size. (the size of the db of RPMs must not be taking so much space) \nStep 5 (less than or equal to 2.3)\nThe size on /var/lib/rpm/ must keep around 30MB" - }, - "2": { - "action": "After system is up, check the size of log file named as \"log.xxxxxx\" on /var/lib/rpm/log \n\n", - "expected_results": "" - }, - "3": { - "action": "After several install/removal of packages, with either of the install/removal commands (rpm/smart/zypper/dnf install/removal), check again the size of log file. \n\n", - "expected_results": "" - }, - "4": { - "action": "For packages installation, there will be some database files under /var/lib/rpm/, named as \"__db.xxx\" and there will be some log files \nunder /var/lib/rpm/log, named as \"\"log.xxxxxx\"\". \n\nNote: You will only see the log.xxxx on /var/lib/rpm/log mentioned above if the poky version is minor than 2.3.For poky 2.3 or major versions this has been modified and the package RPM4 does not show the logs.xxxx. if major, follow the next step. \n\n", - "expected_results": "" - }, - "5": { - "action": "Repeat steps (1 and 3) and check the size of /var/lib/rpm/ \n\nMore info: https://bugzilla.yoctoproject.org/show_bug.cgi?id=9259", - "expected_results": "" - } - }, - "summary": "Check_rpm_install/removal_log_file_size" - } - }, - { - "test": { - "@alias": "bsps-qemu.bsps-runtime.only_one_connmand_in_background(auto)", - "author": [ - { - "email": "alexandru.c.georgescu@intel.com", - "name": "alexandru.c.georgescu@intel.com" - } - ], - "execution": { - "1": { - "action": "Boot system", - "expected_results": "" - }, - "2": { - "action": "Run \"ps aux |grep connmand\" or \"ps -ef | grep connmand\" or \"ps | grep connmand\"", - "expected_results": "Connmand (connection manager, used to manage internet connections) should be shown as an active process \n\n" - }, - "3": { - "action": "Run command \"connmand\" to try to launch to a second connmand process", - "expected_results": "" - }, - "4": { - "action": "Check, with \"ps\" connmand if a second connmand can be generated ", - "expected_results": "There should be only one connmand process instance in background ." - } - }, - "summary": "only_one_connmand_in_background" - } - }, - { - "test": { - "@alias": "bsps-qemu.bsps-runtime.X_server_can_start_up_with_runlevel_5_boot", - "author": [ - { - "email": "alexandru.c.georgescu@intel.com", - "name": "alexandru.c.georgescu@intel.com" - } - ], - "execution": { - "1": { - "action": "boot up system with default runlevel \n\n", - "expected_results": "X server can start up well and desktop display has no problem . \n\n" - }, - "2": { - "action": "type runlevel at command prompt", - "expected_results": "Output:N 5" - } - }, - "summary": "X_server_can_start_up_with_runlevel_5_boot" - } - }, - { - "test": { - "@alias": "bsps-qemu.bsps-runtime.check_bash_in_image", - "author": [ - { - "email": "alexandru.c.georgescu@intel.com", - "name": "alexandru.c.georgescu@intel.com" - } - ], - "execution": { - "1": { - "action": "After system is up, check if bash command exists with command \"which bash\"", - "expected_results": "bash command should exist in image giving something as below \"/bin/bash\"" - } - }, - "summary": "check_bash_in_image" - } - } -] diff --git a/poky/meta/lib/oeqa/manual/compliance-test.json b/poky/meta/lib/oeqa/manual/compliance-test.json deleted file mode 100644 index 367a416f0..000000000 --- a/poky/meta/lib/oeqa/manual/compliance-test.json +++ /dev/null @@ -1,76 +0,0 @@ -[ - { - "test": { - "@alias": "compliance-test.compliance-test.stress_test_-_Genericx86-64", - "author": [ - { - "email": "corneliux.stoicescu@intel.com", - "name": "corneliux.stoicescu@intel.com" - } - ], - "execution": { - "1": { - "action": "Bootup with core-image-sato-sdk image", - "expected_results": "" - }, - "2": { - "action": "Execute the crashme test with below command \n\n./opt/ltp/runltp f crashme", - "expected_results": "The stress testing should not make the target crash. Check CPU usage and basic functionality of the system after the tests are over. " - } - }, - "summary": "stress_test_-_Genericx86-64" - } - }, - { - "test": { - "@alias": "compliance-test.compliance-test.stress_test_-_- crashme_-_-Beaglebone", - "author": [ - { - "email": "corneliux.stoicescu@intel.com", - "name": "corneliux.stoicescu@intel.com" - } - ], - "execution": { - "1": { - "action": " Get crashme from http://people.delphiforums.com/gjc/crashme.html", - "expected_results": "" - }, - "2": { - "action": "Follow the setup steps on above URL, build crashme in target", - "expected_results": "" - }, - "3": { - "action": " Run crashme for 24 hours", - "expected_results": "Target should not crash with the program." - } - }, - "summary": "stress_test_-_crashme_-Beaglebone" - } - }, - { - "test": { - "@alias": "compliance-test.compliance-test.stress_test_-_ltp_-Beaglebone", - "author": [ - { - "email": "corneliux.stoicescu@intel.com", - "name": "corneliux.stoicescu@intel.com" - } - ], - "execution": { - "1": { - "action": "Build LTP with toolchain or in sdk image", - "expected_results": "" - }, - "2": { - "action": "Copy LTP folder into target, for example, /opt/ltp. Modify script, testscripts/ltpstress.sh, set Iostat=1, NO_NETWORK=1", - "expected_results": "" - }, - "3": { - "action": "cd testscripts/ && ./ltpstress.sh", - "expected_results": "This stress case will run for 24 hours Check the result\ntarget should not crash with the program " - } - }, - "summary": "stress_test_-_-ltp_-Beaglebone" - } - } -] diff --git a/poky/meta/lib/oeqa/manual/oe-core.json b/poky/meta/lib/oeqa/manual/oe-core.json index 3ee0aa95f..fb47c5ec3 100644 --- a/poky/meta/lib/oeqa/manual/oe-core.json +++ b/poky/meta/lib/oeqa/manual/oe-core.json @@ -1,82 +1,6 @@ [ { "test": { - "@alias": "oe-core.scripts.Crosstap_script_check", - "author": [ - { - "email": "alexandru.c.georgescu@intel.com", - "name": "alexandru.c.georgescu@intel.com" - } - ], - "execution": { - "1": { - "action": "Create the trace_open.stp script as follows in the host machine: \n\n\nprobe syscall.open \n\n{ \n\n\n printf (\"%s(%d) open (%s)\\n\", execname(), pid(), argstr) \n\n} \n\n\n\nif the above failed, then create the below instead. \n\nprobe syscall.open \n{ \n printf (\"%s(%d) open\\n\", execname(), pid()) \n\n} \n \n", - "expected_results": "" - }, - "2": { - "action": "Add 'tools-profile' and 'ssh-server-openssh' to EXTRA_IMAGE_FEATURES in local.conf \n\n\n", - "expected_results": "" - }, - "3": { - "action": "Build a core-image-minimal image, build systemtap-native. Start the image under qemu. \n\n", - "expected_results": "" - }, - "4": { - "action": "Make sure that the ssh service is started on the Qemu machine. \n\n", - "expected_results": "" - }, - "5": { - "action": "From the host machine poky build_dir, run \"crosstap root@192.168.7.2 trace_open.stp\".", - "expected_results": "" - }, - "6": { - "action": "In QEMU, try to open some applications, such as open a terminal, input some command, \n\n", - "expected_results": "" - }, - "7": { - "action": "Check the host machine, \"crosstap\" has related output. \n\n\n\nNOTE: Do not build the kernel from shared state(sstate-cache) for this to work.", - "expected_results": "The script should successfully connect to the qemu machine and there \nshould be presented a list of services(pid, process name) which run on \nthe qemu machine. " - } - }, - "summary": "Crosstap_script_check" - } - }, - { - "test": { - "@alias": "oe-core.scripts.List_all_the_PACKAGECONFIG's_flags", - "author": [ - { - "email": "yi.zhao@windriver.com", - "name": "yi.zhao@windriver.com" - } - ], - "execution": { - "1": { - "action": " Download the poky source and setup the environment. ", - "expected_results": "" - }, - "2": { - "action": "Run \"../scripts/contrib/list-packageconfig-flags.py\" ", - "expected_results": "In step 2, will list available pkgs which have PACKAGECONFIG flags: \nPACKAGE NAME (or RECIPE NAME) PACKAGECONFIG FLAGS \n============================================================== \nalsa-tools-1.0.26.1 defaultval gtk+ \navahi-ui-0.6.31 defaultval python \nbluez4-4.101 alsa defaultval pie \n" - }, - "3": { - "action": "Run \"../scripts/contrib/list-packageconfig-flags.py -f\" ", - "expected_results": "In step 3, will list available PACKAGECONFIG flags and all affected pkgs \nPACKAGECONFIG FLAG PACKAGE NAMES (or RECIPE NAMES) \n==================================== \n3g connman-1.16 \n \navahi cups-1.6.3 pulseaudio-4.0 \nbeecrypt rpm-5.4.9 rpm-native-5.4.9 \n" - }, - "4": { - "action": "Run \"../scripts/contrib/list-packageconfig-flags.py -a\" ", - "expected_results": "In step 4, will list all pkgs and PACKAGECONFIG information: \n================================================== \ngtk+-2.24.18 \n/home/jiahongxu/yocto/poky/meta/recipes-gnome/gtk+/gtk+_2.24.18.bb \nPACKAGECONFIG x11 \nPACKAGECONFIG[x11] --with-x=yes --with-gdktarget=x11,--with-x=no,${X11DEPENDS} \nxf86-video-intel-2.21.9 \n/home/jiahongxu/yocto/poky/meta/recipes-graphics/xorg-driver/xf86-video-intel_2.21.9.bb \nPACKAGECONFIG None \nPACKAGECONFIG[xvmc] --enable-xvmc,--disable-xvmc,libxvmc \nPACKAGECONFIG[sna] --enable-sna,--disable-sna \n" - }, - "5": { - "action": "Run \"../scripts/contrib/list-packageconfig-flags.py -p\" ", - "expected_results": "In step 5, will list pkgs with preferred version: \nPACKAGE NAME (or RECIPE NAME) PACKAGECONFIG FLAGS \n=================================================== \nalsa-tools-1.0.26.1 defaultval gtk+ \navahi-ui-0.6.31 defaultval python \nbluez4-4.101 alsa defaultval pie \nbluez5-5.7 alsa defaultval obex-profiles \n\n\n\n " - } - }, - "summary": "List_all_the_PACKAGECONFIG's_flags" - } - }, - { - "test": { "@alias": "oe-core.bitbake.Test_bitbake_menuconfig", "author": [ { @@ -231,4 +155,4 @@ "summary": "test_bitbake_sane_error_for_invalid_layer" } } -]
\ No newline at end of file +] diff --git a/poky/meta/lib/oeqa/runtime/cases/boot.py b/poky/meta/lib/oeqa/runtime/cases/boot.py new file mode 100644 index 000000000..2142f400a --- /dev/null +++ b/poky/meta/lib/oeqa/runtime/cases/boot.py @@ -0,0 +1,33 @@ +# +# SPDX-License-Identifier: MIT +# + +from subprocess import Popen, PIPE +import time + +from oeqa.runtime.case import OERuntimeTestCase +from oeqa.core.decorator.depends import OETestDepends +from oeqa.core.decorator.oetimeout import OETimeout +from oeqa.core.decorator.data import skipIfQemu + +class BootTest(OERuntimeTestCase): + + @OETimeout(120) + @skipIfQemu('qemuall', 'Test only runs on real hardware') + @OETestDepends(['ssh.SSHTest.test_ssh']) + def test_reboot(self): + output = '' + count = 0 + (status, output) = self.target.run('reboot -h') + while count < 5: + time.sleep(5) + cmd = 'ping -c 1 %s' % self.target.ip + proc = Popen(cmd, shell=True, stdout=PIPE) + output += proc.communicate()[0].decode('utf-8') + if proc.poll() == 0: + count += 1 + else: + count = 0 + msg = ('Expected 5 consecutive, got %d.\n' + 'ping output is:\n%s' % (count,output)) + self.assertEqual(count, 5, msg = msg) diff --git a/poky/meta/lib/oeqa/runtime/cases/df.py b/poky/meta/lib/oeqa/runtime/cases/df.py index d8d79f32e..89fd0fb90 100644 --- a/poky/meta/lib/oeqa/runtime/cases/df.py +++ b/poky/meta/lib/oeqa/runtime/cases/df.py @@ -11,7 +11,7 @@ class DfTest(OERuntimeTestCase): @OETestDepends(['ssh.SSHTest.test_ssh']) @OEHasPackage(['coreutils', 'busybox']) def test_df(self): - cmd = "df / | sed -n '2p' | awk '{print $4}'" + cmd = "df -P / | sed -n '2p' | awk '{print $4}'" (status,output) = self.target.run(cmd) msg = 'Not enough space on image. Current size is %s' % output self.assertTrue(int(output)>5120, msg=msg) diff --git a/poky/meta/lib/oeqa/runtime/cases/ltp_stress.py b/poky/meta/lib/oeqa/runtime/cases/ltp_stress.py new file mode 100644 index 000000000..2445ffbc9 --- /dev/null +++ b/poky/meta/lib/oeqa/runtime/cases/ltp_stress.py @@ -0,0 +1,98 @@ +# LTP Stress runtime +# +# Copyright (c) 2019 MontaVista Software, LLC +# +# SPDX-License-Identifier: MIT +# + +import time +import datetime +import pprint + +from oeqa.runtime.case import OERuntimeTestCase +from oeqa.core.decorator.depends import OETestDepends +from oeqa.runtime.decorator.package import OEHasPackage +from oeqa.core.decorator.data import skipIfQemu +from oeqa.utils.logparser import LtpParser + +class LtpStressBase(OERuntimeTestCase): + + @classmethod + def setUpClass(cls): + cls.ltp_startup() + + @classmethod + def tearDownClass(cls): + cls.ltp_finishup() + + @classmethod + def ltp_startup(cls): + cls.sections = {} + cls.failmsg = "" + test_log_dir = os.path.join(cls.td.get('WORKDIR', ''), 'testimage') + timestamp = datetime.datetime.now().strftime('%Y%m%d%H%M%S') + + cls.ltptest_log_dir_link = os.path.join(test_log_dir, 'ltpstress_log') + cls.ltptest_log_dir = '%s.%s' % (cls.ltptest_log_dir_link, timestamp) + os.makedirs(cls.ltptest_log_dir) + + cls.tc.target.run("mkdir -p /opt/ltp/results") + + if not hasattr(cls.tc, "extraresults"): + cls.tc.extraresults = {} + cls.extras = cls.tc.extraresults + cls.extras['ltpstressresult.rawlogs'] = {'log': ""} + + + @classmethod + def ltp_finishup(cls): + cls.extras['ltpstressresult.sections'] = cls.sections + + # update symlink to ltp_log + if os.path.exists(cls.ltptest_log_dir_link): + os.remove(cls.ltptest_log_dir_link) + + os.symlink(os.path.basename(cls.ltptest_log_dir), cls.ltptest_log_dir_link) + + if cls.failmsg: + cls.fail(cls.failmsg) + +class LtpStressTest(LtpStressBase): + + def runltp(self, stress_group): + cmd = '/opt/ltp/runltp -f %s -p -q 2>@1 | tee /opt/ltp/results/%s' % (stress_group, stress_group) + starttime = time.time() + (status, output) = self.target.run(cmd) + endtime = time.time() + with open(os.path.join(self.ltptest_log_dir, "%s" % stress_group), 'w') as f: + f.write(output) + + self.extras['ltpstressresult.rawlogs']['log'] = self.extras['ltpstressresult.rawlogs']['log'] + output + + parser = LtpParser() + results, sections = parser.parse(os.path.join(self.ltptest_log_dir, "%s" % stress_group)) + + runtime = int(endtime-starttime) + sections['duration'] = runtime + self.sections[stress_group] = sections + + failed_tests = {} + for test in results: + result = results[test] + testname = ("ltpstressresult." + stress_group + "." + test) + self.extras[testname] = {'status': result} + if result == 'FAILED': + failed_tests[stress_group] = test + + if failed_tests: + self.failmsg = self.failmsg + "Failed ptests:\n%s" % pprint.pformat(failed_tests) + + # LTP stress runtime tests + # + @skipIfQemu('qemuall', 'Test only runs on real hardware') + + @OETestDepends(['ssh.SSHTest.test_ssh']) + @OEHasPackage(["ltp"]) + def test_ltp_stress(self): + self.tc.target.run("sed -i -r 's/^fork12.*//' /opt/ltp/runtest/crashme") + self.runltp('crashme') diff --git a/poky/meta/lib/oeqa/runtime/cases/opkg.py b/poky/meta/lib/oeqa/runtime/cases/opkg.py index bb8b6d99d..750706161 100644 --- a/poky/meta/lib/oeqa/runtime/cases/opkg.py +++ b/poky/meta/lib/oeqa/runtime/cases/opkg.py @@ -5,7 +5,7 @@ import os from oeqa.utils.httpserver import HTTPService from oeqa.runtime.case import OERuntimeTestCase -from oeqa.core.decorator.data import skipIfNotDataVar, skipIfNotFeature +from oeqa.core.decorator.data import skipIfNotDataVar, skipIfNotFeature, skipIfFeature from oeqa.runtime.decorator.package import OEHasPackage class OpkgTest(OERuntimeTestCase): @@ -45,6 +45,8 @@ class OpkgRepoTest(OpkgTest): 'Test requires package-management to be in IMAGE_FEATURES') @skipIfNotDataVar('IMAGE_PKGTYPE', 'ipk', 'IPK is not the primary package manager') + @skipIfFeature('read-only-rootfs', + 'Test does not work with read-only-rootfs in IMAGE_FEATURES') @OEHasPackage(['opkg']) def test_opkg_install_from_repo(self): self.setup_source_config_for_package_install() diff --git a/poky/meta/lib/oeqa/runtime/cases/storage.py b/poky/meta/lib/oeqa/runtime/cases/storage.py new file mode 100644 index 000000000..166d26b25 --- /dev/null +++ b/poky/meta/lib/oeqa/runtime/cases/storage.py @@ -0,0 +1,149 @@ +# +# SPDX-License-Identifier: MIT +# + +import re +import time + +from oeqa.runtime.case import OERuntimeTestCase +from oeqa.core.decorator.depends import OETestDepends +from oeqa.core.decorator.data import skipIfQemu + +class StorageBase(OERuntimeTestCase): + def storage_mount(cls, tmo=1): + + (status, output) = cls.target.run('mkdir -p %s' % cls.mount_point) + (status, output) = cls.target.run('mount %s %s' % (cls.device, cls.mount_point)) + msg = ('Mount failed: %s.' % status) + cls.assertFalse(output, msg = msg) + time.sleep(tmo) + (status, output) = cls.target.run('cat /proc/mounts') + match = re.search('%s' % cls.device, output) + if match: + msg = ('Device %s not mounted.' % cls.device) + cls.assertTrue(match, msg = msg) + + (status, output) = cls.target.run('mkdir -p %s' % cls.test_dir) + + (status, output) = cls.target.run('rm -f %s/*' % cls.test_dir) + msg = ('Failed to cleanup files @ %s/*' % cls.test_dir) + cls.assertFalse(output, msg = msg) + + + def storage_basic(cls): + # create file on device + (status, output) = cls.target.run('touch %s/%s' % (cls.test_dir, cls.test_file)) + msg = ('File %s not created on %s' % (cls.test_file, cls.device)) + cls.assertFalse(status, msg = msg) + # move file + (status, output) = cls.target.run('mv %s/%s %s/%s1' % + (cls.test_dir, cls.test_file, cls.test_dir, cls.test_file)) + msg = ('File %s not moved to %s' % (cls.test_file, cls.device)) + cls.assertFalse(status, msg = msg) + # remove file + (status, output) = cls.target.run('rm %s/%s1' % (cls.test_dir, cls.test_file)) + msg = ('File %s not removed on %s' % (cls.test_file, cls.device)) + cls.assertFalse(status, msg = msg) + + def storage_read(cls): + # check if message is in file + (status, output) = cls.target.run('cat %s/%s' % + (cls.test_dir, cls.test_file)) + + match = re.search('%s' % cls.test_msg, output) + msg = ('Test message %s not in file %s.' % (cls.test_msg, cls.test_file)) + cls.assertEqual(status, 0, msg = msg) + + def storage_write(cls): + # create test message in file on device + (status, output) = cls.target.run('echo "%s" > %s/%s' % + (cls.test_msg, cls.test_dir, cls.test_file)) + msg = ('File %s not create test message on %s' % (cls.test_file, cls.device)) + cls.assertEqual(status, 0, msg = msg) + + def storage_umount(cls, tmo=1): + time.sleep(tmo) + (status, output) = cls.target.run('umount %s' % cls.mount_point) + + if status == 32: + # already unmounted, should it fail? + return + else: + msg = ('Device not unmount %s' % cls.mount_point) + cls.assertEqual(status, 0, msg = msg) + + (status, output) = cls.target.run('cat /proc/mounts') + match = re.search('%s' % cls.device, output) + if match: + msg = ('Device %s still mounted.' % cls.device) + cls.assertTrue(match, msg = msg) + + +class UsbTest(StorageBase): + ''' + This is to mimic the usb test previously done in manual bsp-hw.json + ''' + @classmethod + def setUpClass(self): + self.test_msg = "Hello World - USB" + self.mount_point = "/media/usb" + self.device = "/dev/sda1" + self.test_file = "usb.tst" + self.test_dir = os.path.join(self.mount_point, "oeqa") + + @skipIfQemu('qemuall', 'Test only runs on real hardware') + @OETestDepends(['ssh.SSHTest.test_ssh']) + def test_usb_mount(self): + self.storage_umount(2) + self.storage_mount(5) + + @skipIfQemu('qemuall', 'Test only runs on real hardware') + @OETestDepends(['storage.UsbTest.test_usb_mount']) + def test_usb_basic_operations(self): + self.storage_basic() + + @skipIfQemu('qemuall', 'Test only runs on real hardware') + @OETestDepends(['storage.UsbTest.test_usb_basic_operations']) + def test_usb_basic_rw(self): + self.storage_write() + self.storage_read() + + @skipIfQemu('qemuall', 'Test only runs on real hardware') + @OETestDepends(['storage.UsbTest.test_usb_mount']) + def test_usb_umount(self): + self.storage_umount(2) + + +class MMCTest(StorageBase): + ''' + This is to mimic the usb test previously done in manual bsp-hw.json + ''' + @classmethod + def setUpClass(self): + self.test_msg = "Hello World - MMC" + self.mount_point = "/media/mmc" + self.device = "/dev/mmcblk1p1" + self.test_file = "mmc.tst" + self.test_dir = os.path.join(self.mount_point, "oeqa") + + @skipIfQemu('qemuall', 'Test only runs on real hardware') + @OETestDepends(['ssh.SSHTest.test_ssh']) + def test_mmc_mount(self): + self.storage_umount(2) + self.storage_mount() + + @skipIfQemu('qemuall', 'Test only runs on real hardware') + @OETestDepends(['storage.MMCTest.test_mmc_mount']) + def test_mmc_basic_operations(self): + self.storage_basic() + + @skipIfQemu('qemuall', 'Test only runs on real hardware') + @OETestDepends(['storage.MMCTest.test_mmc_basic_operations']) + def test_mmc_basic_rw(self): + self.storage_write() + self.storage_read() + + @skipIfQemu('qemuall', 'Test only runs on real hardware') + @OETestDepends(['storage.MMCTest.test_mmc_mount']) + def test_mmc_umount(self): + self.storage_umount(2) diff --git a/poky/meta/lib/oeqa/runtime/cases/systemd.py b/poky/meta/lib/oeqa/runtime/cases/systemd.py index c11fa49b0..7c44abe8e 100644 --- a/poky/meta/lib/oeqa/runtime/cases/systemd.py +++ b/poky/meta/lib/oeqa/runtime/cases/systemd.py @@ -9,7 +9,7 @@ from oeqa.runtime.case import OERuntimeTestCase from oeqa.core.decorator.depends import OETestDepends from oeqa.core.decorator.data import skipIfDataVar, skipIfNotDataVar from oeqa.runtime.decorator.package import OEHasPackage -from oeqa.core.decorator.data import skipIfNotFeature +from oeqa.core.decorator.data import skipIfNotFeature, skipIfFeature class SystemdTest(OERuntimeTestCase): @@ -114,12 +114,26 @@ class SystemdServiceTests(SystemdTest): self.systemctl('is-active', 'avahi-daemon.service', verbose=True) @OETestDepends(['systemd.SystemdServiceTests.test_systemd_status']) + @skipIfFeature('read-only-rootfs', + 'Test is only meant to run without read-only-rootfs in IMAGE_FEATURES') def test_systemd_disable_enable(self): self.systemctl('disable', 'avahi-daemon.service') self.systemctl('is-enabled', 'avahi-daemon.service', expected=1) self.systemctl('enable', 'avahi-daemon.service') self.systemctl('is-enabled', 'avahi-daemon.service') + @OETestDepends(['systemd.SystemdServiceTests.test_systemd_status']) + @skipIfNotFeature('read-only-rootfs', + 'Test is only meant to run with read-only-rootfs in IMAGE_FEATURES') + def test_systemd_disable_enable_ro(self): + status = self.target.run('mount -orw,remount /')[0] + self.assertTrue(status == 0, msg='Remounting / as r/w failed') + try: + self.test_systemd_disable_enable() + finally: + status = self.target.run('mount -oro,remount /')[0] + self.assertTrue(status == 0, msg='Remounting / as r/o failed') + class SystemdJournalTests(SystemdTest): @OETestDepends(['systemd.SystemdBasicTests.test_systemd_basic']) diff --git a/poky/meta/lib/oeqa/runtime/context.py b/poky/meta/lib/oeqa/runtime/context.py index 77d58eefa..ef738a335 100644 --- a/poky/meta/lib/oeqa/runtime/context.py +++ b/poky/meta/lib/oeqa/runtime/context.py @@ -138,7 +138,7 @@ class OERuntimeTestContextExecutor(OETestContextExecutor): def add_controller_list(path): if not os.path.exists(os.path.join(path, '__init__.py')): raise OSError('Controllers directory %s exists but is missing __init__.py' % path) - files = sorted([f for f in os.listdir(path) if f.endswith('.py') and not f.startswith('_')]) + files = sorted([f for f in os.listdir(path) if f.endswith('.py') and not f.startswith('_') and not f.startswith('.#')]) for f in files: module = 'oeqa.controllers.' + f[:-3] if module not in controllerslist: diff --git a/poky/meta/lib/oeqa/selftest/cases/bblayers.py b/poky/meta/lib/oeqa/selftest/cases/bblayers.py index 954488dfd..f131d9856 100644 --- a/poky/meta/lib/oeqa/selftest/cases/bblayers.py +++ b/poky/meta/lib/oeqa/selftest/cases/bblayers.py @@ -14,21 +14,21 @@ class BitbakeLayers(OESelftestTestCase): def test_bitbakelayers_showcrossdepends(self): result = runCmd('bitbake-layers show-cross-depends') - self.assertTrue('aspell' in result.output, msg = "No dependencies were shown. bitbake-layers show-cross-depends output: %s" % result.output) + self.assertIn('aspell', result.output) def test_bitbakelayers_showlayers(self): result = runCmd('bitbake-layers show-layers') - self.assertTrue('meta-selftest' in result.output, msg = "No layers were shown. bitbake-layers show-layers output: %s" % result.output) + self.assertIn('meta-selftest', result.output) def test_bitbakelayers_showappends(self): recipe = "xcursor-transparent-theme" bb_file = self.get_recipe_basename(recipe) result = runCmd('bitbake-layers show-appends') - self.assertTrue(bb_file in result.output, msg="%s file was not recognised. bitbake-layers show-appends output: %s" % (bb_file, result.output)) + self.assertIn(bb_file, result.output) def test_bitbakelayers_showoverlayed(self): result = runCmd('bitbake-layers show-overlayed') - self.assertTrue('aspell' in result.output, msg="aspell overlayed recipe was not recognised bitbake-layers show-overlayed %s" % result.output) + self.assertIn('aspell', result.output) def test_bitbakelayers_flatten(self): recipe = "xcursor-transparent-theme" diff --git a/poky/meta/lib/oeqa/selftest/cases/bbtests.py b/poky/meta/lib/oeqa/selftest/cases/bbtests.py index 9461c7ed1..dc423ec43 100644 --- a/poky/meta/lib/oeqa/selftest/cases/bbtests.py +++ b/poky/meta/lib/oeqa/selftest/cases/bbtests.py @@ -44,7 +44,7 @@ class BitbakeTests(OESelftestTestCase): find_build_completed = re.search(r"Tasks Summary:.*(\n.*)*NOTE: Test for bb\.event\.BuildCompleted", result.output) self.assertTrue(find_build_started, msg = "Match failed in:\n%s" % result.output) self.assertTrue(find_build_completed, msg = "Match failed in:\n%s" % result.output) - self.assertFalse('Test for bb.event.InvalidEvent' in result.output, msg = "\"Test for bb.event.InvalidEvent\" message found during bitbake process. bitbake output: %s" % result.output) + self.assertNotIn('Test for bb.event.InvalidEvent', result.output) def test_local_sstate(self): bitbake('m4-native') @@ -59,7 +59,7 @@ class BitbakeTests(OESelftestTestCase): def test_bitbake_invalid_target(self): result = bitbake('asdf', ignore_status=True) - self.assertTrue("ERROR: Nothing PROVIDES 'asdf'" in result.output, msg = "Though no 'asdf' target exists, bitbake didn't output any err. message. bitbake output: %s" % result.output) + self.assertIn("ERROR: Nothing PROVIDES 'asdf'", result.output) def test_warnings_errors(self): result = bitbake('-b asdf', ignore_status=True) @@ -123,7 +123,7 @@ class BitbakeTests(OESelftestTestCase): for f in ['pn-buildlist', 'task-depends.dot']: self.addCleanup(os.remove, f) self.assertTrue('Task dependencies saved to \'task-depends.dot\'' in result.output, msg = "No task dependency \"task-depends.dot\" file was generated for the given task target. bitbake output: %s" % result.output) - self.assertTrue(recipe in ftools.read_file(os.path.join(self.builddir, 'task-depends.dot')), msg = "No \"%s\" dependency found in task-depends.dot file." % recipe) + self.assertIn(recipe, ftools.read_file(os.path.join(self.builddir, 'task-depends.dot'))) def test_image_manifest(self): bitbake('core-image-minimal') @@ -147,8 +147,7 @@ INHERIT_remove = \"report-error\" bitbake('-ccleanall man-db') self.delete_recipeinc('man-db') self.assertEqual(result.status, 1, msg="Command succeded when it should have failed. bitbake output: %s" % result.output) - self.assertTrue('Fetcher failure: Unable to find file file://invalid anywhere. The paths that were searched were:' in result.output, msg = "\"invalid\" file \ -doesn't exist, yet no error message encountered. bitbake output: %s" % result.output) + self.assertIn('Fetcher failure: Unable to find file file://invalid anywhere. The paths that were searched were:', result.output) line = self.getline(result, 'Fetcher failure for URL: \'file://invalid\'. Unable to fetch URL from any source.') self.assertTrue(line and line.startswith("ERROR:"), msg = "\"invalid\" file \ doesn't exist, yet fetcher didn't report any error. bitbake output: %s" % result.output) @@ -173,7 +172,7 @@ SSTATE_DIR = \"${TOPDIR}/download-selftest\" def test_environment(self): self.write_config("TEST_ENV=\"localconf\"") result = runCmd('bitbake -e | grep TEST_ENV=') - self.assertTrue('localconf' in result.output, msg = "bitbake didn't report any value for TEST_ENV variable. To test, run 'bitbake -e | grep TEST_ENV='") + self.assertIn('localconf', result.output) def test_dry_run(self): result = runCmd('bitbake -n m4-native') @@ -193,10 +192,10 @@ SSTATE_DIR = \"${TOPDIR}/download-selftest\" self.track_for_cleanup(preconf) ftools.write_file(preconf ,"TEST_PREFILE=\"prefile\"") result = runCmd('bitbake -r conf/prefile.conf -e | grep TEST_PREFILE=') - self.assertTrue('prefile' in result.output, "Preconfigure file \"prefile.conf\"was not taken into consideration. ") + self.assertIn('prefile', result.output) self.write_config("TEST_PREFILE=\"localconf\"") result = runCmd('bitbake -r conf/prefile.conf -e | grep TEST_PREFILE=') - self.assertTrue('localconf' in result.output, "Preconfigure file \"prefile.conf\"was not taken into consideration.") + self.assertIn('localconf', result.output) def test_postfile(self): postconf = os.path.join(self.builddir, 'conf/postfile.conf') @@ -204,7 +203,7 @@ SSTATE_DIR = \"${TOPDIR}/download-selftest\" ftools.write_file(postconf , "TEST_POSTFILE=\"postfile\"") self.write_config("TEST_POSTFILE=\"localconf\"") result = runCmd('bitbake -R conf/postfile.conf -e | grep TEST_POSTFILE=') - self.assertTrue('postfile' in result.output, "Postconfigure file \"postfile.conf\"was not taken into consideration.") + self.assertIn('postfile', result.output) def test_checkuri(self): result = runCmd('bitbake -c checkuri m4') diff --git a/poky/meta/lib/oeqa/selftest/cases/buildoptions.py b/poky/meta/lib/oeqa/selftest/cases/buildoptions.py index 6a5378d3f..e91f0bd18 100644 --- a/poky/meta/lib/oeqa/selftest/cases/buildoptions.py +++ b/poky/meta/lib/oeqa/selftest/cases/buildoptions.py @@ -143,7 +143,7 @@ class BuildhistoryTests(BuildhistoryBase): def test_buildhistory_buildtime_pr_backwards(self): target = 'xcursor-transparent-theme' - error = "ERROR:.*QA Issue: Package version for package %s went backwards which would break package feeds from (.*-r1.* to .*-r0.*)" % target + error = "ERROR:.*QA Issue: Package version for package %s went backwards which would break package feeds \(from .*-r1.* to .*-r0.*\)" % target self.run_buildhistory_operation(target, target_config="PR = \"r1\"", change_bh_location=True) self.run_buildhistory_operation(target, target_config="PR = \"r0\"", change_bh_location=False, expect_error=True, error_regex=error) diff --git a/poky/meta/lib/oeqa/selftest/cases/devtool.py b/poky/meta/lib/oeqa/selftest/cases/devtool.py index 3a25da203..57e6662e4 100644 --- a/poky/meta/lib/oeqa/selftest/cases/devtool.py +++ b/poky/meta/lib/oeqa/selftest/cases/devtool.py @@ -137,6 +137,7 @@ class DevtoolBase(OESelftestTestCase): with open(recipefile, 'r') as f: invar = None invalue = None + inherits = set() for line in f: var = None if invar: @@ -158,7 +159,7 @@ class DevtoolBase(OESelftestTestCase): invar = var continue elif line.startswith('inherit '): - inherits = line.split()[1:] + inherits.update(line.split()[1:]) if var and var in checkvars: needvalue = checkvars.pop(var) @@ -1496,11 +1497,13 @@ class DevtoolUpgradeTests(DevtoolBase): recipedir = os.path.dirname(oldrecipefile) olddir = os.path.join(recipedir, recipe + '-' + oldversion) patchfn = '0001-Add-a-note-line-to-the-quick-reference.patch' + backportedpatchfn = 'backported.patch' self.assertExists(os.path.join(olddir, patchfn), 'Original patch file does not exist') - return recipe, oldrecipefile, recipedir, olddir, newversion, patchfn + self.assertExists(os.path.join(olddir, backportedpatchfn), 'Backported patch file does not exist') + return recipe, oldrecipefile, recipedir, olddir, newversion, patchfn, backportedpatchfn def test_devtool_finish_upgrade_origlayer(self): - recipe, oldrecipefile, recipedir, olddir, newversion, patchfn = self._setup_test_devtool_finish_upgrade() + recipe, oldrecipefile, recipedir, olddir, newversion, patchfn, backportedpatchfn = self._setup_test_devtool_finish_upgrade() # Ensure the recipe is where we think it should be (so that cleanup doesn't trash things) self.assertIn('/meta-selftest/', recipedir) # Try finish to the original layer @@ -1511,14 +1514,23 @@ class DevtoolUpgradeTests(DevtoolBase): self.assertNotExists(os.path.join(self.workspacedir, 'recipes', recipe), 'Recipe directory should not exist after finish') self.assertNotExists(oldrecipefile, 'Old recipe file should have been deleted but wasn\'t') self.assertNotExists(os.path.join(olddir, patchfn), 'Old patch file should have been deleted but wasn\'t') + self.assertNotExists(os.path.join(olddir, backportedpatchfn), 'Old backported patch file should have been deleted but wasn\'t') newrecipefile = os.path.join(recipedir, '%s_%s.bb' % (recipe, newversion)) newdir = os.path.join(recipedir, recipe + '-' + newversion) self.assertExists(newrecipefile, 'New recipe file should have been copied into existing layer but wasn\'t') self.assertExists(os.path.join(newdir, patchfn), 'Patch file should have been copied into new directory but wasn\'t') + self.assertNotExists(os.path.join(newdir, backportedpatchfn), 'Backported patch file should not have been copied into new directory but was') self.assertExists(os.path.join(newdir, '0002-Add-a-comment-to-the-code.patch'), 'New patch file should have been created but wasn\'t') + with open(newrecipefile, 'r') as f: + newcontent = f.read() + self.assertNotIn(backportedpatchfn, newcontent, "Backported patch should have been removed from the recipe but wasn't") + self.assertIn(patchfn, newcontent, "Old patch should have not been removed from the recipe but was") + self.assertIn("0002-Add-a-comment-to-the-code.patch", newcontent, "New patch should have been added to the recipe but wasn't") + self.assertIn("http://www.ivarch.com/programs/sources/pv-${PV}.tar.gz", newcontent, "New recipe no longer has upstream source in SRC_URI") + def test_devtool_finish_upgrade_otherlayer(self): - recipe, oldrecipefile, recipedir, olddir, newversion, patchfn = self._setup_test_devtool_finish_upgrade() + recipe, oldrecipefile, recipedir, olddir, newversion, patchfn, backportedpatchfn = self._setup_test_devtool_finish_upgrade() # Ensure the recipe is where we think it should be (so that cleanup doesn't trash things) self.assertIn('/meta-selftest/', recipedir) # Try finish to a different layer - should create a bbappend @@ -1534,10 +1546,18 @@ class DevtoolUpgradeTests(DevtoolBase): self.assertNotExists(os.path.join(self.workspacedir, 'recipes', recipe), 'Recipe directory should not exist after finish') self.assertExists(oldrecipefile, 'Old recipe file should not have been deleted') self.assertExists(os.path.join(olddir, patchfn), 'Old patch file should not have been deleted') + self.assertExists(os.path.join(olddir, backportedpatchfn), 'Old backported patch file should not have been deleted') newdir = os.path.join(newrecipedir, recipe + '-' + newversion) self.assertExists(newrecipefile, 'New recipe file should have been copied into existing layer but wasn\'t') self.assertExists(os.path.join(newdir, patchfn), 'Patch file should have been copied into new directory but wasn\'t') + self.assertNotExists(os.path.join(newdir, backportedpatchfn), 'Backported patch file should not have been copied into new directory but was') self.assertExists(os.path.join(newdir, '0002-Add-a-comment-to-the-code.patch'), 'New patch file should have been created but wasn\'t') + with open(newrecipefile, 'r') as f: + newcontent = f.read() + self.assertNotIn(backportedpatchfn, newcontent, "Backported patch should have been removed from the recipe but wasn't") + self.assertIn(patchfn, newcontent, "Old patch should have not been removed from the recipe but was") + self.assertIn("0002-Add-a-comment-to-the-code.patch", newcontent, "New patch should have been added to the recipe but wasn't") + self.assertIn("http://www.ivarch.com/programs/sources/pv-${PV}.tar.gz", newcontent, "New recipe no longer has upstream source in SRC_URI") def _setup_test_devtool_finish_modify(self): # Check preconditions diff --git a/poky/meta/lib/oeqa/selftest/cases/imagefeatures.py b/poky/meta/lib/oeqa/selftest/cases/imagefeatures.py index cf2a42aab..ef2eefa86 100644 --- a/poky/meta/lib/oeqa/selftest/cases/imagefeatures.py +++ b/poky/meta/lib/oeqa/selftest/cases/imagefeatures.py @@ -124,7 +124,7 @@ class ImageFeatures(OESelftestTestCase): # check if result image is sparse image_stat = os.stat(image_path) - self.assertTrue(image_stat.st_size > image_stat.st_blocks * 512) + self.assertGreater(image_stat.st_size, image_stat.st_blocks * 512) # check if the resulting gzip is valid self.assertTrue(runCmd('gzip -t %s' % gzip_path)) diff --git a/poky/meta/lib/oeqa/selftest/cases/incompatible_lic.py b/poky/meta/lib/oeqa/selftest/cases/incompatible_lic.py index 424a9e69c..904b5b409 100644 --- a/poky/meta/lib/oeqa/selftest/cases/incompatible_lic.py +++ b/poky/meta/lib/oeqa/selftest/cases/incompatible_lic.py @@ -73,3 +73,21 @@ INCOMPATIBLE_LICENSE_pn-core-image-minimal = "GPL-3.0 LGPL-3.0" bitbake('core-image-minimal') +class NoGPL3InImagesTests(OESelftestTestCase): + def test_core_image_minimal(self): + self.write_config(""" +INCOMPATIBLE_LICENSE_pn-core-image-minimal = "GPL-3.0 LGPL-3.0" +""") + bitbake('core-image-minimal') + + def test_core_image_full_cmdline(self): + self.write_config(""" +INHERIT += "testimage"\n +INCOMPATIBLE_LICENSE_pn-core-image-full-cmdline = "GPL-3.0 LGPL-3.0"\n +RDEPENDS_packagegroup-core-full-cmdline-utils_remove = "bash bc coreutils cpio ed findutils gawk grep mc mc-fish mc-helpers mc-helpers-perl sed tar time"\n +RDEPENDS_packagegroup-core-full-cmdline-dev-utils_remove = "diffutils m4 make patch"\n +RDEPENDS_packagegroup-core-full-cmdline-multiuser_remove = "gzip"\n +""") + bitbake('core-image-full-cmdline') + bitbake('-c testimage core-image-full-cmdline') + diff --git a/poky/meta/lib/oeqa/selftest/cases/oescripts.py b/poky/meta/lib/oeqa/selftest/cases/oescripts.py index c169885cf..41cbe0480 100644 --- a/poky/meta/lib/oeqa/selftest/cases/oescripts.py +++ b/poky/meta/lib/oeqa/selftest/cases/oescripts.py @@ -65,6 +65,7 @@ class OEPybootchartguyTests(OEScriptTests): runCmd('%s/pybootchartgui/pybootchartgui.py %s -o %s/charts -f pdf' % (self.scripts_dir, self.buildstats, self.tmpdir)) self.assertTrue(os.path.exists(self.tmpdir + "/charts.pdf")) + class OEGitproxyTests(OESelftestTestCase): scripts_dir = os.path.join(get_bb_var('COREBASE'), 'scripts') @@ -121,3 +122,67 @@ class OEGitproxyTests(OESelftestTestCase): if dash is None: self.skipTest("No \"dash\" found on test system.") self.run_oegitproxy(custom_shell=dash) + +class OeRunNativeTest(OESelftestTestCase): + def test_oe_run_native(self): + bitbake("qemu-helper-native -c addto_recipe_sysroot") + result = runCmd("oe-run-native qemu-helper-native tunctl -h") + self.assertIn("Delete: tunctl -d device-name [-f tun-clone-device]", result.output) + +class OEListPackageconfigTests(OEScriptTests): + #oe-core.scripts.List_all_the_PACKAGECONFIG's_flags + def check_endlines(self, results, expected_endlines): + for line in results.output.splitlines(): + for el in expected_endlines: + if line == el: + expected_endlines.remove(el) + break + + if expected_endlines: + self.fail('Missing expected listings:\n %s' % '\n '.join(expected_endlines)) + + + #oe-core.scripts.List_all_the_PACKAGECONFIG's_flags + def test_packageconfig_flags_help(self): + runCmd('%s/contrib/list-packageconfig-flags.py -h' % self.scripts_dir) + + def test_packageconfig_flags_default(self): + results = runCmd('%s/contrib/list-packageconfig-flags.py' % self.scripts_dir) + expected_endlines = [] + expected_endlines.append("RECIPE NAME PACKAGECONFIG FLAGS") + expected_endlines.append("pinentry gtk2 libcap ncurses qt secret") + expected_endlines.append("tar acl") + + self.check_endlines(results, expected_endlines) + + + def test_packageconfig_flags_option_flags(self): + results = runCmd('%s/contrib/list-packageconfig-flags.py -f' % self.scripts_dir) + expected_endlines = [] + expected_endlines.append("PACKAGECONFIG FLAG RECIPE NAMES") + expected_endlines.append("qt nativesdk-pinentry pinentry pinentry-native") + expected_endlines.append("secret nativesdk-pinentry pinentry pinentry-native") + + self.check_endlines(results, expected_endlines) + + def test_packageconfig_flags_option_all(self): + results = runCmd('%s/contrib/list-packageconfig-flags.py -a' % self.scripts_dir) + expected_endlines = [] + expected_endlines.append("pinentry-1.1.0") + expected_endlines.append("PACKAGECONFIG ncurses libcap") + expected_endlines.append("PACKAGECONFIG[qt] --enable-pinentry-qt, --disable-pinentry-qt, qtbase-native qtbase") + expected_endlines.append("PACKAGECONFIG[gtk2] --enable-pinentry-gtk2, --disable-pinentry-gtk2, gtk+ glib-2.0") + expected_endlines.append("PACKAGECONFIG[libcap] --with-libcap, --without-libcap, libcap") + expected_endlines.append("PACKAGECONFIG[ncurses] --enable-ncurses --with-ncurses-include-dir=${STAGING_INCDIR}, --disable-ncurses, ncurses") + expected_endlines.append("PACKAGECONFIG[secret] --enable-libsecret, --disable-libsecret, libsecret") + + self.check_endlines(results, expected_endlines) + + def test_packageconfig_flags_optiins_preferred_only(self): + results = runCmd('%s/contrib/list-packageconfig-flags.py -p' % self.scripts_dir) + expected_endlines = [] + expected_endlines.append("RECIPE NAME PACKAGECONFIG FLAGS") + expected_endlines.append("pinentry gtk2 libcap ncurses qt secret") + + self.check_endlines(results, expected_endlines) + diff --git a/poky/meta/lib/oeqa/selftest/cases/recipetool.py b/poky/meta/lib/oeqa/selftest/cases/recipetool.py index 1c701a40b..c1562c63b 100644 --- a/poky/meta/lib/oeqa/selftest/cases/recipetool.py +++ b/poky/meta/lib/oeqa/selftest/cases/recipetool.py @@ -685,7 +685,9 @@ class RecipetoolAppendsrcTests(RecipetoolAppendsrcBase): self._test_appendsrcfile(testrecipe, filepath, srcdir=subdir) bitbake('%s:do_unpack' % testrecipe) - self.assertEqual(open(self.testfile, 'r').read(), open(os.path.join(srcdir, filepath), 'r').read()) + with open(self.testfile, 'r') as testfile: + with open(os.path.join(srcdir, filepath), 'r') as makefilein: + self.assertEqual(testfile.read(), makefilein.read()) def test_recipetool_appendsrcfiles_basic(self, destdir=None): newfiles = [self.testfile] diff --git a/poky/meta/lib/oeqa/selftest/cases/reproducible.py b/poky/meta/lib/oeqa/selftest/cases/reproducible.py index c235c139e..a9110565a 100644 --- a/poky/meta/lib/oeqa/selftest/cases/reproducible.py +++ b/poky/meta/lib/oeqa/selftest/cases/reproducible.py @@ -5,11 +5,16 @@ from oeqa.selftest.case import OESelftestTestCase from oeqa.utils.commands import runCmd, bitbake, get_bb_var, get_bb_vars +import bb.utils import functools import multiprocessing import textwrap import json import unittest +import tempfile +import shutil +import stat +import os MISSING = 'MISSING' DIFFERENT = 'DIFFERENT' @@ -74,6 +79,7 @@ def compare_file(reference, test, diffutils_sysroot): class ReproducibleTests(OESelftestTestCase): package_classes = ['deb', 'ipk'] images = ['core-image-minimal'] + save_results = False def setUpLocal(self): super().setUpLocal() @@ -117,9 +123,18 @@ class ReproducibleTests(OESelftestTestCase): self.extrasresults['reproducible']['files'].setdefault(package_class, {})[name] = [ {'reference': p.reference, 'test': p.test} for p in packages] + def copy_file(self, source, dest): + bb.utils.mkdirhier(os.path.dirname(dest)) + shutil.copyfile(source, dest) + def test_reproducible_builds(self): capture_vars = ['DEPLOY_DIR_' + c.upper() for c in self.package_classes] + if self.save_results: + save_dir = tempfile.mkdtemp(prefix='oe-reproducible-') + os.chmod(save_dir, stat.S_IRWXU | stat.S_IRGRP | stat.S_IXGRP | stat.S_IROTH | stat.S_IXOTH) + self.logger.info('Non-reproducible packages will be copied to %s', save_dir) + # Build native utilities self.write_config('') bitbake("diffutils-native -c addto_recipe_sysroot") @@ -176,6 +191,11 @@ class ReproducibleTests(OESelftestTestCase): self.write_package_list(package_class, 'different', result.different) self.write_package_list(package_class, 'same', result.same) + if self.save_results: + for d in result.different: + self.copy_file(d.reference, '/'.join([save_dir, d.reference])) + self.copy_file(d.test, '/'.join([save_dir, d.test])) + if result.missing or result.different: self.fail("The following %s packages are missing or different: %s" % (c, ' '.join(r.test for r in (result.missing + result.different)))) diff --git a/poky/meta/lib/oeqa/selftest/cases/runtime_test.py b/poky/meta/lib/oeqa/selftest/cases/runtime_test.py index 3f212bd0e..4b56e5bec 100644 --- a/poky/meta/lib/oeqa/selftest/cases/runtime_test.py +++ b/poky/meta/lib/oeqa/selftest/cases/runtime_test.py @@ -179,6 +179,8 @@ class TestImage(OESelftestTestCase): distro = oe.lsb.distro_identifier() if distro and distro == 'debian-8': self.skipTest('virgl isn\'t working with Debian 8') + if distro and distro == 'centos-7': + self.skipTest('virgl isn\'t working with Centos 7') qemu_packageconfig = get_bb_var('PACKAGECONFIG', 'qemu-system-native') features = 'INHERIT += "testimage"\n' @@ -320,3 +322,80 @@ class Postinst(OESelftestTestCase): self.assertFalse(os.path.isfile(os.path.join(hosttestdir, "rootfs-after-failure")), "rootfs-after-failure file was created") +class SystemTap(OESelftestTestCase): + """ + Summary: The purpose of this test case is to verify native crosstap + works while talking to a target. + Expected: The script should successfully connect to the qemu machine + and run some systemtap examples on a qemu machine. + """ + + @classmethod + def setUpClass(cls): + super(SystemTap, cls).setUpClass() + cls.image = "core-image-minimal" + + def default_config(self): + return """ +# These aren't the actual IP addresses but testexport class needs something defined +TEST_SERVER_IP = "192.168.7.1" +TEST_TARGET_IP = "192.168.7.2" + +EXTRA_IMAGE_FEATURES += "tools-profile dbg-pkgs" +IMAGE_FEATURES_append = " ssh-server-dropbear" + +# enables kernel debug symbols +KERNEL_EXTRA_FEATURES_append = " features/debug/debug-kernel.scc" +KERNEL_EXTRA_FEATURES_append = " features/systemtap/systemtap.scc" + +# add systemtap run-time into target image if it is not there yet +IMAGE_INSTALL_append = " systemtap" +""" + + def test_crosstap_helloworld(self): + self.write_config(self.default_config()) + bitbake('systemtap-native') + systemtap_examples = os.path.join(get_bb_var("WORKDIR","systemtap-native"), "usr/share/systemtap/examples") + bitbake(self.image) + + with runqemu(self.image) as qemu: + cmd = "crosstap -r root@192.168.7.2 -s %s/general/helloworld.stp " % systemtap_examples + result = runCmd(cmd) + self.assertEqual(0, result.status, 'crosstap helloworld returned a non 0 status:%s' % result.output) + + def test_crosstap_pstree(self): + self.write_config(self.default_config()) + + bitbake('systemtap-native') + systemtap_examples = os.path.join(get_bb_var("WORKDIR","systemtap-native"), "usr/share/systemtap/examples") + bitbake(self.image) + + with runqemu(self.image) as qemu: + cmd = "crosstap -r root@192.168.7.2 -s %s/process/pstree.stp" % systemtap_examples + result = runCmd(cmd) + self.assertEqual(0, result.status, 'crosstap pstree returned a non 0 status:%s' % result.output) + + def test_crosstap_syscalls_by_proc(self): + self.write_config(self.default_config()) + + bitbake('systemtap-native') + systemtap_examples = os.path.join(get_bb_var("WORKDIR","systemtap-native"), "usr/share/systemtap/examples") + bitbake(self.image) + + with runqemu(self.image) as qemu: + cmd = "crosstap -r root@192.168.7.2 -s %s/process/ syscalls_by_proc.stp" % systemtap_examples + result = runCmd(cmd) + self.assertEqual(0, result.status, 'crosstap syscalls_by_proc returned a non 0 status:%s' % result.output) + + def test_crosstap_syscalls_by_pid(self): + self.write_config(self.default_config()) + + bitbake('systemtap-native') + systemtap_examples = os.path.join(get_bb_var("WORKDIR","systemtap-native"), "usr/share/systemtap/examples") + bitbake(self.image) + + with runqemu(self.image) as qemu: + cmd = "crosstap -r root@192.168.7.2 -s %s/process/ syscalls_by_pid.stp" % systemtap_examples + result = runCmd(cmd) + self.assertEqual(0, result.status, 'crosstap syscalls_by_pid returned a non 0 status:%s' % result.output) + diff --git a/poky/meta/lib/oeqa/selftest/cases/signing.py b/poky/meta/lib/oeqa/selftest/cases/signing.py index 5c4e01b2c..93b15ae68 100644 --- a/poky/meta/lib/oeqa/selftest/cases/signing.py +++ b/poky/meta/lib/oeqa/selftest/cases/signing.py @@ -3,7 +3,7 @@ # from oeqa.selftest.case import OESelftestTestCase -from oeqa.utils.commands import runCmd, bitbake, get_bb_var, get_bb_vars +from oeqa.utils.commands import runCmd, bitbake, get_bb_var, get_bb_vars, create_temp_layer import os import oe import glob @@ -185,8 +185,6 @@ class LockedSignatures(OESelftestTestCase): test_recipe = 'ed' locked_sigs_file = 'locked-sigs.inc' - self.add_command_to_tearDown('rm -f %s' % os.path.join(self.builddir, locked_sigs_file)) - bitbake(test_recipe) # Generate locked sigs include file bitbake('-S none %s' % test_recipe) @@ -198,16 +196,23 @@ class LockedSignatures(OESelftestTestCase): # Build a locked recipe bitbake(test_recipe) + templayerdir = tempfile.mkdtemp(prefix='signingqa') + create_temp_layer(templayerdir, 'selftestsigning') + runCmd('bitbake-layers add-layer %s' % templayerdir) + # Make a change that should cause the locked task signature to change # Use uuid so hash equivalance server isn't triggered recipe_append_file = test_recipe + '_' + get_bb_var('PV', test_recipe) + '.bbappend' - recipe_append_path = os.path.join(self.testlayer_path, 'recipes-test', test_recipe, recipe_append_file) + recipe_append_path = os.path.join(templayerdir, 'recipes-test', test_recipe, recipe_append_file) feature = 'SUMMARY_${PN} = "test locked signature%s"\n' % uuid.uuid4() - os.mkdir(os.path.join(self.testlayer_path, 'recipes-test', test_recipe)) + os.mkdir(os.path.join(templayerdir, 'recipes-test')) + os.mkdir(os.path.join(templayerdir, 'recipes-test', test_recipe)) write_file(recipe_append_path, feature) - self.add_command_to_tearDown('rm -rf %s' % os.path.join(self.testlayer_path, 'recipes-test', test_recipe)) + self.add_command_to_tearDown('bitbake-layers remove-layer %s' % templayerdir) + self.add_command_to_tearDown('rm -f %s' % os.path.join(self.builddir, locked_sigs_file)) + self.add_command_to_tearDown('rm -rf %s' % templayerdir) # Build the recipe again ret = bitbake(test_recipe) diff --git a/poky/meta/lib/oeqa/selftest/cases/sstatetests.py b/poky/meta/lib/oeqa/selftest/cases/sstatetests.py index 2867cb78a..6757a0ec6 100644 --- a/poky/meta/lib/oeqa/selftest/cases/sstatetests.py +++ b/poky/meta/lib/oeqa/selftest/cases/sstatetests.py @@ -255,6 +255,7 @@ BUILD_ARCH = "x86_64" BUILD_OS = "linux" SDKMACHINE = "x86_64" PACKAGE_CLASSES = "package_rpm package_ipk package_deb" +BB_SIGNATURE_HANDLER = "OEBasicHash" """) self.track_for_cleanup(self.topdir + "/tmp-sstatesamehash") bitbake("core-image-sato -S none") @@ -266,6 +267,7 @@ BUILD_ARCH = "i686" BUILD_OS = "linux" SDKMACHINE = "i686" PACKAGE_CLASSES = "package_rpm package_ipk package_deb" +BB_SIGNATURE_HANDLER = "OEBasicHash" """) self.track_for_cleanup(self.topdir + "/tmp-sstatesamehash2") bitbake("core-image-sato -S none") @@ -298,6 +300,7 @@ PACKAGE_CLASSES = "package_rpm package_ipk package_deb" TMPDIR = \"${TOPDIR}/tmp-sstatesamehash\" TCLIBCAPPEND = \"\" NATIVELSBSTRING = \"DistroA\" +BB_SIGNATURE_HANDLER = "OEBasicHash" """) self.track_for_cleanup(self.topdir + "/tmp-sstatesamehash") bitbake("core-image-sato -S none") @@ -305,6 +308,7 @@ NATIVELSBSTRING = \"DistroA\" TMPDIR = \"${TOPDIR}/tmp-sstatesamehash2\" TCLIBCAPPEND = \"\" NATIVELSBSTRING = \"DistroB\" +BB_SIGNATURE_HANDLER = "OEBasicHash" """) self.track_for_cleanup(self.topdir + "/tmp-sstatesamehash2") bitbake("core-image-sato -S none") @@ -332,11 +336,13 @@ NATIVELSBSTRING = \"DistroB\" TMPDIR = \"${TOPDIR}/tmp-sstatesamehash\" TCLIBCAPPEND = \"\" MACHINE = \"qemux86-64\" +BB_SIGNATURE_HANDLER = "OEBasicHash" """ configB = """ TMPDIR = \"${TOPDIR}/tmp-sstatesamehash2\" TCLIBCAPPEND = \"\" MACHINE = \"qemuarm\" +BB_SIGNATURE_HANDLER = "OEBasicHash" """ self.sstate_allarch_samesigs(configA, configB) @@ -352,6 +358,7 @@ MACHINE = \"qemux86-64\" require conf/multilib.conf MULTILIBS = \"multilib:lib32\" DEFAULTTUNE_virtclass-multilib-lib32 = \"x86\" +BB_SIGNATURE_HANDLER = "OEBasicHash" """ configB = """ TMPDIR = \"${TOPDIR}/tmp-sstatesamehash2\" @@ -359,6 +366,7 @@ TCLIBCAPPEND = \"\" MACHINE = \"qemuarm\" require conf/multilib.conf MULTILIBS = \"\" +BB_SIGNATURE_HANDLER = "OEBasicHash" """ self.sstate_allarch_samesigs(configA, configB) @@ -404,6 +412,7 @@ MACHINE = \"qemux86\" require conf/multilib.conf MULTILIBS = "multilib:lib32" DEFAULTTUNE_virtclass-multilib-lib32 = "x86" +BB_SIGNATURE_HANDLER = "OEBasicHash" """) self.track_for_cleanup(self.topdir + "/tmp-sstatesamehash") bitbake("world meta-toolchain -S none") @@ -414,6 +423,7 @@ MACHINE = \"qemux86copy\" require conf/multilib.conf MULTILIBS = "multilib:lib32" DEFAULTTUNE_virtclass-multilib-lib32 = "x86" +BB_SIGNATURE_HANDLER = "OEBasicHash" """) self.track_for_cleanup(self.topdir + "/tmp-sstatesamehash2") bitbake("world meta-toolchain -S none") @@ -452,6 +462,7 @@ TIME = "111111" DATE = "20161111" INHERIT_remove = "buildstats-summary buildhistory uninative" http_proxy = "" +BB_SIGNATURE_HANDLER = "OEBasicHash" """) self.track_for_cleanup(self.topdir + "/tmp-sstatesamehash") self.track_for_cleanup(self.topdir + "/download1") @@ -468,6 +479,7 @@ DATE = "20161212" INHERIT_remove = "uninative" INHERIT += "buildstats-summary buildhistory" http_proxy = "http://example.com/" +BB_SIGNATURE_HANDLER = "OEBasicHash" """) self.track_for_cleanup(self.topdir + "/tmp-sstatesamehash2") self.track_for_cleanup(self.topdir + "/download2") diff --git a/poky/meta/lib/oeqa/selftest/cases/wic.py b/poky/meta/lib/oeqa/selftest/cases/wic.py index ea7530040..0c03b4b02 100644 --- a/poky/meta/lib/oeqa/selftest/cases/wic.py +++ b/poky/meta/lib/oeqa/selftest/cases/wic.py @@ -1025,3 +1025,10 @@ class Wic2(WicTestCase): # check if it's removed result = runCmd("wic ls %s:2/etc/ -n %s" % (images[0], sysroot)) self.assertTrue('fstab' not in [line.split()[-1] for line in result.output.split('\n') if line]) + + # remove non-empty directory + runCmd("wic rm -r %s:2/etc/ -n %s" % (images[0], sysroot)) + + # check if it's removed + result = runCmd("wic ls %s:2/ -n %s" % (images[0], sysroot)) + self.assertTrue('etc' not in [line.split()[-1] for line in result.output.split('\n') if line]) diff --git a/poky/meta/recipes-bsp/gnu-efi/gnu-efi/parallel-make-archives.patch b/poky/meta/recipes-bsp/gnu-efi/gnu-efi/parallel-make-archives.patch index a9806cfdf..8a0138bbe 100644 --- a/poky/meta/recipes-bsp/gnu-efi/gnu-efi/parallel-make-archives.patch +++ b/poky/meta/recipes-bsp/gnu-efi/gnu-efi/parallel-make-archives.patch @@ -19,25 +19,7 @@ Signed-off-by: Darren Hart <dvhart@linux.intel.com> Signed-off-by: California Sullivan <california.l.sullivan@intel.com> [Rebased for 3.0.8] Signed-off-by: Yi Zhao <yi.zhao@windriver.com> ---- - gnuefi/Makefile | 3 ++- - lib/Makefile | 2 +- - 2 files changed, 3 insertions(+), 2 deletions(-) -diff --git a/gnuefi/Makefile b/gnuefi/Makefile -index 2a61699..89b560a 100644 ---- a/gnuefi/Makefile -+++ b/gnuefi/Makefile -@@ -54,7 +54,8 @@ TARGETS = crt0-efi-$(ARCH).o libgnuefi.a - - all: $(TARGETS) - --libgnuefi.a: $(patsubst %,libgnuefi.a(%),$(OBJS)) -+libgnuefi.a: $(OBJS) -+ $(AR) $(ARFLAGS) $@ $(OBJS) - - clean: - rm -f $(TARGETS) *~ *.o $(OBJS) diff --git a/lib/Makefile b/lib/Makefile index 0e6410d..048751a 100644 --- a/lib/Makefile diff --git a/poky/meta/recipes-bsp/gnu-efi/gnu-efi_3.0.9.bb b/poky/meta/recipes-bsp/gnu-efi/gnu-efi_3.0.11.bb index 6d4c30335..9954d7f57 100644 --- a/poky/meta/recipes-bsp/gnu-efi/gnu-efi_3.0.9.bb +++ b/poky/meta/recipes-bsp/gnu-efi/gnu-efi_3.0.11.bb @@ -18,8 +18,8 @@ SRC_URI = "${SOURCEFORGE_MIRROR}/${BPN}/${BP}.tar.bz2 \ file://gnu-efi-3.0.9-fix-clang-build.patch \ " -SRC_URI[md5sum] = "32af17b917545a693e549af2439c4a99" -SRC_URI[sha256sum] = "6715ea7eae1c7e4fc5041034bd3f107ec2911962ed284a081e491646b12277f0" +SRC_URI[md5sum] = "21148bbcccec385a9bfdf5f678959577" +SRC_URI[sha256sum] = "f28da792a2532e91e18e0101468811739a22cde9eee5eacfd0efb9bf3a61d6b9" COMPATIBLE_HOST = "(x86_64.*|i.86.*|aarch64.*|arm.*)-linux" COMPATIBLE_HOST_armv4 = 'null' diff --git a/poky/meta/recipes-bsp/opensbi/opensbi_0.4.bb b/poky/meta/recipes-bsp/opensbi/opensbi_0.5.bb index b03043668..759bbbfda 100644 --- a/poky/meta/recipes-bsp/opensbi/opensbi_0.4.bb +++ b/poky/meta/recipes-bsp/opensbi/opensbi_0.5.bb @@ -8,7 +8,7 @@ require opensbi-payloads.inc inherit autotools-brokensep deploy -SRCREV = "ce228ee0919deb9957192d723eecc8aaae2697c6" +SRCREV = "be92da280d87c38a2e0adc5d3f43bab7b5468f09" SRC_URI = "git://github.com/riscv/opensbi.git \ file://0001-Makefile-Don-t-specify-mabi-or-march.patch \ " diff --git a/poky/meta/recipes-bsp/u-boot/files/0001-CVE-2019-13103.patch b/poky/meta/recipes-bsp/u-boot/files/0001-CVE-2019-13103.patch deleted file mode 100644 index 1a5d1eb99..000000000 --- a/poky/meta/recipes-bsp/u-boot/files/0001-CVE-2019-13103.patch +++ /dev/null @@ -1,69 +0,0 @@ -From 39a759494f734c4cdc3e2b919671bfb3134b41ae Mon Sep 17 00:00:00 2001 -From: Paul Emge <paulemge@forallsecure.com> -Date: Mon, 8 Jul 2019 16:37:03 -0700 -Subject: [PATCH 1/9] CVE-2019-13103: disk: stop infinite recursion in DOS - Partitions - -part_get_info_extended and print_partition_extended can recurse infinitely -while parsing a self-referential filesystem or one with a silly number of -extended partitions. This patch adds a limit to the number of recursive -partitions. - -Signed-off-by: Paul Emge <paulemge@forallsecure.com> - -Upstream-Status: Backport[http://git.denx.de/?p=u-boot.git;a=commit; - h=232e2f4fd9a24bf08215ddc8c53ccadffc841fb5] - -CVE: CVE-2019-13103 - -Signed-off-by: Meng Li <Meng.Li@windriver.com> ---- - disk/part_dos.c | 18 ++++++++++++++++++ - 1 file changed, 18 insertions(+) - -diff --git a/disk/part_dos.c b/disk/part_dos.c -index 936cee0d36..aae9d95906 100644 ---- a/disk/part_dos.c -+++ b/disk/part_dos.c -@@ -23,6 +23,10 @@ - - #define DOS_PART_DEFAULT_SECTOR 512 - -+/* should this be configurable? It looks like it's not very common at all -+ * to use large numbers of partitions */ -+#define MAX_EXT_PARTS 256 -+ - /* Convert char[4] in little endian format to the host format integer - */ - static inline unsigned int le32_to_int(unsigned char *le32) -@@ -126,6 +130,13 @@ static void print_partition_extended(struct blk_desc *dev_desc, - dos_partition_t *pt; - int i; - -+ /* set a maximum recursion level */ -+ if (part_num > MAX_EXT_PARTS) -+ { -+ printf("** Nested DOS partitions detected, stopping **\n"); -+ return; -+ } -+ - if (blk_dread(dev_desc, ext_part_sector, 1, (ulong *)buffer) != 1) { - printf ("** Can't read partition table on %d:" LBAFU " **\n", - dev_desc->devnum, ext_part_sector); -@@ -191,6 +202,13 @@ static int part_get_info_extended(struct blk_desc *dev_desc, - int i; - int dos_type; - -+ /* set a maximum recursion level */ -+ if (part_num > MAX_EXT_PARTS) -+ { -+ printf("** Nested DOS partitions detected, stopping **\n"); -+ return -1; -+ } -+ - if (blk_dread(dev_desc, ext_part_sector, 1, (ulong *)buffer) != 1) { - printf ("** Can't read partition table on %d:" LBAFU " **\n", - dev_desc->devnum, ext_part_sector); --- -2.17.1 - diff --git a/poky/meta/recipes-bsp/u-boot/files/0001-include-env.h-Ensure-ulong-is-defined.patch b/poky/meta/recipes-bsp/u-boot/files/0001-include-env.h-Ensure-ulong-is-defined.patch new file mode 100644 index 000000000..b9118164d --- /dev/null +++ b/poky/meta/recipes-bsp/u-boot/files/0001-include-env.h-Ensure-ulong-is-defined.patch @@ -0,0 +1,31 @@ +From 0565a080d153d5baaaacfeb5045a832e126f4f9e Mon Sep 17 00:00:00 2001 +From: Alistair Francis <alistair.francis@wdc.com> +Date: Mon, 14 Oct 2019 17:37:30 -0700 +Subject: [PATCH] include/env.h: Ensure ulong is defined + +To fix these failures when building with musl: + include/env.h:166:1: error: unknown type name 'ulong'; did you mean 'long'? +ensure that ulong is defined. + +Upstream-Status: Pending +Signed-off-by: Alistair Francis <alistair.francis@wdc.com> +--- + include/env.h | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/include/env.h b/include/env.h +index b72239f6a5..5ca49a3456 100644 +--- a/include/env.h ++++ b/include/env.h +@@ -13,6 +13,8 @@ + #include <stdbool.h> + #include <linux/types.h> + ++typedef unsigned long ulong; ++ + struct environment_s; + + /* Value for environment validity */ +-- +2.23.0 + diff --git a/poky/meta/recipes-bsp/u-boot/files/0002-CVE-2019-13104.patch b/poky/meta/recipes-bsp/u-boot/files/0002-CVE-2019-13104.patch deleted file mode 100644 index de122b27d..000000000 --- a/poky/meta/recipes-bsp/u-boot/files/0002-CVE-2019-13104.patch +++ /dev/null @@ -1,49 +0,0 @@ -From 1d36545e43003f4b1bb3a303a3b468abd482fa2f Mon Sep 17 00:00:00 2001 -From: Paul Emge <paulemge@forallsecure.com> -Date: Mon, 8 Jul 2019 16:37:05 -0700 -Subject: [PATCH 2/9] CVE-2019-13104: ext4: check for underflow in - ext4fs_read_file - -in ext4fs_read_file, it is possible for a broken/malicious file -system to cause a memcpy of a negative number of bytes, which -overflows all memory. This patch fixes the issue by checking for -a negative length. - -Signed-off-by: Paul Emge <paulemge@forallsecure.com> - -Upstream-Status: Backport[http://git.denx.de/?p=u-boot.git;a=commit; - h=878269dbe74229005dd7f27aca66c554e31dad8e] - -CVE: CVE-2019-13104 - -Signed-off-by: Meng Li <Meng.Li@windriver.com> ---- - fs/ext4/ext4fs.c | 8 +++++--- - 1 file changed, 5 insertions(+), 3 deletions(-) - -diff --git a/fs/ext4/ext4fs.c b/fs/ext4/ext4fs.c -index 26db677a1f..c8c8655ed8 100644 ---- a/fs/ext4/ext4fs.c -+++ b/fs/ext4/ext4fs.c -@@ -66,13 +66,15 @@ int ext4fs_read_file(struct ext2fs_node *node, loff_t pos, - - ext_cache_init(&cache); - -- if (blocksize <= 0) -- return -1; -- - /* Adjust len so it we can't read past the end of the file. */ - if (len + pos > filesize) - len = (filesize - pos); - -+ if (blocksize <= 0 || len <= 0) { -+ ext_cache_fini(&cache); -+ return -1; -+ } -+ - blockcnt = lldiv(((len + pos) + blocksize - 1), blocksize); - - for (i = lldiv(pos, blocksize); i < blockcnt; i++) { --- -2.17.1 - diff --git a/poky/meta/recipes-bsp/u-boot/files/0003-CVE-2019-13105.patch b/poky/meta/recipes-bsp/u-boot/files/0003-CVE-2019-13105.patch deleted file mode 100644 index f525147e5..000000000 --- a/poky/meta/recipes-bsp/u-boot/files/0003-CVE-2019-13105.patch +++ /dev/null @@ -1,37 +0,0 @@ -From 4e937d0de669ee69cf41c20494cbf66c339c3174 Mon Sep 17 00:00:00 2001 -From: Paul Emge <paulemge@forallsecure.com> -Date: Mon, 8 Jul 2019 16:37:04 -0700 -Subject: [PATCH 3/9] CVE-2019-13105: ext4: fix double-free in ext4_cache_read - -ext_cache_read doesn't null cache->buf, after freeing, which results -in a later function double-freeing it. This patch fixes -ext_cache_read to call ext_cache_fini instead of free. - -Signed-off-by: Paul Emge <paulemge@forallsecure.com> - -Upstream-Status: Backport[http://git.denx.de/?p=u-boot.git;a=commit; - h=6e5a79de658cb1c8012c86e0837379aa6eabd024] - -CVE: CVE-2019-13105 - -Signed-off-by: Meng Li <Meng.Li@windriver.com> ---- - fs/ext4/ext4fs.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/fs/ext4/ext4fs.c b/fs/ext4/ext4fs.c -index c8c8655ed8..e2b740cac4 100644 ---- a/fs/ext4/ext4fs.c -+++ b/fs/ext4/ext4fs.c -@@ -288,7 +288,7 @@ int ext_cache_read(struct ext_block_cache *cache, lbaint_t block, int size) - if (!cache->buf) - return 0; - if (!ext4fs_devread(block, 0, size, cache->buf)) { -- free(cache->buf); -+ ext_cache_fini(cache); - return 0; - } - cache->block = block; --- -2.17.1 - diff --git a/poky/meta/recipes-bsp/u-boot/files/0004-CVE-2019-13106.patch b/poky/meta/recipes-bsp/u-boot/files/0004-CVE-2019-13106.patch deleted file mode 100644 index 8e1a1a994..000000000 --- a/poky/meta/recipes-bsp/u-boot/files/0004-CVE-2019-13106.patch +++ /dev/null @@ -1,56 +0,0 @@ -From 1307dabf5422372483f840dda3963f9dbd2e8e6f Mon Sep 17 00:00:00 2001 -From: Paul Emge <paulemge@forallsecure.com> -Date: Mon, 8 Jul 2019 16:37:07 -0700 -Subject: [PATCH 4/9] CVE-2019-13106: ext4: fix out-of-bounds memset - -In ext4fs_read_file in ext4fs.c, a memset can overwrite the bounds of -the destination memory region. This patch adds a check to disallow -this. - -Signed-off-by: Paul Emge <paulemge@forallsecure.com> - -Upstream-Status: Backport[http://git.denx.de/?p=u-boot.git;a=commit; - h=e205896c5383c938274262524adceb2775fb03ba] - -CVE: CVE-2019-13106 - -Signed-off-by: Meng Li <Meng.Li@windriver.com> ---- - fs/ext4/ext4fs.c | 7 +++++-- - 1 file changed, 5 insertions(+), 2 deletions(-) - -diff --git a/fs/ext4/ext4fs.c b/fs/ext4/ext4fs.c -index e2b740cac4..37b31d9f0f 100644 ---- a/fs/ext4/ext4fs.c -+++ b/fs/ext4/ext4fs.c -@@ -61,6 +61,7 @@ int ext4fs_read_file(struct ext2fs_node *node, loff_t pos, - lbaint_t delayed_skipfirst = 0; - lbaint_t delayed_next = 0; - char *delayed_buf = NULL; -+ char *start_buf = buf; - short status; - struct ext_block_cache cache; - -@@ -139,6 +140,7 @@ int ext4fs_read_file(struct ext2fs_node *node, loff_t pos, - } - } else { - int n; -+ int n_left; - if (previous_block_number != -1) { - /* spill */ - status = ext4fs_devread(delayed_start, -@@ -153,8 +155,9 @@ int ext4fs_read_file(struct ext2fs_node *node, loff_t pos, - } - /* Zero no more than `len' bytes. */ - n = blocksize - skipfirst; -- if (n > len) -- n = len; -+ n_left = len - ( buf - start_buf ); -+ if (n > n_left) -+ n = n_left; - memset(buf, 0, n); - } - buf += blocksize - skipfirst; --- -2.17.1 - diff --git a/poky/meta/recipes-bsp/u-boot/files/0005-CVE-2019-14192-14193-14199.patch b/poky/meta/recipes-bsp/u-boot/files/0005-CVE-2019-14192-14193-14199.patch deleted file mode 100644 index a19545a2d..000000000 --- a/poky/meta/recipes-bsp/u-boot/files/0005-CVE-2019-14192-14193-14199.patch +++ /dev/null @@ -1,43 +0,0 @@ -From e8e602f4a4b2aacfb3da32bb8a838be15ea70e7b Mon Sep 17 00:00:00 2001 -From: "liucheng (G)" <liucheng32@huawei.com> -Date: Thu, 29 Aug 2019 13:47:33 +0000 -Subject: [PATCH 5/9] CVE: net: fix unbounded memcpy of UDP packet -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -This patch adds a check to udp_len to fix unbounded memcpy for -CVE-2019-14192, CVE-2019-14193 and CVE-2019-14199. - -Signed-off-by: Cheng Liu <liucheng32@huawei.com> -Reviewed-by: Simon Goldschmidt <simon.k.r.goldschmidt@gmail.com> -Reported-by: Fermín Serna <fermin@semmle.com> -Acked-by: Joe Hershberger <joe.hershberger@ni.com> - -Upstream-Status: Backport[http://git.denx.de/?p=u-boot.git;a=commit; - h=fe7288069d2e6659117049f7d27e261b550bb725] - -CVE: CVE-2019-14192, CVE-2019-14193 and CVE-2019-14199 - -Signed-off-by: Meng Li <Meng.Li@windriver.com> ---- - net/net.c | 3 +++ - 1 file changed, 3 insertions(+) - -diff --git a/net/net.c b/net/net.c -index 58b0417cbe..38105f1142 100644 ---- a/net/net.c -+++ b/net/net.c -@@ -1252,6 +1252,9 @@ void net_process_received_packet(uchar *in_packet, int len) - return; - } - -+ if (ntohs(ip->udp_len) < UDP_HDR_SIZE || ntohs(ip->udp_len) > ntohs(ip->ip_len)) -+ return; -+ - debug_cond(DEBUG_DEV_PKT, - "received UDP (to=%pI4, from=%pI4, len=%d)\n", - &dst_ip, &src_ip, len); --- -2.17.1 - diff --git a/poky/meta/recipes-bsp/u-boot/files/0006-CVE-2019-14197-14200-14201-14202-14203-14204.patch b/poky/meta/recipes-bsp/u-boot/files/0006-CVE-2019-14197-14200-14201-14202-14203-14204.patch deleted file mode 100644 index 04a09e46d..000000000 --- a/poky/meta/recipes-bsp/u-boot/files/0006-CVE-2019-14197-14200-14201-14202-14203-14204.patch +++ /dev/null @@ -1,44 +0,0 @@ -From 261658ddaf24bb35edd477cf09ec055569fd9894 Mon Sep 17 00:00:00 2001 -From: "liucheng (G)" <liucheng32@huawei.com> -Date: Thu, 29 Aug 2019 13:47:40 +0000 -Subject: [PATCH 6/9] CVE: nfs: fix stack-based buffer overflow in some - nfs_handler reply helper functions -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -This patch adds a check to nfs_handler to fix buffer overflow for CVE-2019-14197, -CVE-2019-14200, CVE-2019-14201, CVE-2019-14202, CVE-2019-14203 and CVE-2019-14204. - -Signed-off-by: Cheng Liu <liucheng32@huawei.com> -Reported-by: Fermín Serna <fermin@semmle.com> -Acked-by: Joe Hershberger <joe.hershberger@ni.com> - -Upstream-Status: Backport[http://git.denx.de/?p=u-boot.git;a=commit; - h=741a8a08ebe5bc3ccfe3cde6c2b44ee53891af21] - -CVE: CVE-2019-14197, CVE-2019-14200, CVE-2019-14201, CVE-2019-14202, - CVE-2019-14203 and CVE-2019-14204 - -Signed-off-by: Meng Li <Meng.Li@windriver.com> ---- - net/nfs.c | 3 +++ - 1 file changed, 3 insertions(+) - -diff --git a/net/nfs.c b/net/nfs.c -index d6a7f8e827..b7cf3b3a18 100644 ---- a/net/nfs.c -+++ b/net/nfs.c -@@ -732,6 +732,9 @@ static void nfs_handler(uchar *pkt, unsigned dest, struct in_addr sip, - - debug("%s\n", __func__); - -+ if (len > sizeof(struct rpc_t)) -+ return; -+ - if (dest != nfs_our_port) - return; - --- -2.17.1 - diff --git a/poky/meta/recipes-bsp/u-boot/files/0007-CVE-2019-14194-14198.patch b/poky/meta/recipes-bsp/u-boot/files/0007-CVE-2019-14194-14198.patch deleted file mode 100644 index b3e3b72eb..000000000 --- a/poky/meta/recipes-bsp/u-boot/files/0007-CVE-2019-14194-14198.patch +++ /dev/null @@ -1,42 +0,0 @@ -From fb6dc193bf2685b7574b218f7ca558aa54659e11 Mon Sep 17 00:00:00 2001 -From: "liucheng (G)" <liucheng32@huawei.com> -Date: Thu, 29 Aug 2019 13:47:48 +0000 -Subject: [PATCH 7/9] CVE-2019-14194/CVE-2019-14198: nfs: fix unbounded memcpy - with a failed length check at nfs_read_reply -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -This patch adds a check to rpc_pkt.u.reply.data at nfs_read_reply. - -Signed-off-by: Cheng Liu <liucheng32@huawei.com> -Reported-by: Fermín Serna <fermin@semmle.com> -Acked-by: Joe Hershberger <joe.hershberger@ni.com> - -Upstream-Status: Backport[http://git.denx.de/?p=u-boot.git;a=commit; - h=aa207cf3a6d68f39d64cd29057a4fb63943e9078] - -CVE: CVE-2019-14194 and CVE-2019-14198 - -Signed-off-by: Meng Li <Meng.Li@windriver.com> ---- - net/nfs.c | 3 +++ - 1 file changed, 3 insertions(+) - -diff --git a/net/nfs.c b/net/nfs.c -index b7cf3b3a18..11941fad1a 100644 ---- a/net/nfs.c -+++ b/net/nfs.c -@@ -701,6 +701,9 @@ static int nfs_read_reply(uchar *pkt, unsigned len) - &(rpc_pkt.u.reply.data[4 + nfsv3_data_offset]); - } - -+ if (((uchar *)&(rpc_pkt.u.reply.data[0]) - (uchar *)(&rpc_pkt) + rlen) > len) -+ return -9999; -+ - if (store_block(data_ptr, nfs_offset, rlen)) - return -9999; - --- -2.17.1 - diff --git a/poky/meta/recipes-bsp/u-boot/files/0008-CVE-2019-14195.patch b/poky/meta/recipes-bsp/u-boot/files/0008-CVE-2019-14195.patch deleted file mode 100644 index bf9fb0ef5..000000000 --- a/poky/meta/recipes-bsp/u-boot/files/0008-CVE-2019-14195.patch +++ /dev/null @@ -1,42 +0,0 @@ -From 2236973b8a173ff54ae1ebf8ec2300928e69bd1b Mon Sep 17 00:00:00 2001 -From: "liucheng (G)" <liucheng32@huawei.com> -Date: Thu, 29 Aug 2019 13:47:54 +0000 -Subject: [PATCH 8/9] CVE-2019-14195: nfs: fix unbounded memcpy with - unvalidated length at nfs_readlink_reply -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -This patch adds a check to rpc_pkt.u.reply.data at nfs_readlink_reply. - -Signed-off-by: Cheng Liu <liucheng32@huawei.com> -Reported-by: Fermín Serna <fermin@semmle.com> -Acked-by: Joe Hershberger <joe.hershberger@ni.com> - -Upstream-Status: Backport[http://git.denx.de/?p=u-boot.git;a=commit; - h=cf3a4f1e86ecdd24f87b615051b49d8e1968c230] - -CVE: CVE-2019-14195 - -Signed-off-by: Meng Li <Meng.Li@windriver.com> ---- - net/nfs.c | 3 +++ - 1 file changed, 3 insertions(+) - -diff --git a/net/nfs.c b/net/nfs.c -index 11941fad1a..915acd95cf 100644 ---- a/net/nfs.c -+++ b/net/nfs.c -@@ -634,6 +634,9 @@ static int nfs_readlink_reply(uchar *pkt, unsigned len) - /* new path length */ - rlen = ntohl(rpc_pkt.u.reply.data[1 + nfsv3_data_offset]); - -+ if (((uchar *)&(rpc_pkt.u.reply.data[0]) - (uchar *)(&rpc_pkt) + rlen) > len) -+ return -NFS_RPC_DROP; -+ - if (*((char *)&(rpc_pkt.u.reply.data[2 + nfsv3_data_offset])) != '/') { - int pathlen; - --- -2.17.1 - diff --git a/poky/meta/recipes-bsp/u-boot/files/0009-CVE-2019-14196.patch b/poky/meta/recipes-bsp/u-boot/files/0009-CVE-2019-14196.patch deleted file mode 100644 index f06e02529..000000000 --- a/poky/meta/recipes-bsp/u-boot/files/0009-CVE-2019-14196.patch +++ /dev/null @@ -1,48 +0,0 @@ -From 74c468caa95c86cdb12c4b8073e154c435ac0bf7 Mon Sep 17 00:00:00 2001 -From: "liucheng (G)" <liucheng32@huawei.com> -Date: Thu, 29 Aug 2019 13:48:02 +0000 -Subject: [PATCH 9/9] CVE-2019-14196: nfs: fix unbounded memcpy with a failed - length check at nfs_lookup_reply -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -This patch adds a check to rpc_pkt.u.reply.data at nfs_lookup_reply. - -Signed-off-by: Cheng Liu <liucheng32@huawei.com> -Reported-by: Fermín Serna <fermin@semmle.com> -Acked-by: Joe Hershberger <joe.hershberger@ni.com> - -Upstream-Status: Backport[http://git.denx.de/?p=u-boot.git;a=commit; - h=5d14ee4e53a81055d34ba280cb8fd90330f22a96] - -CVE: CVE-2019-14196 - -Signed-off-by: Meng Li <Meng.Li@windriver.com> ---- - net/nfs.c | 4 ++++ - 1 file changed, 4 insertions(+) - -diff --git a/net/nfs.c b/net/nfs.c -index 915acd95cf..89952aeb66 100644 ---- a/net/nfs.c -+++ b/net/nfs.c -@@ -566,11 +566,15 @@ static int nfs_lookup_reply(uchar *pkt, unsigned len) - } - - if (supported_nfs_versions & NFSV2_FLAG) { -+ if (((uchar *)&(rpc_pkt.u.reply.data[0]) - (uchar *)(&rpc_pkt) + NFS_FHSIZE) > len) -+ return -NFS_RPC_DROP; - memcpy(filefh, rpc_pkt.u.reply.data + 1, NFS_FHSIZE); - } else { /* NFSV3_FLAG */ - filefh3_length = ntohl(rpc_pkt.u.reply.data[1]); - if (filefh3_length > NFS3_FHSIZE) - filefh3_length = NFS3_FHSIZE; -+ if (((uchar *)&(rpc_pkt.u.reply.data[0]) - (uchar *)(&rpc_pkt) + filefh3_length) > len) -+ return -NFS_RPC_DROP; - memcpy(filefh, rpc_pkt.u.reply.data + 2, filefh3_length); - } - --- -2.17.1 - diff --git a/poky/meta/recipes-bsp/u-boot/u-boot-common.inc b/poky/meta/recipes-bsp/u-boot/u-boot-common.inc index f63dfa3b7..c3e458e92 100644 --- a/poky/meta/recipes-bsp/u-boot/u-boot-common.inc +++ b/poky/meta/recipes-bsp/u-boot/u-boot-common.inc @@ -12,18 +12,9 @@ PE = "1" # We use the revision in order to avoid having to fetch it from the # repo during parse -SRCREV = "e5aee22e4be75e75a854ab64503fc80598bc2004" +SRCREV = "61ba1244b548463dbfb3c5285b6b22e7c772c5bd" SRC_URI = "git://git.denx.de/u-boot.git \ - file://0001-CVE-2019-13103.patch \ - file://0002-CVE-2019-13104.patch \ - file://0003-CVE-2019-13105.patch \ - file://0004-CVE-2019-13106.patch \ - file://0005-CVE-2019-14192-14193-14199.patch \ - file://0006-CVE-2019-14197-14200-14201-14202-14203-14204.patch \ - file://0007-CVE-2019-14194-14198.patch \ - file://0008-CVE-2019-14195.patch \ - file://0009-CVE-2019-14196.patch \ -" + " S = "${WORKDIR}/git" diff --git a/poky/meta/recipes-bsp/u-boot/u-boot-fw-utils_2019.07.bb b/poky/meta/recipes-bsp/u-boot/u-boot-fw-utils_2019.10.bb index b5ce56847..04321b7b6 100644 --- a/poky/meta/recipes-bsp/u-boot/u-boot-fw-utils_2019.07.bb +++ b/poky/meta/recipes-bsp/u-boot/u-boot-fw-utils_2019.10.bb @@ -3,6 +3,8 @@ require u-boot-common.inc SUMMARY = "U-Boot bootloader fw_printenv/setenv utilities" DEPENDS += "mtd-utils" +SRC_URI += "file://0001-include-env.h-Ensure-ulong-is-defined.patch" + INSANE_SKIP_${PN} = "already-stripped" EXTRA_OEMAKE_class-target = 'CROSS_COMPILE=${TARGET_PREFIX} CC="${CC} ${CFLAGS} ${LDFLAGS}" HOSTCC="${BUILD_CC} ${BUILD_CFLAGS} ${BUILD_LDFLAGS}" V=1' EXTRA_OEMAKE_class-cross = 'HOSTCC="${CC} ${CFLAGS} ${LDFLAGS}" V=1' diff --git a/poky/meta/recipes-bsp/u-boot/u-boot-tools_2019.07.bb b/poky/meta/recipes-bsp/u-boot/u-boot-tools_2019.10.bb index bede984ef..bede984ef 100644 --- a/poky/meta/recipes-bsp/u-boot/u-boot-tools_2019.07.bb +++ b/poky/meta/recipes-bsp/u-boot/u-boot-tools_2019.10.bb diff --git a/poky/meta/recipes-bsp/u-boot/u-boot_2019.07.bb b/poky/meta/recipes-bsp/u-boot/u-boot_2019.10.bb index 02d67c0db..02d67c0db 100644 --- a/poky/meta/recipes-bsp/u-boot/u-boot_2019.07.bb +++ b/poky/meta/recipes-bsp/u-boot/u-boot_2019.10.bb diff --git a/poky/meta/recipes-bsp/usbutils/usbutils_012.bb b/poky/meta/recipes-bsp/usbutils/usbutils_012.bb index 0213e7af6..b670fa4ab 100644 --- a/poky/meta/recipes-bsp/usbutils/usbutils_012.bb +++ b/poky/meta/recipes-bsp/usbutils/usbutils_012.bb @@ -15,7 +15,7 @@ SRC_URI = "${KERNELORG_MIRROR}/linux/utils/usb/usbutils/usbutils-${PV}.tar.gz \ SRC_URI[md5sum] = "7484445cbcf04b3eacac892fe58f8d9f" SRC_URI[sha256sum] = "ae2e10aad530d95839b6f4d46cd41715eae6f0f1789310d793e9be21b3e7ae20" -inherit autotools pkgconfig distro_features_check update-alternatives +inherit autotools pkgconfig features_check update-alternatives ALTERNATIVE_${PN} = "lsusb" ALTERNATIVE_PRIORITY = "100" diff --git a/poky/meta/recipes-connectivity/avahi/avahi-ui_0.7.bb b/poky/meta/recipes-connectivity/avahi/avahi-ui_0.7.bb index 1c6e46aab..1510a0ef4 100644 --- a/poky/meta/recipes-connectivity/avahi/avahi-ui_0.7.bb +++ b/poky/meta/recipes-connectivity/avahi/avahi-ui_0.7.bb @@ -1,6 +1,6 @@ require avahi.inc -inherit distro_features_check +inherit features_check ANY_OF_DISTRO_FEATURES = "${GTK3DISTROFEATURES}" DEPENDS += "avahi" diff --git a/poky/meta/recipes-connectivity/bind/bind/0001-bind-fix-CVE-2019-6471.patch b/poky/meta/recipes-connectivity/bind/bind/0001-bind-fix-CVE-2019-6471.patch new file mode 100644 index 000000000..2fed99e1b --- /dev/null +++ b/poky/meta/recipes-connectivity/bind/bind/0001-bind-fix-CVE-2019-6471.patch @@ -0,0 +1,64 @@ +Backport patch to fix CVE-2019-6471. + +Ref: +https://security-tracker.debian.org/tracker/CVE-2019-6471 + +CVE: CVE-2019-6471 +Upstream-Status: Backport [https://gitlab.isc.org/isc-projects/bind9/commit/3a9c7bb] + +Signed-off-by: Kai Kang <kai.kang@windriver.com> + +From 3a9c7bb80d4a609b86427406d9dd783199920b5b Mon Sep 17 00:00:00 2001 +From: Mark Andrews <marka@isc.org> +Date: Tue, 19 Mar 2019 14:14:21 +1100 +Subject: [PATCH] move item_out test inside lock in dns_dispatch_getnext() + +(cherry picked from commit 60c42f849d520564ed42e5ed0ba46b4b69c07712) +--- + lib/dns/dispatch.c | 12 ++++++++---- + 1 file changed, 8 insertions(+), 4 deletions(-) + +diff --git a/lib/dns/dispatch.c b/lib/dns/dispatch.c +index 408beda367..3278db4a07 100644 +--- a/lib/dns/dispatch.c ++++ b/lib/dns/dispatch.c +@@ -134,7 +134,7 @@ struct dns_dispentry { + isc_task_t *task; + isc_taskaction_t action; + void *arg; +- bool item_out; ++ bool item_out; + dispsocket_t *dispsocket; + ISC_LIST(dns_dispatchevent_t) items; + ISC_LINK(dns_dispentry_t) link; +@@ -3422,13 +3422,14 @@ dns_dispatch_getnext(dns_dispentry_t *resp, dns_dispatchevent_t **sockevent) { + disp = resp->disp; + REQUIRE(VALID_DISPATCH(disp)); + +- REQUIRE(resp->item_out == true); +- resp->item_out = false; +- + ev = *sockevent; + *sockevent = NULL; + + LOCK(&disp->lock); ++ ++ REQUIRE(resp->item_out == true); ++ resp->item_out = false; ++ + if (ev->buffer.base != NULL) + free_buffer(disp, ev->buffer.base, ev->buffer.length); + free_devent(disp, ev); +@@ -3573,6 +3574,9 @@ dns_dispatch_removeresponse(dns_dispentry_t **resp, + isc_task_send(disp->task[0], &disp->ctlevent); + } + ++/* ++ * disp must be locked. ++ */ + static void + do_cancel(dns_dispatch_t *disp) { + dns_dispatchevent_t *ev; +-- +2.20.1 + diff --git a/poky/meta/recipes-connectivity/bind/bind/0001-fix-enforcement-of-tcp-clients-v1.patch b/poky/meta/recipes-connectivity/bind/bind/0001-fix-enforcement-of-tcp-clients-v1.patch new file mode 100644 index 000000000..48ae125f8 --- /dev/null +++ b/poky/meta/recipes-connectivity/bind/bind/0001-fix-enforcement-of-tcp-clients-v1.patch @@ -0,0 +1,60 @@ +Backport patch to fix CVE-2018-5743. + +Ref: +https://security-tracker.debian.org/tracker/CVE-2018-5743 + +CVE: CVE-2018-5743 +Upstream-Status: Backport [https://gitlab.isc.org/isc-projects/bind9/commit/ec2d50d] + +Signed-off-by: Kai Kang <kai.kang@windriver.com> + +From ec2d50da8d81814640e28593d912f4b96c7efece Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Witold=20Kr=C4=99cicki?= <wpk@isc.org> +Date: Thu, 3 Jan 2019 14:17:43 +0100 +Subject: [PATCH 1/6] fix enforcement of tcp-clients (v1) + +tcp-clients settings could be exceeded in some cases by +creating more and more active TCP clients that are over +the set quota limit, which in the end could lead to a +DoS attack by e.g. exhaustion of file descriptors. + +If TCP client we're closing went over the quota (so it's +not attached to a quota) mark it as mortal - so that it +will be destroyed and not set up to listen for new +connections - unless it's the last client for a specific +interface. + +(cherry picked from commit f97131d21b97381cef72b971b157345c1f9b4115) +(cherry picked from commit 9689ffc485df8f971f0ad81ab8ab1f5389493776) +--- + bin/named/client.c | 13 ++++++++++++- + 1 file changed, 12 insertions(+), 1 deletion(-) + +diff --git a/bin/named/client.c b/bin/named/client.c +index d482da7121..0739dd48af 100644 +--- a/bin/named/client.c ++++ b/bin/named/client.c +@@ -421,8 +421,19 @@ exit_check(ns_client_t *client) { + isc_socket_detach(&client->tcpsocket); + } + +- if (client->tcpquota != NULL) ++ if (client->tcpquota != NULL) { + isc_quota_detach(&client->tcpquota); ++ } else { ++ /* ++ * We went over quota with this client, we don't ++ * want to restart listening unless this is the ++ * last client on this interface, which is ++ * checked later. ++ */ ++ if (TCP_CLIENT(client)) { ++ client->mortal = true; ++ } ++ } + + if (client->timerset) { + (void)isc_timer_reset(client->timer, +-- +2.20.1 + diff --git a/poky/meta/recipes-connectivity/bind/bind/0002-tcp-clients-could-still-be-exceeded-v2.patch b/poky/meta/recipes-connectivity/bind/bind/0002-tcp-clients-could-still-be-exceeded-v2.patch new file mode 100644 index 000000000..ca4e8b1a6 --- /dev/null +++ b/poky/meta/recipes-connectivity/bind/bind/0002-tcp-clients-could-still-be-exceeded-v2.patch @@ -0,0 +1,670 @@ +Backport patch to fix CVE-2018-5743. + +Ref: +https://security-tracker.debian.org/tracker/CVE-2018-5743 + +CVE: CVE-2018-5743 +Upstream-Status: Backport [https://gitlab.isc.org/isc-projects/bind9/commit/719f604] + +Signed-off-by: Kai Kang <kai.kang@windriver.com> + +From 719f604e3fad5b7479bd14e2fa0ef4413f0a8fdc Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Witold=20Kr=C4=99cicki?= <wpk@isc.org> +Date: Fri, 4 Jan 2019 12:50:51 +0100 +Subject: [PATCH 2/6] tcp-clients could still be exceeded (v2) + +the TCP client quota could still be ineffective under some +circumstances. this change: + +- improves quota accounting to ensure that TCP clients are + properly limited, while still guaranteeing that at least one client + is always available to serve TCP connections on each interface. +- uses more descriptive names and removes one (ntcptarget) that + was no longer needed +- adds comments + +(cherry picked from commit 924651f1d5e605cd186d03f4f7340bcc54d77cc2) +(cherry picked from commit 55a7a458e30e47874d34bdf1079eb863a0512396) +--- + bin/named/client.c | 311 ++++++++++++++++++++----- + bin/named/include/named/client.h | 14 +- + bin/named/include/named/interfacemgr.h | 11 +- + bin/named/interfacemgr.c | 8 +- + 4 files changed, 267 insertions(+), 77 deletions(-) + +diff --git a/bin/named/client.c b/bin/named/client.c +index 0739dd48af..a7b49a0f71 100644 +--- a/bin/named/client.c ++++ b/bin/named/client.c +@@ -246,10 +246,11 @@ static void ns_client_dumpmessage(ns_client_t *client, const char *reason); + static isc_result_t get_client(ns_clientmgr_t *manager, ns_interface_t *ifp, + dns_dispatch_t *disp, bool tcp); + static isc_result_t get_worker(ns_clientmgr_t *manager, ns_interface_t *ifp, +- isc_socket_t *sock); ++ isc_socket_t *sock, ns_client_t *oldclient); + static inline bool +-allowed(isc_netaddr_t *addr, dns_name_t *signer, isc_netaddr_t *ecs_addr, +- uint8_t ecs_addrlen, uint8_t *ecs_scope, dns_acl_t *acl); ++allowed(isc_netaddr_t *addr, dns_name_t *signer, ++ isc_netaddr_t *ecs_addr, uint8_t ecs_addrlen, ++ uint8_t *ecs_scope, dns_acl_t *acl) + static void compute_cookie(ns_client_t *client, uint32_t when, + uint32_t nonce, const unsigned char *secret, + isc_buffer_t *buf); +@@ -405,8 +406,11 @@ exit_check(ns_client_t *client) { + */ + INSIST(client->recursionquota == NULL); + INSIST(client->newstate <= NS_CLIENTSTATE_READY); +- if (client->nreads > 0) ++ ++ if (client->nreads > 0) { + dns_tcpmsg_cancelread(&client->tcpmsg); ++ } ++ + if (client->nreads != 0) { + /* Still waiting for read cancel completion. */ + return (true); +@@ -416,25 +420,58 @@ exit_check(ns_client_t *client) { + dns_tcpmsg_invalidate(&client->tcpmsg); + client->tcpmsg_valid = false; + } ++ + if (client->tcpsocket != NULL) { + CTRACE("closetcp"); + isc_socket_detach(&client->tcpsocket); ++ ++ if (client->tcpactive) { ++ LOCK(&client->interface->lock); ++ INSIST(client->interface->ntcpactive > 0); ++ client->interface->ntcpactive--; ++ UNLOCK(&client->interface->lock); ++ client->tcpactive = false; ++ } + } + + if (client->tcpquota != NULL) { +- isc_quota_detach(&client->tcpquota); +- } else { + /* +- * We went over quota with this client, we don't +- * want to restart listening unless this is the +- * last client on this interface, which is +- * checked later. ++ * If we are not in a pipeline group, or ++ * we are the last client in the group, detach from ++ * tcpquota; otherwise, transfer the quota to ++ * another client in the same group. + */ +- if (TCP_CLIENT(client)) { +- client->mortal = true; ++ if (!ISC_LINK_LINKED(client, glink) || ++ (client->glink.next == NULL && ++ client->glink.prev == NULL)) ++ { ++ isc_quota_detach(&client->tcpquota); ++ } else if (client->glink.next != NULL) { ++ INSIST(client->glink.next->tcpquota == NULL); ++ client->glink.next->tcpquota = client->tcpquota; ++ client->tcpquota = NULL; ++ } else { ++ INSIST(client->glink.prev->tcpquota == NULL); ++ client->glink.prev->tcpquota = client->tcpquota; ++ client->tcpquota = NULL; + } + } + ++ /* ++ * Unlink from pipeline group. ++ */ ++ if (ISC_LINK_LINKED(client, glink)) { ++ if (client->glink.next != NULL) { ++ client->glink.next->glink.prev = ++ client->glink.prev; ++ } ++ if (client->glink.prev != NULL) { ++ client->glink.prev->glink.next = ++ client->glink.next; ++ } ++ ISC_LINK_INIT(client, glink); ++ } ++ + if (client->timerset) { + (void)isc_timer_reset(client->timer, + isc_timertype_inactive, +@@ -455,15 +492,16 @@ exit_check(ns_client_t *client) { + * that already. Check whether this client needs to remain + * active and force it to go inactive if not. + * +- * UDP clients go inactive at this point, but TCP clients +- * may remain active if we have fewer active TCP client +- * objects than desired due to an earlier quota exhaustion. ++ * UDP clients go inactive at this point, but a TCP client ++ * will needs to remain active if no other clients are ++ * listening for TCP requests on this interface, to ++ * prevent this interface from going nonresponsive. + */ + if (client->mortal && TCP_CLIENT(client) && !ns_g_clienttest) { + LOCK(&client->interface->lock); +- if (client->interface->ntcpcurrent < +- client->interface->ntcptarget) ++ if (client->interface->ntcpaccepting == 0) { + client->mortal = false; ++ } + UNLOCK(&client->interface->lock); + } + +@@ -472,15 +510,17 @@ exit_check(ns_client_t *client) { + * queue for recycling. + */ + if (client->mortal) { +- if (client->newstate > NS_CLIENTSTATE_INACTIVE) ++ if (client->newstate > NS_CLIENTSTATE_INACTIVE) { + client->newstate = NS_CLIENTSTATE_INACTIVE; ++ } + } + + if (NS_CLIENTSTATE_READY == client->newstate) { + if (TCP_CLIENT(client)) { + client_accept(client); +- } else ++ } else { + client_udprecv(client); ++ } + client->newstate = NS_CLIENTSTATE_MAX; + return (true); + } +@@ -492,41 +532,57 @@ exit_check(ns_client_t *client) { + /* + * We are trying to enter the inactive state. + */ +- if (client->naccepts > 0) ++ if (client->naccepts > 0) { + isc_socket_cancel(client->tcplistener, client->task, + ISC_SOCKCANCEL_ACCEPT); ++ } + + /* Still waiting for accept cancel completion. */ +- if (! (client->naccepts == 0)) ++ if (! (client->naccepts == 0)) { + return (true); ++ } + + /* Accept cancel is complete. */ +- if (client->nrecvs > 0) ++ if (client->nrecvs > 0) { + isc_socket_cancel(client->udpsocket, client->task, + ISC_SOCKCANCEL_RECV); ++ } + + /* Still waiting for recv cancel completion. */ +- if (! (client->nrecvs == 0)) ++ if (! (client->nrecvs == 0)) { + return (true); ++ } + + /* Still waiting for control event to be delivered */ +- if (client->nctls > 0) ++ if (client->nctls > 0) { + return (true); +- +- /* Deactivate the client. */ +- if (client->interface) +- ns_interface_detach(&client->interface); ++ } + + INSIST(client->naccepts == 0); + INSIST(client->recursionquota == NULL); +- if (client->tcplistener != NULL) ++ if (client->tcplistener != NULL) { + isc_socket_detach(&client->tcplistener); + +- if (client->udpsocket != NULL) ++ if (client->tcpactive) { ++ LOCK(&client->interface->lock); ++ INSIST(client->interface->ntcpactive > 0); ++ client->interface->ntcpactive--; ++ UNLOCK(&client->interface->lock); ++ client->tcpactive = false; ++ } ++ } ++ if (client->udpsocket != NULL) { + isc_socket_detach(&client->udpsocket); ++ } + +- if (client->dispatch != NULL) ++ /* Deactivate the client. */ ++ if (client->interface != NULL) { ++ ns_interface_detach(&client->interface); ++ } ++ ++ if (client->dispatch != NULL) { + dns_dispatch_detach(&client->dispatch); ++ } + + client->attributes = 0; + client->mortal = false; +@@ -551,10 +607,13 @@ exit_check(ns_client_t *client) { + client->newstate = NS_CLIENTSTATE_MAX; + if (!ns_g_clienttest && manager != NULL && + !manager->exiting) ++ { + ISC_QUEUE_PUSH(manager->inactive, client, + ilink); +- if (client->needshutdown) ++ } ++ if (client->needshutdown) { + isc_task_shutdown(client->task); ++ } + return (true); + } + } +@@ -675,7 +734,6 @@ client_start(isc_task_t *task, isc_event_t *event) { + } + } + +- + /*% + * The client's task has received a shutdown event. + */ +@@ -2507,17 +2565,12 @@ client_request(isc_task_t *task, isc_event_t *event) { + /* + * Pipeline TCP query processing. + */ +- if (client->message->opcode != dns_opcode_query) ++ if (client->message->opcode != dns_opcode_query) { + client->pipelined = false; ++ } + if (TCP_CLIENT(client) && client->pipelined) { +- result = isc_quota_reserve(&ns_g_server->tcpquota); +- if (result == ISC_R_SUCCESS) +- result = ns_client_replace(client); ++ result = ns_client_replace(client); + if (result != ISC_R_SUCCESS) { +- ns_client_log(client, NS_LOGCATEGORY_CLIENT, +- NS_LOGMODULE_CLIENT, ISC_LOG_WARNING, +- "no more TCP clients(read): %s", +- isc_result_totext(result)); + client->pipelined = false; + } + } +@@ -3087,6 +3140,7 @@ client_create(ns_clientmgr_t *manager, ns_client_t **clientp) { + client->filter_aaaa = dns_aaaa_ok; + #endif + client->needshutdown = ns_g_clienttest; ++ client->tcpactive = false; + + ISC_EVENT_INIT(&client->ctlevent, sizeof(client->ctlevent), 0, NULL, + NS_EVENT_CLIENTCONTROL, client_start, client, client, +@@ -3100,6 +3154,7 @@ client_create(ns_clientmgr_t *manager, ns_client_t **clientp) { + client->formerrcache.id = 0; + ISC_LINK_INIT(client, link); + ISC_LINK_INIT(client, rlink); ++ ISC_LINK_INIT(client, glink); + ISC_QLINK_INIT(client, ilink); + client->keytag = NULL; + client->keytag_len = 0; +@@ -3193,12 +3248,19 @@ client_newconn(isc_task_t *task, isc_event_t *event) { + + INSIST(client->state == NS_CLIENTSTATE_READY); + ++ /* ++ * The accept() was successful and we're now establishing a new ++ * connection. We need to make note of it in the client and ++ * interface objects so client objects can do the right thing ++ * when going inactive in exit_check() (see comments in ++ * client_accept() for details). ++ */ + INSIST(client->naccepts == 1); + client->naccepts--; + + LOCK(&client->interface->lock); +- INSIST(client->interface->ntcpcurrent > 0); +- client->interface->ntcpcurrent--; ++ INSIST(client->interface->ntcpaccepting > 0); ++ client->interface->ntcpaccepting--; + UNLOCK(&client->interface->lock); + + /* +@@ -3232,6 +3294,9 @@ client_newconn(isc_task_t *task, isc_event_t *event) { + NS_LOGMODULE_CLIENT, ISC_LOG_DEBUG(3), + "accept failed: %s", + isc_result_totext(nevent->result)); ++ if (client->tcpquota != NULL) { ++ isc_quota_detach(&client->tcpquota); ++ } + } + + if (exit_check(client)) +@@ -3270,18 +3335,12 @@ client_newconn(isc_task_t *task, isc_event_t *event) { + * deny service to legitimate TCP clients. + */ + client->pipelined = false; +- result = isc_quota_attach(&ns_g_server->tcpquota, +- &client->tcpquota); +- if (result == ISC_R_SUCCESS) +- result = ns_client_replace(client); +- if (result != ISC_R_SUCCESS) { +- ns_client_log(client, NS_LOGCATEGORY_CLIENT, +- NS_LOGMODULE_CLIENT, ISC_LOG_WARNING, +- "no more TCP clients(accept): %s", +- isc_result_totext(result)); +- } else if (ns_g_server->keepresporder == NULL || +- !allowed(&netaddr, NULL, NULL, 0, NULL, +- ns_g_server->keepresporder)) { ++ result = ns_client_replace(client); ++ if (result == ISC_R_SUCCESS && ++ (client->sctx->keepresporder == NULL || ++ !allowed(&netaddr, NULL, NULL, 0, NULL, ++ ns_g_server->keepresporder))) ++ { + client->pipelined = true; + } + +@@ -3298,12 +3357,80 @@ client_accept(ns_client_t *client) { + + CTRACE("accept"); + ++ /* ++ * The tcpquota object can only be simultaneously referenced a ++ * pre-defined number of times; this is configured by 'tcp-clients' ++ * in named.conf. If we can't attach to it here, that means the TCP ++ * client quota has been exceeded. ++ */ ++ result = isc_quota_attach(&client->sctx->tcpquota, ++ &client->tcpquota); ++ if (result != ISC_R_SUCCESS) { ++ bool exit; ++ ++ ns_client_log(client, NS_LOGCATEGORY_CLIENT, ++ NS_LOGMODULE_CLIENT, ISC_LOG_DEBUG(1), ++ "no more TCP clients: %s", ++ isc_result_totext(result)); ++ ++ /* ++ * We have exceeded the system-wide TCP client ++ * quota. But, we can't just block this accept ++ * in all cases, because if we did, a heavy TCP ++ * load on other interfaces might cause this ++ * interface to be starved, with no clients able ++ * to accept new connections. ++ * ++ * So, we check here to see if any other client ++ * is already servicing TCP queries on this ++ * interface (whether accepting, reading, or ++ * processing). ++ * ++ * If so, then it's okay *not* to call ++ * accept - we can let this client to go inactive ++ * and the other one handle the next connection ++ * when it's ready. ++ * ++ * But if not, then we need to be a little bit ++ * flexible about the quota. We allow *one* extra ++ * TCP client through, to ensure we're listening on ++ * every interface. ++ * ++ * (Note: In practice this means that the *real* ++ * TCP client quota is tcp-clients plus the number ++ * of interfaces.) ++ */ ++ LOCK(&client->interface->lock); ++ exit = (client->interface->ntcpactive > 0); ++ UNLOCK(&client->interface->lock); ++ ++ if (exit) { ++ client->newstate = NS_CLIENTSTATE_INACTIVE; ++ (void)exit_check(client); ++ return; ++ } ++ } ++ ++ /* ++ * By incrementing the interface's ntcpactive counter we signal ++ * that there is at least one client servicing TCP queries for the ++ * interface. ++ * ++ * We also make note of the fact in the client itself with the ++ * tcpactive flag. This ensures proper accounting by preventing ++ * us from accidentally incrementing or decrementing ntcpactive ++ * more than once per client object. ++ */ ++ if (!client->tcpactive) { ++ LOCK(&client->interface->lock); ++ client->interface->ntcpactive++; ++ UNLOCK(&client->interface->lock); ++ client->tcpactive = true; ++ } ++ + result = isc_socket_accept(client->tcplistener, client->task, + client_newconn, client); + if (result != ISC_R_SUCCESS) { +- UNEXPECTED_ERROR(__FILE__, __LINE__, +- "isc_socket_accept() failed: %s", +- isc_result_totext(result)); + /* + * XXXRTH What should we do? We're trying to accept but + * it didn't work. If we just give up, then TCP +@@ -3311,12 +3438,39 @@ client_accept(ns_client_t *client) { + * + * For now, we just go idle. + */ ++ UNEXPECTED_ERROR(__FILE__, __LINE__, ++ "isc_socket_accept() failed: %s", ++ isc_result_totext(result)); ++ if (client->tcpquota != NULL) { ++ isc_quota_detach(&client->tcpquota); ++ } + return; + } ++ ++ /* ++ * The client's 'naccepts' counter indicates that this client has ++ * called accept() and is waiting for a new connection. It should ++ * never exceed 1. ++ */ + INSIST(client->naccepts == 0); + client->naccepts++; ++ ++ /* ++ * The interface's 'ntcpaccepting' counter is incremented when ++ * any client calls accept(), and decremented in client_newconn() ++ * once the connection is established. ++ * ++ * When the client object is shutting down after handling a TCP ++ * request (see exit_check()), it looks to see whether this value is ++ * non-zero. If so, that means another client has already called ++ * accept() and is waiting to establish the next connection, which ++ * means the first client is free to go inactive. Otherwise, ++ * the first client must come back and call accept() again; this ++ * guarantees there will always be at least one client listening ++ * for new TCP connections on each interface. ++ */ + LOCK(&client->interface->lock); +- client->interface->ntcpcurrent++; ++ client->interface->ntcpaccepting++; + UNLOCK(&client->interface->lock); + } + +@@ -3390,13 +3544,14 @@ ns_client_replace(ns_client_t *client) { + tcp = TCP_CLIENT(client); + if (tcp && client->pipelined) { + result = get_worker(client->manager, client->interface, +- client->tcpsocket); ++ client->tcpsocket, client); + } else { + result = get_client(client->manager, client->interface, + client->dispatch, tcp); + } +- if (result != ISC_R_SUCCESS) ++ if (result != ISC_R_SUCCESS) { + return (result); ++ } + + /* + * The responsibility for listening for new requests is hereby +@@ -3585,6 +3740,7 @@ get_client(ns_clientmgr_t *manager, ns_interface_t *ifp, + client->attributes |= NS_CLIENTATTR_TCP; + isc_socket_attach(ifp->tcpsocket, + &client->tcplistener); ++ + } else { + isc_socket_t *sock; + +@@ -3602,7 +3758,8 @@ get_client(ns_clientmgr_t *manager, ns_interface_t *ifp, + } + + static isc_result_t +-get_worker(ns_clientmgr_t *manager, ns_interface_t *ifp, isc_socket_t *sock) ++get_worker(ns_clientmgr_t *manager, ns_interface_t *ifp, isc_socket_t *sock, ++ ns_client_t *oldclient) + { + isc_result_t result = ISC_R_SUCCESS; + isc_event_t *ev; +@@ -3610,6 +3767,7 @@ get_worker(ns_clientmgr_t *manager, ns_interface_t *ifp, isc_socket_t *sock) + MTRACE("get worker"); + + REQUIRE(manager != NULL); ++ REQUIRE(oldclient != NULL); + + if (manager->exiting) + return (ISC_R_SHUTTINGDOWN); +@@ -3642,7 +3800,28 @@ get_worker(ns_clientmgr_t *manager, ns_interface_t *ifp, isc_socket_t *sock) + ns_interface_attach(ifp, &client->interface); + client->newstate = client->state = NS_CLIENTSTATE_WORKING; + INSIST(client->recursionquota == NULL); +- client->tcpquota = &ns_g_server->tcpquota; ++ ++ /* ++ * Transfer TCP quota to the new client. ++ */ ++ INSIST(client->tcpquota == NULL); ++ INSIST(oldclient->tcpquota != NULL); ++ client->tcpquota = oldclient->tcpquota; ++ oldclient->tcpquota = NULL; ++ ++ /* ++ * Link to a pipeline group, creating it if needed. ++ */ ++ if (!ISC_LINK_LINKED(oldclient, glink)) { ++ oldclient->glink.next = NULL; ++ oldclient->glink.prev = NULL; ++ } ++ client->glink.next = oldclient->glink.next; ++ client->glink.prev = oldclient; ++ if (oldclient->glink.next != NULL) { ++ oldclient->glink.next->glink.prev = client; ++ } ++ oldclient->glink.next = client; + + client->dscp = ifp->dscp; + +@@ -3656,6 +3835,12 @@ get_worker(ns_clientmgr_t *manager, ns_interface_t *ifp, isc_socket_t *sock) + (void)isc_socket_getpeername(client->tcpsocket, &client->peeraddr); + client->peeraddr_valid = true; + ++ LOCK(&client->interface->lock); ++ client->interface->ntcpactive++; ++ UNLOCK(&client->interface->lock); ++ ++ client->tcpactive = true; ++ + INSIST(client->tcpmsg_valid == false); + dns_tcpmsg_init(client->mctx, client->tcpsocket, &client->tcpmsg); + client->tcpmsg_valid = true; +diff --git a/bin/named/include/named/client.h b/bin/named/include/named/client.h +index b23a7b191d..1f7973f9c5 100644 +--- a/bin/named/include/named/client.h ++++ b/bin/named/include/named/client.h +@@ -94,7 +94,8 @@ struct ns_client { + int nupdates; + int nctls; + int references; +- bool needshutdown; /* ++ bool tcpactive; ++ bool needshutdown; /* + * Used by clienttest to get + * the client to go from + * inactive to free state +@@ -130,9 +131,9 @@ struct ns_client { + isc_stdtime_t now; + isc_time_t tnow; + dns_name_t signername; /*%< [T]SIG key name */ +- dns_name_t * signer; /*%< NULL if not valid sig */ +- bool mortal; /*%< Die after handling request */ +- bool pipelined; /*%< TCP queries not in sequence */ ++ dns_name_t *signer; /*%< NULL if not valid sig */ ++ bool mortal; /*%< Die after handling request */ ++ bool pipelined; /*%< TCP queries not in sequence */ + isc_quota_t *tcpquota; + isc_quota_t *recursionquota; + ns_interface_t *interface; +@@ -143,8 +144,8 @@ struct ns_client { + isc_sockaddr_t destsockaddr; + + isc_netaddr_t ecs_addr; /*%< EDNS client subnet */ +- uint8_t ecs_addrlen; +- uint8_t ecs_scope; ++ uint8_t ecs_addrlen; ++ uint8_t ecs_scope; + + struct in6_pktinfo pktinfo; + isc_dscp_t dscp; +@@ -166,6 +167,7 @@ struct ns_client { + + ISC_LINK(ns_client_t) link; + ISC_LINK(ns_client_t) rlink; ++ ISC_LINK(ns_client_t) glink; + ISC_QLINK(ns_client_t) ilink; + unsigned char cookie[8]; + uint32_t expire; +diff --git a/bin/named/include/named/interfacemgr.h b/bin/named/include/named/interfacemgr.h +index 7d1883e1e8..61b08826a6 100644 +--- a/bin/named/include/named/interfacemgr.h ++++ b/bin/named/include/named/interfacemgr.h +@@ -77,9 +77,14 @@ struct ns_interface { + /*%< UDP dispatchers. */ + isc_socket_t * tcpsocket; /*%< TCP socket. */ + isc_dscp_t dscp; /*%< "listen-on" DSCP value */ +- int ntcptarget; /*%< Desired number of concurrent +- TCP accepts */ +- int ntcpcurrent; /*%< Current ditto, locked */ ++ int ntcpaccepting; /*%< Number of clients ++ ready to accept new ++ TCP connections on this ++ interface */ ++ int ntcpactive; /*%< Number of clients ++ servicing TCP queries ++ (whether accepting or ++ connected) */ + int nudpdispatch; /*%< Number of UDP dispatches */ + ns_clientmgr_t * clientmgr; /*%< Client manager. */ + ISC_LINK(ns_interface_t) link; +diff --git a/bin/named/interfacemgr.c b/bin/named/interfacemgr.c +index 419927bf54..955096ef47 100644 +--- a/bin/named/interfacemgr.c ++++ b/bin/named/interfacemgr.c +@@ -386,8 +386,8 @@ ns_interface_create(ns_interfacemgr_t *mgr, isc_sockaddr_t *addr, + * connections will be handled in parallel even though there is + * only one client initially. + */ +- ifp->ntcptarget = 1; +- ifp->ntcpcurrent = 0; ++ ifp->ntcpaccepting = 0; ++ ifp->ntcpactive = 0; + ifp->nudpdispatch = 0; + + ifp->dscp = -1; +@@ -522,9 +522,7 @@ ns_interface_accepttcp(ns_interface_t *ifp) { + */ + (void)isc_socket_filter(ifp->tcpsocket, "dataready"); + +- result = ns_clientmgr_createclients(ifp->clientmgr, +- ifp->ntcptarget, ifp, +- true); ++ result = ns_clientmgr_createclients(ifp->clientmgr, 1, ifp, true); + if (result != ISC_R_SUCCESS) { + UNEXPECTED_ERROR(__FILE__, __LINE__, + "TCP ns_clientmgr_createclients(): %s", +-- +2.20.1 + diff --git a/poky/meta/recipes-connectivity/bind/bind/0003-use-reference-counter-for-pipeline-groups-v3.patch b/poky/meta/recipes-connectivity/bind/bind/0003-use-reference-counter-for-pipeline-groups-v3.patch new file mode 100644 index 000000000..032cfb8c4 --- /dev/null +++ b/poky/meta/recipes-connectivity/bind/bind/0003-use-reference-counter-for-pipeline-groups-v3.patch @@ -0,0 +1,278 @@ +Backport patch to fix CVE-2018-5743. + +Ref: +https://security-tracker.debian.org/tracker/CVE-2018-5743 + +CVE: CVE-2018-5743 +Upstream-Status: Backport [https://gitlab.isc.org/isc-projects/bind9/commit/366b4e1] + +Signed-off-by: Kai Kang <kai.kang@windriver.com> + +From 366b4e1ede8aed690e981e07137cb1cb77879c36 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Micha=C5=82=20K=C4=99pie=C5=84?= <michal@isc.org> +Date: Thu, 17 Jan 2019 15:53:38 +0100 +Subject: [PATCH 3/6] use reference counter for pipeline groups (v3) + +Track pipeline groups using a shared reference counter +instead of a linked list. + +(cherry picked from commit 513afd33eb17d5dc41a3f0d2d38204ef8c5f6f91) +(cherry picked from commit 9446629b730c59c4215f08d37fbaf810282fbccb) +--- + bin/named/client.c | 171 ++++++++++++++++++++----------- + bin/named/include/named/client.h | 2 +- + 2 files changed, 110 insertions(+), 63 deletions(-) + +diff --git a/bin/named/client.c b/bin/named/client.c +index a7b49a0f71..277656cef0 100644 +--- a/bin/named/client.c ++++ b/bin/named/client.c +@@ -299,6 +299,75 @@ ns_client_settimeout(ns_client_t *client, unsigned int seconds) { + } + } + ++/*% ++ * Allocate a reference counter that will track the number of client structures ++ * using the TCP connection that 'client' called accept() for. This counter ++ * will be shared between all client structures associated with this TCP ++ * connection. ++ */ ++static void ++pipeline_init(ns_client_t *client) { ++ isc_refcount_t *refs; ++ ++ REQUIRE(client->pipeline_refs == NULL); ++ ++ /* ++ * A global memory context is used for the allocation as different ++ * client structures may have different memory contexts assigned and a ++ * reference counter allocated here might need to be freed by a ++ * different client. The performance impact caused by memory context ++ * contention here is expected to be negligible, given that this code ++ * is only executed for TCP connections. ++ */ ++ refs = isc_mem_allocate(client->sctx->mctx, sizeof(*refs)); ++ isc_refcount_init(refs, 1); ++ client->pipeline_refs = refs; ++} ++ ++/*% ++ * Increase the count of client structures using the TCP connection that ++ * 'source' is associated with and put a pointer to that count in 'target', ++ * thus associating it with the same TCP connection. ++ */ ++static void ++pipeline_attach(ns_client_t *source, ns_client_t *target) { ++ int old_refs; ++ ++ REQUIRE(source->pipeline_refs != NULL); ++ REQUIRE(target->pipeline_refs == NULL); ++ ++ old_refs = isc_refcount_increment(source->pipeline_refs); ++ INSIST(old_refs > 0); ++ target->pipeline_refs = source->pipeline_refs; ++} ++ ++/*% ++ * Decrease the count of client structures using the TCP connection that ++ * 'client' is associated with. If this is the last client using this TCP ++ * connection, free the reference counter and return true; otherwise, return ++ * false. ++ */ ++static bool ++pipeline_detach(ns_client_t *client) { ++ isc_refcount_t *refs; ++ int old_refs; ++ ++ REQUIRE(client->pipeline_refs != NULL); ++ ++ refs = client->pipeline_refs; ++ client->pipeline_refs = NULL; ++ ++ old_refs = isc_refcount_decrement(refs); ++ INSIST(old_refs > 0); ++ ++ if (old_refs == 1) { ++ isc_mem_free(client->sctx->mctx, refs); ++ return (true); ++ } ++ ++ return (false); ++} ++ + /*% + * Check for a deactivation or shutdown request and take appropriate + * action. Returns true if either is in progress; in this case +@@ -421,6 +490,40 @@ exit_check(ns_client_t *client) { + client->tcpmsg_valid = false; + } + ++ if (client->tcpquota != NULL) { ++ if (client->pipeline_refs == NULL || ++ pipeline_detach(client)) ++ { ++ /* ++ * Only detach from the TCP client quota if ++ * there are no more client structures using ++ * this TCP connection. ++ * ++ * Note that we check 'pipeline_refs' and not ++ * 'pipelined' because in some cases (e.g. ++ * after receiving a request with an opcode ++ * different than QUERY) 'pipelined' is set to ++ * false after the reference counter gets ++ * allocated in pipeline_init() and we must ++ * still drop our reference as failing to do so ++ * would prevent the reference counter itself ++ * from being freed. ++ */ ++ isc_quota_detach(&client->tcpquota); ++ } else { ++ /* ++ * There are other client structures using this ++ * TCP connection, so we cannot detach from the ++ * TCP client quota to prevent excess TCP ++ * connections from being accepted. However, ++ * this client structure might later be reused ++ * for accepting new connections and thus must ++ * have its 'tcpquota' field set to NULL. ++ */ ++ client->tcpquota = NULL; ++ } ++ } ++ + if (client->tcpsocket != NULL) { + CTRACE("closetcp"); + isc_socket_detach(&client->tcpsocket); +@@ -434,44 +537,6 @@ exit_check(ns_client_t *client) { + } + } + +- if (client->tcpquota != NULL) { +- /* +- * If we are not in a pipeline group, or +- * we are the last client in the group, detach from +- * tcpquota; otherwise, transfer the quota to +- * another client in the same group. +- */ +- if (!ISC_LINK_LINKED(client, glink) || +- (client->glink.next == NULL && +- client->glink.prev == NULL)) +- { +- isc_quota_detach(&client->tcpquota); +- } else if (client->glink.next != NULL) { +- INSIST(client->glink.next->tcpquota == NULL); +- client->glink.next->tcpquota = client->tcpquota; +- client->tcpquota = NULL; +- } else { +- INSIST(client->glink.prev->tcpquota == NULL); +- client->glink.prev->tcpquota = client->tcpquota; +- client->tcpquota = NULL; +- } +- } +- +- /* +- * Unlink from pipeline group. +- */ +- if (ISC_LINK_LINKED(client, glink)) { +- if (client->glink.next != NULL) { +- client->glink.next->glink.prev = +- client->glink.prev; +- } +- if (client->glink.prev != NULL) { +- client->glink.prev->glink.next = +- client->glink.next; +- } +- ISC_LINK_INIT(client, glink); +- } +- + if (client->timerset) { + (void)isc_timer_reset(client->timer, + isc_timertype_inactive, +@@ -3130,6 +3195,7 @@ client_create(ns_clientmgr_t *manager, ns_client_t **clientp) { + dns_name_init(&client->signername, NULL); + client->mortal = false; + client->pipelined = false; ++ client->pipeline_refs = NULL; + client->tcpquota = NULL; + client->recursionquota = NULL; + client->interface = NULL; +@@ -3154,7 +3220,6 @@ client_create(ns_clientmgr_t *manager, ns_client_t **clientp) { + client->formerrcache.id = 0; + ISC_LINK_INIT(client, link); + ISC_LINK_INIT(client, rlink); +- ISC_LINK_INIT(client, glink); + ISC_QLINK_INIT(client, ilink); + client->keytag = NULL; + client->keytag_len = 0; +@@ -3341,6 +3406,7 @@ client_newconn(isc_task_t *task, isc_event_t *event) { + !allowed(&netaddr, NULL, NULL, 0, NULL, + ns_g_server->keepresporder))) + { ++ pipeline_init(client); + client->pipelined = true; + } + +@@ -3800,35 +3866,16 @@ get_worker(ns_clientmgr_t *manager, ns_interface_t *ifp, isc_socket_t *sock, + ns_interface_attach(ifp, &client->interface); + client->newstate = client->state = NS_CLIENTSTATE_WORKING; + INSIST(client->recursionquota == NULL); +- +- /* +- * Transfer TCP quota to the new client. +- */ +- INSIST(client->tcpquota == NULL); +- INSIST(oldclient->tcpquota != NULL); +- client->tcpquota = oldclient->tcpquota; +- oldclient->tcpquota = NULL; +- +- /* +- * Link to a pipeline group, creating it if needed. +- */ +- if (!ISC_LINK_LINKED(oldclient, glink)) { +- oldclient->glink.next = NULL; +- oldclient->glink.prev = NULL; +- } +- client->glink.next = oldclient->glink.next; +- client->glink.prev = oldclient; +- if (oldclient->glink.next != NULL) { +- oldclient->glink.next->glink.prev = client; +- } +- oldclient->glink.next = client; ++ client->tcpquota = &client->sctx->tcpquota; + + client->dscp = ifp->dscp; + + client->attributes |= NS_CLIENTATTR_TCP; +- client->pipelined = true; + client->mortal = true; + ++ pipeline_attach(oldclient, client); ++ client->pipelined = true; ++ + isc_socket_attach(ifp->tcpsocket, &client->tcplistener); + isc_socket_attach(sock, &client->tcpsocket); + isc_socket_setname(client->tcpsocket, "worker-tcp", NULL); +diff --git a/bin/named/include/named/client.h b/bin/named/include/named/client.h +index 1f7973f9c5..aeed9ccdda 100644 +--- a/bin/named/include/named/client.h ++++ b/bin/named/include/named/client.h +@@ -134,6 +134,7 @@ struct ns_client { + dns_name_t *signer; /*%< NULL if not valid sig */ + bool mortal; /*%< Die after handling request */ + bool pipelined; /*%< TCP queries not in sequence */ ++ isc_refcount_t *pipeline_refs; + isc_quota_t *tcpquota; + isc_quota_t *recursionquota; + ns_interface_t *interface; +@@ -167,7 +168,6 @@ struct ns_client { + + ISC_LINK(ns_client_t) link; + ISC_LINK(ns_client_t) rlink; +- ISC_LINK(ns_client_t) glink; + ISC_QLINK(ns_client_t) ilink; + unsigned char cookie[8]; + uint32_t expire; +-- +2.20.1 + diff --git a/poky/meta/recipes-connectivity/bind/bind/0004-better-tcpquota-accounting-and-client-mortality-chec.patch b/poky/meta/recipes-connectivity/bind/bind/0004-better-tcpquota-accounting-and-client-mortality-chec.patch new file mode 100644 index 000000000..034ab1330 --- /dev/null +++ b/poky/meta/recipes-connectivity/bind/bind/0004-better-tcpquota-accounting-and-client-mortality-chec.patch @@ -0,0 +1,512 @@ +Backport patch to fix CVE-2018-5743. + +Ref: +https://security-tracker.debian.org/tracker/CVE-2018-5743 + +CVE: CVE-2018-5743 +Upstream-Status: Backport [https://gitlab.isc.org/isc-projects/bind9/commit/2ab8a08] + +Signed-off-by: Kai Kang <kai.kang@windriver.com> + +From 2ab8a085b3c666f28f1f9229bd6ecb59915b26c3 Mon Sep 17 00:00:00 2001 +From: Evan Hunt <each@isc.org> +Date: Fri, 5 Apr 2019 16:12:18 -0700 +Subject: [PATCH 4/6] better tcpquota accounting and client mortality checks + +- ensure that tcpactive is cleaned up correctly when accept() fails. +- set 'client->tcpattached' when the client is attached to the tcpquota. + carry this value on to new clients sharing the same pipeline group. + don't call isc_quota_detach() on the tcpquota unless tcpattached is + set. this way clients that were allowed to accept TCP connections + despite being over quota (and therefore, were never attached to the + quota) will not inadvertently detach from it and mess up the + accounting. +- simplify the code for tcpquota disconnection by using a new function + tcpquota_disconnect(). +- before deciding whether to reject a new connection due to quota + exhaustion, check to see whether there are at least two active + clients. previously, this was "at least one", but that could be + insufficient if there was one other client in READING state (waiting + for messages on an open connection) but none in READY (listening + for new connections). +- before deciding whether a TCP client object can to go inactive, we + must ensure there are enough other clients to maintain service + afterward -- both accepting new connections and reading/processing new + queries. A TCP client can't shut down unless at least one + client is accepting new connections and (in the case of pipelined + clients) at least one additional client is waiting to read. + +(cherry picked from commit c7394738b2445c16f728a88394864dd61baad900) +(cherry picked from commit e965d5f11d3d0f6d59704e614fceca2093cb1856) +(cherry picked from commit 87d431161450777ea093821212abfb52d51b36e3) +--- + bin/named/client.c | 244 +++++++++++++++++++------------ + bin/named/include/named/client.h | 3 +- + 2 files changed, 152 insertions(+), 95 deletions(-) + +diff --git a/bin/named/client.c b/bin/named/client.c +index 277656cef0..61e96dd28c 100644 +--- a/bin/named/client.c ++++ b/bin/named/client.c +@@ -244,13 +244,14 @@ static void client_start(isc_task_t *task, isc_event_t *event); + static void client_request(isc_task_t *task, isc_event_t *event); + static void ns_client_dumpmessage(ns_client_t *client, const char *reason); + static isc_result_t get_client(ns_clientmgr_t *manager, ns_interface_t *ifp, +- dns_dispatch_t *disp, bool tcp); ++ dns_dispatch_t *disp, ns_client_t *oldclient, ++ bool tcp); + static isc_result_t get_worker(ns_clientmgr_t *manager, ns_interface_t *ifp, + isc_socket_t *sock, ns_client_t *oldclient); + static inline bool + allowed(isc_netaddr_t *addr, dns_name_t *signer, + isc_netaddr_t *ecs_addr, uint8_t ecs_addrlen, +- uint8_t *ecs_scope, dns_acl_t *acl) ++ uint8_t *ecs_scope, dns_acl_t *acl); + static void compute_cookie(ns_client_t *client, uint32_t when, + uint32_t nonce, const unsigned char *secret, + isc_buffer_t *buf); +@@ -319,7 +320,7 @@ pipeline_init(ns_client_t *client) { + * contention here is expected to be negligible, given that this code + * is only executed for TCP connections. + */ +- refs = isc_mem_allocate(client->sctx->mctx, sizeof(*refs)); ++ refs = isc_mem_allocate(ns_g_mctx, sizeof(*refs)); + isc_refcount_init(refs, 1); + client->pipeline_refs = refs; + } +@@ -331,13 +332,13 @@ pipeline_init(ns_client_t *client) { + */ + static void + pipeline_attach(ns_client_t *source, ns_client_t *target) { +- int old_refs; ++ int refs; + + REQUIRE(source->pipeline_refs != NULL); + REQUIRE(target->pipeline_refs == NULL); + +- old_refs = isc_refcount_increment(source->pipeline_refs); +- INSIST(old_refs > 0); ++ isc_refcount_increment(source->pipeline_refs, &refs); ++ INSIST(refs > 1); + target->pipeline_refs = source->pipeline_refs; + } + +@@ -349,25 +350,51 @@ pipeline_attach(ns_client_t *source, ns_client_t *target) { + */ + static bool + pipeline_detach(ns_client_t *client) { +- isc_refcount_t *refs; +- int old_refs; ++ isc_refcount_t *refcount; ++ int refs; + + REQUIRE(client->pipeline_refs != NULL); + +- refs = client->pipeline_refs; ++ refcount = client->pipeline_refs; + client->pipeline_refs = NULL; + +- old_refs = isc_refcount_decrement(refs); +- INSIST(old_refs > 0); ++ isc_refcount_decrement(refcount, refs); + +- if (old_refs == 1) { +- isc_mem_free(client->sctx->mctx, refs); ++ if (refs == 0) { ++ isc_mem_free(ns_g_mctx, refs); + return (true); + } + + return (false); + } + ++/* ++ * Detach a client from the TCP client quota if appropriate, and set ++ * the quota pointer to NULL. ++ * ++ * Sometimes when the TCP client quota is exhausted but there are no other ++ * clients servicing the interface, a client will be allowed to continue ++ * running despite not having been attached to the quota. In this event, ++ * the TCP quota was never attached to the client, so when the client (or ++ * associated pipeline group) shuts down, the quota must NOT be detached. ++ * ++ * Otherwise, if the quota pointer is set, it should be detached. If not ++ * set at all, we just return without doing anything. ++ */ ++static void ++tcpquota_disconnect(ns_client_t *client) { ++ if (client->tcpquota == NULL) { ++ return; ++ } ++ ++ if (client->tcpattached) { ++ isc_quota_detach(&client->tcpquota); ++ client->tcpattached = false; ++ } else { ++ client->tcpquota = NULL; ++ } ++} ++ + /*% + * Check for a deactivation or shutdown request and take appropriate + * action. Returns true if either is in progress; in this case +@@ -490,38 +517,31 @@ exit_check(ns_client_t *client) { + client->tcpmsg_valid = false; + } + +- if (client->tcpquota != NULL) { +- if (client->pipeline_refs == NULL || +- pipeline_detach(client)) +- { +- /* +- * Only detach from the TCP client quota if +- * there are no more client structures using +- * this TCP connection. +- * +- * Note that we check 'pipeline_refs' and not +- * 'pipelined' because in some cases (e.g. +- * after receiving a request with an opcode +- * different than QUERY) 'pipelined' is set to +- * false after the reference counter gets +- * allocated in pipeline_init() and we must +- * still drop our reference as failing to do so +- * would prevent the reference counter itself +- * from being freed. +- */ +- isc_quota_detach(&client->tcpquota); +- } else { +- /* +- * There are other client structures using this +- * TCP connection, so we cannot detach from the +- * TCP client quota to prevent excess TCP +- * connections from being accepted. However, +- * this client structure might later be reused +- * for accepting new connections and thus must +- * have its 'tcpquota' field set to NULL. +- */ +- client->tcpquota = NULL; +- } ++ /* ++ * Detach from pipeline group and from TCP client quota, ++ * if appropriate. ++ * ++ * - If no pipeline group is active, attempt to ++ * detach from the TCP client quota. ++ * ++ * - If a pipeline group is active, detach from it; ++ * if the return code indicates that there no more ++ * clients left if this pipeline group, we also detach ++ * from the TCP client quota. ++ * ++ * - Otherwise we don't try to detach, we just set the ++ * TCP quota pointer to NULL if it wasn't NULL already. ++ * ++ * tcpquota_disconnect() will set tcpquota to NULL, either ++ * by detaching it or by assignment, depending on the ++ * needs of the client. See the comments on that function ++ * for further information. ++ */ ++ if (client->pipeline_refs == NULL || pipeline_detach(client)) { ++ tcpquota_disconnect(client); ++ } else { ++ client->tcpquota = NULL; ++ client->tcpattached = false; + } + + if (client->tcpsocket != NULL) { +@@ -544,8 +564,6 @@ exit_check(ns_client_t *client) { + client->timerset = false; + } + +- client->pipelined = false; +- + client->peeraddr_valid = false; + + client->state = NS_CLIENTSTATE_READY; +@@ -558,18 +576,27 @@ exit_check(ns_client_t *client) { + * active and force it to go inactive if not. + * + * UDP clients go inactive at this point, but a TCP client +- * will needs to remain active if no other clients are +- * listening for TCP requests on this interface, to +- * prevent this interface from going nonresponsive. ++ * may need to remain active and go into ready state if ++ * no other clients are available to listen for TCP ++ * requests on this interface or (in the case of pipelined ++ * clients) to read for additional messages on the current ++ * connection. + */ + if (client->mortal && TCP_CLIENT(client) && !ns_g_clienttest) { + LOCK(&client->interface->lock); +- if (client->interface->ntcpaccepting == 0) { ++ if ((client->interface->ntcpaccepting == 0 || ++ (client->pipelined && ++ client->interface->ntcpactive < 2)) && ++ client->newstate != NS_CLIENTSTATE_FREED) ++ { + client->mortal = false; ++ client->newstate = NS_CLIENTSTATE_READY; + } + UNLOCK(&client->interface->lock); + } + ++ client->pipelined = false; ++ + /* + * We don't need the client; send it to the inactive + * queue for recycling. +@@ -2634,6 +2661,18 @@ client_request(isc_task_t *task, isc_event_t *event) { + client->pipelined = false; + } + if (TCP_CLIENT(client) && client->pipelined) { ++ /* ++ * We're pipelining. Replace the client; the ++ * the replacement can read the TCP socket looking ++ * for new messages and this client can process the ++ * current message asynchronously. ++ * ++ * There are now at least three clients using this ++ * TCP socket - one accepting new connections, ++ * one reading an existing connection to get new ++ * messages, and one answering the message already ++ * received. ++ */ + result = ns_client_replace(client); + if (result != ISC_R_SUCCESS) { + client->pipelined = false; +@@ -3197,6 +3236,7 @@ client_create(ns_clientmgr_t *manager, ns_client_t **clientp) { + client->pipelined = false; + client->pipeline_refs = NULL; + client->tcpquota = NULL; ++ client->tcpattached = false; + client->recursionquota = NULL; + client->interface = NULL; + client->peeraddr_valid = false; +@@ -3359,9 +3399,7 @@ client_newconn(isc_task_t *task, isc_event_t *event) { + NS_LOGMODULE_CLIENT, ISC_LOG_DEBUG(3), + "accept failed: %s", + isc_result_totext(nevent->result)); +- if (client->tcpquota != NULL) { +- isc_quota_detach(&client->tcpquota); +- } ++ tcpquota_disconnect(client); + } + + if (exit_check(client)) +@@ -3402,7 +3440,7 @@ client_newconn(isc_task_t *task, isc_event_t *event) { + client->pipelined = false; + result = ns_client_replace(client); + if (result == ISC_R_SUCCESS && +- (client->sctx->keepresporder == NULL || ++ (ns_g_server->keepresporder == NULL || + !allowed(&netaddr, NULL, NULL, 0, NULL, + ns_g_server->keepresporder))) + { +@@ -3429,7 +3467,7 @@ client_accept(ns_client_t *client) { + * in named.conf. If we can't attach to it here, that means the TCP + * client quota has been exceeded. + */ +- result = isc_quota_attach(&client->sctx->tcpquota, ++ result = isc_quota_attach(&ns_g_server->tcpquota, + &client->tcpquota); + if (result != ISC_R_SUCCESS) { + bool exit; +@@ -3447,27 +3485,27 @@ client_accept(ns_client_t *client) { + * interface to be starved, with no clients able + * to accept new connections. + * +- * So, we check here to see if any other client +- * is already servicing TCP queries on this ++ * So, we check here to see if any other clients ++ * are already servicing TCP queries on this + * interface (whether accepting, reading, or +- * processing). +- * +- * If so, then it's okay *not* to call +- * accept - we can let this client to go inactive +- * and the other one handle the next connection +- * when it's ready. ++ * processing). If there are at least two ++ * (one reading and one processing a request) ++ * then it's okay *not* to call accept - we ++ * can let this client go inactive and another ++ * one will resume accepting when it's done. + * +- * But if not, then we need to be a little bit +- * flexible about the quota. We allow *one* extra +- * TCP client through, to ensure we're listening on +- * every interface. ++ * If there aren't enough active clients on the ++ * interface, then we can be a little bit ++ * flexible about the quota. We'll allow *one* ++ * extra client through to ensure we're listening ++ * on every interface. + * +- * (Note: In practice this means that the *real* +- * TCP client quota is tcp-clients plus the number +- * of interfaces.) ++ * (Note: In practice this means that the real ++ * TCP client quota is tcp-clients plus the ++ * number of listening interfaces plus 2.) + */ + LOCK(&client->interface->lock); +- exit = (client->interface->ntcpactive > 0); ++ exit = (client->interface->ntcpactive > 1); + UNLOCK(&client->interface->lock); + + if (exit) { +@@ -3475,6 +3513,9 @@ client_accept(ns_client_t *client) { + (void)exit_check(client); + return; + } ++ ++ } else { ++ client->tcpattached = true; + } + + /* +@@ -3507,9 +3548,16 @@ client_accept(ns_client_t *client) { + UNEXPECTED_ERROR(__FILE__, __LINE__, + "isc_socket_accept() failed: %s", + isc_result_totext(result)); +- if (client->tcpquota != NULL) { +- isc_quota_detach(&client->tcpquota); ++ ++ tcpquota_disconnect(client); ++ ++ if (client->tcpactive) { ++ LOCK(&client->interface->lock); ++ client->interface->ntcpactive--; ++ UNLOCK(&client->interface->lock); ++ client->tcpactive = false; + } ++ + return; + } + +@@ -3527,13 +3575,12 @@ client_accept(ns_client_t *client) { + * once the connection is established. + * + * When the client object is shutting down after handling a TCP +- * request (see exit_check()), it looks to see whether this value is +- * non-zero. If so, that means another client has already called +- * accept() and is waiting to establish the next connection, which +- * means the first client is free to go inactive. Otherwise, +- * the first client must come back and call accept() again; this +- * guarantees there will always be at least one client listening +- * for new TCP connections on each interface. ++ * request (see exit_check()), if this value is at least one, that ++ * means another client has called accept() and is waiting to ++ * establish the next connection. That means the client may be ++ * be free to become inactive; otherwise it may need to start ++ * listening for connections itself to prevent the interface ++ * going dead. + */ + LOCK(&client->interface->lock); + client->interface->ntcpaccepting++; +@@ -3613,19 +3660,19 @@ ns_client_replace(ns_client_t *client) { + client->tcpsocket, client); + } else { + result = get_client(client->manager, client->interface, +- client->dispatch, tcp); ++ client->dispatch, client, tcp); ++ ++ /* ++ * The responsibility for listening for new requests is hereby ++ * transferred to the new client. Therefore, the old client ++ * should refrain from listening for any more requests. ++ */ ++ client->mortal = true; + } + if (result != ISC_R_SUCCESS) { + return (result); + } + +- /* +- * The responsibility for listening for new requests is hereby +- * transferred to the new client. Therefore, the old client +- * should refrain from listening for any more requests. +- */ +- client->mortal = true; +- + return (ISC_R_SUCCESS); + } + +@@ -3759,7 +3806,7 @@ ns_clientmgr_destroy(ns_clientmgr_t **managerp) { + + static isc_result_t + get_client(ns_clientmgr_t *manager, ns_interface_t *ifp, +- dns_dispatch_t *disp, bool tcp) ++ dns_dispatch_t *disp, ns_client_t *oldclient, bool tcp) + { + isc_result_t result = ISC_R_SUCCESS; + isc_event_t *ev; +@@ -3803,6 +3850,16 @@ get_client(ns_clientmgr_t *manager, ns_interface_t *ifp, + client->dscp = ifp->dscp; + + if (tcp) { ++ client->tcpattached = false; ++ if (oldclient != NULL) { ++ client->tcpattached = oldclient->tcpattached; ++ } ++ ++ LOCK(&client->interface->lock); ++ client->interface->ntcpactive++; ++ UNLOCK(&client->interface->lock); ++ client->tcpactive = true; ++ + client->attributes |= NS_CLIENTATTR_TCP; + isc_socket_attach(ifp->tcpsocket, + &client->tcplistener); +@@ -3866,7 +3923,8 @@ get_worker(ns_clientmgr_t *manager, ns_interface_t *ifp, isc_socket_t *sock, + ns_interface_attach(ifp, &client->interface); + client->newstate = client->state = NS_CLIENTSTATE_WORKING; + INSIST(client->recursionquota == NULL); +- client->tcpquota = &client->sctx->tcpquota; ++ client->tcpquota = &ns_g_server->tcpquota; ++ client->tcpattached = oldclient->tcpattached; + + client->dscp = ifp->dscp; + +@@ -3885,7 +3943,6 @@ get_worker(ns_clientmgr_t *manager, ns_interface_t *ifp, isc_socket_t *sock, + LOCK(&client->interface->lock); + client->interface->ntcpactive++; + UNLOCK(&client->interface->lock); +- + client->tcpactive = true; + + INSIST(client->tcpmsg_valid == false); +@@ -3913,7 +3970,8 @@ ns_clientmgr_createclients(ns_clientmgr_t *manager, unsigned int n, + MTRACE("createclients"); + + for (disp = 0; disp < n; disp++) { +- result = get_client(manager, ifp, ifp->udpdispatch[disp], tcp); ++ result = get_client(manager, ifp, ifp->udpdispatch[disp], ++ NULL, tcp); + if (result != ISC_R_SUCCESS) + break; + } +diff --git a/bin/named/include/named/client.h b/bin/named/include/named/client.h +index aeed9ccdda..e2c40acd28 100644 +--- a/bin/named/include/named/client.h ++++ b/bin/named/include/named/client.h +@@ -9,8 +9,6 @@ + * information regarding copyright ownership. + */ + +-/* $Id: client.h,v 1.96 2012/01/31 23:47:31 tbox Exp $ */ +- + #ifndef NAMED_CLIENT_H + #define NAMED_CLIENT_H 1 + +@@ -136,6 +134,7 @@ struct ns_client { + bool pipelined; /*%< TCP queries not in sequence */ + isc_refcount_t *pipeline_refs; + isc_quota_t *tcpquota; ++ bool tcpattached; + isc_quota_t *recursionquota; + ns_interface_t *interface; + +-- +2.20.1 + diff --git a/poky/meta/recipes-connectivity/bind/bind/0005-refactor-tcpquota-and-pipeline-refs-allow-special-ca.patch b/poky/meta/recipes-connectivity/bind/bind/0005-refactor-tcpquota-and-pipeline-refs-allow-special-ca.patch new file mode 100644 index 000000000..987e75bc0 --- /dev/null +++ b/poky/meta/recipes-connectivity/bind/bind/0005-refactor-tcpquota-and-pipeline-refs-allow-special-ca.patch @@ -0,0 +1,911 @@ +Backport patch to fix CVE-2018-5743. + +Ref: +https://security-tracker.debian.org/tracker/CVE-2018-5743 + +CVE: CVE-2018-5743 +Upstream-Status: Backport [https://gitlab.isc.org/isc-projects/bind9/commit/c47ccf6] + +Signed-off-by: Kai Kang <kai.kang@windriver.com> + +From c47ccf630f147378568b33e8fdb7b754f228c346 Mon Sep 17 00:00:00 2001 +From: Evan Hunt <each@isc.org> +Date: Fri, 5 Apr 2019 16:26:05 -0700 +Subject: [PATCH 5/6] refactor tcpquota and pipeline refs; allow special-case + overrun in isc_quota + +- if the TCP quota has been exceeded but there are no clients listening + for new connections on the interface, we can now force attachment to the + quota using isc_quota_force(), instead of carrying on with the quota not + attached. +- the TCP client quota is now referenced via a reference-counted + 'ns_tcpconn' object, one of which is created whenever a client begins + listening for new connections, and attached to by members of that + client's pipeline group. when the last reference to the tcpconn + object is detached, it is freed and the TCP quota slot is released. +- reduce code duplication by adding mark_tcp_active() function. +- convert counters to atomic. + +(cherry picked from commit 7e8222378ca24f1302a0c1c638565050ab04681b) +(cherry picked from commit 4939451275722bfda490ea86ca13e84f6bc71e46) +(cherry picked from commit 13f7c918b8720d890408f678bd73c20e634539d9) +--- + bin/named/client.c | 444 +++++++++++-------------- + bin/named/include/named/client.h | 12 +- + bin/named/include/named/interfacemgr.h | 6 +- + bin/named/interfacemgr.c | 1 + + lib/isc/include/isc/quota.h | 7 + + lib/isc/quota.c | 33 +- + lib/isc/win32/libisc.def.in | 1 + + 7 files changed, 236 insertions(+), 268 deletions(-) + +diff --git a/bin/named/client.c b/bin/named/client.c +index 61e96dd28c..d826ab32bf 100644 +--- a/bin/named/client.c ++++ b/bin/named/client.c +@@ -244,8 +244,7 @@ static void client_start(isc_task_t *task, isc_event_t *event); + static void client_request(isc_task_t *task, isc_event_t *event); + static void ns_client_dumpmessage(ns_client_t *client, const char *reason); + static isc_result_t get_client(ns_clientmgr_t *manager, ns_interface_t *ifp, +- dns_dispatch_t *disp, ns_client_t *oldclient, +- bool tcp); ++ dns_dispatch_t *disp, bool tcp); + static isc_result_t get_worker(ns_clientmgr_t *manager, ns_interface_t *ifp, + isc_socket_t *sock, ns_client_t *oldclient); + static inline bool +@@ -301,16 +300,32 @@ ns_client_settimeout(ns_client_t *client, unsigned int seconds) { + } + + /*% +- * Allocate a reference counter that will track the number of client structures +- * using the TCP connection that 'client' called accept() for. This counter +- * will be shared between all client structures associated with this TCP +- * connection. ++ * Allocate a reference-counted object that will maintain a single pointer to ++ * the (also reference-counted) TCP client quota, shared between all the ++ * clients processing queries on a single TCP connection, so that all ++ * clients sharing the one socket will together consume only one slot in ++ * the 'tcp-clients' quota. + */ +-static void +-pipeline_init(ns_client_t *client) { +- isc_refcount_t *refs; ++static isc_result_t ++tcpconn_init(ns_client_t *client, bool force) { ++ isc_result_t result; ++ isc_quota_t *quota = NULL; ++ ns_tcpconn_t *tconn = NULL; + +- REQUIRE(client->pipeline_refs == NULL); ++ REQUIRE(client->tcpconn == NULL); ++ ++ /* ++ * Try to attach to the quota first, so we won't pointlessly ++ * allocate memory for a tcpconn object if we can't get one. ++ */ ++ if (force) { ++ result = isc_quota_force(&ns_g_server->tcpquota, "a); ++ } else { ++ result = isc_quota_attach(&ns_g_server->tcpquota, "a); ++ } ++ if (result != ISC_R_SUCCESS) { ++ return (result); ++ } + + /* + * A global memory context is used for the allocation as different +@@ -320,78 +335,80 @@ pipeline_init(ns_client_t *client) { + * contention here is expected to be negligible, given that this code + * is only executed for TCP connections. + */ +- refs = isc_mem_allocate(ns_g_mctx, sizeof(*refs)); +- isc_refcount_init(refs, 1); +- client->pipeline_refs = refs; ++ tconn = isc_mem_allocate(ns_g_mctx, sizeof(*tconn)); ++ ++ isc_refcount_init(&tconn->refs, 1); ++ tconn->tcpquota = quota; ++ quota = NULL; ++ tconn->pipelined = false; ++ ++ client->tcpconn = tconn; ++ ++ return (ISC_R_SUCCESS); + } + + /*% +- * Increase the count of client structures using the TCP connection that +- * 'source' is associated with and put a pointer to that count in 'target', +- * thus associating it with the same TCP connection. ++ * Increase the count of client structures sharing the TCP connection ++ * that 'source' is associated with; add a pointer to the same tcpconn ++ * to 'target', thus associating it with the same TCP connection. + */ + static void +-pipeline_attach(ns_client_t *source, ns_client_t *target) { ++tcpconn_attach(ns_client_t *source, ns_client_t *target) { + int refs; + +- REQUIRE(source->pipeline_refs != NULL); +- REQUIRE(target->pipeline_refs == NULL); ++ REQUIRE(source->tcpconn != NULL); ++ REQUIRE(target->tcpconn == NULL); ++ REQUIRE(source->tcpconn->pipelined); + +- isc_refcount_increment(source->pipeline_refs, &refs); ++ isc_refcount_increment(&source->tcpconn->refs, &refs); + INSIST(refs > 1); +- target->pipeline_refs = source->pipeline_refs; ++ target->tcpconn = source->tcpconn; + } + + /*% +- * Decrease the count of client structures using the TCP connection that ++ * Decrease the count of client structures sharing the TCP connection that + * 'client' is associated with. If this is the last client using this TCP +- * connection, free the reference counter and return true; otherwise, return +- * false. ++ * connection, we detach from the TCP quota and free the tcpconn ++ * object. Either way, client->tcpconn is set to NULL. + */ +-static bool +-pipeline_detach(ns_client_t *client) { +- isc_refcount_t *refcount; ++static void ++tcpconn_detach(ns_client_t *client) { ++ ns_tcpconn_t *tconn = NULL; + int refs; + +- REQUIRE(client->pipeline_refs != NULL); +- +- refcount = client->pipeline_refs; +- client->pipeline_refs = NULL; ++ REQUIRE(client->tcpconn != NULL); + +- isc_refcount_decrement(refcount, refs); ++ tconn = client->tcpconn; ++ client->tcpconn = NULL; + ++ isc_refcount_decrement(&tconn->refs, &refs); + if (refs == 0) { +- isc_mem_free(ns_g_mctx, refs); +- return (true); ++ isc_quota_detach(&tconn->tcpquota); ++ isc_mem_free(ns_g_mctx, tconn); + } +- +- return (false); + } + +-/* +- * Detach a client from the TCP client quota if appropriate, and set +- * the quota pointer to NULL. +- * +- * Sometimes when the TCP client quota is exhausted but there are no other +- * clients servicing the interface, a client will be allowed to continue +- * running despite not having been attached to the quota. In this event, +- * the TCP quota was never attached to the client, so when the client (or +- * associated pipeline group) shuts down, the quota must NOT be detached. ++/*% ++ * Mark a client as active and increment the interface's 'ntcpactive' ++ * counter, as a signal that there is at least one client servicing ++ * TCP queries for the interface. If we reach the TCP client quota at ++ * some point, this will be used to determine whether a quota overrun ++ * should be permitted. + * +- * Otherwise, if the quota pointer is set, it should be detached. If not +- * set at all, we just return without doing anything. ++ * Marking the client active with the 'tcpactive' flag ensures proper ++ * accounting, by preventing us from incrementing or decrementing ++ * 'ntcpactive' more than once per client. + */ + static void +-tcpquota_disconnect(ns_client_t *client) { +- if (client->tcpquota == NULL) { +- return; +- } +- +- if (client->tcpattached) { +- isc_quota_detach(&client->tcpquota); +- client->tcpattached = false; +- } else { +- client->tcpquota = NULL; ++mark_tcp_active(ns_client_t *client, bool active) { ++ if (active && !client->tcpactive) { ++ isc_atomic_xadd(&client->interface->ntcpactive, 1); ++ client->tcpactive = active; ++ } else if (!active && client->tcpactive) { ++ uint32_t old = ++ isc_atomic_xadd(&client->interface->ntcpactive, -1); ++ INSIST(old > 0); ++ client->tcpactive = active; + } + } + +@@ -484,7 +501,8 @@ exit_check(ns_client_t *client) { + INSIST(client->recursionquota == NULL); + + if (NS_CLIENTSTATE_READING == client->newstate) { +- if (!client->pipelined) { ++ INSIST(client->tcpconn != NULL); ++ if (!client->tcpconn->pipelined) { + client_read(client); + client->newstate = NS_CLIENTSTATE_MAX; + return (true); /* We're done. */ +@@ -507,8 +525,8 @@ exit_check(ns_client_t *client) { + dns_tcpmsg_cancelread(&client->tcpmsg); + } + +- if (client->nreads != 0) { +- /* Still waiting for read cancel completion. */ ++ /* Still waiting for read cancel completion. */ ++ if (client->nreads > 0) { + return (true); + } + +@@ -518,43 +536,45 @@ exit_check(ns_client_t *client) { + } + + /* +- * Detach from pipeline group and from TCP client quota, +- * if appropriate. ++ * Soon the client will be ready to accept a new TCP ++ * connection or UDP request, but we may have enough ++ * clients doing that already. Check whether this client ++ * needs to remain active and allow it go inactive if ++ * not. + * +- * - If no pipeline group is active, attempt to +- * detach from the TCP client quota. ++ * UDP clients always go inactive at this point, but a TCP ++ * client may need to stay active and return to READY ++ * state if no other clients are available to listen ++ * for TCP requests on this interface. + * +- * - If a pipeline group is active, detach from it; +- * if the return code indicates that there no more +- * clients left if this pipeline group, we also detach +- * from the TCP client quota. +- * +- * - Otherwise we don't try to detach, we just set the +- * TCP quota pointer to NULL if it wasn't NULL already. +- * +- * tcpquota_disconnect() will set tcpquota to NULL, either +- * by detaching it or by assignment, depending on the +- * needs of the client. See the comments on that function +- * for further information. ++ * Regardless, if we're going to FREED state, that means ++ * the system is shutting down and we don't need to ++ * retain clients. + */ +- if (client->pipeline_refs == NULL || pipeline_detach(client)) { +- tcpquota_disconnect(client); +- } else { +- client->tcpquota = NULL; +- client->tcpattached = false; ++ if (client->mortal && TCP_CLIENT(client) && ++ client->newstate != NS_CLIENTSTATE_FREED && ++ !ns_g_clienttest && ++ isc_atomic_xadd(&client->interface->ntcpaccepting, 0) == 0) ++ { ++ /* Nobody else is accepting */ ++ client->mortal = false; ++ client->newstate = NS_CLIENTSTATE_READY; ++ } ++ ++ /* ++ * Detach from TCP connection and TCP client quota, ++ * if appropriate. If this is the last reference to ++ * the TCP connection in our pipeline group, the ++ * TCP quota slot will be released. ++ */ ++ if (client->tcpconn) { ++ tcpconn_detach(client); + } + + if (client->tcpsocket != NULL) { + CTRACE("closetcp"); + isc_socket_detach(&client->tcpsocket); +- +- if (client->tcpactive) { +- LOCK(&client->interface->lock); +- INSIST(client->interface->ntcpactive > 0); +- client->interface->ntcpactive--; +- UNLOCK(&client->interface->lock); +- client->tcpactive = false; +- } ++ mark_tcp_active(client, false); + } + + if (client->timerset) { +@@ -567,35 +587,6 @@ exit_check(ns_client_t *client) { + client->peeraddr_valid = false; + + client->state = NS_CLIENTSTATE_READY; +- INSIST(client->recursionquota == NULL); +- +- /* +- * Now the client is ready to accept a new TCP connection +- * or UDP request, but we may have enough clients doing +- * that already. Check whether this client needs to remain +- * active and force it to go inactive if not. +- * +- * UDP clients go inactive at this point, but a TCP client +- * may need to remain active and go into ready state if +- * no other clients are available to listen for TCP +- * requests on this interface or (in the case of pipelined +- * clients) to read for additional messages on the current +- * connection. +- */ +- if (client->mortal && TCP_CLIENT(client) && !ns_g_clienttest) { +- LOCK(&client->interface->lock); +- if ((client->interface->ntcpaccepting == 0 || +- (client->pipelined && +- client->interface->ntcpactive < 2)) && +- client->newstate != NS_CLIENTSTATE_FREED) +- { +- client->mortal = false; +- client->newstate = NS_CLIENTSTATE_READY; +- } +- UNLOCK(&client->interface->lock); +- } +- +- client->pipelined = false; + + /* + * We don't need the client; send it to the inactive +@@ -630,7 +621,7 @@ exit_check(ns_client_t *client) { + } + + /* Still waiting for accept cancel completion. */ +- if (! (client->naccepts == 0)) { ++ if (client->naccepts > 0) { + return (true); + } + +@@ -641,7 +632,7 @@ exit_check(ns_client_t *client) { + } + + /* Still waiting for recv cancel completion. */ +- if (! (client->nrecvs == 0)) { ++ if (client->nrecvs > 0) { + return (true); + } + +@@ -654,14 +645,7 @@ exit_check(ns_client_t *client) { + INSIST(client->recursionquota == NULL); + if (client->tcplistener != NULL) { + isc_socket_detach(&client->tcplistener); +- +- if (client->tcpactive) { +- LOCK(&client->interface->lock); +- INSIST(client->interface->ntcpactive > 0); +- client->interface->ntcpactive--; +- UNLOCK(&client->interface->lock); +- client->tcpactive = false; +- } ++ mark_tcp_active(client, false); + } + if (client->udpsocket != NULL) { + isc_socket_detach(&client->udpsocket); +@@ -816,7 +800,7 @@ client_start(isc_task_t *task, isc_event_t *event) { + return; + + if (TCP_CLIENT(client)) { +- if (client->pipelined) { ++ if (client->tcpconn != NULL) { + client_read(client); + } else { + client_accept(client); +@@ -2470,6 +2454,7 @@ client_request(isc_task_t *task, isc_event_t *event) { + client->nrecvs--; + } else { + INSIST(TCP_CLIENT(client)); ++ INSIST(client->tcpconn != NULL); + REQUIRE(event->ev_type == DNS_EVENT_TCPMSG); + REQUIRE(event->ev_sender == &client->tcpmsg); + buffer = &client->tcpmsg.buffer; +@@ -2657,17 +2642,19 @@ client_request(isc_task_t *task, isc_event_t *event) { + /* + * Pipeline TCP query processing. + */ +- if (client->message->opcode != dns_opcode_query) { +- client->pipelined = false; ++ if (TCP_CLIENT(client) && ++ client->message->opcode != dns_opcode_query) ++ { ++ client->tcpconn->pipelined = false; + } +- if (TCP_CLIENT(client) && client->pipelined) { ++ if (TCP_CLIENT(client) && client->tcpconn->pipelined) { + /* + * We're pipelining. Replace the client; the +- * the replacement can read the TCP socket looking +- * for new messages and this client can process the ++ * replacement can read the TCP socket looking ++ * for new messages and this one can process the + * current message asynchronously. + * +- * There are now at least three clients using this ++ * There will now be at least three clients using this + * TCP socket - one accepting new connections, + * one reading an existing connection to get new + * messages, and one answering the message already +@@ -2675,7 +2662,7 @@ client_request(isc_task_t *task, isc_event_t *event) { + */ + result = ns_client_replace(client); + if (result != ISC_R_SUCCESS) { +- client->pipelined = false; ++ client->tcpconn->pipelined = false; + } + } + +@@ -3233,10 +3220,7 @@ client_create(ns_clientmgr_t *manager, ns_client_t **clientp) { + client->signer = NULL; + dns_name_init(&client->signername, NULL); + client->mortal = false; +- client->pipelined = false; +- client->pipeline_refs = NULL; +- client->tcpquota = NULL; +- client->tcpattached = false; ++ client->tcpconn = NULL; + client->recursionquota = NULL; + client->interface = NULL; + client->peeraddr_valid = false; +@@ -3341,9 +3325,10 @@ client_read(ns_client_t *client) { + + static void + client_newconn(isc_task_t *task, isc_event_t *event) { ++ isc_result_t result; + ns_client_t *client = event->ev_arg; + isc_socket_newconnev_t *nevent = (isc_socket_newconnev_t *)event; +- isc_result_t result; ++ uint32_t old; + + REQUIRE(event->ev_type == ISC_SOCKEVENT_NEWCONN); + REQUIRE(NS_CLIENT_VALID(client)); +@@ -3363,10 +3348,8 @@ client_newconn(isc_task_t *task, isc_event_t *event) { + INSIST(client->naccepts == 1); + client->naccepts--; + +- LOCK(&client->interface->lock); +- INSIST(client->interface->ntcpaccepting > 0); +- client->interface->ntcpaccepting--; +- UNLOCK(&client->interface->lock); ++ old = isc_atomic_xadd(&client->interface->ntcpaccepting, -1); ++ INSIST(old > 0); + + /* + * We must take ownership of the new socket before the exit +@@ -3399,7 +3382,7 @@ client_newconn(isc_task_t *task, isc_event_t *event) { + NS_LOGMODULE_CLIENT, ISC_LOG_DEBUG(3), + "accept failed: %s", + isc_result_totext(nevent->result)); +- tcpquota_disconnect(client); ++ tcpconn_detach(client); + } + + if (exit_check(client)) +@@ -3437,15 +3420,13 @@ client_newconn(isc_task_t *task, isc_event_t *event) { + * telnetting to port 53 (once per CPU) will + * deny service to legitimate TCP clients. + */ +- client->pipelined = false; + result = ns_client_replace(client); + if (result == ISC_R_SUCCESS && + (ns_g_server->keepresporder == NULL || + !allowed(&netaddr, NULL, NULL, 0, NULL, + ns_g_server->keepresporder))) + { +- pipeline_init(client); +- client->pipelined = true; ++ client->tcpconn->pipelined = true; + } + + client_read(client); +@@ -3462,78 +3443,59 @@ client_accept(ns_client_t *client) { + CTRACE("accept"); + + /* +- * The tcpquota object can only be simultaneously referenced a +- * pre-defined number of times; this is configured by 'tcp-clients' +- * in named.conf. If we can't attach to it here, that means the TCP +- * client quota has been exceeded. ++ * Set up a new TCP connection. This means try to attach to the ++ * TCP client quota (tcp-clients), but fail if we're over quota. + */ +- result = isc_quota_attach(&ns_g_server->tcpquota, +- &client->tcpquota); ++ result = tcpconn_init(client, false); + if (result != ISC_R_SUCCESS) { +- bool exit; ++ bool exit; + +- ns_client_log(client, NS_LOGCATEGORY_CLIENT, +- NS_LOGMODULE_CLIENT, ISC_LOG_DEBUG(1), +- "no more TCP clients: %s", +- isc_result_totext(result)); +- +- /* +- * We have exceeded the system-wide TCP client +- * quota. But, we can't just block this accept +- * in all cases, because if we did, a heavy TCP +- * load on other interfaces might cause this +- * interface to be starved, with no clients able +- * to accept new connections. +- * +- * So, we check here to see if any other clients +- * are already servicing TCP queries on this +- * interface (whether accepting, reading, or +- * processing). If there are at least two +- * (one reading and one processing a request) +- * then it's okay *not* to call accept - we +- * can let this client go inactive and another +- * one will resume accepting when it's done. +- * +- * If there aren't enough active clients on the +- * interface, then we can be a little bit +- * flexible about the quota. We'll allow *one* +- * extra client through to ensure we're listening +- * on every interface. +- * +- * (Note: In practice this means that the real +- * TCP client quota is tcp-clients plus the +- * number of listening interfaces plus 2.) +- */ +- LOCK(&client->interface->lock); +- exit = (client->interface->ntcpactive > 1); +- UNLOCK(&client->interface->lock); ++ ns_client_log(client, NS_LOGCATEGORY_CLIENT, ++ NS_LOGMODULE_CLIENT, ISC_LOG_WARNING, ++ "TCP client quota reached: %s", ++ isc_result_totext(result)); + +- if (exit) { +- client->newstate = NS_CLIENTSTATE_INACTIVE; +- (void)exit_check(client); +- return; +- } ++ /* ++ * We have exceeded the system-wide TCP client quota. But, ++ * we can't just block this accept in all cases, because if ++ * we did, a heavy TCP load on other interfaces might cause ++ * this interface to be starved, with no clients able to ++ * accept new connections. ++ * ++ * So, we check here to see if any other clients are ++ * already servicing TCP queries on this interface (whether ++ * accepting, reading, or processing). If we find at least ++ * one, then it's okay *not* to call accept - we can let this ++ * client go inactive and another will take over when it's ++ * done. ++ * ++ * If there aren't enough active clients on the interface, ++ * then we can be a little bit flexible about the quota. ++ * We'll allow *one* extra client through to ensure we're ++ * listening on every interface; we do this by setting the ++ * 'force' option to tcpconn_init(). ++ * ++ * (Note: In practice this means that the real TCP client ++ * quota is tcp-clients plus the number of listening ++ * interfaces plus 1.) ++ */ ++ exit = (isc_atomic_xadd(&client->interface->ntcpactive, 0) > 0); ++ if (exit) { ++ client->newstate = NS_CLIENTSTATE_INACTIVE; ++ (void)exit_check(client); ++ return; ++ } + +- } else { +- client->tcpattached = true; ++ result = tcpconn_init(client, true); ++ RUNTIME_CHECK(result == ISC_R_SUCCESS); + } + + /* +- * By incrementing the interface's ntcpactive counter we signal +- * that there is at least one client servicing TCP queries for the +- * interface. +- * +- * We also make note of the fact in the client itself with the +- * tcpactive flag. This ensures proper accounting by preventing +- * us from accidentally incrementing or decrementing ntcpactive +- * more than once per client object. ++ * If this client was set up using get_client() or get_worker(), ++ * then TCP is already marked active. However, if it was restarted ++ * from exit_check(), it might not be, so we take care of it now. + */ +- if (!client->tcpactive) { +- LOCK(&client->interface->lock); +- client->interface->ntcpactive++; +- UNLOCK(&client->interface->lock); +- client->tcpactive = true; +- } ++ mark_tcp_active(client, true); + + result = isc_socket_accept(client->tcplistener, client->task, + client_newconn, client); +@@ -3549,15 +3511,8 @@ client_accept(ns_client_t *client) { + "isc_socket_accept() failed: %s", + isc_result_totext(result)); + +- tcpquota_disconnect(client); +- +- if (client->tcpactive) { +- LOCK(&client->interface->lock); +- client->interface->ntcpactive--; +- UNLOCK(&client->interface->lock); +- client->tcpactive = false; +- } +- ++ tcpconn_detach(client); ++ mark_tcp_active(client, false); + return; + } + +@@ -3582,9 +3537,7 @@ client_accept(ns_client_t *client) { + * listening for connections itself to prevent the interface + * going dead. + */ +- LOCK(&client->interface->lock); +- client->interface->ntcpaccepting++; +- UNLOCK(&client->interface->lock); ++ isc_atomic_xadd(&client->interface->ntcpaccepting, 1); + } + + static void +@@ -3655,24 +3608,25 @@ ns_client_replace(ns_client_t *client) { + REQUIRE(client->manager != NULL); + + tcp = TCP_CLIENT(client); +- if (tcp && client->pipelined) { ++ if (tcp && client->tcpconn != NULL && client->tcpconn->pipelined) { + result = get_worker(client->manager, client->interface, + client->tcpsocket, client); + } else { + result = get_client(client->manager, client->interface, +- client->dispatch, client, tcp); ++ client->dispatch, tcp); + +- /* +- * The responsibility for listening for new requests is hereby +- * transferred to the new client. Therefore, the old client +- * should refrain from listening for any more requests. +- */ +- client->mortal = true; + } + if (result != ISC_R_SUCCESS) { + return (result); + } + ++ /* ++ * The responsibility for listening for new requests is hereby ++ * transferred to the new client. Therefore, the old client ++ * should refrain from listening for any more requests. ++ */ ++ client->mortal = true; ++ + return (ISC_R_SUCCESS); + } + +@@ -3806,7 +3760,7 @@ ns_clientmgr_destroy(ns_clientmgr_t **managerp) { + + static isc_result_t + get_client(ns_clientmgr_t *manager, ns_interface_t *ifp, +- dns_dispatch_t *disp, ns_client_t *oldclient, bool tcp) ++ dns_dispatch_t *disp, bool tcp) + { + isc_result_t result = ISC_R_SUCCESS; + isc_event_t *ev; +@@ -3850,15 +3804,7 @@ get_client(ns_clientmgr_t *manager, ns_interface_t *ifp, + client->dscp = ifp->dscp; + + if (tcp) { +- client->tcpattached = false; +- if (oldclient != NULL) { +- client->tcpattached = oldclient->tcpattached; +- } +- +- LOCK(&client->interface->lock); +- client->interface->ntcpactive++; +- UNLOCK(&client->interface->lock); +- client->tcpactive = true; ++ mark_tcp_active(client, true); + + client->attributes |= NS_CLIENTATTR_TCP; + isc_socket_attach(ifp->tcpsocket, +@@ -3923,16 +3869,14 @@ get_worker(ns_clientmgr_t *manager, ns_interface_t *ifp, isc_socket_t *sock, + ns_interface_attach(ifp, &client->interface); + client->newstate = client->state = NS_CLIENTSTATE_WORKING; + INSIST(client->recursionquota == NULL); +- client->tcpquota = &ns_g_server->tcpquota; +- client->tcpattached = oldclient->tcpattached; + + client->dscp = ifp->dscp; + + client->attributes |= NS_CLIENTATTR_TCP; + client->mortal = true; + +- pipeline_attach(oldclient, client); +- client->pipelined = true; ++ tcpconn_attach(oldclient, client); ++ mark_tcp_active(client, true); + + isc_socket_attach(ifp->tcpsocket, &client->tcplistener); + isc_socket_attach(sock, &client->tcpsocket); +@@ -3940,11 +3884,6 @@ get_worker(ns_clientmgr_t *manager, ns_interface_t *ifp, isc_socket_t *sock, + (void)isc_socket_getpeername(client->tcpsocket, &client->peeraddr); + client->peeraddr_valid = true; + +- LOCK(&client->interface->lock); +- client->interface->ntcpactive++; +- UNLOCK(&client->interface->lock); +- client->tcpactive = true; +- + INSIST(client->tcpmsg_valid == false); + dns_tcpmsg_init(client->mctx, client->tcpsocket, &client->tcpmsg); + client->tcpmsg_valid = true; +@@ -3970,8 +3909,7 @@ ns_clientmgr_createclients(ns_clientmgr_t *manager, unsigned int n, + MTRACE("createclients"); + + for (disp = 0; disp < n; disp++) { +- result = get_client(manager, ifp, ifp->udpdispatch[disp], +- NULL, tcp); ++ result = get_client(manager, ifp, ifp->udpdispatch[disp], tcp); + if (result != ISC_R_SUCCESS) + break; + } +diff --git a/bin/named/include/named/client.h b/bin/named/include/named/client.h +index e2c40acd28..969ee4c08f 100644 +--- a/bin/named/include/named/client.h ++++ b/bin/named/include/named/client.h +@@ -78,6 +78,13 @@ + *** Types + ***/ + ++/*% reference-counted TCP connection object */ ++typedef struct ns_tcpconn { ++ isc_refcount_t refs; ++ isc_quota_t *tcpquota; ++ bool pipelined; ++} ns_tcpconn_t; ++ + /*% nameserver client structure */ + struct ns_client { + unsigned int magic; +@@ -131,10 +138,7 @@ struct ns_client { + dns_name_t signername; /*%< [T]SIG key name */ + dns_name_t *signer; /*%< NULL if not valid sig */ + bool mortal; /*%< Die after handling request */ +- bool pipelined; /*%< TCP queries not in sequence */ +- isc_refcount_t *pipeline_refs; +- isc_quota_t *tcpquota; +- bool tcpattached; ++ ns_tcpconn_t *tcpconn; + isc_quota_t *recursionquota; + ns_interface_t *interface; + +diff --git a/bin/named/include/named/interfacemgr.h b/bin/named/include/named/interfacemgr.h +index 61b08826a6..3535ef22a8 100644 +--- a/bin/named/include/named/interfacemgr.h ++++ b/bin/named/include/named/interfacemgr.h +@@ -9,8 +9,6 @@ + * information regarding copyright ownership. + */ + +-/* $Id: interfacemgr.h,v 1.35 2011/07/28 23:47:58 tbox Exp $ */ +- + #ifndef NAMED_INTERFACEMGR_H + #define NAMED_INTERFACEMGR_H 1 + +@@ -77,11 +75,11 @@ struct ns_interface { + /*%< UDP dispatchers. */ + isc_socket_t * tcpsocket; /*%< TCP socket. */ + isc_dscp_t dscp; /*%< "listen-on" DSCP value */ +- int ntcpaccepting; /*%< Number of clients ++ int32_t ntcpaccepting; /*%< Number of clients + ready to accept new + TCP connections on this + interface */ +- int ntcpactive; /*%< Number of clients ++ int32_t ntcpactive; /*%< Number of clients + servicing TCP queries + (whether accepting or + connected) */ +diff --git a/bin/named/interfacemgr.c b/bin/named/interfacemgr.c +index 955096ef47..d9f6df5802 100644 +--- a/bin/named/interfacemgr.c ++++ b/bin/named/interfacemgr.c +@@ -388,6 +388,7 @@ ns_interface_create(ns_interfacemgr_t *mgr, isc_sockaddr_t *addr, + */ + ifp->ntcpaccepting = 0; + ifp->ntcpactive = 0; ++ + ifp->nudpdispatch = 0; + + ifp->dscp = -1; +diff --git a/lib/isc/include/isc/quota.h b/lib/isc/include/isc/quota.h +index b9bf59877a..36c5830242 100644 +--- a/lib/isc/include/isc/quota.h ++++ b/lib/isc/include/isc/quota.h +@@ -100,6 +100,13 @@ isc_quota_attach(isc_quota_t *quota, isc_quota_t **p); + * quota if successful (ISC_R_SUCCESS or ISC_R_SOFTQUOTA). + */ + ++isc_result_t ++isc_quota_force(isc_quota_t *quota, isc_quota_t **p); ++/*%< ++ * Like isc_quota_attach, but will attach '*p' to the quota ++ * even if the hard quota has been exceeded. ++ */ ++ + void + isc_quota_detach(isc_quota_t **p); + /*%< +diff --git a/lib/isc/quota.c b/lib/isc/quota.c +index 3ddff0d875..556a61f21d 100644 +--- a/lib/isc/quota.c ++++ b/lib/isc/quota.c +@@ -74,20 +74,39 @@ isc_quota_release(isc_quota_t *quota) { + UNLOCK("a->lock); + } + +-isc_result_t +-isc_quota_attach(isc_quota_t *quota, isc_quota_t **p) +-{ ++static isc_result_t ++doattach(isc_quota_t *quota, isc_quota_t **p, bool force) { + isc_result_t result; +- INSIST(p != NULL && *p == NULL); ++ REQUIRE(p != NULL && *p == NULL); ++ + result = isc_quota_reserve(quota); +- if (result == ISC_R_SUCCESS || result == ISC_R_SOFTQUOTA) ++ if (result == ISC_R_SUCCESS || result == ISC_R_SOFTQUOTA) { ++ *p = quota; ++ } else if (result == ISC_R_QUOTA && force) { ++ /* attach anyway */ ++ LOCK("a->lock); ++ quota->used++; ++ UNLOCK("a->lock); ++ + *p = quota; ++ result = ISC_R_SUCCESS; ++ } ++ + return (result); + } + ++isc_result_t ++isc_quota_attach(isc_quota_t *quota, isc_quota_t **p) { ++ return (doattach(quota, p, false)); ++} ++ ++isc_result_t ++isc_quota_force(isc_quota_t *quota, isc_quota_t **p) { ++ return (doattach(quota, p, true)); ++} ++ + void +-isc_quota_detach(isc_quota_t **p) +-{ ++isc_quota_detach(isc_quota_t **p) { + INSIST(p != NULL && *p != NULL); + isc_quota_release(*p); + *p = NULL; +diff --git a/lib/isc/win32/libisc.def.in b/lib/isc/win32/libisc.def.in +index a82facec0f..7b9f23d776 100644 +--- a/lib/isc/win32/libisc.def.in ++++ b/lib/isc/win32/libisc.def.in +@@ -519,6 +519,7 @@ isc_portset_removerange + isc_quota_attach + isc_quota_destroy + isc_quota_detach ++isc_quota_force + isc_quota_init + isc_quota_max + isc_quota_release +-- +2.20.1 + diff --git a/poky/meta/recipes-connectivity/bind/bind/0006-restore-allowance-for-tcp-clients-interfaces.patch b/poky/meta/recipes-connectivity/bind/bind/0006-restore-allowance-for-tcp-clients-interfaces.patch new file mode 100644 index 000000000..3821d1850 --- /dev/null +++ b/poky/meta/recipes-connectivity/bind/bind/0006-restore-allowance-for-tcp-clients-interfaces.patch @@ -0,0 +1,80 @@ +Backport patch to fix CVE-2018-5743. + +Ref: +https://security-tracker.debian.org/tracker/CVE-2018-5743 + +CVE: CVE-2018-5743 +Upstream-Status: Backport [https://gitlab.isc.org/isc-projects/bind9/commit/59434b9] + +Signed-off-by: Kai Kang <kai.kang@windriver.com> + +From 59434b987e8eb436b08c24e559ee094c4e939daa Mon Sep 17 00:00:00 2001 +From: Evan Hunt <each@isc.org> +Date: Fri, 5 Apr 2019 16:26:19 -0700 +Subject: [PATCH 6/6] restore allowance for tcp-clients < interfaces + +in the "refactor tcpquota and pipeline refs" commit, the counting +of active interfaces was tightened in such a way that named could +fail to listen on an interface if there were more interfaces than +tcp-clients. when checking the quota to start accepting on an +interface, if the number of active clients was above zero, then +it was presumed that some other client was able to handle accepting +new connections. this, however, ignored the fact that the current client +could be included in that count, so if the quota was already exceeded +before all the interfaces were listening, some interfaces would never +listen. + +we now check whether the current client has been marked active; if so, +then the number of active clients on the interface must be greater +than 1, not 0. + +(cherry picked from commit 0b4e2cd4c3192ba88569dd344f542a8cc43742b5) +(cherry picked from commit d01023aaac35543daffbdf48464e320150235d41) +--- + bin/named/client.c | 8 +++++--- + doc/arm/Bv9ARM-book.xml | 3 ++- + 2 files changed, 7 insertions(+), 4 deletions(-) + +diff --git a/bin/named/client.c b/bin/named/client.c +index d826ab32bf..845326abc0 100644 +--- a/bin/named/client.c ++++ b/bin/named/client.c +@@ -3464,8 +3464,9 @@ client_accept(ns_client_t *client) { + * + * So, we check here to see if any other clients are + * already servicing TCP queries on this interface (whether +- * accepting, reading, or processing). If we find at least +- * one, then it's okay *not* to call accept - we can let this ++ * accepting, reading, or processing). If we find that at ++ * least one client other than this one is active, then ++ * it's okay *not* to call accept - we can let this + * client go inactive and another will take over when it's + * done. + * +@@ -3479,7 +3480,8 @@ client_accept(ns_client_t *client) { + * quota is tcp-clients plus the number of listening + * interfaces plus 1.) + */ +- exit = (isc_atomic_xadd(&client->interface->ntcpactive, 0) > 0); ++ exit = (isc_atomic_xadd(&client->interface->ntcpactive, 0) > ++ (client->tcpactive ? 1 : 0)); + if (exit) { + client->newstate = NS_CLIENTSTATE_INACTIVE; + (void)exit_check(client); +diff --git a/doc/arm/Bv9ARM-book.xml b/doc/arm/Bv9ARM-book.xml +index 381768d540..9c76d3cd6f 100644 +--- a/doc/arm/Bv9ARM-book.xml ++++ b/doc/arm/Bv9ARM-book.xml +@@ -8493,7 +8493,8 @@ avoid-v6-udp-ports { 40000; range 50000 60000; }; + <para> + The number of file descriptors reserved for TCP, stdio, + etc. This needs to be big enough to cover the number of +- interfaces <command>named</command> listens on, <command>tcp-clients</command> as well as ++ interfaces <command>named</command> listens on plus ++ <command>tcp-clients</command>, as well as + to provide room for outgoing TCP queries and incoming zone + transfers. The default is <literal>512</literal>. + The minimum value is <literal>128</literal> and the +-- +2.20.1 + diff --git a/poky/meta/recipes-connectivity/bind/bind/0007-Replace-atomic-operations-in-bin-named-client.c-with.patch b/poky/meta/recipes-connectivity/bind/bind/0007-Replace-atomic-operations-in-bin-named-client.c-with.patch new file mode 100644 index 000000000..1a84eca58 --- /dev/null +++ b/poky/meta/recipes-connectivity/bind/bind/0007-Replace-atomic-operations-in-bin-named-client.c-with.patch @@ -0,0 +1,140 @@ +Backport commit to fix compile error on arm caused by commits which are +to fix CVE-2018-5743. + +CVE: CVE-2018-5743 +Upstream-Status: Backport [https://gitlab.isc.org/isc-projects/bind9/commit/ef49780] + +Signed-off-by: Kai Kang <kai.kang@windriver.com> + +From ef49780d30d3ddc5735cfc32561b678a634fa72f Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Ond=C5=99ej=20Sur=C3=BD?= <ondrej@sury.org> +Date: Wed, 17 Apr 2019 15:22:27 +0200 +Subject: [PATCH] Replace atomic operations in bin/named/client.c with + isc_refcount reference counting + +--- + bin/named/client.c | 18 +++++++----------- + bin/named/include/named/interfacemgr.h | 5 +++-- + bin/named/interfacemgr.c | 7 +++++-- + 3 files changed, 15 insertions(+), 15 deletions(-) + +diff --git a/bin/named/client.c b/bin/named/client.c +index 845326abc0..29fecadca8 100644 +--- a/bin/named/client.c ++++ b/bin/named/client.c +@@ -402,12 +402,10 @@ tcpconn_detach(ns_client_t *client) { + static void + mark_tcp_active(ns_client_t *client, bool active) { + if (active && !client->tcpactive) { +- isc_atomic_xadd(&client->interface->ntcpactive, 1); ++ isc_refcount_increment0(&client->interface->ntcpactive, NULL); + client->tcpactive = active; + } else if (!active && client->tcpactive) { +- uint32_t old = +- isc_atomic_xadd(&client->interface->ntcpactive, -1); +- INSIST(old > 0); ++ isc_refcount_decrement(&client->interface->ntcpactive, NULL); + client->tcpactive = active; + } + } +@@ -554,7 +552,7 @@ exit_check(ns_client_t *client) { + if (client->mortal && TCP_CLIENT(client) && + client->newstate != NS_CLIENTSTATE_FREED && + !ns_g_clienttest && +- isc_atomic_xadd(&client->interface->ntcpaccepting, 0) == 0) ++ isc_refcount_current(&client->interface->ntcpaccepting) == 0) + { + /* Nobody else is accepting */ + client->mortal = false; +@@ -3328,7 +3326,6 @@ client_newconn(isc_task_t *task, isc_event_t *event) { + isc_result_t result; + ns_client_t *client = event->ev_arg; + isc_socket_newconnev_t *nevent = (isc_socket_newconnev_t *)event; +- uint32_t old; + + REQUIRE(event->ev_type == ISC_SOCKEVENT_NEWCONN); + REQUIRE(NS_CLIENT_VALID(client)); +@@ -3348,8 +3345,7 @@ client_newconn(isc_task_t *task, isc_event_t *event) { + INSIST(client->naccepts == 1); + client->naccepts--; + +- old = isc_atomic_xadd(&client->interface->ntcpaccepting, -1); +- INSIST(old > 0); ++ isc_refcount_decrement(&client->interface->ntcpaccepting, NULL); + + /* + * We must take ownership of the new socket before the exit +@@ -3480,8 +3476,8 @@ client_accept(ns_client_t *client) { + * quota is tcp-clients plus the number of listening + * interfaces plus 1.) + */ +- exit = (isc_atomic_xadd(&client->interface->ntcpactive, 0) > +- (client->tcpactive ? 1 : 0)); ++ exit = (isc_refcount_current(&client->interface->ntcpactive) > ++ (client->tcpactive ? 1U : 0U)); + if (exit) { + client->newstate = NS_CLIENTSTATE_INACTIVE; + (void)exit_check(client); +@@ -3539,7 +3535,7 @@ client_accept(ns_client_t *client) { + * listening for connections itself to prevent the interface + * going dead. + */ +- isc_atomic_xadd(&client->interface->ntcpaccepting, 1); ++ isc_refcount_increment0(&client->interface->ntcpaccepting, NULL); + } + + static void +diff --git a/bin/named/include/named/interfacemgr.h b/bin/named/include/named/interfacemgr.h +index 3535ef22a8..6e10f210fd 100644 +--- a/bin/named/include/named/interfacemgr.h ++++ b/bin/named/include/named/interfacemgr.h +@@ -45,6 +45,7 @@ + #include <isc/magic.h> + #include <isc/mem.h> + #include <isc/socket.h> ++#include <isc/refcount.h> + + #include <dns/result.h> + +@@ -75,11 +76,11 @@ struct ns_interface { + /*%< UDP dispatchers. */ + isc_socket_t * tcpsocket; /*%< TCP socket. */ + isc_dscp_t dscp; /*%< "listen-on" DSCP value */ +- int32_t ntcpaccepting; /*%< Number of clients ++ isc_refcount_t ntcpaccepting; /*%< Number of clients + ready to accept new + TCP connections on this + interface */ +- int32_t ntcpactive; /*%< Number of clients ++ isc_refcount_t ntcpactive; /*%< Number of clients + servicing TCP queries + (whether accepting or + connected) */ +diff --git a/bin/named/interfacemgr.c b/bin/named/interfacemgr.c +index d9f6df5802..135533be6b 100644 +--- a/bin/named/interfacemgr.c ++++ b/bin/named/interfacemgr.c +@@ -386,8 +386,8 @@ ns_interface_create(ns_interfacemgr_t *mgr, isc_sockaddr_t *addr, + * connections will be handled in parallel even though there is + * only one client initially. + */ +- ifp->ntcpaccepting = 0; +- ifp->ntcpactive = 0; ++ isc_refcount_init(&ifp->ntcpaccepting, 0); ++ isc_refcount_init(&ifp->ntcpactive, 0); + + ifp->nudpdispatch = 0; + +@@ -618,6 +618,9 @@ ns_interface_destroy(ns_interface_t *ifp) { + + ns_interfacemgr_detach(&ifp->mgr); + ++ isc_refcount_destroy(&ifp->ntcpactive); ++ isc_refcount_destroy(&ifp->ntcpaccepting); ++ + ifp->magic = 0; + isc_mem_put(mctx, ifp, sizeof(*ifp)); + } +-- +2.20.1 + diff --git a/poky/meta/recipes-connectivity/bind/bind_9.11.5-P4.bb b/poky/meta/recipes-connectivity/bind/bind_9.11.5-P4.bb index f4e985036..089770634 100644 --- a/poky/meta/recipes-connectivity/bind/bind_9.11.5-P4.bb +++ b/poky/meta/recipes-connectivity/bind/bind_9.11.5-P4.bb @@ -20,6 +20,14 @@ SRC_URI = "https://ftp.isc.org/isc/bind9/${PV}/${BPN}-${PV}.tar.gz \ file://0001-configure.in-remove-useless-L-use_openssl-lib.patch \ file://0001-named-lwresd-V-and-start-log-hide-build-options.patch \ file://0001-avoid-start-failure-with-bind-user.patch \ + file://0001-bind-fix-CVE-2019-6471.patch \ + file://0001-fix-enforcement-of-tcp-clients-v1.patch \ + file://0002-tcp-clients-could-still-be-exceeded-v2.patch \ + file://0003-use-reference-counter-for-pipeline-groups-v3.patch \ + file://0004-better-tcpquota-accounting-and-client-mortality-chec.patch \ + file://0005-refactor-tcpquota-and-pipeline-refs-allow-special-ca.patch \ + file://0006-restore-allowance-for-tcp-clients-interfaces.patch \ + file://0007-Replace-atomic-operations-in-bin-named-client.c-with.patch \ " SRC_URI[md5sum] = "8ddab4b61fa4516fe404679c74e37960" @@ -29,6 +37,10 @@ UPSTREAM_CHECK_URI = "https://ftp.isc.org/isc/bind9/" # stay at 9.11 until 9.16, from 9.16 follow the ESV versions divisible by 4 UPSTREAM_CHECK_REGEX = "(?P<pver>9.(11|16|20|24|28)(\.\d+)+(-P\d+)*)/" +# BIND >= 9.11.2 need dhcpd >= 4.4.0, +# don't report it here since dhcpd is already recent enough. +CVE_CHECK_WHITELIST += "CVE-2019-6470" + inherit autotools update-rc.d systemd useradd pkgconfig multilib_script MULTILIB_SCRIPTS = "${PN}:${bindir}/bind9-config ${PN}:${bindir}/isc-config.sh" diff --git a/poky/meta/recipes-connectivity/bluez5/bluez5.inc b/poky/meta/recipes-connectivity/bluez5/bluez5.inc index f582a07e2..484509350 100644 --- a/poky/meta/recipes-connectivity/bluez5/bluez5.inc +++ b/poky/meta/recipes-connectivity/bluez5/bluez5.inc @@ -58,12 +58,13 @@ SRC_URI = "\ file://CVE-2018-10910.patch \ file://gcc9-fixes.patch \ file://0001-tools-Fix-build-after-y2038-changes-in-glibc.patch \ + file://0001-tools-btpclient.c-include-signal.h.patch \ " S = "${WORKDIR}/bluez-${PV}" CVE_PRODUCT = "bluez" -inherit autotools pkgconfig systemd update-rc.d distro_features_check ptest gobject-introspection-data +inherit autotools pkgconfig systemd update-rc.d features_check ptest gobject-introspection-data EXTRA_OECONF = "\ --enable-test \ diff --git a/poky/meta/recipes-connectivity/bluez5/bluez5/0001-Makefile.am-Fix-a-race-issue-for-tools.patch b/poky/meta/recipes-connectivity/bluez5/bluez5/0001-Makefile.am-Fix-a-race-issue-for-tools.patch index 3c227a8ea..b6cb97839 100644 --- a/poky/meta/recipes-connectivity/bluez5/bluez5/0001-Makefile.am-Fix-a-race-issue-for-tools.patch +++ b/poky/meta/recipes-connectivity/bluez5/bluez5/0001-Makefile.am-Fix-a-race-issue-for-tools.patch @@ -1,32 +1,30 @@ -From 048e1844092cb4b3afd23f16fc2cc70dd2e122b7 Mon Sep 17 00:00:00 2001 -From: Robert Yang <liezhi.yang@windriver.com> -Date: Mon, 24 Dec 2018 17:57:14 -0800 -Subject: [PATCH] Makefile.am: Fix a race issue for tools +Upstream-Status: Backport +Signed-off-by: Ross Burton <ross.burton@intel.com> -Fixed: -cp ../bluez-5.50/tools/hid2hci.rules tools/97-hid2hci.rules -cp: cannot create regular file tools/97-hid2hci.rules: No such file or directory -make[1]: *** [tools/97-hid2hci.rules] Error 1 +From 117c41242c01e057295aed80ed973c6dc7e35fe2 Mon Sep 17 00:00:00 2001 +From: Ross Burton <ross.burton@intel.com> +Date: Tue, 8 Oct 2019 11:01:56 +0100 +Subject: [PATCH BlueZ] Makefile.am: add missing mkdir in rules generation -Upstream-Status: Submitted[https://www.spinics.net/lists/linux-bluetooth/msg78361.html] - -Signed-off-by: Robert Yang <liezhi.yang@windriver.com> +In parallel out-of-tree builds it's possible that tools/*.rules are +generated before the target directory has been implicitly created. Solve this by +creating the directory before writing into it. --- Makefile.am | 1 + 1 file changed, 1 insertion(+) diff --git a/Makefile.am b/Makefile.am -index 6d1ff11..35a01f2 100644 +index 2ac28b23d..e7bcd2366 100644 --- a/Makefile.am +++ b/Makefile.am -@@ -504,6 +504,7 @@ src/builtin.h: src/genbuiltin $(builtin_sources) +@@ -589,6 +589,7 @@ src/builtin.h: src/genbuiltin $(builtin_sources) $(AM_V_GEN)$(srcdir)/src/genbuiltin $(builtin_modules) > $@ tools/%.rules: -+ [ -e tools ] || $(MKDIR_P) tools ++ $(AM_V_at)$(MKDIR_P) tools $(AM_V_GEN)cp $(srcdir)/$(subst 97-,,$@) $@ $(lib_libbluetooth_la_OBJECTS): $(local_headers) -- -2.10.2 +2.20.1 diff --git a/poky/meta/recipes-connectivity/bluez5/bluez5/0001-tools-btpclient.c-include-signal.h.patch b/poky/meta/recipes-connectivity/bluez5/bluez5/0001-tools-btpclient.c-include-signal.h.patch new file mode 100644 index 000000000..620aaabc6 --- /dev/null +++ b/poky/meta/recipes-connectivity/bluez5/bluez5/0001-tools-btpclient.c-include-signal.h.patch @@ -0,0 +1,30 @@ +From 0b1766514f6847c7367fce07f19a750ec74c11a6 Mon Sep 17 00:00:00 2001 +From: Robert Yang <liezhi.yang@windriver.com> +Date: Thu, 26 Sep 2019 16:19:34 +0800 +Subject: [PATCH] tools/btpclient.c: include signal.h + +Fix compile failure when configure --enable-btpclient: +btpclient.c:2834:7: error: 'SIGINT' undeclared (first use in this function) + +Upstream-Status: Backport [A subset of the full fix that went upstream] + +Signed-off-by: Robert Yang <liezhi.yang@windriver.com> +--- + tools/btpclient.c | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/tools/btpclient.c b/tools/btpclient.c +index b217df5..aece7fe 100644 +--- a/tools/btpclient.c ++++ b/tools/btpclient.c +@@ -29,6 +29,7 @@ + #include <stdlib.h> + #include <assert.h> + #include <getopt.h> ++#include <signal.h> + + #include <ell/ell.h> + +-- +2.7.4 + diff --git a/poky/meta/recipes-connectivity/bluez5/bluez5/out-of-tree.patch b/poky/meta/recipes-connectivity/bluez5/bluez5/out-of-tree.patch index 3ee79d704..76ed77925 100644 --- a/poky/meta/recipes-connectivity/bluez5/bluez5/out-of-tree.patch +++ b/poky/meta/recipes-connectivity/bluez5/bluez5/out-of-tree.patch @@ -7,7 +7,7 @@ In parallel out-of-tree builds it's possible that obexd/src/builtin.h is generated before the target directory has been implicitly created. Solve this by creating the directory before writing into it. -Upstream-Status: Submitted +Upstream-Status: Backport Signed-off-by: Ross Burton <ross.burton@intel.com> --- Makefile.obexd | 1 + diff --git a/poky/meta/recipes-connectivity/connman/connman-gnome_0.7.bb b/poky/meta/recipes-connectivity/connman/connman-gnome_0.7.bb index a56bd3751..778bf5019 100644 --- a/poky/meta/recipes-connectivity/connman/connman-gnome_0.7.bb +++ b/poky/meta/recipes-connectivity/connman/connman-gnome_0.7.bb @@ -20,7 +20,7 @@ SRC_URI = "git://github.com/connectivity/connman-gnome.git \ S = "${WORKDIR}/git" -inherit autotools-brokensep gtk-icon-cache pkgconfig distro_features_check +inherit autotools-brokensep gtk-icon-cache pkgconfig features_check ANY_OF_DISTRO_FEATURES = "${GTK3DISTROFEATURES}" RDEPENDS_${PN} = "connman" diff --git a/poky/meta/recipes-connectivity/connman/connman.inc b/poky/meta/recipes-connectivity/connman/connman.inc index ee0047992..fb38ab4fc 100644 --- a/poky/meta/recipes-connectivity/connman/connman.inc +++ b/poky/meta/recipes-connectivity/connman/connman.inc @@ -59,7 +59,7 @@ INITSCRIPT_NAME = "connman" INITSCRIPT_PARAMS = "start 05 5 2 3 . stop 22 0 1 6 ." python __anonymous () { - systemd_packages = "${PN}" + systemd_packages = "${PN} ${PN}-wait-online" pkgconfig = d.getVar('PACKAGECONFIG') if ('openvpn' or 'vpnc' or 'l2tp' or 'pptp') in pkgconfig.split(): systemd_packages += " ${PN}-vpn" diff --git a/poky/meta/recipes-connectivity/dhcp/dhcp.inc b/poky/meta/recipes-connectivity/dhcp/dhcp.inc index 18bbaf884..c4697beaf 100644 --- a/poky/meta/recipes-connectivity/dhcp/dhcp.inc +++ b/poky/meta/recipes-connectivity/dhcp/dhcp.inc @@ -43,7 +43,7 @@ INITSCRIPT_PACKAGES = "dhcp-server" INITSCRIPT_NAME_dhcp-server = "dhcp-server" INITSCRIPT_PARAMS_dhcp-server = "defaults" -TARGET_CFLAGS += "-D_GNU_SOURCE" +CFLAGS += "-D_GNU_SOURCE" EXTRA_OECONF = "--with-srv-lease-file=${localstatedir}/lib/dhcp/dhcpd.leases \ --with-srv6-lease-file=${localstatedir}/lib/dhcp/dhcpd6.leases \ --with-cli-lease-file=${localstatedir}/lib/dhcp/dhclient.leases \ diff --git a/poky/meta/recipes-connectivity/dhcp/dhcp/0001-workaround-busybox-limitation-in-linux-dhclient-script.patch b/poky/meta/recipes-connectivity/dhcp/dhcp/0001-workaround-busybox-limitation-in-linux-dhclient-script.patch new file mode 100644 index 000000000..2359381b9 --- /dev/null +++ b/poky/meta/recipes-connectivity/dhcp/dhcp/0001-workaround-busybox-limitation-in-linux-dhclient-script.patch @@ -0,0 +1,65 @@ +From eec0503cfc36f63d777f5cb3f2719cecedcb8468 Mon Sep 17 00:00:00 2001 +From: Haris Okanovic <haris.okanovic@ni.com> +Date: Mon, 7 Jan 2019 13:22:09 -0600 +Subject: [PATCH] Workaround busybox limitation in Linux dhclient-script + +Busybox is a lightweight implementation of coreutils commonly used on +space-constrained embedded Linux distributions. It's implementation of +chown and chmod doesn't provide a "--reference" option added to +client/scripts/linux as of commit 9261cb14. This change works around +that limitation by using stat to read ownership and permissions flags +and simple chown/chmod calls supported in both coreutils and busybox. + + modified: client/scripts/linux + +Signed-off-by: Haris Okanovic <haris.okanovic@ni.com> +Upstream-Status: Pending [ISC-Bugs #48771] +--- + client/scripts/linux | 17 +++++++++++++---- + 1 file changed, 13 insertions(+), 4 deletions(-) + +diff --git a/client/scripts/linux b/client/scripts/linux +index 0c429697..2435a44b 100755 +--- a/client/scripts/linux ++++ b/client/scripts/linux +@@ -32,6 +32,17 @@ + # if your system holds ip tool in a non-standard location. + ip=/sbin/ip + ++chown_chmod_by_reference() { ++ local reference_file="$1" ++ local target_file="$2" ++ ++ local owner=$(stat -c "%u:%g" "$reference_file") ++ local perm=$(stat -c "%a" "$reference_file") ++ ++ chown "$owner" "$target_file" ++ chmod "$perm" "$target_file" ++} ++ + # update /etc/resolv.conf based on received values + # This updated version mostly follows Debian script by Andrew Pollock et al. + make_resolv_conf() { +@@ -74,8 +85,7 @@ make_resolv_conf() { + fi + + if [ -f /etc/resolv.conf ]; then +- chown --reference=/etc/resolv.conf $new_resolv_conf +- chmod --reference=/etc/resolv.conf $new_resolv_conf ++ chown_chmod_by_reference /etc/resolv.conf $new_resolv_conf + fi + mv -f $new_resolv_conf /etc/resolv.conf + # DHCPv6 +@@ -101,8 +111,7 @@ make_resolv_conf() { + fi + + if [ -f /etc/resolv.conf ]; then +- chown --reference=/etc/resolv.conf $new_resolv_conf +- chmod --reference=/etc/resolv.conf $new_resolv_conf ++ chown_chmod_by_reference /etc/resolv.conf $new_resolv_conf + fi + mv -f $new_resolv_conf /etc/resolv.conf + fi +-- +2.20.0 + diff --git a/poky/meta/recipes-connectivity/dhcp/dhcp_4.4.1.bb b/poky/meta/recipes-connectivity/dhcp/dhcp_4.4.1.bb index 275961a60..020777b8f 100644 --- a/poky/meta/recipes-connectivity/dhcp/dhcp_4.4.1.bb +++ b/poky/meta/recipes-connectivity/dhcp/dhcp_4.4.1.bb @@ -11,6 +11,7 @@ SRC_URI += "file://0001-define-macro-_PATH_DHCPD_CONF-and-_PATH_DHCLIENT_CON.pat file://0013-fixup_use_libbind.patch \ file://0001-master-Added-includes-of-new-BIND9-compatibility-hea.patch \ file://0001-Fix-a-NSUPDATE-compiling-issue.patch \ + file://0001-workaround-busybox-limitation-in-linux-dhclient-script.patch \ " SRC_URI[md5sum] = "18c7f4dcbb0a63df25098216d47b1ede" diff --git a/poky/meta/recipes-connectivity/iproute2/iproute2_5.2.0.bb b/poky/meta/recipes-connectivity/iproute2/iproute2_5.3.0.bb index 1728cd69a..8a86cbf78 100644 --- a/poky/meta/recipes-connectivity/iproute2/iproute2_5.2.0.bb +++ b/poky/meta/recipes-connectivity/iproute2/iproute2_5.3.0.bb @@ -4,8 +4,8 @@ SRC_URI = "${KERNELORG_MIRROR}/linux/utils/net/${BPN}/${BP}.tar.xz \ file://0001-libc-compat.h-add-musl-workaround.patch \ " -SRC_URI[md5sum] = "0cb2736e7bc2f56254a363d3d23703b7" -SRC_URI[sha256sum] = "a5b95dec26353fc71dba9bb403e9343fad2a06bd69fb154a22a2aa2914f74da8" +SRC_URI[md5sum] = "227404413c8d6db649d6188ead1e5a6e" +SRC_URI[sha256sum] = "cb1c1e45993a3bd2438543fd4332d70f1726a6e6ff97dc613a8258c993117b3f" # CFLAGS are computed in Makefile and reference CCOPTS # diff --git a/poky/meta/recipes-connectivity/nfs-utils/nfs-utils/nfsserver b/poky/meta/recipes-connectivity/nfs-utils/nfs-utils/nfsserver index d5e9c38a9..0f5747cc6 100644 --- a/poky/meta/recipes-connectivity/nfs-utils/nfs-utils/nfsserver +++ b/poky/meta/recipes-connectivity/nfs-utils/nfs-utils/nfsserver @@ -107,7 +107,7 @@ stop_nfsd(){ #FIXME: need to create the /var/lib/nfs/... directories case "$1" in start) - exportfs -r + test -r /etc/exports && exportfs -r start_nfsd "$NFS_SERVERS" start_mountd test -r /etc/exports && exportfs -a;; diff --git a/poky/meta/recipes-connectivity/nfs-utils/nfs-utils_2.4.1.bb b/poky/meta/recipes-connectivity/nfs-utils/nfs-utils_2.4.1.bb index 7e80354e4..eb32bccb5 100644 --- a/poky/meta/recipes-connectivity/nfs-utils/nfs-utils_2.4.1.bb +++ b/poky/meta/recipes-connectivity/nfs-utils/nfs-utils_2.4.1.bb @@ -9,7 +9,7 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=95f3a93a5c3c7888de623b46ea085a84" # util-linux for libblkid DEPENDS = "libcap libevent util-linux sqlite3 libtirpc" -RDEPENDS_${PN} = "${PN}-client bash" +RDEPENDS_${PN} = "${PN}-client" RRECOMMENDS_${PN} = "kernel-module-nfsd" inherit useradd diff --git a/poky/meta/recipes-connectivity/ofono/ofono_1.30.bb b/poky/meta/recipes-connectivity/ofono/ofono_1.30.bb deleted file mode 100644 index c916cb1b2..000000000 --- a/poky/meta/recipes-connectivity/ofono/ofono_1.30.bb +++ /dev/null @@ -1,9 +0,0 @@ -require ofono.inc - -SRC_URI = "\ - ${KERNELORG_MIRROR}/linux/network/${BPN}/${BP}.tar.xz \ - file://ofono \ - file://0001-mbim-add-an-optional-TEMP_FAILURE_RETRY-macro-copy.patch \ -" -SRC_URI[md5sum] = "2b1ce11a4db1f4b5c8cd96eb7e96ba0c" -SRC_URI[sha256sum] = "8079735efc5d7f33be9e792e791f2f7ff75c31ce67d477b994673e32319eec5c" diff --git a/poky/meta/recipes-connectivity/ofono/ofono.inc b/poky/meta/recipes-connectivity/ofono/ofono_1.31.bb index bdbb0b5bc..7d0976ad7 100644 --- a/poky/meta/recipes-connectivity/ofono/ofono.inc +++ b/poky/meta/recipes-connectivity/ofono/ofono_1.31.bb @@ -1,28 +1,35 @@ -HOMEPAGE = "http://www.ofono.org" -SUMMARY = "open source telephony" +SUMMARY = "open source telephony" DESCRIPTION = "oFono is a stack for mobile telephony devices on Linux. oFono supports speaking to telephony devices through specific drivers, or with generic AT commands." -LICENSE = "GPLv2" +HOMEPAGE = "http://www.ofono.org" +BUGTRACKER = "https://01.org/jira/browse/OF" +LICENSE = "GPLv2" LIC_FILES_CHKSUM = "file://COPYING;md5=eb723b61539feef013de476e68b5c50a \ file://src/ofono.h;beginline=1;endline=20;md5=3ce17d5978ef3445def265b98899c2ee" +DEPENDS = "dbus glib-2.0 udev mobile-broadband-provider-info ell" -inherit autotools pkgconfig update-rc.d systemd gobject-introspection-data +SRC_URI = "\ + ${KERNELORG_MIRROR}/linux/network/${BPN}/${BP}.tar.xz \ + file://ofono \ + file://0001-mbim-add-an-optional-TEMP_FAILURE_RETRY-macro-copy.patch \ +" +SRC_URI[md5sum] = "1c26340e3c6ed132cc812595081bb3dc" +SRC_URI[sha256sum] = "a15c5d28096c10eb30e47a68b6dc2e7c4a5a99d7f4cfedf0b69624f33d859e9b" -DEPENDS = "dbus glib-2.0 udev mobile-broadband-provider-info ell" +inherit autotools pkgconfig update-rc.d systemd gobject-introspection-data INITSCRIPT_NAME = "ofono" INITSCRIPT_PARAMS = "defaults 22" +SYSTEMD_SERVICE_${PN} = "ofono.service" PACKAGECONFIG ??= "\ ${@bb.utils.filter('DISTRO_FEATURES', 'systemd', d)} \ ${@bb.utils.contains('DISTRO_FEATURES', 'bluetooth', 'bluez', '', d)} \ - " +" PACKAGECONFIG[systemd] = "--with-systemdunitdir=${systemd_unitdir}/system/,--with-systemdunitdir=" PACKAGECONFIG[bluez] = "--enable-bluetooth, --disable-bluetooth, bluez5" EXTRA_OECONF += "--enable-test --enable-external-ell" -SYSTEMD_SERVICE_${PN} = "ofono.service" - do_install_append() { install -d ${D}${sysconfdir}/init.d/ install -m 0755 ${WORKDIR}/ofono ${D}${sysconfdir}/init.d/ofono @@ -30,10 +37,14 @@ do_install_append() { PACKAGES =+ "${PN}-tests" -RDEPENDS_${PN} += "dbus" -RRECOMMENDS_${PN} += "kernel-module-tun mobile-broadband-provider-info" - FILES_${PN} += "${systemd_unitdir}" FILES_${PN}-tests = "${libdir}/${BPN}/test" -RDEPENDS_${PN}-tests = "python3-core python3-dbus" -RDEPENDS_${PN}-tests += "${@bb.utils.contains('GI_DATA_ENABLED', 'True', 'python3-pygobject', '', d)}" + +RDEPENDS_${PN} += "dbus" +RDEPENDS_${PN}-tests = "\ + python3-core \ + python3-dbus \ + ${@bb.utils.contains('GI_DATA_ENABLED', 'True', 'python3-pygobject', '', d)} \ +" + +RRECOMMENDS_${PN} += "kernel-module-tun mobile-broadband-provider-info" diff --git a/poky/meta/recipes-connectivity/openssh/openssh/0001-upstream-fix-integer-overflow-in-XMSS-private-key-pa.patch b/poky/meta/recipes-connectivity/openssh/openssh/0001-upstream-fix-integer-overflow-in-XMSS-private-key-pa.patch new file mode 100644 index 000000000..3265be348 --- /dev/null +++ b/poky/meta/recipes-connectivity/openssh/openssh/0001-upstream-fix-integer-overflow-in-XMSS-private-key-pa.patch @@ -0,0 +1,40 @@ +From 2014fad3d28090b59d2f8a0971166c06e5fa6da6 Mon Sep 17 00:00:00 2001 +From: Hongxu Jia <hongxu.jia@windriver.com> +Date: Fri, 18 Oct 2019 14:56:58 +0800 +Subject: [PATCH] upstream: fix integer overflow in XMSS private key parsing. + +Reported by Adam Zabrocki via SecuriTeam's SSH program. + +Note that this code is experimental and not compiled by default. + +ok markus@ + +OpenBSD-Commit-ID: cd0361896d15e8a1bac495ac583ff065ffca2be1 + +Signed-off-by: "djm@openbsd.org" <djm@openbsd.org> + +Upstream-Status: Backport [https://github.com/openssh/openssh-portable/commit/a546b17bbaeb12beac4c9aeed56f74a42b18a93a] +CVE: CVE-2019-16905 + +Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> +--- + sshkey-xmss.c | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/sshkey-xmss.c b/sshkey-xmss.c +index aaae702..c57681a 100644 +--- a/sshkey-xmss.c ++++ b/sshkey-xmss.c +@@ -977,7 +977,8 @@ sshkey_xmss_decrypt_state(const struct sshkey *k, struct sshbuf *encoded, + goto out; + } + /* check that an appropriate amount of auth data is present */ +- if (sshbuf_len(encoded) < encrypted_len + authlen) { ++ if (sshbuf_len(encoded) < authlen || ++ sshbuf_len(encoded) - authlen < encrypted_len) { + r = SSH_ERR_INVALID_FORMAT; + goto out; + } +-- +2.7.4 + diff --git a/poky/meta/recipes-connectivity/openssh/openssh_8.0p1.bb b/poky/meta/recipes-connectivity/openssh/openssh_8.0p1.bb index 01eaecd4e..2ffbc9a95 100644 --- a/poky/meta/recipes-connectivity/openssh/openssh_8.0p1.bb +++ b/poky/meta/recipes-connectivity/openssh/openssh_8.0p1.bb @@ -24,6 +24,7 @@ SRC_URI = "http://ftp.openbsd.org/pub/OpenBSD/OpenSSH/portable/openssh-${PV}.tar file://fix-potential-signed-overflow-in-pointer-arithmatic.patch \ file://sshd_check_keys \ file://add-test-support-for-busybox.patch \ + file://0001-upstream-fix-integer-overflow-in-XMSS-private-key-pa.patch \ " SRC_URI[md5sum] = "bf050f002fe510e1daecd39044e1122d" SRC_URI[sha256sum] = "bd943879e69498e8031eb6b7f44d08cdc37d59a7ab689aa0b437320c3481fd68" diff --git a/poky/meta/recipes-connectivity/openssl/openssl_1.1.1d.bb b/poky/meta/recipes-connectivity/openssl/openssl_1.1.1d.bb index 072f727e0..8819e19ec 100644 --- a/poky/meta/recipes-connectivity/openssl/openssl_1.1.1d.bb +++ b/poky/meta/recipes-connectivity/openssl/openssl_1.1.1d.bb @@ -148,7 +148,7 @@ do_install_append_class-native () { OPENSSL_CONF=${libdir}/ssl-1.1/openssl.cnf \ SSL_CERT_DIR=${libdir}/ssl-1.1/certs \ SSL_CERT_FILE=${libdir}/ssl-1.1/cert.pem \ - OPENSSL_ENGINES=${libdir}/ssl-1.1/engines + OPENSSL_ENGINES=${libdir}/engines-1.1 } do_install_append_class-nativesdk () { diff --git a/poky/meta/recipes-connectivity/wpa-supplicant/wpa-supplicant/0001-AP-Silently-ignore-management-frame-from-unexpected-.patch b/poky/meta/recipes-connectivity/wpa-supplicant/wpa-supplicant/0001-AP-Silently-ignore-management-frame-from-unexpected-.patch new file mode 100644 index 000000000..7b0713cf6 --- /dev/null +++ b/poky/meta/recipes-connectivity/wpa-supplicant/wpa-supplicant/0001-AP-Silently-ignore-management-frame-from-unexpected-.patch @@ -0,0 +1,82 @@ +hostapd before 2.10 and wpa_supplicant before 2.10 allow an incorrect indication +of disconnection in certain situations because source address validation is +mishandled. This is a denial of service that should have been prevented by PMF +(aka management frame protection). The attacker must send a crafted 802.11 frame +from a location that is within the 802.11 communications range. + +CVE: CVE-2019-16275 +Upstream-Status: Backport +Signed-off-by: Ross Burton <ross.burton@intel.com> + +From 8c07fa9eda13e835f3f968b2e1c9a8be3a851ff9 Mon Sep 17 00:00:00 2001 +From: Jouni Malinen <j@w1.fi> +Date: Thu, 29 Aug 2019 11:52:04 +0300 +Subject: [PATCH] AP: Silently ignore management frame from unexpected source + address + +Do not process any received Management frames with unexpected/invalid SA +so that we do not add any state for unexpected STA addresses or end up +sending out frames to unexpected destination. This prevents unexpected +sequences where an unprotected frame might end up causing the AP to send +out a response to another device and that other device processing the +unexpected response. + +In particular, this prevents some potential denial of service cases +where the unexpected response frame from the AP might result in a +connected station dropping its association. + +Signed-off-by: Jouni Malinen <j@w1.fi> +--- + src/ap/drv_callbacks.c | 13 +++++++++++++ + src/ap/ieee802_11.c | 12 ++++++++++++ + 2 files changed, 25 insertions(+) + +diff --git a/src/ap/drv_callbacks.c b/src/ap/drv_callbacks.c +index 31587685fe3b..34ca379edc3d 100644 +--- a/src/ap/drv_callbacks.c ++++ b/src/ap/drv_callbacks.c +@@ -131,6 +131,19 @@ int hostapd_notif_assoc(struct hostapd_data *hapd, const u8 *addr, + "hostapd_notif_assoc: Skip event with no address"); + return -1; + } ++ ++ if (is_multicast_ether_addr(addr) || ++ is_zero_ether_addr(addr) || ++ os_memcmp(addr, hapd->own_addr, ETH_ALEN) == 0) { ++ /* Do not process any frames with unexpected/invalid SA so that ++ * we do not add any state for unexpected STA addresses or end ++ * up sending out frames to unexpected destination. */ ++ wpa_printf(MSG_DEBUG, "%s: Invalid SA=" MACSTR ++ " in received indication - ignore this indication silently", ++ __func__, MAC2STR(addr)); ++ return 0; ++ } ++ + random_add_randomness(addr, ETH_ALEN); + + hostapd_logger(hapd, addr, HOSTAPD_MODULE_IEEE80211, +diff --git a/src/ap/ieee802_11.c b/src/ap/ieee802_11.c +index c85a28db44b7..e7065372e158 100644 +--- a/src/ap/ieee802_11.c ++++ b/src/ap/ieee802_11.c +@@ -4626,6 +4626,18 @@ int ieee802_11_mgmt(struct hostapd_data *hapd, const u8 *buf, size_t len, + fc = le_to_host16(mgmt->frame_control); + stype = WLAN_FC_GET_STYPE(fc); + ++ if (is_multicast_ether_addr(mgmt->sa) || ++ is_zero_ether_addr(mgmt->sa) || ++ os_memcmp(mgmt->sa, hapd->own_addr, ETH_ALEN) == 0) { ++ /* Do not process any frames with unexpected/invalid SA so that ++ * we do not add any state for unexpected STA addresses or end ++ * up sending out frames to unexpected destination. */ ++ wpa_printf(MSG_DEBUG, "MGMT: Invalid SA=" MACSTR ++ " in received frame - ignore this frame silently", ++ MAC2STR(mgmt->sa)); ++ return 0; ++ } ++ + if (stype == WLAN_FC_STYPE_BEACON) { + handle_beacon(hapd, mgmt, len, fi); + return 1; +-- +2.20.1 diff --git a/poky/meta/recipes-connectivity/wpa-supplicant/wpa-supplicant_2.9.bb b/poky/meta/recipes-connectivity/wpa-supplicant/wpa-supplicant_2.9.bb index ad9e6ea4b..3e92427bb 100644 --- a/poky/meta/recipes-connectivity/wpa-supplicant/wpa-supplicant_2.9.bb +++ b/poky/meta/recipes-connectivity/wpa-supplicant/wpa-supplicant_2.9.bb @@ -25,6 +25,7 @@ SRC_URI = "http://w1.fi/releases/wpa_supplicant-${PV}.tar.gz \ file://wpa_supplicant.conf-sane \ file://99_wpa_supplicant \ file://0001-replace-systemd-install-Alias-with-WantedBy.patch \ + file://0001-AP-Silently-ignore-management-frame-from-unexpected-.patch \ " SRC_URI[md5sum] = "2d2958c782576dc9901092fbfecb4190" SRC_URI[sha256sum] = "fcbdee7b4a64bea8177973299c8c824419c413ec2e3a95db63dd6a5dc3541f17" diff --git a/poky/meta/recipes-core/coreutils/coreutils_8.31.bb b/poky/meta/recipes-core/coreutils/coreutils_8.31.bb index 4a74f619a..57b2c1bdb 100644 --- a/poky/meta/recipes-core/coreutils/coreutils_8.31.bb +++ b/poky/meta/recipes-core/coreutils/coreutils_8.31.bb @@ -49,7 +49,7 @@ bindir_progs = "arch basename chcon cksum comm csplit cut dir dircolors dirname env expand expr factor fmt fold groups head hostid id install \ join link logname md5sum mkfifo nl nohup nproc od paste pathchk \ pinky pr printf ptx readlink realpath runcon seq sha1sum sha224sum sha256sum \ - sha384sum sha512sum shred shuf sort split stdbuf sum tac tail tee test timeout \ + sha384sum sha512sum shred shuf sort split sum tac tail tee test timeout \ tr truncate tsort tty unexpand uniq unlink uptime users vdir wc who whoami yes" # hostname gets a special treatment and is not included in this @@ -58,6 +58,10 @@ base_bindir_progs = "cat chgrp chmod chown cp date dd echo false hostname kill l sbindir_progs= "chroot" +PACKAGE_BEFORE_PN_class-target += "coreutils-stdbuf" +FILES_coreutils-stdbuf = "${bindir}/stdbuf ${libdir}/coreutils/libstdbuf.so" +RDEPENDS_coreutils_class-target += "coreutils-stdbuf" + # Let aclocal use the relative path for the m4 file rather than the # absolute since coreutils has a lot of m4 files, otherwise there might # be an "Argument list too long" error when it is built in a long/deep diff --git a/poky/meta/recipes-core/dbus/dbus/dbus-1.init b/poky/meta/recipes-core/dbus/dbus/dbus-1.init index 42c86297c..90e167e57 100644 --- a/poky/meta/recipes-core/dbus/dbus/dbus-1.init +++ b/poky/meta/recipes-core/dbus/dbus/dbus-1.init @@ -21,8 +21,8 @@ DAEMON=@bindir@/dbus-daemon NAME=dbus -DAEMONUSER=messagebus # must match /etc/dbus-1/system.conf -PIDFILE=/var/run/messagebus.pid # must match /etc/dbus-1/system.conf +DAEMONUSER=messagebus # must match /usr/share/dbus-1/system.conf +PIDFILE=/var/run/dbus/pid # must match /usr/share/dbus-1/system.conf UUIDDIR=/var/lib/dbus DESC="system message bus" EVENTDIR=/etc/dbus-1/event.d diff --git a/poky/meta/recipes-core/dbus/dbus_1.12.16.bb b/poky/meta/recipes-core/dbus/dbus_1.12.16.bb index f4fec2365..96b503687 100644 --- a/poky/meta/recipes-core/dbus/dbus_1.12.16.bb +++ b/poky/meta/recipes-core/dbus/dbus_1.12.16.bb @@ -32,7 +32,6 @@ python __anonymous() { } USERADD_PACKAGES = "${PN}" -GROUPADD_PARAM_${PN} = "-r netdev" USERADD_PARAM_${PN} = "--system --home ${localstatedir}/lib/dbus \ --no-create-home --shell /bin/false \ --user-group messagebus" diff --git a/poky/meta/recipes-core/ell/ell_0.22.bb b/poky/meta/recipes-core/ell/ell_0.26.bb index b3942fc30..f1f252ce4 100644 --- a/poky/meta/recipes-core/ell/ell_0.22.bb +++ b/poky/meta/recipes-core/ell/ell_0.26.bb @@ -14,8 +14,8 @@ DEPENDS = "dbus" inherit autotools pkgconfig SRC_URI = "https://mirrors.edge.kernel.org/pub/linux/libs/${BPN}/${BPN}-${PV}.tar.xz" -SRC_URI[md5sum] = "a4e7d74404f11e71775b89f53a8f1c33" -SRC_URI[sha256sum] = "3c1d6d997e17dfcbe4ebcd1331d9a7be5c64f2f0a0813bc223790e570d8da2e3" +SRC_URI[md5sum] = "4660e25541071e933a2bb02ef2f94e7d" +SRC_URI[sha256sum] = "7855b4b8f271ba6ee67d87d0965b975a9a8dbeaa616665ca2248afa3b5fcbc77" do_configure_prepend () { mkdir -p ${S}/build-aux diff --git a/poky/meta/recipes-core/glib-2.0/glib-2.0_2.62.1.bb b/poky/meta/recipes-core/glib-2.0/glib-2.0_2.62.2.bb index 7897170a7..27a15a9b1 100644 --- a/poky/meta/recipes-core/glib-2.0/glib-2.0_2.62.1.bb +++ b/poky/meta/recipes-core/glib-2.0/glib-2.0_2.62.2.bb @@ -20,5 +20,5 @@ SRC_URI = "${GNOME_MIRROR}/glib/${SHRT_VER}/glib-${PV}.tar.xz \ SRC_URI_append_class-native = " file://relocate-modules.patch" SRC_URI_append_class-target = " file://glib-meson.cross" -SRC_URI[md5sum] = "64c14b4fe46c478992560c2f48a5b649" -SRC_URI[sha256sum] = "3dd9024e1d0872a6da7ac509937ccf997161b11d7d35be337c7e829cbae0f9df" +SRC_URI[md5sum] = "bed3a70397a019965efac0c49f9c8164" +SRC_URI[sha256sum] = "698824a413f76df039739c2a78f45b10939d526ae7495bab4e694e6730deb3f1" diff --git a/poky/meta/recipes-core/glib-2.0/glib.inc b/poky/meta/recipes-core/glib-2.0/glib.inc index 8b95f2120..e811b42d7 100644 --- a/poky/meta/recipes-core/glib-2.0/glib.inc +++ b/poky/meta/recipes-core/glib-2.0/glib.inc @@ -28,7 +28,7 @@ PACKAGES += "${PN}-codegen ${PN}-utils" LEAD_SONAME = "libglib-2.0.*" -inherit meson gettext gtk-doc pkgconfig ptest-gnome upstream-version-is-even bash-completion gio-module-cache manpages distro_features_check +inherit meson gettext gtk-doc pkgconfig ptest-gnome upstream-version-is-even bash-completion gio-module-cache manpages features_check GTKDOC_MESON_OPTION = "gtk_doc" diff --git a/poky/meta/recipes-core/glibc/glibc-package.inc b/poky/meta/recipes-core/glibc/glibc-package.inc index d7037c5cc..9dd5a0d40 100644 --- a/poky/meta/recipes-core/glibc/glibc-package.inc +++ b/poky/meta/recipes-core/glibc/glibc-package.inc @@ -1,6 +1,6 @@ INHIBIT_SYSROOT_STRIP = "1" -PACKAGES = "${PN}-dbg catchsegv sln nscd ldd tzcode glibc-thread-db ${PN}-pic libcidn libmemusage libnss-db libsegfault ${PN}-pcprofile libsotruss ${PN} ${PN}-utils glibc-extra-nss ${PN}-dev ${PN}-staticdev ${PN}-doc" +PACKAGES = "${PN}-dbg catchsegv sln nscd ldd tzcode glibc-thread-db ${PN}-pic libcidn libmemusage libnss-db libsegfault ${PN}-pcprofile libsotruss ${PN} ${PN}-utils glibc-extra-nss ${PN}-dev ${PN}-staticdev ${PN}-doc ldconfig" # The ld.so in this glibc supports the GNU_HASH RPROVIDES_${PN} = "eglibc rtld(GNU_HASH)" @@ -23,7 +23,9 @@ ARCH_DYNAMIC_LOADER_aarch64 = "ld-linux-${TARGET_ARCH}.so.1" libc_baselibs_append = " ${@oe.utils.conditional('ARCH_DYNAMIC_LOADER', '', '', '${root_prefix}/lib/${ARCH_DYNAMIC_LOADER}', d)}" INSANE_SKIP_${PN}_append_aarch64 = " libdir" -FILES_${PN} = "${libc_baselibs} ${libexecdir}/* ${base_sbindir}/ldconfig ${sysconfdir}/ld.so.conf" +FILES_${PN} = "${libc_baselibs} ${libexecdir}/*" +RRECOMMENDS_${PN} = "${@bb.utils.filter('DISTRO_FEATURES', 'ldconfig', d)}" +FILES_ldconfig = "${base_sbindir}/ldconfig ${sysconfdir}/ld.so.conf" FILES_ldd = "${bindir}/ldd" FILES_libsegfault = "${base_libdir}/libSegFault*" FILES_libcidn = "${base_libdir}/libcidn-*.so ${base_libdir}/libcidn.so.*" @@ -107,11 +109,6 @@ do_install_append () { } do_install_append_class-target() { - if ! ${@bb.utils.contains('DISTRO_FEATURES', 'ldconfig', 'true', 'false', d)}; then - # The distro doesn't want these files so let's not install them - rm -f ${D}${sysconfdir}/ld.so.conf - rm -f ${D}${base_sbindir}/ldconfig - fi if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then install -d ${D}${sysconfdir}/tmpfiles.d echo "d /run/nscd 755 root root -" \ diff --git a/poky/meta/recipes-core/glibc/glibc.inc b/poky/meta/recipes-core/glibc/glibc.inc index 252fd56c1..ea9a04ac7 100644 --- a/poky/meta/recipes-core/glibc/glibc.inc +++ b/poky/meta/recipes-core/glibc/glibc.inc @@ -6,7 +6,7 @@ DEPENDS = "virtual/${TARGET_PREFIX}gcc libgcc-initial linux-libc-headers" PROVIDES = "virtual/libc" PROVIDES += "virtual/libintl virtual/libiconv" -inherit autotools texinfo distro_features_check systemd +inherit autotools texinfo features_check systemd LEAD_SONAME = "libc.so" diff --git a/poky/meta/recipes-core/initscripts/initscripts-1.0/sysfs.sh b/poky/meta/recipes-core/initscripts/initscripts-1.0/sysfs.sh index f5b5b9904..4871ee94e 100644 --- a/poky/meta/recipes-core/initscripts/initscripts-1.0/sysfs.sh +++ b/poky/meta/recipes-core/initscripts/initscripts-1.0/sysfs.sh @@ -26,6 +26,10 @@ if [ -e /sys/kernel/config ] && grep -q configfs /proc/filesystems; then mount -t configfs configfs /sys/kernel/config fi +if [ -e /sys/firmware/efi/efivars ] && grep -q efivarfs /proc/filesystems; then + mount -t efivarfs efivarfs /sys/firmware/efi/efivars +fi + if ! [ -e /dev/zero ] && [ -e /dev ] && grep -q devtmpfs /proc/filesystems; then mount -n -t devtmpfs devtmpfs /dev fi diff --git a/poky/meta/recipes-core/libxml/libxml2_2.9.9.bb b/poky/meta/recipes-core/libxml/libxml2_2.9.9.bb index c38f883e4..5a7e098f3 100644 --- a/poky/meta/recipes-core/libxml/libxml2_2.9.9.bb +++ b/poky/meta/recipes-core/libxml/libxml2_2.9.9.bb @@ -35,7 +35,7 @@ PACKAGECONFIG ??= "python \ PACKAGECONFIG[python] = "--with-python=${PYTHON},--without-python,python3" PACKAGECONFIG[ipv6] = "--enable-ipv6,--disable-ipv6," -inherit autotools pkgconfig binconfig-disabled ptest distro_features_check +inherit autotools pkgconfig binconfig-disabled ptest features_check inherit ${@bb.utils.contains('PACKAGECONFIG', 'python', 'python3native', '', d)} diff --git a/poky/meta/recipes-core/meta/buildtools-tarball.bb b/poky/meta/recipes-core/meta/buildtools-tarball.bb index 91df6f1ae..9c5c2cc8d 100644 --- a/poky/meta/recipes-core/meta/buildtools-tarball.bb +++ b/poky/meta/recipes-core/meta/buildtools-tarball.bb @@ -72,6 +72,7 @@ create_sdk_files_append () { toolchain_create_sdk_version ${SDK_OUTPUT}/${SDKPATH}/version-${SDK_SYS} echo 'export GIT_SSL_CAINFO="${SDKPATHNATIVE}${sysconfdir}/ssl/certs/ca-certificates.crt"' >>$script + echo 'export OPENSSL_CONF="${SDKPATHNATIVE}${sysconfdir}/ssl/openssl.cnf"' >>$script if [ "${SDKMACHINE}" = "i686" ]; then echo 'export NO32LIBS="0"' >>$script diff --git a/poky/meta/recipes-core/meta/cve-update-db-native.bb b/poky/meta/recipes-core/meta/cve-update-db-native.bb index 2c427a588..db1d69a28 100644 --- a/poky/meta/recipes-core/meta/cve-update-db-native.bb +++ b/poky/meta/recipes-core/meta/cve-update-db-native.bb @@ -21,26 +21,26 @@ python do_populate_cve_db() { """ Update NVD database with json data feed """ - + import bb.utils import sqlite3, urllib, urllib.parse, shutil, gzip from datetime import date + bb.utils.export_proxies(d) + BASE_URL = "https://nvd.nist.gov/feeds/json/cve/1.0/nvdcve-1.0-" YEAR_START = 2002 - db_dir = os.path.join(d.getVar("DL_DIR"), 'CVE_CHECK') - db_file = os.path.join(db_dir, 'nvdcve_1.0.db') + db_file = d.getVar("CVE_CHECK_DB_FILE") + db_dir = os.path.dirname(db_file) json_tmpfile = os.path.join(db_dir, 'nvd.json.gz') - proxy = d.getVar("https_proxy") - if proxy: - # instantiate an opener but do not install it as the global - # opener unless if we're really sure it's applicable for all - # urllib requests - proxy_handler = urllib.request.ProxyHandler({'https': proxy}) - proxy_opener = urllib.request.build_opener(proxy_handler) - else: - proxy_opener = None + # Don't refresh the database more than once an hour + try: + import time + if time.time() - os.path.getmtime(db_file) < (60*60): + return + except OSError: + pass cve_f = open(os.path.join(d.getVar("TMPDIR"), 'cve_check'), 'a') @@ -59,15 +59,7 @@ python do_populate_cve_db() { json_url = year_url + ".json.gz" # Retrieve meta last modified date - - response = None - - if proxy_opener: - response = proxy_opener.open(meta_url) - else: - req = urllib.request.Request(meta_url) - response = urllib.request.urlopen(req) - + response = urllib.request.urlopen(meta_url) if response: for l in response.read().decode("utf-8").splitlines(): key, value = l.split(":", 1) @@ -87,12 +79,7 @@ python do_populate_cve_db() { # Update db with current year json file try: - if proxy_opener: - response = proxy_opener.open(json_url) - else: - req = urllib.request.Request(json_url) - response = urllib.request.urlopen(req) - + response = urllib.request.urlopen(json_url) if response: update_db(c, gzip.decompress(response.read()).decode('utf-8')) c.execute("insert or replace into META values (?, ?)", [year, last_modified]) @@ -112,11 +99,14 @@ python do_populate_cve_db() { def initialize_db(c): c.execute("CREATE TABLE IF NOT EXISTS META (YEAR INTEGER UNIQUE, DATE TEXT)") + c.execute("CREATE TABLE IF NOT EXISTS NVD (ID TEXT UNIQUE, SUMMARY TEXT, \ SCOREV2 TEXT, SCOREV3 TEXT, MODIFIED INTEGER, VECTOR TEXT)") + c.execute("CREATE TABLE IF NOT EXISTS PRODUCTS (ID TEXT, \ VENDOR TEXT, PRODUCT TEXT, VERSION_START TEXT, OPERATOR_START TEXT, \ VERSION_END TEXT, OPERATOR_END TEXT)") + c.execute("CREATE INDEX IF NOT EXISTS PRODUCT_ID_IDX on PRODUCTS(ID);") def parse_node_and_insert(c, node, cveId): # Parse children node if needed diff --git a/poky/meta/recipes-core/ncurses/files/0001-ncurses-selective-backport-of-20191012-patch.patch b/poky/meta/recipes-core/ncurses/files/0001-ncurses-selective-backport-of-20191012-patch.patch new file mode 100644 index 000000000..7870c4ba3 --- /dev/null +++ b/poky/meta/recipes-core/ncurses/files/0001-ncurses-selective-backport-of-20191012-patch.patch @@ -0,0 +1,169 @@ +From 064b77f173337aa790f1cec0d741bfbc61a33d31 Mon Sep 17 00:00:00 2001 +From: Trevor Gamblin <trevor.gamblin@windriver.com> +Date: Fri, 18 Oct 2019 09:57:43 -0400 +Subject: [PATCH] ncurses: selective backport of 20191012 patch + +Upstream-Status: Backport [https://salsa.debian.org/debian/ncurses/commit/243908b1e3d81] + +Contents of the upstream patch that are not applied to comp_hash.c, +parse_entry.c, or dump_entry.c have been omitted. + +CVE: CVE-2019-17594 +CVE: CVE-2019-17595 + +Signed-off-by: Trevor Gamblin <trevor.gamblin@windriver.com> + +--- + ncurses/tinfo/comp_hash.c | 14 ++++++++++---- + ncurses/tinfo/parse_entry.c | 32 ++++++++++++++++---------------- + progs/dump_entry.c | 7 ++++--- + 3 files changed, 30 insertions(+), 23 deletions(-) + +diff --git a/ncurses/tinfo/comp_hash.c b/ncurses/tinfo/comp_hash.c +index 21f165ca..a62d38f9 100644 +--- a/ncurses/tinfo/comp_hash.c ++++ b/ncurses/tinfo/comp_hash.c +@@ -44,7 +44,7 @@ + #include <tic.h> + #include <hashsize.h> + +-MODULE_ID("$Id: comp_hash.c,v 1.49 2019/03/10 00:06:48 tom Exp $") ++MODULE_ID("$Id: comp_hash.c,v 1.51 2019/10/12 16:32:13 tom Exp $") + + /* + * Finds the entry for the given string in the hash table if present. +@@ -63,7 +63,9 @@ _nc_find_entry(const char *string, + + hashvalue = data->hash_of(string); + +- if (data->table_data[hashvalue] >= 0) { ++ if (hashvalue >= 0 ++ && (unsigned) hashvalue < data->table_size ++ && data->table_data[hashvalue] >= 0) { + + real_table = _nc_get_table(termcap); + ptr = real_table + data->table_data[hashvalue]; +@@ -96,7 +98,9 @@ _nc_find_type_entry(const char *string, + const HashData *data = _nc_get_hash_info(termcap); + int hashvalue = data->hash_of(string); + +- if (data->table_data[hashvalue] >= 0) { ++ if (hashvalue >= 0 ++ && (unsigned) hashvalue < data->table_size ++ && data->table_data[hashvalue] >= 0) { + const struct name_table_entry *const table = _nc_get_table(termcap); + + ptr = table + data->table_data[hashvalue]; +@@ -124,7 +128,9 @@ _nc_find_user_entry(const char *string) + + hashvalue = data->hash_of(string); + +- if (data->table_data[hashvalue] >= 0) { ++ if (hashvalue >= 0 ++ && (unsigned) hashvalue < data->table_size ++ && data->table_data[hashvalue] >= 0) { + + real_table = _nc_get_userdefs_table(); + ptr = real_table + data->table_data[hashvalue]; +diff --git a/ncurses/tinfo/parse_entry.c b/ncurses/tinfo/parse_entry.c +index f8cca8b5..064376c5 100644 +--- a/ncurses/tinfo/parse_entry.c ++++ b/ncurses/tinfo/parse_entry.c +@@ -47,7 +47,7 @@ + #include <ctype.h> + #include <tic.h> + +-MODULE_ID("$Id: parse_entry.c,v 1.97 2019/08/03 23:10:38 tom Exp $") ++MODULE_ID("$Id: parse_entry.c,v 1.98 2019/10/12 00:50:31 tom Exp $") + + #ifdef LINT + static short const parametrized[] = +@@ -654,12 +654,12 @@ _nc_capcmp(const char *s, const char *t) + } + + static void +-append_acs0(string_desc * dst, int code, int src) ++append_acs0(string_desc * dst, int code, char *src, size_t off) + { +- if (src != 0) { ++ if (src != 0 && off < strlen(src)) { + char temp[3]; + temp[0] = (char) code; +- temp[1] = (char) src; ++ temp[1] = src[off]; + temp[2] = 0; + _nc_safe_strcat(dst, temp); + } +@@ -669,7 +669,7 @@ static void + append_acs(string_desc * dst, int code, char *src) + { + if (VALID_STRING(src) && strlen(src) == 1) { +- append_acs0(dst, code, *src); ++ append_acs0(dst, code, src, 0); + } + } + +@@ -1038,17 +1038,17 @@ postprocess_terminfo(TERMTYPE2 *tp) + _nc_str_init(&result, buf2, sizeof(buf2)); + _nc_safe_strcat(&result, acs_chars); + +- append_acs0(&result, 'l', box_chars_1[0]); /* ACS_ULCORNER */ +- append_acs0(&result, 'q', box_chars_1[1]); /* ACS_HLINE */ +- append_acs0(&result, 'k', box_chars_1[2]); /* ACS_URCORNER */ +- append_acs0(&result, 'x', box_chars_1[3]); /* ACS_VLINE */ +- append_acs0(&result, 'j', box_chars_1[4]); /* ACS_LRCORNER */ +- append_acs0(&result, 'm', box_chars_1[5]); /* ACS_LLCORNER */ +- append_acs0(&result, 'w', box_chars_1[6]); /* ACS_TTEE */ +- append_acs0(&result, 'u', box_chars_1[7]); /* ACS_RTEE */ +- append_acs0(&result, 'v', box_chars_1[8]); /* ACS_BTEE */ +- append_acs0(&result, 't', box_chars_1[9]); /* ACS_LTEE */ +- append_acs0(&result, 'n', box_chars_1[10]); /* ACS_PLUS */ ++ append_acs0(&result, 'l', box_chars_1, 0); /* ACS_ULCORNER */ ++ append_acs0(&result, 'q', box_chars_1, 1); /* ACS_HLINE */ ++ append_acs0(&result, 'k', box_chars_1, 2); /* ACS_URCORNER */ ++ append_acs0(&result, 'x', box_chars_1, 3); /* ACS_VLINE */ ++ append_acs0(&result, 'j', box_chars_1, 4); /* ACS_LRCORNER */ ++ append_acs0(&result, 'm', box_chars_1, 5); /* ACS_LLCORNER */ ++ append_acs0(&result, 'w', box_chars_1, 6); /* ACS_TTEE */ ++ append_acs0(&result, 'u', box_chars_1, 7); /* ACS_RTEE */ ++ append_acs0(&result, 'v', box_chars_1, 8); /* ACS_BTEE */ ++ append_acs0(&result, 't', box_chars_1, 9); /* ACS_LTEE */ ++ append_acs0(&result, 'n', box_chars_1, 10); /* ACS_PLUS */ + + if (buf2[0]) { + acs_chars = _nc_save_str(buf2); +diff --git a/progs/dump_entry.c b/progs/dump_entry.c +index d0e420ec..8a47084a 100644 +--- a/progs/dump_entry.c ++++ b/progs/dump_entry.c +@@ -39,7 +39,7 @@ + #include "termsort.c" /* this C file is generated */ + #include <parametrized.h> /* so is this */ + +-MODULE_ID("$Id: dump_entry.c,v 1.173 2019/05/11 21:02:24 tom Exp $") ++MODULE_ID("$Id: dump_entry.c,v 1.175 2019/10/12 15:59:07 tom Exp $") + + #define DISCARD(string) string = ABSENT_STRING + #define PRINTF (void) printf +@@ -1136,7 +1136,8 @@ fmt_entry(TERMTYPE2 *tterm, + *d++ = '\\'; + *d = ':'; + } else if (*d == '\\') { +- *++d = *s++; ++ if ((*++d = *s++) == '\0') ++ break; + } + d++; + *d = '\0'; +@@ -1396,7 +1397,7 @@ one_one_mapping(const char *mapping) + + if (VALID_STRING(mapping)) { + int n = 0; +- while (mapping[n] != '\0') { ++ while (mapping[n] != '\0' && mapping[n + 1] != '\0') { + if (isLine(mapping[n]) && + mapping[n] != mapping[n + 1]) { + result = FALSE; +-- +2.17.1 + diff --git a/poky/meta/recipes-core/ncurses/ncurses_6.1+20190803.bb b/poky/meta/recipes-core/ncurses/ncurses_6.1+20190803.bb index a44d78e4f..e638a3737 100644 --- a/poky/meta/recipes-core/ncurses/ncurses_6.1+20190803.bb +++ b/poky/meta/recipes-core/ncurses/ncurses_6.1+20190803.bb @@ -3,6 +3,7 @@ require ncurses.inc SRC_URI += "file://0001-tic-hang.patch \ file://0002-configure-reproducible.patch \ file://config.cache \ + file://0001-ncurses-selective-backport-of-20191012-patch.patch \ " # commit id corresponds to the revision in package version SRCREV = "3c9b2677c96c645496997321bf2fe465a5e7e21f" diff --git a/poky/meta/recipes-core/ovmf/ovmf_git.bb b/poky/meta/recipes-core/ovmf/ovmf_git.bb index 3b5a05e51..ff2b2a530 100644 --- a/poky/meta/recipes-core/ovmf/ovmf_git.bb +++ b/poky/meta/recipes-core/ovmf/ovmf_git.bb @@ -29,10 +29,7 @@ PARALLEL_MAKE = "" S = "${WORKDIR}/git" -DEPENDS_class-native="util-linux-native iasl-native" -DEPENDS_class-target="ovmf-native bc-native" - -DEPENDS_append = " nasm-native" +DEPENDS = "nasm-native acpica-native ovmf-native util-linux-native" EDK_TOOLS_DIR="edk2_basetools" diff --git a/poky/meta/recipes-core/packagegroups/packagegroup-self-hosted.bb b/poky/meta/recipes-core/packagegroups/packagegroup-self-hosted.bb index ee9d0636f..0aab23e3e 100644 --- a/poky/meta/recipes-core/packagegroups/packagegroup-self-hosted.bb +++ b/poky/meta/recipes-core/packagegroups/packagegroup-self-hosted.bb @@ -8,7 +8,7 @@ PR = "r13" PACKAGE_ARCH = "${TUNE_PKGARCH}" -inherit packagegroup distro_features_check +inherit packagegroup features_check # rdepends on libx11-dev REQUIRED_DISTRO_FEATURES = "x11" diff --git a/poky/meta/recipes-core/psplash/files/psplash-init b/poky/meta/recipes-core/psplash/files/psplash-init index dcb751907..4bee866b0 100755 --- a/poky/meta/recipes-core/psplash/files/psplash-init +++ b/poky/meta/recipes-core/psplash/files/psplash-init @@ -25,7 +25,7 @@ done export TMPDIR=/mnt/.psplash [ -d $TMPDIR ] || mkdir -p $TMPDIR -if [ ! mountpoint -q $TMPDIR ]; then +if ! mountpoint -q $TMPDIR; then mount tmpfs -t tmpfs $TMPDIR -o,size=40k fi diff --git a/poky/meta/recipes-core/systemd/systemd-compat-units.bb b/poky/meta/recipes-core/systemd/systemd-compat-units.bb index d228a51c1..faa428b58 100644 --- a/poky/meta/recipes-core/systemd/systemd-compat-units.bb +++ b/poky/meta/recipes-core/systemd/systemd-compat-units.bb @@ -8,7 +8,7 @@ PACKAGE_WRITE_DEPS += "systemd-systemctl-native" S = "${WORKDIR}" -inherit distro_features_check +inherit features_check ALLOW_EMPTY_${PN} = "1" diff --git a/poky/meta/recipes-core/systemd/systemd-serialgetty.bb b/poky/meta/recipes-core/systemd/systemd-serialgetty.bb index 65a931f41..044c6c5b6 100644 --- a/poky/meta/recipes-core/systemd/systemd-serialgetty.bb +++ b/poky/meta/recipes-core/systemd/systemd-serialgetty.bb @@ -12,7 +12,7 @@ SRC_URI = "file://serial-getty@.service" S = "${WORKDIR}" # As this package is tied to systemd, only build it when we're also building systemd. -inherit distro_features_check +inherit features_check REQUIRED_DISTRO_FEATURES = "systemd" do_install() { diff --git a/poky/meta/recipes-core/systemd/systemd/0001-pstore-fix-use-after-free.patch b/poky/meta/recipes-core/systemd/systemd/0001-pstore-fix-use-after-free.patch new file mode 100644 index 000000000..fd147a18b --- /dev/null +++ b/poky/meta/recipes-core/systemd/systemd/0001-pstore-fix-use-after-free.patch @@ -0,0 +1,39 @@ +From 1b3156edd291e0882d80a695d035dd30521345d1 Mon Sep 17 00:00:00 2001 +From: Michael Olbrich <m.olbrich@pengutronix.de> +Date: Fri, 6 Sep 2019 15:04:01 +0200 +Subject: [PATCH] pstore: fix use after free + +The memory is still needed in the sd_journal_sendv() after the 'if' block. + +(cherry picked from commit 1e19f5ac0d680a63eccae7ef1fc6ce225dca0bbf) + +Upstream-Status: Backport + +Signed-off-by: Yongxin Liu <yongxin.liu@windriver.com> +--- + src/pstore/pstore.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/pstore/pstore.c b/src/pstore/pstore.c +index c760b3e899..8ffe523830 100644 +--- a/src/pstore/pstore.c ++++ b/src/pstore/pstore.c +@@ -117,6 +117,7 @@ static int compare_pstore_entries(const void *_a, const void *_b) { + + static int move_file(PStoreEntry *pe, const char *subdir) { + _cleanup_free_ char *ifd_path = NULL, *ofd_path = NULL; ++ _cleanup_free_ void *field = NULL; + const char *suffix, *message; + struct iovec iovec[2]; + int n_iovec = 0, r; +@@ -138,7 +139,6 @@ static int move_file(PStoreEntry *pe, const char *subdir) { + iovec[n_iovec++] = IOVEC_MAKE_STRING(message); + + if (pe->content_size > 0) { +- _cleanup_free_ void *field = NULL; + size_t field_size; + + field_size = strlen("FILE=") + pe->content_size; +-- +2.14.4 + diff --git a/poky/meta/recipes-core/systemd/systemd_243.bb b/poky/meta/recipes-core/systemd/systemd_243.bb index 6e7f95693..b31d0b5ed 100644 --- a/poky/meta/recipes-core/systemd/systemd_243.bb +++ b/poky/meta/recipes-core/systemd/systemd_243.bb @@ -8,7 +8,7 @@ DEPENDS = "intltool-native gperf-native libcap util-linux" SECTION = "base/shell" -inherit useradd pkgconfig meson perlnative update-rc.d update-alternatives qemu systemd gettext bash-completion manpages distro_features_check +inherit useradd pkgconfig meson perlnative update-rc.d update-alternatives qemu systemd gettext bash-completion manpages features_check # As this recipe builds udev, respect systemd being in DISTRO_FEATURES so # that we don't build both udev and systemd in world builds. @@ -24,6 +24,7 @@ SRC_URI += "file://touchscreen.rules \ file://0005-rules-watch-metadata-changes-in-ide-devices.patch \ file://0001-unit-file.c-consider-symlink-on-filesystems-like-NFS.patch \ file://99-default.preset \ + file://0001-pstore-fix-use-after-free.patch \ " # patches needed by musl @@ -139,7 +140,7 @@ PACKAGECONFIG[importd] = "-Dimportd=true,-Dimportd=false" PACKAGECONFIG[iptc] = "-Dlibiptc=true,-Dlibiptc=false,iptables" PACKAGECONFIG[journal-upload] = "-Dlibcurl=true,-Dlibcurl=false,curl" PACKAGECONFIG[kmod] = "-Dkmod=true,-Dkmod=false,kmod" -PACKAGECONFIG[ldconfig] = "-Dldconfig=true,-Dldconfig=false" +PACKAGECONFIG[ldconfig] = "-Dldconfig=true,-Dldconfig=false,,ldconfig" PACKAGECONFIG[libidn] = "-Dlibidn=true,-Dlibidn=false,libidn" PACKAGECONFIG[localed] = "-Dlocaled=true,-Dlocaled=false" PACKAGECONFIG[logind] = "-Dlogind=true,-Dlogind=false" @@ -316,7 +317,6 @@ PACKAGES =+ "\ ${PN}-rpm-macros \ ${PN}-binfmt \ ${PN}-zsh-completion \ - ${PN}-xorg-xinitrc \ ${PN}-container \ ${PN}-journal-gatewayd \ ${PN}-journal-upload \ @@ -378,8 +378,6 @@ FILES_${PN}-kernel-install = "${bindir}/kernel-install \ FILES_${PN}-rpm-macros = "${exec_prefix}/lib/rpm \ " -FILES_${PN}-xorg-xinitrc = "${sysconfdir}/X11/xinit/xinitrc.d/*" - FILES_${PN}-zsh-completion = "${datadir}/zsh/site-functions" FILES_${PN}-binfmt = "${sysconfdir}/binfmt.d/ \ @@ -528,6 +526,7 @@ FILES_${PN} = " ${base_bindir}/* \ ${sysconfdir}/xdg/ \ ${sysconfdir}/init.d/README \ ${sysconfdir}/resolv-conf.systemd \ + ${sysconfdir}/X11/xinit/xinitrc.d/* \ ${rootlibexecdir}/systemd/* \ ${systemd_unitdir}/* \ ${base_libdir}/security/*.so \ diff --git a/poky/meta/recipes-core/sysvinit/sysvinit_2.88dsf.bb b/poky/meta/recipes-core/sysvinit/sysvinit_2.88dsf.bb index bfc1283f7..8fd6df9d6 100644 --- a/poky/meta/recipes-core/sysvinit/sysvinit_2.88dsf.bb +++ b/poky/meta/recipes-core/sysvinit/sysvinit_2.88dsf.bb @@ -29,7 +29,7 @@ SRC_URI[sha256sum] = "60bbc8c1e1792056e23761d22960b30bb13eccc2cabff8c7310a01f4d5 S = "${WORKDIR}/sysvinit-${PV}" B = "${S}/src" -inherit update-alternatives distro_features_check +inherit update-alternatives features_check DEPENDS_append = " update-rc.d-native base-passwd virtual/crypt" REQUIRED_DISTRO_FEATURES = "sysvinit" diff --git a/poky/meta/recipes-core/udev/eudev_3.2.8.bb b/poky/meta/recipes-core/udev/eudev_3.2.8.bb index eecf64e55..08729e14c 100644 --- a/poky/meta/recipes-core/udev/eudev_3.2.8.bb +++ b/poky/meta/recipes-core/udev/eudev_3.2.8.bb @@ -23,7 +23,7 @@ SRC_URI = "http://dev.gentoo.org/~blueness/${BPN}/${BP}.tar.gz \ SRC_URI[md5sum] = "ce166b3fdd910c2a4a840378f48fedaf" SRC_URI[sha256sum] = "61e4948e9e51271c3cce2bb5311a30b206dd03ef011062e6c627fb007e43f6b8" -inherit autotools update-rc.d qemu pkgconfig distro_features_check +inherit autotools update-rc.d qemu pkgconfig features_check CONFLICT_DISTRO_FEATURES = "systemd" diff --git a/poky/meta/recipes-core/util-linux/util-linux/0001-lsblk-force-to-print-PKNAME-for-partition.patch b/poky/meta/recipes-core/util-linux/util-linux/0001-lsblk-force-to-print-PKNAME-for-partition.patch new file mode 100644 index 000000000..5d4c148fb --- /dev/null +++ b/poky/meta/recipes-core/util-linux/util-linux/0001-lsblk-force-to-print-PKNAME-for-partition.patch @@ -0,0 +1,36 @@ +From e3bb9bfb76c17b1d05814436ced62c05c4011f48 Mon Sep 17 00:00:00 2001 +From: Karel Zak <kzak@redhat.com> +Date: Thu, 27 Jun 2019 09:22:18 +0200 +Subject: [PATCH] lsblk: force to print PKNAME for partition + +PKNAME (parent kernel device name) is based on printed tree according +to parent -> child relationship. The tree is optional and not printed +if partition specified (.e.g "lsblk -o+PKNAME /dev/sda1"), but old +versions print the PKNAME also in this case. + +Upstream-Status: Backport [https://github.com/karelzak/util-linux/commit/e3bb9bfb76c17b1d05814436ced62c05c4011f48] + +Addresses: https://github.com/karelzak/util-linux/issues/813 +Signed-off-by: Karel Zak <kzak@redhat.com> +Signed-off-by: Liwei Song <liwei.song@windriver.com> +--- + misc-utils/lsblk.c | 3 +++ + 1 file changed, 3 insertions(+) + +diff --git a/misc-utils/lsblk.c b/misc-utils/lsblk.c +index e95af7af0256..3ce6da730264 100644 +--- a/misc-utils/lsblk.c ++++ b/misc-utils/lsblk.c +@@ -1019,6 +1019,9 @@ static void device_to_scols( + DBG(DEV, ul_debugobj(dev, "add '%s' to scols", dev->name)); + ON_DBG(DEV, if (ul_path_isopen_dirfd(dev->sysfs)) ul_debugobj(dev, " %s ---> is open!", dev->name)); + ++ if (!parent && dev->wholedisk) ++ parent = dev->wholedisk; ++ + /* Do not print device more than one in --list mode */ + if (!(lsblk->flags & LSBLK_TREE) && dev->is_printed) + return; +-- +2.17.1 + diff --git a/poky/meta/recipes-core/util-linux/util-linux_2.34.bb b/poky/meta/recipes-core/util-linux/util-linux_2.34.bb index 262f4bacb..e9c2d80e9 100644 --- a/poky/meta/recipes-core/util-linux/util-linux_2.34.bb +++ b/poky/meta/recipes-core/util-linux/util-linux_2.34.bb @@ -7,6 +7,7 @@ SRC_URI += "file://configure-sbindir.patch \ file://run-ptest \ file://display_testname_for_subtest.patch \ file://avoid_parallel_tests.patch \ + file://0001-lsblk-force-to-print-PKNAME-for-partition.patch \ " SRC_URI[md5sum] = "a78cbeaed9c39094b96a48ba8f891d50" SRC_URI[sha256sum] = "743f9d0c7252b6db246b659c1e1ce0bd45d8d4508b4dfa427bbb4a3e9b9f62b5" diff --git a/poky/meta/recipes-core/volatile-binds/volatile-binds.bb b/poky/meta/recipes-core/volatile-binds/volatile-binds.bb index d861a71a6..b273293e9 100644 --- a/poky/meta/recipes-core/volatile-binds/volatile-binds.bb +++ b/poky/meta/recipes-core/volatile-binds/volatile-binds.bb @@ -11,7 +11,7 @@ SRC_URI = "\ S = "${WORKDIR}" -inherit allarch systemd distro_features_check +inherit allarch systemd features_check REQUIRED_DISTRO_FEATURES = "systemd" diff --git a/poky/meta/recipes-devtools/binutils/binutils-2.32.inc b/poky/meta/recipes-devtools/binutils/binutils-2.32.inc index 19baf8a88..349c3e115 100644 --- a/poky/meta/recipes-devtools/binutils/binutils-2.32.inc +++ b/poky/meta/recipes-devtools/binutils/binutils-2.32.inc @@ -49,6 +49,8 @@ SRC_URI = "\ file://CVE-2019-12972.patch \ file://CVE-2019-14250.patch \ file://CVE-2019-14444.patch \ + file://CVE-2019-17450.patch \ + file://CVE-2019-17451.patch \ " S = "${WORKDIR}/git" diff --git a/poky/meta/recipes-devtools/binutils/binutils/CVE-2019-17450.patch b/poky/meta/recipes-devtools/binutils/binutils/CVE-2019-17450.patch new file mode 100644 index 000000000..a6ce0b9a8 --- /dev/null +++ b/poky/meta/recipes-devtools/binutils/binutils/CVE-2019-17450.patch @@ -0,0 +1,99 @@ +From 09dd135df9ebc7a4b640537e23e26a03a288a789 Mon Sep 17 00:00:00 2001 +From: Alan Modra <amodra@gmail.com> +Date: Wed, 9 Oct 2019 00:07:29 +1030 +Subject: [PATCH] PR25078, stack overflow in function find_abstract_instance + +Selectively backporting fix for bfd/dwarf2.c, but not the ChangeLog +file. There are newer versions of binutils, but none of them contain the +commit fixing CVE-2019-17450, so backport it to master and zeus. + +Upstream-Status: Backport [https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=063c511bd79] +CVE: CVE-2019-17450 +Signed-off-by: Trevor Gamblin <trevor.gamblin@windriver.com> + + PR 25078 + * dwarf2.c (find_abstract_instance): Delete orig_info_ptr, add + recur_count. Error on recur_count reaching 100 rather than + info_ptr matching orig_info_ptr. Adjust calls. + +--- + bfd/dwarf2.c | 35 +++++++++++++++++------------------ + 1 file changed, 17 insertions(+), 18 deletions(-) + +diff --git a/bfd/dwarf2.c b/bfd/dwarf2.c +index 0b4e485582..20ec9e2e56 100644 +--- a/bfd/dwarf2.c ++++ b/bfd/dwarf2.c +@@ -2803,13 +2803,13 @@ lookup_symbol_in_variable_table (struct comp_unit *unit, + } + + static bfd_boolean +-find_abstract_instance (struct comp_unit * unit, +- bfd_byte * orig_info_ptr, +- struct attribute * attr_ptr, +- const char ** pname, +- bfd_boolean * is_linkage, +- char ** filename_ptr, +- int * linenumber_ptr) ++find_abstract_instance (struct comp_unit *unit, ++ struct attribute *attr_ptr, ++ unsigned int recur_count, ++ const char **pname, ++ bfd_boolean *is_linkage, ++ char **filename_ptr, ++ int *linenumber_ptr) + { + bfd *abfd = unit->abfd; + bfd_byte *info_ptr; +@@ -2820,6 +2820,14 @@ find_abstract_instance (struct comp_unit * unit, + struct attribute attr; + const char *name = NULL; + ++ if (recur_count == 100) ++ { ++ _bfd_error_handler ++ (_("DWARF error: abstract instance recursion detected")); ++ bfd_set_error (bfd_error_bad_value); ++ return FALSE; ++ } ++ + /* DW_FORM_ref_addr can reference an entry in a different CU. It + is an offset from the .debug_info section, not the current CU. */ + if (attr_ptr->form == DW_FORM_ref_addr) +@@ -2939,15 +2947,6 @@ find_abstract_instance (struct comp_unit * unit, + info_ptr, info_ptr_end); + if (info_ptr == NULL) + break; +- /* It doesn't ever make sense for DW_AT_specification to +- refer to the same DIE. Stop simple recursion. */ +- if (info_ptr == orig_info_ptr) +- { +- _bfd_error_handler +- (_("DWARF error: abstract instance recursion detected")); +- bfd_set_error (bfd_error_bad_value); +- return FALSE; +- } + switch (attr.name) + { + case DW_AT_name: +@@ -2961,7 +2960,7 @@ find_abstract_instance (struct comp_unit * unit, + } + break; + case DW_AT_specification: +- if (!find_abstract_instance (unit, info_ptr, &attr, ++ if (!find_abstract_instance (unit, &attr, recur_count + 1, + &name, is_linkage, + filename_ptr, linenumber_ptr)) + return FALSE; +@@ -3175,7 +3174,7 @@ scan_unit_for_symbols (struct comp_unit *unit) + + case DW_AT_abstract_origin: + case DW_AT_specification: +- if (!find_abstract_instance (unit, info_ptr, &attr, ++ if (!find_abstract_instance (unit, &attr, 0, + &func->name, + &func->is_linkage, + &func->file, +-- +2.23.0 + diff --git a/poky/meta/recipes-devtools/binutils/binutils/CVE-2019-17451.patch b/poky/meta/recipes-devtools/binutils/binutils/CVE-2019-17451.patch new file mode 100644 index 000000000..b36a53266 --- /dev/null +++ b/poky/meta/recipes-devtools/binutils/binutils/CVE-2019-17451.patch @@ -0,0 +1,51 @@ +From 0192438051a7e781585647d5581a2a6f62fda362 Mon Sep 17 00:00:00 2001 +From: Alan Modra <amodra@gmail.com> +Date: Wed, 9 Oct 2019 10:47:13 +1030 +Subject: [PATCH] PR25070, SEGV in function _bfd_dwarf2_find_nearest_line + +Selectively backporting fix for bfd/dwarf2.c, but not the ChangeLog +file. There are newer versions of binutils, but none of them contain the +commit fixing CVE-2019-17451, so backport it to master and zeus. + +Upstream-Status: Backport +[https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=336bfbeb1848] +CVE: CVE-2019-17451 +Signed-off-by: Trevor Gamblin <trevor.gamblin@windriver.com> + + +Evil testcase with two debug info sections, with sizes of 2aaaabac4ec1 +and ffffd5555453b140 result in a total size of 1. Reading the first +section of course overflows the buffer and tramples on other memory. + + PR 25070 + * dwarf2.c (_bfd_dwarf2_slurp_debug_info): Catch overflow of + total_size calculation. +--- + bfd/dwarf2.c | 11 ++++++++++- + 1 file changed, 10 insertions(+), 1 deletion(-) + +diff --git a/bfd/dwarf2.c b/bfd/dwarf2.c +index 0b4e485582..a91597b1d0 100644 +--- a/bfd/dwarf2.c ++++ b/bfd/dwarf2.c +@@ -4426,7 +4426,16 @@ _bfd_dwarf2_slurp_debug_info (bfd *abfd, bfd *debug_bfd, + for (total_size = 0; + msec; + msec = find_debug_info (debug_bfd, debug_sections, msec)) +- total_size += msec->size; ++ { ++ /* Catch PR25070 testcase overflowing size calculation here. */ ++ if (total_size + msec->size < total_size ++ || total_size + msec->size < msec->size) ++ { ++ bfd_set_error (bfd_error_no_memory); ++ return FALSE; ++ } ++ total_size += msec->size; ++ } + + stash->info_ptr_memory = (bfd_byte *) bfd_malloc (total_size); + if (stash->info_ptr_memory == NULL) +-- +2.23.0 + diff --git a/poky/meta/recipes-devtools/bison/bison_3.4.1.bb b/poky/meta/recipes-devtools/bison/bison_3.4.2.bb index 7946e20c5..46f0f908d 100644 --- a/poky/meta/recipes-devtools/bison/bison_3.4.1.bb +++ b/poky/meta/recipes-devtools/bison/bison_3.4.2.bb @@ -17,8 +17,8 @@ SRC_URI = "${GNU_MIRROR}/bison/bison-${PV}.tar.xz \ # No point in hardcoding path to m4, just use PATH EXTRA_OECONF += "M4=m4" -SRC_URI[md5sum] = "201286a573b12da109df96282fe4ff4a" -SRC_URI[sha256sum] = "27159ac5ebf736dffd5636fd2cd625767c9e437de65baa63cb0de83570bd820d" +SRC_URI[md5sum] = "d1ceb9dfde2d03b24a4c1137f7f1b572" +SRC_URI[sha256sum] = "27d05534699735dc69e86add5b808d6cb35900ad3fd63fa82e3eb644336abfa0" inherit autotools gettext texinfo diff --git a/poky/meta/recipes-devtools/btrfs-tools/btrfs-tools_5.2.2.bb b/poky/meta/recipes-devtools/btrfs-tools/btrfs-tools_5.3.1.bb index 6b73c01dc..a44c0bc87 100644 --- a/poky/meta/recipes-devtools/btrfs-tools/btrfs-tools_5.2.2.bb +++ b/poky/meta/recipes-devtools/btrfs-tools/btrfs-tools_5.3.1.bb @@ -14,7 +14,7 @@ DEPENDS = "util-linux attr e2fsprogs lzo acl" DEPENDS_append_class-target = " udev" RDEPENDS_${PN} = "libgcc" -SRCREV = "55a8c9626fb906c20c3206f8fd39b9a8fb259b79" +SRCREV = "f82e569b33c3c1cfd4f8f405085ff8d439a0a915" SRC_URI = "git://git.kernel.org/pub/scm/linux/kernel/git/kdave/btrfs-progs.git \ file://0001-Add-a-possibility-to-specify-where-python-modules-ar.patch \ " diff --git a/poky/meta/recipes-devtools/cdrtools/cdrtools-native_3.01.bb b/poky/meta/recipes-devtools/cdrtools/cdrtools-native_3.01.bb index 78e1565e4..1c602e7ce 100644 --- a/poky/meta/recipes-devtools/cdrtools/cdrtools-native_3.01.bb +++ b/poky/meta/recipes-devtools/cdrtools/cdrtools-native_3.01.bb @@ -7,7 +7,10 @@ SECTION = "console/utils" LICENSE = "GPLv2 & CDDL-1.0 & LGPLv2.1+" LIC_FILES_CHKSUM = "file://COPYING;md5=32f68170be424c2cd64804337726b312" -SRC_URI = "${SOURCEFORGE_MIRROR}/project/cdrtools/cdrtools-${REALPV}.tar.bz2" +SRC_URI = " \ + ${SOURCEFORGE_MIRROR}/project/cdrtools/cdrtools-${REALPV}.tar.bz2 \ + file://0001-Don-t-set-uid-gid-during-install.patch \ + " UPSTREAM_VERSION_UNKNOWN = "1" SRC_URI[md5sum] = "7d45c5b7e1f78d85d1583b361aee6e8b" diff --git a/poky/meta/recipes-devtools/cdrtools/cdrtools/0001-Don-t-set-uid-gid-during-install.patch b/poky/meta/recipes-devtools/cdrtools/cdrtools/0001-Don-t-set-uid-gid-during-install.patch new file mode 100644 index 000000000..9d38294b4 --- /dev/null +++ b/poky/meta/recipes-devtools/cdrtools/cdrtools/0001-Don-t-set-uid-gid-during-install.patch @@ -0,0 +1,27 @@ +From 529cd5b007aa681c3ca14e5ab1e30469dd51646b Mon Sep 17 00:00:00 2001 +From: Paul Barker <paul@betafive.co.uk> +Date: Tue, 12 Nov 2019 22:17:19 +0000 +Subject: [PATCH] Don't set uid/gid during install + +Signed-off-by: Paul Barker <paul@betafive.co.uk> +Upstream-Status: Inappropriate [native] +--- + RULES/rules.prg | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/RULES/rules.prg b/RULES/rules.prg +index 023555c..f70f1a7 100644 +--- a/RULES/rules.prg ++++ b/RULES/rules.prg +@@ -94,7 +94,7 @@ INSGRP= $(__DEFINSGRP:$(_UNIQ)%=%) + + LD= @echo " ==> LINKING \"$@\""; ld + LOCALIZE= @echo " ==> LOCALIZING \"$@\""; $(RM_F) $@; cp +-INSTALL= @echo " ==> INSTALLING \"$@\""; sh $(SRCROOT)/conf/install-sh -c -m $(INSMODEINS) -o $(INSUSR) -g $(INSGRP) ++INSTALL= @echo " ==> INSTALLING \"$@\""; sh $(SRCROOT)/conf/install-sh -c -m $(INSMODEINS) + CHMOD= @echo " ==> SETTING PERMISSIONS ON \"$@\""; chmod + CHOWN= @echo " ==> SETTING OWNER ON \"$@\""; chown + CHGRP= @echo " ==> SETTING GROUP ON \"$@\""; chgrp +-- +2.24.0 + diff --git a/poky/meta/recipes-devtools/e2fsprogs/e2fsprogs_1.45.3.bb b/poky/meta/recipes-devtools/e2fsprogs/e2fsprogs_1.45.4.bb index fdc9454b5..90db71df0 100644 --- a/poky/meta/recipes-devtools/e2fsprogs/e2fsprogs_1.45.3.bb +++ b/poky/meta/recipes-devtools/e2fsprogs/e2fsprogs_1.45.4.bb @@ -11,7 +11,7 @@ SRC_URI_append_class-native = " file://e2fsprogs-fix-missing-check-for-permissio file://quiet-debugfs.patch \ " -SRCREV = "1f56fb81236fe3e25e2c60c1e89ea0aa7cb36260" +SRCREV = "984ff8d6a0a1d5dc300505f67b38ed5047d51dac" UPSTREAM_CHECK_GITTAGREGEX = "v(?P<pver>\d+\.\d+(\.\d+)*)$" EXTRA_OECONF += "--libdir=${base_libdir} --sbindir=${base_sbindir} \ diff --git a/poky/meta/recipes-devtools/elfutils/elfutils_0.177.bb b/poky/meta/recipes-devtools/elfutils/elfutils_0.177.bb index 818794266..e7740c7fb 100644 --- a/poky/meta/recipes-devtools/elfutils/elfutils_0.177.bb +++ b/poky/meta/recipes-devtools/elfutils/elfutils_0.177.bb @@ -3,7 +3,7 @@ HOMEPAGE = "https://sourceware.org/elfutils" SECTION = "base" LICENSE = "GPLv2 & LGPLv3+ & GPLv3+" LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504" -DEPENDS = "bzip2 zlib virtual/libintl" +DEPENDS = "zlib virtual/libintl" DEPENDS_append_libc-musl = " argp-standalone fts musl-obstack " # The Debian patches below are from: # http://ftp.de.debian.org/debian/pool/main/e/elfutils/elfutils_0.176-1.debian.tar.xz @@ -46,8 +46,15 @@ SRC_URI[sha256sum] = "fa489deccbcae7d8c920f60d85906124c1989c591196d90e0fd668e3dc inherit autotools gettext ptest -EXTRA_OECONF = "--program-prefix=eu- --without-lzma" -EXTRA_OECONF_append_class-native = " --without-bzlib" +EXTRA_OECONF = "--program-prefix=eu-" + +DEPENDS_BZIP2 = "bzip2-replacement-native" +DEPENDS_BZIP2_class-target = "bzip2" + +PACKAGECONFIG ??= "" +PACKAGECONFIG[bzip2] = "--with-bzlib,--without-bzlib,${DEPENDS_BZIP2}" +PACKAGECONFIG[xz] = "--with-lzma,--without-lzma,xz" + RDEPENDS_${PN}-ptest += "libasm libelf bash make coreutils ${PN}-binutils" EXTRA_OECONF_append_class-target += "--disable-tests-rpath" diff --git a/poky/meta/recipes-devtools/file/file/CVE-2019-18218.patch b/poky/meta/recipes-devtools/file/file/CVE-2019-18218.patch new file mode 100644 index 000000000..3d02c5ad4 --- /dev/null +++ b/poky/meta/recipes-devtools/file/file/CVE-2019-18218.patch @@ -0,0 +1,55 @@ +cdf_read_property_info in cdf.c in file through 5.37 does not restrict the +number of CDF_VECTOR elements, which allows a heap-based buffer overflow (4-byte +out-of-bounds write). + +CVE: CVE-2019-18218 +Upstream-Status: Backport +Signed-off-by: Ross Burton <ross.burton@intel.com> + +From 46a8443f76cec4b41ec736eca396984c74664f84 Mon Sep 17 00:00:00 2001 +From: Christos Zoulas <christos@zoulas.com> +Date: Mon, 26 Aug 2019 14:31:39 +0000 +Subject: [PATCH] Limit the number of elements in a vector (found by oss-fuzz) + +--- + src/cdf.c | 9 ++++----- + src/cdf.h | 1 + + 2 files changed, 5 insertions(+), 5 deletions(-) + +diff --git a/src/cdf.c b/src/cdf.c +index 9d6396742..bb81d6374 100644 +--- a/src/cdf.c ++++ b/src/cdf.c +@@ -1016,8 +1016,9 @@ cdf_read_property_info(const cdf_stream_t *sst, const cdf_header_t *h, + goto out; + } + nelements = CDF_GETUINT32(q, 1); +- if (nelements == 0) { +- DPRINTF(("CDF_VECTOR with nelements == 0\n")); ++ if (nelements > CDF_ELEMENT_LIMIT || nelements == 0) { ++ DPRINTF(("CDF_VECTOR with nelements == %" ++ SIZE_T_FORMAT "u\n", nelements)); + goto out; + } + slen = 2; +@@ -1060,8 +1061,6 @@ cdf_read_property_info(const cdf_stream_t *sst, const cdf_header_t *h, + goto out; + inp += nelem; + } +- DPRINTF(("nelements = %" SIZE_T_FORMAT "u\n", +- nelements)); + for (j = 0; j < nelements && i < sh.sh_properties; + j++, i++) + { +diff --git a/src/cdf.h b/src/cdf.h +index 2f7e554b7..05056668f 100644 +--- a/src/cdf.h ++++ b/src/cdf.h +@@ -48,6 +48,7 @@ + typedef int32_t cdf_secid_t; + + #define CDF_LOOP_LIMIT 10000 ++#define CDF_ELEMENT_LIMIT 100000 + + #define CDF_SECID_NULL 0 + #define CDF_SECID_FREE -1 diff --git a/poky/meta/recipes-devtools/file/file_5.37.bb b/poky/meta/recipes-devtools/file/file_5.37.bb index a840dbc01..a96ccc0d3 100644 --- a/poky/meta/recipes-devtools/file/file_5.37.bb +++ b/poky/meta/recipes-devtools/file/file_5.37.bb @@ -11,16 +11,16 @@ LIC_FILES_CHKSUM = "file://COPYING;beginline=2;md5=0251eaec1188b20d9a72c502ecfdd DEPENDS = "zlib file-replacement-native" DEPENDS_class-native = "zlib-native" -# Blacklist a bogus tag in upstream check -UPSTREAM_CHECK_GITTAGREGEX = "FILE(?P<pver>(?!6_23).+)" - -SRC_URI = "git://github.com/file/file.git" +SRC_URI = "git://github.com/file/file.git \ + file://CVE-2019-18218.patch" SRCREV = "a0d5b0e4e9f97d74a9911e95cedd579852e25398" S = "${WORKDIR}/git" inherit autotools update-alternatives +EXTRA_OECONF += "--disable-libseccomp" + ALTERNATIVE_${PN} = "file" ALTERNATIVE_LINK_NAME[file] = "${bindir}/file" @@ -29,6 +29,10 @@ EXTRA_OEMAKE_append_class-nativesdk = "-e FILE_COMPILE=${STAGING_BINDIR_NATIVE}/ FILES_${PN} += "${datadir}/misc/*.mgc" +do_compile_append_class-native() { + oe_runmake check +} + do_install_append_class-native() { create_cmdline_wrapper ${D}/${bindir}/file \ --magic-file ${datadir}/misc/magic.mgc diff --git a/poky/meta/recipes-devtools/gcc/gcc-8.3/CVE-2019-14250.patch b/poky/meta/recipes-devtools/gcc/gcc-8.3/CVE-2019-14250.patch deleted file mode 100644 index e327684e1..000000000 --- a/poky/meta/recipes-devtools/gcc/gcc-8.3/CVE-2019-14250.patch +++ /dev/null @@ -1,44 +0,0 @@ -From a4f1b58eb48b349a5f353bc69c30be553506d33b Mon Sep 17 00:00:00 2001 -From: rguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4> -Date: Thu, 25 Jul 2019 10:48:26 +0000 -Subject: [PATCH] 2019-07-25 Richard Biener <rguenther@suse.de> - - PR lto/90924 - Backport from mainline - 2019-07-12 Ren Kimura <rkx1209dev@gmail.com> - - * simple-object-elf.c (simple_object_elf_match): Check zero value - shstrndx. - - -git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-8-branch@273794 138bc75d-0d04-0410-961f-82ee72b054a4 - -Upstream-Status: Backport -Affectes: < 9.2 -CVE: CVE-2019-14250 -Dropped changelog -Signed-off-by: Armin Kuster <Akustre@mvista.com> - ---- - libiberty/simple-object-elf.c | 8 ++++++++ - 2 files changed, 17 insertions(+) - -Index: gcc-8.2.0/libiberty/simple-object-elf.c -=================================================================== ---- gcc-8.2.0.orig/libiberty/simple-object-elf.c -+++ gcc-8.2.0/libiberty/simple-object-elf.c -@@ -549,6 +549,14 @@ simple_object_elf_match (unsigned char h - return NULL; - } - -+ if (eor->shstrndx == 0) -+ { -+ *errmsg = "invalid ELF shstrndx == 0"; -+ *err = 0; -+ XDELETE (eor); -+ return NULL; -+ } -+ - return (void *) eor; - } - diff --git a/poky/meta/recipes-devtools/git/git.inc b/poky/meta/recipes-devtools/git/git.inc index 6e137432f..95ab397f6 100644 --- a/poky/meta/recipes-devtools/git/git.inc +++ b/poky/meta/recipes-devtools/git/git.inc @@ -39,12 +39,12 @@ do_compile_prepend () { do_install () { oe_runmake install DESTDIR="${D}" bindir=${bindir} \ template_dir=${datadir}/git-core/templates - install -d ${D}/${mandir}/man1 - install -d ${D}/${mandir}/man5 - install -d ${D}/${mandir}/man7 - install -t ${D}/${mandir}/man1 ${WORKDIR}/man1/* - install -t ${D}/${mandir}/man5 ${WORKDIR}/man5/* - install -t ${D}/${mandir}/man7 ${WORKDIR}/man7/* + + for section in man1 man5 man7; do + install -d ${D}/${mandir}/$section + install -t ${D}/${mandir}/$section ${WORKDIR}/$section/* + done + install -d ${D}/${datadir}/bash-completion/completions/ install -m 644 ${S}/contrib/completion/git-completion.bash ${D}/${datadir}/bash-completion/completions/git } @@ -94,19 +94,15 @@ do_install_append_class-nativesdk() { FILES_${PN} += "${datadir}/git-core ${libexecdir}/git-core/" PERLTOOLS = " \ + ${bindir}/git-cvsserver \ ${libexecdir}/git-core/git-add--interactive \ ${libexecdir}/git-core/git-archimport \ ${libexecdir}/git-core/git-cvsexportcommit \ ${libexecdir}/git-core/git-cvsimport \ ${libexecdir}/git-core/git-cvsserver \ - ${bindir}/git-cvsserver \ - ${libexecdir}/git-core/git-difftool \ ${libexecdir}/git-core/git-send-email \ ${libexecdir}/git-core/git-svn \ ${libexecdir}/git-core/git-instaweb \ - ${libexecdir}/git-core/git-submodule \ - ${libexecdir}/git-core/git-am \ - ${libexecdir}/git-core/git-request-pull \ ${datadir}/gitweb/gitweb.cgi \ ${datadir}/git-core/templates/hooks/prepare-commit-msg.sample \ ${datadir}/git-core/templates/hooks/pre-rebase.sample \ diff --git a/poky/meta/recipes-devtools/git/git_2.23.0.bb b/poky/meta/recipes-devtools/git/git_2.23.0.bb deleted file mode 100644 index 1539182a9..000000000 --- a/poky/meta/recipes-devtools/git/git_2.23.0.bb +++ /dev/null @@ -1,11 +0,0 @@ -require git.inc - -EXTRA_OECONF += "ac_cv_snprintf_returns_bogus=no \ - ac_cv_fread_reads_directories=${ac_cv_fread_reads_directories=yes} \ - " -EXTRA_OEMAKE += "NO_GETTEXT=1" - -SRC_URI[tarball.md5sum] = "203c238ffdcef76f9bd6c67cfbaf949f" -SRC_URI[tarball.sha256sum] = "e3396c90888111a01bf607346db09b0fbf49a95bc83faf9506b61195936f0cfe" -SRC_URI[manpages.md5sum] = "90a72e553de712d798d68b15b57bc928" -SRC_URI[manpages.sha256sum] = "a5b0998f95c2290386d191d34780d145ea67e527fac98541e0350749bf76be75" diff --git a/poky/meta/recipes-devtools/git/git_2.24.0.bb b/poky/meta/recipes-devtools/git/git_2.24.0.bb new file mode 100644 index 000000000..e9cb382f6 --- /dev/null +++ b/poky/meta/recipes-devtools/git/git_2.24.0.bb @@ -0,0 +1,11 @@ +require git.inc + +EXTRA_OECONF += "ac_cv_snprintf_returns_bogus=no \ + ac_cv_fread_reads_directories=${ac_cv_fread_reads_directories=yes} \ + " +EXTRA_OEMAKE += "NO_GETTEXT=1" + +SRC_URI[tarball.md5sum] = "ed39361a3ae362c8af852d1a06992bc2" +SRC_URI[tarball.sha256sum] = "ad11030d2eac656ee9e8862f56d1610550f7867181beff814c7712a99192e99d" +SRC_URI[manpages.md5sum] = "57465e83f13ba910a178b717d93958c0" +SRC_URI[manpages.sha256sum] = "ce995f86f441b56ab1fd0788a94786904ae2e2989e7191fd68060003011366d7" diff --git a/poky/meta/recipes-devtools/go/go-1.12.inc b/poky/meta/recipes-devtools/go/go-1.12.inc index 39157ff88..ed14b175e 100644 --- a/poky/meta/recipes-devtools/go/go-1.12.inc +++ b/poky/meta/recipes-devtools/go/go-1.12.inc @@ -16,6 +16,7 @@ SRC_URI += "\ file://0006-cmd-dist-separate-host-and-target-builds.patch \ file://0007-cmd-go-make-GOROOT-precious-by-default.patch \ file://0008-use-GOBUILDMODE-to-set-buildmode.patch \ + file://0001-release-branch.go1.12-security-net-textproto-don-t-n.patch \ " SRC_URI_append_libc-musl = " file://0009-ld-replace-glibc-dynamic-linker-with-musl.patch" diff --git a/poky/meta/recipes-devtools/go/go-1.12/0001-release-branch.go1.12-security-net-textproto-don-t-n.patch b/poky/meta/recipes-devtools/go/go-1.12/0001-release-branch.go1.12-security-net-textproto-don-t-n.patch new file mode 100644 index 000000000..7b39dbd73 --- /dev/null +++ b/poky/meta/recipes-devtools/go/go-1.12/0001-release-branch.go1.12-security-net-textproto-don-t-n.patch @@ -0,0 +1,163 @@ +From 265b691ac440bfb711d8de323346f7d72e620efe Mon Sep 17 00:00:00 2001 +From: Filippo Valsorda <filippo@golang.org> +Date: Thu, 12 Sep 2019 12:37:36 -0400 +Subject: [PATCH] [release-branch.go1.12-security] net/textproto: don't + normalize headers with spaces before the colon + +RFC 7230 is clear about headers with a space before the colon, like + +X-Answer : 42 + +being invalid, but we've been accepting and normalizing them for compatibility +purposes since CL 5690059 in 2012. + +On the client side, this is harmless and indeed most browsers behave the same +to this day. On the server side, this becomes a security issue when the +behavior doesn't match that of a reverse proxy sitting in front of the server. + +For example, if a WAF accepts them without normalizing them, it might be +possible to bypass its filters, because the Go server would interpret the +header differently. Worse, if the reverse proxy coalesces requests onto a +single HTTP/1.1 connection to a Go server, the understanding of the request +boundaries can get out of sync between them, allowing an attacker to tack an +arbitrary method and path onto a request by other clients, including +authentication headers unknown to the attacker. + +This was recently presented at multiple security conferences: +https://portswigger.net/blog/http-desync-attacks-request-smuggling-reborn + +net/http servers already reject header keys with invalid characters. +Simply stop normalizing extra spaces in net/textproto, let it return them +unchanged like it does for other invalid headers, and let net/http enforce +RFC 7230, which is HTTP specific. This loses us normalization on the client +side, but there's no right answer on the client side anyway, and hiding the +issue sounds worse than letting the application decide. + +Fixes CVE-2019-16276 + +Change-Id: I6d272de827e0870da85d93df770d6a0e161bbcf1 +Reviewed-on: https://team-review.git.corp.google.com/c/golang/go-private/+/549719 +Reviewed-by: Brad Fitzpatrick <bradfitz@google.com> +(cherry picked from commit 1280b868e82bf173ea3e988be3092d160ee66082) +Reviewed-on: https://team-review.git.corp.google.com/c/golang/go-private/+/558776 +Reviewed-by: Dmitri Shuralyov <dmitshur@google.com> + +CVE: CVE-2019-16276 + +Upstream-Status: Backport [https://github.com/golang/go/commit/6e6f4aaf70c8b1cc81e65a26332aa9409de03ad8] + +Signed-off-by: Chen Qi <Qi.Chen@windriver.com> +--- + src/net/http/serve_test.go | 4 ++++ + src/net/http/transport_test.go | 27 +++++++++++++++++++++++++++ + src/net/textproto/reader.go | 10 ++-------- + src/net/textproto/reader_test.go | 13 ++++++------- + 4 files changed, 39 insertions(+), 15 deletions(-) + +diff --git a/src/net/http/serve_test.go b/src/net/http/serve_test.go +index 6eb0088a96..89bfdfbb82 100644 +--- a/src/net/http/serve_test.go ++++ b/src/net/http/serve_test.go +@@ -4748,6 +4748,10 @@ func TestServerValidatesHeaders(t *testing.T) { + {"foo\xffbar: foo\r\n", 400}, // binary in header + {"foo\x00bar: foo\r\n", 400}, // binary in header + {"Foo: " + strings.Repeat("x", 1<<21) + "\r\n", 431}, // header too large ++ // Spaces between the header key and colon are not allowed. ++ // See RFC 7230, Section 3.2.4. ++ {"Foo : bar\r\n", 400}, ++ {"Foo\t: bar\r\n", 400}, + + {"foo: foo foo\r\n", 200}, // LWS space is okay + {"foo: foo\tfoo\r\n", 200}, // LWS tab is okay +diff --git a/src/net/http/transport_test.go b/src/net/http/transport_test.go +index 5c329543e2..5e5438a708 100644 +--- a/src/net/http/transport_test.go ++++ b/src/net/http/transport_test.go +@@ -5133,3 +5133,30 @@ func TestTransportIgnores408(t *testing.T) { + } + t.Fatalf("timeout after %v waiting for Transport connections to die off", time.Since(t0)) + } ++ ++func TestInvalidHeaderResponse(t *testing.T) { ++ setParallel(t) ++ defer afterTest(t) ++ cst := newClientServerTest(t, h1Mode, HandlerFunc(func(w ResponseWriter, r *Request) { ++ conn, buf, _ := w.(Hijacker).Hijack() ++ buf.Write([]byte("HTTP/1.1 200 OK\r\n" + ++ "Date: Wed, 30 Aug 2017 19:09:27 GMT\r\n" + ++ "Content-Type: text/html; charset=utf-8\r\n" + ++ "Content-Length: 0\r\n" + ++ "Foo : bar\r\n\r\n")) ++ buf.Flush() ++ conn.Close() ++ })) ++ defer cst.close() ++ res, err := cst.c.Get(cst.ts.URL) ++ if err != nil { ++ t.Fatal(err) ++ } ++ defer res.Body.Close() ++ if v := res.Header.Get("Foo"); v != "" { ++ t.Errorf(`unexpected "Foo" header: %q`, v) ++ } ++ if v := res.Header.Get("Foo "); v != "bar" { ++ t.Errorf(`bad "Foo " header value: %q, want %q`, v, "bar") ++ } ++} +diff --git a/src/net/textproto/reader.go b/src/net/textproto/reader.go +index 2c4f25d5ae..1a5e364cf7 100644 +--- a/src/net/textproto/reader.go ++++ b/src/net/textproto/reader.go +@@ -493,18 +493,12 @@ func (r *Reader) ReadMIMEHeader() (MIMEHeader, error) { + return m, err + } + +- // Key ends at first colon; should not have trailing spaces +- // but they appear in the wild, violating specs, so we remove +- // them if present. ++ // Key ends at first colon. + i := bytes.IndexByte(kv, ':') + if i < 0 { + return m, ProtocolError("malformed MIME header line: " + string(kv)) + } +- endKey := i +- for endKey > 0 && kv[endKey-1] == ' ' { +- endKey-- +- } +- key := canonicalMIMEHeaderKey(kv[:endKey]) ++ key := canonicalMIMEHeaderKey(kv[:i]) + + // As per RFC 7230 field-name is a token, tokens consist of one or more chars. + // We could return a ProtocolError here, but better to be liberal in what we +diff --git a/src/net/textproto/reader_test.go b/src/net/textproto/reader_test.go +index f85fbdc36d..b92fdcd3c7 100644 +--- a/src/net/textproto/reader_test.go ++++ b/src/net/textproto/reader_test.go +@@ -188,11 +188,10 @@ func TestLargeReadMIMEHeader(t *testing.T) { + } + } + +-// Test that we read slightly-bogus MIME headers seen in the wild, +-// with spaces before colons, and spaces in keys. ++// TestReadMIMEHeaderNonCompliant checks that we don't normalize headers ++// with spaces before colons, and accept spaces in keys. + func TestReadMIMEHeaderNonCompliant(t *testing.T) { +- // Invalid HTTP response header as sent by an Axis security +- // camera: (this is handled by IE, Firefox, Chrome, curl, etc.) ++ // These invalid headers will be rejected by net/http according to RFC 7230. + r := reader("Foo: bar\r\n" + + "Content-Language: en\r\n" + + "SID : 0\r\n" + +@@ -202,9 +201,9 @@ func TestReadMIMEHeaderNonCompliant(t *testing.T) { + want := MIMEHeader{ + "Foo": {"bar"}, + "Content-Language": {"en"}, +- "Sid": {"0"}, +- "Audio Mode": {"None"}, +- "Privilege": {"127"}, ++ "SID ": {"0"}, ++ "Audio Mode ": {"None"}, ++ "Privilege ": {"127"}, + } + if !reflect.DeepEqual(m, want) || err != nil { + t.Fatalf("ReadMIMEHeader =\n%v, %v; want:\n%v", m, err, want) diff --git a/poky/meta/recipes-devtools/go/go-1.13/0001-allow-CC-and-CXX-to-have-multiple-words.patch b/poky/meta/recipes-devtools/go/go-1.13/0001-allow-CC-and-CXX-to-have-multiple-words.patch new file mode 100644 index 000000000..ddfd5e41d --- /dev/null +++ b/poky/meta/recipes-devtools/go/go-1.13/0001-allow-CC-and-CXX-to-have-multiple-words.patch @@ -0,0 +1,38 @@ +From 9e3dc44cdfa58d96504d0a789dc82617dd5bef55 Mon Sep 17 00:00:00 2001 +From: Alex Kube <alexander.j.kube@gmail.com> +Date: Wed, 23 Oct 2019 21:01:13 +0430 +Subject: [PATCH 1/9] cmd/go: Allow CC and CXX to have multiple words + +Upstream-Status: Inappropriate [OE specific] + +Adapted to Go 1.13 from patches originally submitted to +the meta/recipes-devtools/go tree by +Matt Madison <matt@madison.systems>. + +Signed-off-by: Alexander J Kube <alexander.j.kube@gmail.com> + +--- + src/cmd/go/internal/envcmd/env.go | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/src/cmd/go/internal/envcmd/env.go b/src/cmd/go/internal/envcmd/env.go +index 17852de..7b5ec5e 100644 +--- a/src/cmd/go/internal/envcmd/env.go ++++ b/src/cmd/go/internal/envcmd/env.go +@@ -100,11 +100,11 @@ func MkEnv() []cfg.EnvVar { + + cc := cfg.DefaultCC(cfg.Goos, cfg.Goarch) + if env := strings.Fields(cfg.Getenv("CC")); len(env) > 0 { +- cc = env[0] ++ cc = strings.Join(env, " ") + } + cxx := cfg.DefaultCXX(cfg.Goos, cfg.Goarch) + if env := strings.Fields(cfg.Getenv("CXX")); len(env) > 0 { +- cxx = env[0] ++ cxx = strings.Join(env, " ") + } + env = append(env, cfg.EnvVar{Name: "AR", Value: envOr("AR", "ar")}) + env = append(env, cfg.EnvVar{Name: "CC", Value: cc}) +-- +2.17.1 (Apple Git-112) + diff --git a/poky/meta/recipes-devtools/go/go-1.13/0002-cmd-go-make-content-based-hash-generation-less-pedan.patch b/poky/meta/recipes-devtools/go/go-1.13/0002-cmd-go-make-content-based-hash-generation-less-pedan.patch new file mode 100644 index 000000000..4eddd3980 --- /dev/null +++ b/poky/meta/recipes-devtools/go/go-1.13/0002-cmd-go-make-content-based-hash-generation-less-pedan.patch @@ -0,0 +1,226 @@ +From a13ae484e41139094505d2834437e9262a5315f7 Mon Sep 17 00:00:00 2001 +From: Alex Kube <alexander.j.kube@gmail.com> +Date: Wed, 23 Oct 2019 21:14:22 +0430 +Subject: [PATCH 2/9] cmd/go: make content-based hash generation less pedantic + +Upstream-Status: Inappropriate [OE specific] + +Go 1.10's build tool now uses content-based hashes to +determine when something should be built or re-built. +This same mechanism is used to maintain a built-artifact +cache for speeding up builds. + +However, the hashes it generates include information that +doesn't work well with OE, nor with using a shared runtime +library. + +First, it embeds path names to source files, unless +building within GOROOT. This prevents the building +of a package in GOPATH for later staging into GOROOT. + +This patch adds support for the environment variable +GOPATH_OMIT_IN_ACTIONID. If present, path name +embedding is disabled. + +Second, if cgo is enabled, the build ID for cgo-related +packages will include the current value of the environment +variables for invoking the compiler (CC, CXX, FC) and +any CGO_xxFLAGS variables. Only if the settings used +during a compilation exactly match, character for character, +the values used for compiling runtime/cgo or any other +cgo-enabled package being imported, will the tool +decide that the imported package is up-to-date. + +This is done to help ensure correctness, but is overly +simplistic and effectively prevents the reuse of built +artifacts that use cgo (or shared runtime, which includes +runtime/cgo). + +This patch filters out all compiler flags except those +beginning with '-m'. The default behavior can be restored +by setting the CGO_PEDANTIC environment variable. + +Adapted to Go 1.13 from patches originally submitted to +the meta/recipes-devtools/go tree by +Matt Madison <matt@madison.systems>. + +Signed-off-by: Alexander J Kube <alexander.j.kube@gmail.com> +--- + src/cmd/go/internal/envcmd/env.go | 2 +- + src/cmd/go/internal/work/exec.go | 66 ++++++++++++++++++++++--------- + 2 files changed, 49 insertions(+), 19 deletions(-) + +diff --git a/src/cmd/go/internal/envcmd/env.go b/src/cmd/go/internal/envcmd/env.go +index 7b5ec5e..292f117 100644 +--- a/src/cmd/go/internal/envcmd/env.go ++++ b/src/cmd/go/internal/envcmd/env.go +@@ -154,7 +154,7 @@ func ExtraEnvVars() []cfg.EnvVar { + func ExtraEnvVarsCostly() []cfg.EnvVar { + var b work.Builder + b.Init() +- cppflags, cflags, cxxflags, fflags, ldflags, err := b.CFlags(&load.Package{}) ++ cppflags, cflags, cxxflags, fflags, ldflags, err := b.CFlags(&load.Package{}, false) + if err != nil { + // Should not happen - b.CFlags was given an empty package. + fmt.Fprintf(os.Stderr, "go: invalid cflags: %v\n", err) +diff --git a/src/cmd/go/internal/work/exec.go b/src/cmd/go/internal/work/exec.go +index 7dd9a90..ccebaf8 100644 +--- a/src/cmd/go/internal/work/exec.go ++++ b/src/cmd/go/internal/work/exec.go +@@ -32,6 +32,8 @@ import ( + "time" + ) + ++var omitGopath = os.Getenv("GOPATH_OMIT_IN_ACTIONID") != "" ++ + // actionList returns the list of actions in the dag rooted at root + // as visited in a depth-first post-order traversal. + func actionList(root *Action) []*Action { +@@ -205,7 +207,7 @@ func (b *Builder) buildActionID(a *Action) cache.ActionID { + // The compiler hides the exact value of $GOROOT + // when building things in GOROOT. + // Assume b.WorkDir is being trimmed properly. +- if !p.Goroot && !cfg.BuildTrimpath && !strings.HasPrefix(p.Dir, b.WorkDir) { ++ if !p.Goroot && !omitGopath && !cfg.BuildTrimpath && !strings.HasPrefix(p.Dir, b.WorkDir) { + fmt.Fprintf(h, "dir %s\n", p.Dir) + } + fmt.Fprintf(h, "goos %s goarch %s\n", cfg.Goos, cfg.Goarch) +@@ -219,13 +221,13 @@ func (b *Builder) buildActionID(a *Action) cache.ActionID { + } + if len(p.CgoFiles)+len(p.SwigFiles) > 0 { + fmt.Fprintf(h, "cgo %q\n", b.toolID("cgo")) +- cppflags, cflags, cxxflags, fflags, ldflags, _ := b.CFlags(p) +- fmt.Fprintf(h, "CC=%q %q %q %q\n", b.ccExe(), cppflags, cflags, ldflags) ++ cppflags, cflags, cxxflags, fflags, ldflags, _ := b.CFlags(p, true) ++ fmt.Fprintf(h, "CC=%q %q %q %q\n", b.ccExe(true), cppflags, cflags, ldflags) + if len(p.CXXFiles)+len(p.SwigFiles) > 0 { +- fmt.Fprintf(h, "CXX=%q %q\n", b.cxxExe(), cxxflags) ++ fmt.Fprintf(h, "CXX=%q %q\n", b.cxxExe(true), cxxflags) + } + if len(p.FFiles) > 0 { +- fmt.Fprintf(h, "FC=%q %q\n", b.fcExe(), fflags) ++ fmt.Fprintf(h, "FC=%q %q\n", b.fcExe(true), fflags) + } + // TODO(rsc): Should we include the SWIG version or Fortran/GCC/G++/Objective-C compiler versions? + } +@@ -2229,33 +2231,48 @@ var ( + // gccCmd returns a gcc command line prefix + // defaultCC is defined in zdefaultcc.go, written by cmd/dist. + func (b *Builder) GccCmd(incdir, workdir string) []string { +- return b.compilerCmd(b.ccExe(), incdir, workdir) ++ return b.compilerCmd(b.ccExe(false), incdir, workdir) + } + + // gxxCmd returns a g++ command line prefix + // defaultCXX is defined in zdefaultcc.go, written by cmd/dist. + func (b *Builder) GxxCmd(incdir, workdir string) []string { +- return b.compilerCmd(b.cxxExe(), incdir, workdir) ++ return b.compilerCmd(b.cxxExe(false), incdir, workdir) + } + + // gfortranCmd returns a gfortran command line prefix. + func (b *Builder) gfortranCmd(incdir, workdir string) []string { +- return b.compilerCmd(b.fcExe(), incdir, workdir) ++ return b.compilerCmd(b.fcExe(false), incdir, workdir) + } + + // ccExe returns the CC compiler setting without all the extra flags we add implicitly. +-func (b *Builder) ccExe() []string { +- return b.compilerExe(origCC, cfg.DefaultCC(cfg.Goos, cfg.Goarch)) ++func (b *Builder) ccExe(filtered bool) []string { ++ return b.compilerExe(origCC, cfg.DefaultCC(cfg.Goos, cfg.Goarch), filtered) + } + + // cxxExe returns the CXX compiler setting without all the extra flags we add implicitly. +-func (b *Builder) cxxExe() []string { +- return b.compilerExe(origCXX, cfg.DefaultCXX(cfg.Goos, cfg.Goarch)) ++func (b *Builder) cxxExe(filtered bool) []string { ++ return b.compilerExe(origCXX, cfg.DefaultCXX(cfg.Goos, cfg.Goarch), filtered) + } + + // fcExe returns the FC compiler setting without all the extra flags we add implicitly. +-func (b *Builder) fcExe() []string { +- return b.compilerExe(cfg.Getenv("FC"), "gfortran") ++func (b *Builder) fcExe(filtered bool) []string { ++ return b.compilerExe(os.Getenv("FC"), "gfortran", filtered) ++} ++ ++var filterFlags = os.Getenv("CGO_PEDANTIC") == "" ++ ++func filterCompilerFlags(flags []string) []string { ++ var newflags []string ++ if !filterFlags { ++ return flags ++ } ++ for _, flag := range flags { ++ if strings.HasPrefix(flag, "-m") { ++ newflags = append(newflags, flag) ++ } ++ } ++ return newflags + } + + // compilerExe returns the compiler to use given an +@@ -2264,11 +2281,16 @@ func (b *Builder) fcExe() []string { + // of the compiler but can have additional arguments if they + // were present in the environment value. + // For example if CC="gcc -DGOPHER" then the result is ["gcc", "-DGOPHER"]. +-func (b *Builder) compilerExe(envValue string, def string) []string { ++func (b *Builder) compilerExe(envValue string, def string, filtered bool) []string { + compiler := strings.Fields(envValue) + if len(compiler) == 0 { + compiler = []string{def} + } ++ ++ if filtered { ++ return append(compiler[0:1], filterCompilerFlags(compiler[1:])...) ++ } ++ + return compiler + } + +@@ -2429,7 +2451,7 @@ func envList(key, def string) []string { + } + + // CFlags returns the flags to use when invoking the C, C++ or Fortran compilers, or cgo. +-func (b *Builder) CFlags(p *load.Package) (cppflags, cflags, cxxflags, fflags, ldflags []string, err error) { ++func (b *Builder) CFlags(p *load.Package, filtered bool) (cppflags, cflags, cxxflags, fflags, ldflags []string, err error) { + defaults := "-g -O2" + + if cppflags, err = buildFlags("CPPFLAGS", "", p.CgoCPPFLAGS, checkCompilerFlags); err != nil { +@@ -2448,6 +2470,14 @@ func (b *Builder) CFlags(p *load.Package) (cppflags, cflags, cxxflags, fflags, l + return + } + ++ if filtered { ++ cppflags = filterCompilerFlags(cppflags) ++ cflags = filterCompilerFlags(cflags) ++ cxxflags = filterCompilerFlags(cxxflags) ++ fflags = filterCompilerFlags(fflags) ++ ldflags = filterCompilerFlags(ldflags) ++ } ++ + return + } + +@@ -2462,7 +2492,7 @@ var cgoRe = lazyregexp.New(`[/\\:]`) + + func (b *Builder) cgo(a *Action, cgoExe, objdir string, pcCFLAGS, pcLDFLAGS, cgofiles, gccfiles, gxxfiles, mfiles, ffiles []string) (outGo, outObj []string, err error) { + p := a.Package +- cgoCPPFLAGS, cgoCFLAGS, cgoCXXFLAGS, cgoFFLAGS, cgoLDFLAGS, err := b.CFlags(p) ++ cgoCPPFLAGS, cgoCFLAGS, cgoCXXFLAGS, cgoFFLAGS, cgoLDFLAGS, err := b.CFlags(p, false) + if err != nil { + return nil, nil, err + } +@@ -2821,7 +2851,7 @@ func (b *Builder) swigIntSize(objdir string) (intsize string, err error) { + + // Run SWIG on one SWIG input file. + func (b *Builder) swigOne(a *Action, p *load.Package, file, objdir string, pcCFLAGS []string, cxx bool, intgosize string) (outGo, outC string, err error) { +- cgoCPPFLAGS, cgoCFLAGS, cgoCXXFLAGS, _, _, err := b.CFlags(p) ++ cgoCPPFLAGS, cgoCFLAGS, cgoCXXFLAGS, _, _, err := b.CFlags(p, false) + if err != nil { + return "", "", err + } +-- +2.17.1 (Apple Git-112) + diff --git a/poky/meta/recipes-devtools/go/go-1.13/0003-allow-GOTOOLDIR-to-be-overridden-in-the-environment.patch b/poky/meta/recipes-devtools/go/go-1.13/0003-allow-GOTOOLDIR-to-be-overridden-in-the-environment.patch new file mode 100644 index 000000000..9aa0119ae --- /dev/null +++ b/poky/meta/recipes-devtools/go/go-1.13/0003-allow-GOTOOLDIR-to-be-overridden-in-the-environment.patch @@ -0,0 +1,54 @@ +From 28ada8896b76d620240bafc22aa395071d601482 Mon Sep 17 00:00:00 2001 +From: Alex Kube <alexander.j.kube@gmail.com> +Date: Wed, 23 Oct 2019 21:15:37 +0430 +Subject: [PATCH 3/9] cmd/go: Allow GOTOOLDIR to be overridden in the environment + +to allow for split host/target build roots + +Adapted to Go 1.13 from patches originally submitted to +the meta/recipes-devtools/go tree by +Matt Madison <matt@madison.systems>. + +Upstream-Status: Inappropriate [OE specific] + +Signed-off-by: Alexander J Kube <alexander.j.kube@gmail.com> +--- + src/cmd/dist/build.go | 4 +++- + src/cmd/go/internal/cfg/cfg.go | 6 +++++- + 2 files changed, 8 insertions(+), 2 deletions(-) + +diff --git a/src/cmd/dist/build.go b/src/cmd/dist/build.go +index 9e50311..683ca6f 100644 +--- a/src/cmd/dist/build.go ++++ b/src/cmd/dist/build.go +@@ -244,7 +244,9 @@ func xinit() { + workdir = xworkdir() + xatexit(rmworkdir) + +- tooldir = pathf("%s/pkg/tool/%s_%s", goroot, gohostos, gohostarch) ++ if tooldir = os.Getenv("GOTOOLDIR"); tooldir == "" { ++ tooldir = pathf("%s/pkg/tool/%s_%s", goroot, gohostos, gohostarch) ++ } + } + + // compilerEnv returns a map from "goos/goarch" to the +diff --git a/src/cmd/go/internal/cfg/cfg.go b/src/cmd/go/internal/cfg/cfg.go +index a3277a6..db96350 100644 +--- a/src/cmd/go/internal/cfg/cfg.go ++++ b/src/cmd/go/internal/cfg/cfg.go +@@ -60,7 +60,11 @@ func defaultContext() build.Context { + // variables. This matches the initialization of ToolDir in + // go/build, except for using ctxt.GOROOT rather than + // runtime.GOROOT. +- build.ToolDir = filepath.Join(ctxt.GOROOT, "pkg/tool/"+runtime.GOOS+"_"+runtime.GOARCH) ++ if s := os.Getenv("GOTOOLDIR"); s != "" { ++ build.ToolDir = filepath.Clean(s) ++ } else { ++ build.ToolDir = filepath.Join(ctxt.GOROOT, "pkg/tool/"+runtime.GOOS+"_"+runtime.GOARCH) ++ } + } + + ctxt.GOPATH = envOr("GOPATH", ctxt.GOPATH) +-- +2.17.1 (Apple Git-112) + diff --git a/poky/meta/recipes-devtools/go/go-1.13/0004-ld-add-soname-to-shareable-objects.patch b/poky/meta/recipes-devtools/go/go-1.13/0004-ld-add-soname-to-shareable-objects.patch new file mode 100644 index 000000000..40763ad5b --- /dev/null +++ b/poky/meta/recipes-devtools/go/go-1.13/0004-ld-add-soname-to-shareable-objects.patch @@ -0,0 +1,50 @@ +From bf5cf5301ae5914498454c87293d1df2e1d8489f Mon Sep 17 00:00:00 2001 +From: Alex Kube <alexander.j.kube@gmail.com> +Date: Wed, 23 Oct 2019 21:16:32 +0430 +Subject: [PATCH 4/9] ld: add soname to shareable objects + +so that OE's shared library dependency handling +can find them. + +Adapted to Go 1.13 from patches originally submitted to +the meta/recipes-devtools/go tree by +Matt Madison <matt@madison.systems>. + +Upstream-Status: Inappropriate [OE specific] + +Signed-off-by: Alexander J Kube <alexander.j.kube@gmail.com> +--- + src/cmd/link/internal/ld/lib.go | 3 +++ + 1 file changed, 3 insertions(+) + +diff --git a/src/cmd/link/internal/ld/lib.go b/src/cmd/link/internal/ld/lib.go +index 3fa258d..f96fb02 100644 +--- a/src/cmd/link/internal/ld/lib.go ++++ b/src/cmd/link/internal/ld/lib.go +@@ -1215,6 +1215,7 @@ func (ctxt *Link) hostlink() { + argv = append(argv, "-Wl,-z,relro") + } + argv = append(argv, "-shared") ++ argv = append(argv, fmt.Sprintf("-Wl,-soname,%s", filepath.Base(*flagOutfile))) + if ctxt.HeadType != objabi.Hwindows { + // Pass -z nodelete to mark the shared library as + // non-closeable: a dlclose will do nothing. +@@ -1226,6 +1227,7 @@ func (ctxt *Link) hostlink() { + argv = append(argv, "-Wl,-z,relro") + } + argv = append(argv, "-shared") ++ argv = append(argv, fmt.Sprintf("-Wl,-soname,%s", filepath.Base(*flagOutfile))) + case BuildModePlugin: + if ctxt.HeadType == objabi.Hdarwin { + argv = append(argv, "-dynamiclib") +@@ -1234,6 +1236,7 @@ func (ctxt *Link) hostlink() { + argv = append(argv, "-Wl,-z,relro") + } + argv = append(argv, "-shared") ++ argv = append(argv, fmt.Sprintf("-Wl,-soname,%s", filepath.Base(*flagOutfile))) + } + } + +-- +2.17.1 (Apple Git-112) + diff --git a/poky/meta/recipes-devtools/go/go-1.13/0005-make.bash-override-CC-when-building-dist-and-go_boot.patch b/poky/meta/recipes-devtools/go/go-1.13/0005-make.bash-override-CC-when-building-dist-and-go_boot.patch new file mode 100644 index 000000000..4f2a46c6c --- /dev/null +++ b/poky/meta/recipes-devtools/go/go-1.13/0005-make.bash-override-CC-when-building-dist-and-go_boot.patch @@ -0,0 +1,44 @@ +From f05ef3ded52b98537c10efd0b15cd9612471524d Mon Sep 17 00:00:00 2001 +From: Alex Kube <alexander.j.kube@gmail.com> +Date: Wed, 23 Oct 2019 21:17:16 +0430 +Subject: [PATCH 5/9] make.bash: override CC when building dist and + go_bootstrap + +for handling OE cross-canadian builds. + +Adapted to Go 1.13 from patches originally submitted to +the meta/recipes-devtools/go tree by +Matt Madison <matt@madison.systems>. + +Upstream-Status: Inappropriate [OE specific] + +Signed-off-by: Alexander J Kube <alexander.j.kube@gmail.com> +--- + src/make.bash | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/src/make.bash b/src/make.bash +index 92d1481..0c2822f 100755 +--- a/src/make.bash ++++ b/src/make.bash +@@ -177,7 +177,7 @@ if [ "$GOROOT_BOOTSTRAP" = "$GOROOT" ]; then + exit 1 + fi + rm -f cmd/dist/dist +-GOROOT="$GOROOT_BOOTSTRAP" GOOS="" GOARCH="" GO111MODULE=off "$GOROOT_BOOTSTRAP/bin/go" build -o cmd/dist/dist ./cmd/dist ++CC="${BUILD_CC:-${CC}}" GOROOT="$GOROOT_BOOTSTRAP" GOOS="" GOARCH="" GO111MODULE=off "$GOROOT_BOOTSTRAP/bin/go" build -o cmd/dist/dist ./cmd/dist + + # -e doesn't propagate out of eval, so check success by hand. + eval $(./cmd/dist/dist env -p || echo FAIL=true) +@@ -208,7 +208,7 @@ fi + # Run dist bootstrap to complete make.bash. + # Bootstrap installs a proper cmd/dist, built with the new toolchain. + # Throw ours, built with Go 1.4, away after bootstrap. +-./cmd/dist/dist bootstrap $buildall $vflag $GO_DISTFLAGS "$@" ++CC="${BUILD_CC:-${CC}}" ./cmd/dist/dist bootstrap $buildall $vflag $GO_DISTFLAGS "$@" + rm -f ./cmd/dist/dist + + # DO NOT ADD ANY NEW CODE HERE. +-- +2.17.1 (Apple Git-112) + diff --git a/poky/meta/recipes-devtools/go/go-1.13/0006-cmd-dist-separate-host-and-target-builds.patch b/poky/meta/recipes-devtools/go/go-1.13/0006-cmd-dist-separate-host-and-target-builds.patch new file mode 100644 index 000000000..354aaca3a --- /dev/null +++ b/poky/meta/recipes-devtools/go/go-1.13/0006-cmd-dist-separate-host-and-target-builds.patch @@ -0,0 +1,279 @@ +From 10735bb84df17ba657f76835f483cd8543a879c1 Mon Sep 17 00:00:00 2001 +From: Alex Kube <alexander.j.kube@gmail.com> +Date: Wed, 23 Oct 2019 21:18:12 +0430 +Subject: [PATCH 6/9] cmd/dist: separate host and target builds + +Upstream-Status: Inappropriate [OE specific] + +Change the dist tool to allow for OE-style cross- +and cross-canadian builds: + + - command flags --host-only and --target only are added; + if one is present, the other changes mentioned below + take effect, and arguments may also be specified on + the command line to enumerate the package(s) to be + built. + + - for OE cross builds, go_bootstrap is always built for + the current build host, and is moved, along with the supporting + toolchain (asm, compile, etc.) to a separate 'native_native' + directory under GOROOT/pkg/tool. + + - go_bootstrap is not automatically removed after the build, + so it can be reused later (e.g., building both static and + shared runtime). + +Note that for --host-only builds, it would be nice to specify +just the "cmd" package to build only the go commands/tools, +the staleness checks in the dist tool will fail if the "std" +library has not also been built. So host-only builds have to +build everything anyway. + +Adapted to Go 1.13 from patches originally submitted to +the meta/recipes-devtools/go tree by +Matt Madison <matt@madison.systems>. + +Signed-off-by: Alexander J Kube <alexander.j.kube@gmail.com> +--- + src/cmd/dist/build.go | 155 ++++++++++++++++++++++++++++++------------ + 1 file changed, 112 insertions(+), 43 deletions(-) + +diff --git a/src/cmd/dist/build.go b/src/cmd/dist/build.go +index 683ca6f..0ad082b 100644 +--- a/src/cmd/dist/build.go ++++ b/src/cmd/dist/build.go +@@ -41,6 +41,7 @@ var ( + goldflags string + workdir string + tooldir string ++ build_tooldir string + oldgoos string + oldgoarch string + exe string +@@ -53,6 +54,7 @@ var ( + + rebuildall bool + defaultclang bool ++ crossBuild bool + + vflag int // verbosity + ) +@@ -247,6 +249,8 @@ func xinit() { + if tooldir = os.Getenv("GOTOOLDIR"); tooldir == "" { + tooldir = pathf("%s/pkg/tool/%s_%s", goroot, gohostos, gohostarch) + } ++ ++ build_tooldir = pathf("%s/pkg/tool/native_native", goroot) + } + + // compilerEnv returns a map from "goos/goarch" to the +@@ -478,8 +482,10 @@ func setup() { + p := pathf("%s/pkg/%s_%s", goroot, gohostos, gohostarch) + if rebuildall { + xremoveall(p) ++ xremoveall(build_tooldir) + } + xmkdirall(p) ++ xmkdirall(build_tooldir) + + if goos != gohostos || goarch != gohostarch { + p := pathf("%s/pkg/%s_%s", goroot, goos, goarch) +@@ -1207,12 +1213,29 @@ func cmdbootstrap() { + + var noBanner bool + var debug bool ++ var hostOnly bool ++ var targetOnly bool ++ var toBuild = []string{"std", "cmd"} ++ + flag.BoolVar(&rebuildall, "a", rebuildall, "rebuild all") + flag.BoolVar(&debug, "d", debug, "enable debugging of bootstrap process") + flag.BoolVar(&noBanner, "no-banner", noBanner, "do not print banner") ++ flag.BoolVar(&hostOnly, "host-only", hostOnly, "build only host binaries, not target") ++ flag.BoolVar(&targetOnly, "target-only", targetOnly, "build only target binaries, not host") + +- xflagparse(0) ++ xflagparse(-1) + ++ if hostOnly && targetOnly { ++ fatalf("specify only one of --host-only or --target-only\n") ++ } ++ crossBuild = hostOnly || targetOnly ++ if flag.NArg() > 0 { ++ if crossBuild { ++ toBuild = flag.Args() ++ } else { ++ fatalf("package names not permitted without --host-only or --target-only\n") ++ } ++ } + // Set GOPATH to an internal directory. We shouldn't actually + // need to store files here, since the toolchain won't + // depend on modules outside of vendor directories, but if +@@ -1266,8 +1289,13 @@ func cmdbootstrap() { + xprintf("\n") + } + +- gogcflags = os.Getenv("GO_GCFLAGS") // we were using $BOOT_GO_GCFLAGS until now +- goldflags = os.Getenv("GO_LDFLAGS") // we were using $BOOT_GO_LDFLAGS until now ++ // For split host/target cross/cross-canadian builds, we don't ++ // want to be setting these flags until after we have compiled ++ // the toolchain that runs on the build host. ++ if !crossBuild { ++ gogcflags = os.Getenv("GO_GCFLAGS") // we were using $BOOT_GO_GCFLAGS until now ++ goldflags = os.Getenv("GO_LDFLAGS") // we were using $BOOT_GO_LDFLAGS until now ++ } + goBootstrap := pathf("%s/go_bootstrap", tooldir) + cmdGo := pathf("%s/go", gobin) + if debug { +@@ -1296,7 +1324,11 @@ func cmdbootstrap() { + xprintf("\n") + } + xprintf("Building Go toolchain2 using go_bootstrap and Go toolchain1.\n") +- os.Setenv("CC", compilerEnvLookup(defaultcc, goos, goarch)) ++ if crossBuild { ++ os.Setenv("CC", defaultcc[""]) ++ } else { ++ os.Setenv("CC", compilerEnvLookup(defaultcc, goos, goarch)) ++ } + goInstall(goBootstrap, append([]string{"-i"}, toolchain...)...) + if debug { + run("", ShowOutput|CheckExit, pathf("%s/compile", tooldir), "-V=full") +@@ -1333,50 +1365,84 @@ func cmdbootstrap() { + } + checkNotStale(goBootstrap, append(toolchain, "runtime/internal/sys")...) + +- if goos == oldgoos && goarch == oldgoarch { +- // Common case - not setting up for cross-compilation. +- timelog("build", "toolchain") +- if vflag > 0 { +- xprintf("\n") ++ if crossBuild { ++ gogcflags = os.Getenv("GO_GCFLAGS") ++ goldflags = os.Getenv("GO_LDFLAGS") ++ tool_files, _ := filepath.Glob(pathf("%s/*", tooldir)) ++ for _, f := range tool_files { ++ copyfile(pathf("%s/%s", build_tooldir, filepath.Base(f)), f, writeExec) ++ xremove(f) ++ } ++ os.Setenv("GOTOOLDIR", build_tooldir) ++ goBootstrap = pathf("%s/go_bootstrap", build_tooldir) ++ if hostOnly { ++ timelog("build", "host toolchain") ++ if vflag > 0 { ++ xprintf("\n") ++ } ++ xprintf("Building %s for host, %s/%s.\n", strings.Join(toBuild, ","), goos, goarch) ++ goInstall(goBootstrap, toBuild...) ++ checkNotStale(goBootstrap, toBuild...) ++ // Skip cmdGo staleness checks here, since we can't necessarily run the cmdGo binary ++ ++ timelog("build", "target toolchain") ++ if vflag > 0 { ++ xprintf("\n") ++ } ++ } else if targetOnly { ++ goos = oldgoos ++ goarch = oldgoarch ++ os.Setenv("GOOS", goos) ++ os.Setenv("GOARCH", goarch) ++ os.Setenv("CC", compilerEnvLookup(defaultcc, goos, goarch)) ++ xprintf("Building %s for target, %s/%s.\n", strings.Join(toBuild, ","), goos, goarch) ++ goInstall(goBootstrap, toBuild...) ++ checkNotStale(goBootstrap, toBuild...) ++ // Skip cmdGo staleness checks here, since we can't run the target's cmdGo binary + } +- xprintf("Building packages and commands for %s/%s.\n", goos, goarch) + } else { +- // GOOS/GOARCH does not match GOHOSTOS/GOHOSTARCH. +- // Finish GOHOSTOS/GOHOSTARCH installation and then +- // run GOOS/GOARCH installation. +- timelog("build", "host toolchain") +- if vflag > 0 { +- xprintf("\n") +- } +- xprintf("Building packages and commands for host, %s/%s.\n", goos, goarch) ++ ++ if goos == oldgoos && goarch == oldgoarch { ++ // Common case - not setting up for cross-compilation. ++ timelog("build", "toolchain") ++ if vflag > 0 { ++ xprintf("\n") ++ } ++ xprintf("Building packages and commands for %s/%s.\n", goos, goarch) ++ } else { ++ // GOOS/GOARCH does not match GOHOSTOS/GOHOSTARCH. ++ // Finish GOHOSTOS/GOHOSTARCH installation and then ++ // run GOOS/GOARCH installation. ++ timelog("build", "host toolchain") ++ if vflag > 0 { ++ xprintf("\n") ++ } ++ xprintf("Building packages and commands for host, %s/%s.\n", goos, goarch) ++ goInstall(goBootstrap, "std", "cmd") ++ checkNotStale(goBootstrap, "std", "cmd") ++ checkNotStale(cmdGo, "std", "cmd") ++ ++ timelog("build", "target toolchain") ++ if vflag > 0 { ++ xprintf("\n") ++ } ++ goos = oldgoos ++ goarch = oldgoarch ++ os.Setenv("GOOS", goos) ++ os.Setenv("GOARCH", goarch) ++ os.Setenv("CC", compilerEnvLookup(defaultcc, goos, goarch)) ++ xprintf("Building packages and commands for target, %s/%s.\n", goos, goarch) ++ } + goInstall(goBootstrap, "std", "cmd") + checkNotStale(goBootstrap, "std", "cmd") + checkNotStale(cmdGo, "std", "cmd") + +- timelog("build", "target toolchain") +- if vflag > 0 { +- xprintf("\n") ++ if debug { ++ run("", ShowOutput|CheckExit, pathf("%s/compile", tooldir), "-V=full") ++ run("", ShowOutput|CheckExit, pathf("%s/buildid", tooldir), pathf("%s/pkg/%s_%s/runtime/internal/sys.a", goroot, goos, goarch)) ++ checkNotStale(goBootstrap, append(toolchain, "runtime/internal/sys")...) ++ copyfile(pathf("%s/compile4", tooldir), pathf("%s/compile", tooldir), writeExec) + } +- goos = oldgoos +- goarch = oldgoarch +- os.Setenv("GOOS", goos) +- os.Setenv("GOARCH", goarch) +- os.Setenv("CC", compilerEnvLookup(defaultcc, goos, goarch)) +- xprintf("Building packages and commands for target, %s/%s.\n", goos, goarch) +- } +- targets := []string{"std", "cmd"} +- if goos == "js" && goarch == "wasm" { +- // Skip the cmd tools for js/wasm. They're not usable. +- targets = targets[:1] +- } +- goInstall(goBootstrap, targets...) +- checkNotStale(goBootstrap, targets...) +- checkNotStale(cmdGo, targets...) +- if debug { +- run("", ShowOutput|CheckExit, pathf("%s/compile", tooldir), "-V=full") +- run("", ShowOutput|CheckExit, pathf("%s/buildid", tooldir), pathf("%s/pkg/%s_%s/runtime/internal/sys.a", goroot, goos, goarch)) +- checkNotStale(goBootstrap, append(toolchain, "runtime/internal/sys")...) +- copyfile(pathf("%s/compile4", tooldir), pathf("%s/compile", tooldir), writeExec) + } + + // Check that there are no new files in $GOROOT/bin other than +@@ -1393,8 +1459,11 @@ func cmdbootstrap() { + } + } + +- // Remove go_bootstrap now that we're done. +- xremove(pathf("%s/go_bootstrap", tooldir)) ++ // Except that for split host/target cross-builds, we need to ++ // keep it. ++ if !crossBuild { ++ xremove(pathf("%s/go_bootstrap", tooldir)) ++ } + + if goos == "android" { + // Make sure the exec wrapper will sync a fresh $GOROOT to the device. +-- +2.17.1 (Apple Git-112) + diff --git a/poky/meta/recipes-devtools/go/go-1.13/0007-cmd-go-make-GOROOT-precious-by-default.patch b/poky/meta/recipes-devtools/go/go-1.13/0007-cmd-go-make-GOROOT-precious-by-default.patch new file mode 100644 index 000000000..e232c7919 --- /dev/null +++ b/poky/meta/recipes-devtools/go/go-1.13/0007-cmd-go-make-GOROOT-precious-by-default.patch @@ -0,0 +1,113 @@ +From 9ba507e076c744f4d394418e4a849e68cd426a4a Mon Sep 17 00:00:00 2001 +From: Alex Kube <alexander.j.kube@gmail.com> +Date: Wed, 23 Oct 2019 21:18:56 +0430 +Subject: [PATCH 7/9] cmd/go: make GOROOT precious by default + +Upstream-Status: Inappropriate [OE specific] + +The go build tool normally rebuilds whatever it detects is +stale. This can be a problem when GOROOT is intended to +be read-only and the go runtime has been built as a shared +library, since we don't want every application to be rebuilding +the shared runtime - particularly in cross-build/packaging +setups, since that would lead to 'abi mismatch' runtime errors. + +This patch prevents the install and linkshared actions from +installing to GOROOT unless overridden with the GOROOT_OVERRIDE +environment variable. + +Adapted to Go 1.13 from patches originally submitted to +the meta/recipes-devtools/go tree by +Matt Madison <matt@madison.systems>. + +Signed-off-by: Alexander J Kube <alexander.j.kube@gmail.com> +--- + src/cmd/go/internal/work/action.go | 3 +++ + src/cmd/go/internal/work/build.go | 6 ++++++ + src/cmd/go/internal/work/exec.go | 25 +++++++++++++++++++++++++ + 3 files changed, 34 insertions(+) + +diff --git a/src/cmd/go/internal/work/action.go b/src/cmd/go/internal/work/action.go +index 33b7818..7617b4c 100644 +--- a/src/cmd/go/internal/work/action.go ++++ b/src/cmd/go/internal/work/action.go +@@ -662,6 +662,9 @@ func (b *Builder) addTransitiveLinkDeps(a, a1 *Action, shlib string) { + if p1 == nil || p1.Shlib == "" || haveShlib[filepath.Base(p1.Shlib)] { + continue + } ++ if goRootPrecious && (p1.Standard || p1.Goroot) { ++ continue ++ } + haveShlib[filepath.Base(p1.Shlib)] = true + // TODO(rsc): The use of ModeInstall here is suspect, but if we only do ModeBuild, + // we'll end up building an overall library or executable that depends at runtime +diff --git a/src/cmd/go/internal/work/build.go b/src/cmd/go/internal/work/build.go +index 9305b2d..6560317 100644 +--- a/src/cmd/go/internal/work/build.go ++++ b/src/cmd/go/internal/work/build.go +@@ -155,6 +155,8 @@ See also: go install, go get, go clean. + + const concurrentGCBackendCompilationEnabledByDefault = true + ++var goRootPrecious bool = true ++ + func init() { + // break init cycle + CmdBuild.Run = runBuild +@@ -167,6 +169,10 @@ func init() { + + AddBuildFlags(CmdBuild) + AddBuildFlags(CmdInstall) ++ ++ if x := os.Getenv("GOROOT_OVERRIDE"); x != "" { ++ goRootPrecious = false ++ } + } + + // Note that flags consulted by other parts of the code +diff --git a/src/cmd/go/internal/work/exec.go b/src/cmd/go/internal/work/exec.go +index ccebaf8..59450d7 100644 +--- a/src/cmd/go/internal/work/exec.go ++++ b/src/cmd/go/internal/work/exec.go +@@ -455,6 +455,23 @@ func (b *Builder) build(a *Action) (err error) { + return errors.New("binary-only packages are no longer supported") + } + ++ if goRootPrecious && (a.Package.Standard || a.Package.Goroot) { ++ _, err := os.Stat(a.Package.Target) ++ if err == nil { ++ a.built = a.Package.Target ++ a.Target = a.Package.Target ++ a.buildID = b.fileHash(a.Package.Target) ++ a.Package.Stale = false ++ a.Package.StaleReason = "GOROOT-resident package" ++ return nil ++ } ++ a.Package.Stale = true ++ a.Package.StaleReason = "missing or invalid GOROOT-resident package" ++ if b.IsCmdList { ++ return nil ++ } ++ } ++ + if err := b.Mkdir(a.Objdir); err != nil { + return err + } +@@ -1499,6 +1516,14 @@ func BuildInstallFunc(b *Builder, a *Action) (err error) { + return nil + } + ++ if goRootPrecious && a.Package != nil { ++ p := a.Package ++ if p.Standard || p.Goroot { ++ err := fmt.Errorf("attempting to install package %s into read-only GOROOT", p.ImportPath) ++ return err ++ } ++ } ++ + if err := b.Mkdir(a.Objdir); err != nil { + return err + } +-- +2.17.1 (Apple Git-112) + diff --git a/poky/meta/recipes-devtools/go/go-1.13/0008-use-GOBUILDMODE-to-set-buildmode.patch b/poky/meta/recipes-devtools/go/go-1.13/0008-use-GOBUILDMODE-to-set-buildmode.patch new file mode 100644 index 000000000..68e132f30 --- /dev/null +++ b/poky/meta/recipes-devtools/go/go-1.13/0008-use-GOBUILDMODE-to-set-buildmode.patch @@ -0,0 +1,47 @@ +From 971b5626339ce0c4d57f9721c9a81af566c5a044 Mon Sep 17 00:00:00 2001 +From: Alex Kube <alexander.j.kube@gmail.com> +Date: Wed, 23 Oct 2019 21:19:26 +0430 +Subject: [PATCH 8/9] cmd/go: Use GOBUILDMODE to set buildmode + +Upstream-Status: Denied [upstream choose antoher solution: `17a256b +cmd/go: -buildmode=pie for android/arm'] + +While building go itself, the go build system does not support +to set `-buildmode=pie' from environment. + +Add GOBUILDMODE to support it which make PIE executables the default +build mode, as PIE executables are required as of Yocto + +Refers: https://groups.google.com/forum/#!topic/golang-dev/gRCe5URKewI + +Adapted to Go 1.13 from patches originally submitted to +the meta/recipes-devtools/go tree by +Hongxu Jia <hongxu.jia@windriver.com> + +Signed-off-by: Alexander J Kube <alexander.j.kube@gmail.com> +--- + src/cmd/go/internal/work/build.go | 8 +++++++- + 1 file changed, 7 insertions(+), 1 deletion(-) + +diff --git a/src/cmd/go/internal/work/build.go b/src/cmd/go/internal/work/build.go +index 6560317..5f3a988 100644 +--- a/src/cmd/go/internal/work/build.go ++++ b/src/cmd/go/internal/work/build.go +@@ -231,7 +231,13 @@ func AddBuildFlags(cmd *base.Command) { + + cmd.Flag.Var(&load.BuildAsmflags, "asmflags", "") + cmd.Flag.Var(buildCompiler{}, "compiler", "") +- cmd.Flag.StringVar(&cfg.BuildBuildmode, "buildmode", "default", "") ++ ++ if bm := os.Getenv("GOBUILDMODE"); bm != "" { ++ cmd.Flag.StringVar(&cfg.BuildBuildmode, "buildmode", bm, "") ++ } else { ++ cmd.Flag.StringVar(&cfg.BuildBuildmode, "buildmode", "default", "") ++ } ++ + cmd.Flag.Var(&load.BuildGcflags, "gcflags", "") + cmd.Flag.Var(&load.BuildGccgoflags, "gccgoflags", "") + cmd.Flag.StringVar(&cfg.BuildMod, "mod", "", "") +-- +2.17.1 (Apple Git-112) + diff --git a/poky/meta/recipes-devtools/go/go-1.13/0009-ld-replace-glibc-dynamic-linker-with-musl.patch b/poky/meta/recipes-devtools/go/go-1.13/0009-ld-replace-glibc-dynamic-linker-with-musl.patch new file mode 100644 index 000000000..4bb1106f0 --- /dev/null +++ b/poky/meta/recipes-devtools/go/go-1.13/0009-ld-replace-glibc-dynamic-linker-with-musl.patch @@ -0,0 +1,134 @@ +From 973251ae0c69a35721f6115345d3f57b2847979f Mon Sep 17 00:00:00 2001 +From: Alex Kube <alexander.j.kube@gmail.com> +Date: Wed, 23 Oct 2019 21:20:13 +0430 +Subject: [PATCH 9/9] ld: replace glibc dynamic linker with musl + +Rework of patch by Khem Raj <raj.khem@gmail.com> +for go 1.10. Should be applied conditionally on +musl being the system C library. + +Adapted to Go 1.13 from patches originally submitted to +the meta/recipes-devtools/go tree by +Matt Madison <matt@madison.systems>. + +Upstream-Status: Inappropriate [Real fix should be portable across libcs] + +Signed-off-by: Alexander J Kube <alexander.j.kube@gmail.com> +--- + src/cmd/link/internal/amd64/obj.go | 2 +- + src/cmd/link/internal/arm/obj.go | 2 +- + src/cmd/link/internal/arm64/obj.go | 2 +- + src/cmd/link/internal/mips/obj.go | 2 +- + src/cmd/link/internal/mips64/obj.go | 2 +- + src/cmd/link/internal/ppc64/obj.go | 2 +- + src/cmd/link/internal/s390x/obj.go | 2 +- + src/cmd/link/internal/x86/obj.go | 2 +- + 8 files changed, 8 insertions(+), 8 deletions(-) + +diff --git a/src/cmd/link/internal/amd64/obj.go b/src/cmd/link/internal/amd64/obj.go +index 23741eb..8e74576 100644 +--- a/src/cmd/link/internal/amd64/obj.go ++++ b/src/cmd/link/internal/amd64/obj.go +@@ -62,7 +62,7 @@ func Init() (*sys.Arch, ld.Arch) { + PEreloc1: pereloc1, + TLSIEtoLE: tlsIEtoLE, + +- Linuxdynld: "/lib64/ld-linux-x86-64.so.2", ++ Linuxdynld: "/lib64/ld-musl-x86-64.so.1", + Freebsddynld: "/libexec/ld-elf.so.1", + Openbsddynld: "/usr/libexec/ld.so", + Netbsddynld: "/libexec/ld.elf_so", +diff --git a/src/cmd/link/internal/arm/obj.go b/src/cmd/link/internal/arm/obj.go +index 45a406e..724d3e3 100644 +--- a/src/cmd/link/internal/arm/obj.go ++++ b/src/cmd/link/internal/arm/obj.go +@@ -59,7 +59,7 @@ func Init() (*sys.Arch, ld.Arch) { + Machoreloc1: machoreloc1, + PEreloc1: pereloc1, + +- Linuxdynld: "/lib/ld-linux.so.3", // 2 for OABI, 3 for EABI ++ Linuxdynld: "/lib/ld-musl-armhf.so.1", + Freebsddynld: "/usr/libexec/ld-elf.so.1", + Openbsddynld: "/usr/libexec/ld.so", + Netbsddynld: "/libexec/ld.elf_so", +diff --git a/src/cmd/link/internal/arm64/obj.go b/src/cmd/link/internal/arm64/obj.go +index 7c66623..d8b1db1 100644 +--- a/src/cmd/link/internal/arm64/obj.go ++++ b/src/cmd/link/internal/arm64/obj.go +@@ -57,7 +57,7 @@ func Init() (*sys.Arch, ld.Arch) { + Gentext: gentext, + Machoreloc1: machoreloc1, + +- Linuxdynld: "/lib/ld-linux-aarch64.so.1", ++ Linuxdynld: "/lib/ld-musl-aarch64.so.1", + + Freebsddynld: "XXX", + Openbsddynld: "/usr/libexec/ld.so", +diff --git a/src/cmd/link/internal/mips/obj.go b/src/cmd/link/internal/mips/obj.go +index 231e1ff..631dd7a 100644 +--- a/src/cmd/link/internal/mips/obj.go ++++ b/src/cmd/link/internal/mips/obj.go +@@ -60,7 +60,7 @@ func Init() (*sys.Arch, ld.Arch) { + Gentext: gentext, + Machoreloc1: machoreloc1, + +- Linuxdynld: "/lib/ld.so.1", ++ Linuxdynld: "/lib/ld-musl-mipsle.so.1", + + Freebsddynld: "XXX", + Openbsddynld: "XXX", +diff --git a/src/cmd/link/internal/mips64/obj.go b/src/cmd/link/internal/mips64/obj.go +index 9604208..5ef3ffc 100644 +--- a/src/cmd/link/internal/mips64/obj.go ++++ b/src/cmd/link/internal/mips64/obj.go +@@ -59,7 +59,7 @@ func Init() (*sys.Arch, ld.Arch) { + Gentext: gentext, + Machoreloc1: machoreloc1, + +- Linuxdynld: "/lib64/ld64.so.1", ++ Linuxdynld: "/lib64/ld-musl-mips64le.so.1", + Freebsddynld: "XXX", + Openbsddynld: "XXX", + Netbsddynld: "XXX", +diff --git a/src/cmd/link/internal/ppc64/obj.go b/src/cmd/link/internal/ppc64/obj.go +index 51d1791..b15da85 100644 +--- a/src/cmd/link/internal/ppc64/obj.go ++++ b/src/cmd/link/internal/ppc64/obj.go +@@ -63,7 +63,7 @@ func Init() (*sys.Arch, ld.Arch) { + Xcoffreloc1: xcoffreloc1, + + // TODO(austin): ABI v1 uses /usr/lib/ld.so.1, +- Linuxdynld: "/lib64/ld64.so.1", ++ Linuxdynld: "/lib64/ld-musl-powerpc64le.so.1", + + Freebsddynld: "XXX", + Openbsddynld: "XXX", +diff --git a/src/cmd/link/internal/s390x/obj.go b/src/cmd/link/internal/s390x/obj.go +index 3454476..42cc346 100644 +--- a/src/cmd/link/internal/s390x/obj.go ++++ b/src/cmd/link/internal/s390x/obj.go +@@ -57,7 +57,7 @@ func Init() (*sys.Arch, ld.Arch) { + Gentext: gentext, + Machoreloc1: machoreloc1, + +- Linuxdynld: "/lib64/ld64.so.1", ++ Linuxdynld: "/lib64/ld-musl-s390x.so.1", + + // not relevant for s390x + Freebsddynld: "XXX", +diff --git a/src/cmd/link/internal/x86/obj.go b/src/cmd/link/internal/x86/obj.go +index f1fad20..d2ca10c 100644 +--- a/src/cmd/link/internal/x86/obj.go ++++ b/src/cmd/link/internal/x86/obj.go +@@ -58,7 +58,7 @@ func Init() (*sys.Arch, ld.Arch) { + Machoreloc1: machoreloc1, + PEreloc1: pereloc1, + +- Linuxdynld: "/lib/ld-linux.so.2", ++ Linuxdynld: "/lib/ld-musl-i386.so.1", + Freebsddynld: "/usr/libexec/ld-elf.so.1", + Openbsddynld: "/usr/libexec/ld.so", + Netbsddynld: "/usr/libexec/ld.elf_so", +-- +2.17.1 (Apple Git-112) + diff --git a/poky/meta/recipes-devtools/i2c-tools/i2c-tools_4.1.bb b/poky/meta/recipes-devtools/i2c-tools/i2c-tools_4.1.bb index dcbd05aed..c5761170a 100644 --- a/poky/meta/recipes-devtools/i2c-tools/i2c-tools_4.1.bb +++ b/poky/meta/recipes-devtools/i2c-tools/i2c-tools_4.1.bb @@ -31,6 +31,7 @@ FILES_${PN}-misc = "${sbindir}/i2c-stub-from-dump \ RDEPENDS_${PN}-misc = "${PN} perl perl-module-posix \ perl-module-constant perl-module-file-basename \ perl-module-fcntl perl-module-strict perl-module-vars \ + perl-module-carp \ " ALTERNATIVE_PRIORITY = "100" diff --git a/poky/meta/recipes-devtools/icecc-create-env/icecc-create-env_0.1.bb b/poky/meta/recipes-devtools/icecc-create-env/icecc-create-env_0.1.bb index 053945ebb..231c1c20e 100644 --- a/poky/meta/recipes-devtools/icecc-create-env/icecc-create-env_0.1.bb +++ b/poky/meta/recipes-devtools/icecc-create-env/icecc-create-env_0.1.bb @@ -34,3 +34,5 @@ do_install() { } BBCLASSEXTEND = "native nativesdk" + +RDEPENDS_${PN}_class-nativesdk = "patchelf" diff --git a/poky/meta/recipes-devtools/libedit/libedit/0001-readline.c-fix-cannot-get-history.patch b/poky/meta/recipes-devtools/libedit/libedit/0001-readline.c-fix-cannot-get-history.patch deleted file mode 100644 index 7e54ac97e..000000000 --- a/poky/meta/recipes-devtools/libedit/libedit/0001-readline.c-fix-cannot-get-history.patch +++ /dev/null @@ -1,34 +0,0 @@ -From ef1fa9bef497d9491a51017f3cad0135a23bb0b4 Mon Sep 17 00:00:00 2001 -From: Changqing Li <changqing.li@windriver.com> -Date: Tue, 20 Aug 2019 17:33:15 +0800 -Subject: [PATCH] readline.c: fix cannot get history - -if history_offset not increate when add history, -it will make current history event not align with offset, -and cannot get history correctly. - -Upstream-Status: Submitted [tech-userlevel@NetBSD.org] - -Signed-off-by: Changqing Li <changqing.li@windriver.com> ---- - src/readline.c | 3 +++ - 1 file changed, 3 insertions(+) - -diff --git a/src/readline.c b/src/readline.c -index 43ac5bd..54b0548 100644 ---- a/src/readline.c -+++ b/src/readline.c -@@ -1476,7 +1476,10 @@ add_history(const char *line) - if (ev.num == history_length) - history_base++; - else -+ { -+ history_offset++; - history_length = ev.num; -+ } - return 0; - } - --- -2.7.4 - diff --git a/poky/meta/recipes-devtools/libedit/libedit_20190324-3.1.bb b/poky/meta/recipes-devtools/libedit/libedit_20191025-3.1.bb index 25667ccce..f810013a6 100644 --- a/poky/meta/recipes-devtools/libedit/libedit_20190324-3.1.bb +++ b/poky/meta/recipes-devtools/libedit/libedit_20191025-3.1.bb @@ -12,9 +12,8 @@ inherit autotools SRC_URI = "http://www.thrysoee.dk/editline/${BP}.tar.gz \ file://stdc-predef.patch \ - file://0001-readline.c-fix-cannot-get-history.patch \ " -SRC_URI[md5sum] = "bec755c8044ad84b752dfe49a0b371d8" -SRC_URI[sha256sum] = "ac8f0f51c1cf65492e4d1e3ed2be360bda41e54633444666422fbf393bba1bae" +SRC_URI[md5sum] = "2d6568467080cfd75e715d045102b544" +SRC_URI[sha256sum] = "6dff036660d478bfaa14e407fc5de26d22da1087118c897b1a3ad2e90cb7bf39" BBCLASSEXTEND = "native nativesdk" diff --git a/poky/meta/recipes-devtools/libmodulemd/libmodulemd-v1/0001-Do-not-generate-gtkdoc-or-python-bindings.patch b/poky/meta/recipes-devtools/libmodulemd/libmodulemd-v1/0001-Do-not-generate-gtkdoc-or-python-bindings.patch deleted file mode 100644 index d950ad586..000000000 --- a/poky/meta/recipes-devtools/libmodulemd/libmodulemd-v1/0001-Do-not-generate-gtkdoc-or-python-bindings.patch +++ /dev/null @@ -1,60 +0,0 @@ -From 71c51206e037c0bb5759e01b307b7ce1d5934703 Mon Sep 17 00:00:00 2001 -From: Alexander Kanavin <alex.kanavin@gmail.com> -Date: Fri, 6 Sep 2019 17:07:00 +0200 -Subject: [PATCH] Do not generate gtkdoc or python bindings - -All of these really need a configuration option. - -Upstream-Status: Inappropriate [oe-core specific] -Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> ---- - meson.build | 12 ------------ - modulemd/meson.build | 8 -------- - 2 files changed, 20 deletions(-) - -diff --git a/meson.build b/meson.build -index 155c9e7..fe35d5e 100644 ---- a/meson.build -+++ b/meson.build -@@ -51,25 +51,13 @@ gnome = import('gnome') - pkg = import('pkgconfig') - gobject = dependency('gobject-2.0') - yaml = dependency('yaml-0.1') --gtkdoc = dependency('gtk-doc') - - glib_prefix = dependency('glib-2.0').get_pkgconfig_variable('prefix') --glib_docpath = join_paths(glib_prefix, 'share', 'gtk-doc', 'html') - - sh = find_program('sh') - sed = find_program('sed') - test = find_program('test') - --ret = run_command ([test, '-e', join_paths(glib_docpath, 'glib/index.html')]) --if ret.returncode() != 0 -- error('Missing documentation for GLib.') --endif -- --ret = run_command ([test, '-e', join_paths(glib_docpath, 'gobject/index.html')]) --if ret.returncode() != 0 -- error('Missing documentation for GObject.') --endif -- - python_name = get_option('python_name') - - if python_name != '' -diff --git a/modulemd/meson.build b/modulemd/meson.build -index 9a164b5..349c982 100644 ---- a/modulemd/meson.build -+++ b/modulemd/meson.build -@@ -523,11 +523,3 @@ configure_file( - configuration : xcdata - ) - --gnome.gtkdoc( -- 'modulemd-1.0', -- install_dir: 'modulemd-1.0', -- src_dir : './modulemd', -- main_xml : 'modulemd-docs.xml', -- install : true, --) -- diff --git a/poky/meta/recipes-devtools/libmodulemd/libmodulemd-v1_git.bb b/poky/meta/recipes-devtools/libmodulemd/libmodulemd-v1_git.bb index 9790470f4..5409051d7 100644 --- a/poky/meta/recipes-devtools/libmodulemd/libmodulemd-v1_git.bb +++ b/poky/meta/recipes-devtools/libmodulemd/libmodulemd-v1_git.bb @@ -4,18 +4,17 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=25a3927bff3ee4f5b21bcb0ed3fcd6bb" SRC_URI = "git://github.com/fedora-modularity/libmodulemd;protocol=https;branch=1.x-maint \ file://0001-spec_tmpl.sh-use-bin-sh-not-usr-bin-sh.patch \ - file://0001-Do-not-generate-gtkdoc-or-python-bindings.patch \ " -PV = "1.8.15" -SRCREV = "2d461725f781c6fdcf32893d8dcfa40bcef8dda5" +PV = "1.8.16" +SRCREV = "d0dcf7b373b3cf85cd39eb3bc23d31e06195a75a" UPSTREAM_CHECK_GITTAGREGEX = "libmodulemd-(?P<pver>1.*\d)" S = "${WORKDIR}/git" inherit meson gobject-introspection -EXTRA_OEMESON = "-Ddeveloper_build=false" +EXTRA_OEMESON = "-Ddeveloper_build=false -Dwith_docs=false" DEPENDS += "glib-2.0 libyaml glib-2.0-native python3" diff --git a/poky/meta/recipes-devtools/librepo/librepo_1.10.6.bb b/poky/meta/recipes-devtools/librepo/librepo_1.11.0.bb index cf4de22c4..30c8a5c55 100644 --- a/poky/meta/recipes-devtools/librepo/librepo_1.10.6.bb +++ b/poky/meta/recipes-devtools/librepo/librepo_1.11.0.bb @@ -8,7 +8,7 @@ SRC_URI = "git://github.com/rpm-software-management/librepo.git \ file://0004-Set-gpgme-variables-with-pkg-config-not-with-cmake-m.patch \ " -SRCREV = "2ec349f1c686c1704dc83da6c118035ff57c8dea" +SRCREV = "497f5eb2293662835bed6bdb0f43521788b2cebe" S = "${WORKDIR}/git" diff --git a/poky/meta/recipes-devtools/llvm/llvm/0006-llvm-TargetLibraryInfo-Undefine-libc-functions-if-th.patch b/poky/meta/recipes-devtools/llvm/llvm/0006-llvm-TargetLibraryInfo-Undefine-libc-functions-if-th.patch index d75c94e9e..d02b7ba6a 100644 --- a/poky/meta/recipes-devtools/llvm/llvm/0006-llvm-TargetLibraryInfo-Undefine-libc-functions-if-th.patch +++ b/poky/meta/recipes-devtools/llvm/llvm/0006-llvm-TargetLibraryInfo-Undefine-libc-functions-if-th.patch @@ -1,3 +1,6 @@ +Upstream-Status: Pending +Signed-off-by: Khem Raj <raj.khem@gmail.com> + From dbeecdb307be8b783b42cbc89dcb9c5e7f528989 Mon Sep 17 00:00:00 2001 From: Khem Raj <raj.khem@gmail.com> Date: Sat, 21 May 2016 00:33:20 +0000 diff --git a/poky/meta/recipes-devtools/llvm/llvm/0007-llvm-allow-env-override-of-exe-path.patch b/poky/meta/recipes-devtools/llvm/llvm/0007-llvm-allow-env-override-of-exe-path.patch index 58dce513c..b01b8647c 100644 --- a/poky/meta/recipes-devtools/llvm/llvm/0007-llvm-allow-env-override-of-exe-path.patch +++ b/poky/meta/recipes-devtools/llvm/llvm/0007-llvm-allow-env-override-of-exe-path.patch @@ -1,3 +1,6 @@ +Upstream-Status: Pending +Signed-off-by: Khem Raj <raj.khem@gmail.com> + From 61b00e1e051e367f5483d7b5253b6c85a9e8a90f Mon Sep 17 00:00:00 2001 From: Martin Kelly <mkelly@xevo.com> Date: Fri, 19 May 2017 00:22:57 -0700 diff --git a/poky/meta/recipes-devtools/makedevs/makedevs/makedevs.c b/poky/meta/recipes-devtools/makedevs/makedevs/makedevs.c index cba768141..32b987293 100644 --- a/poky/meta/recipes-devtools/makedevs/makedevs/makedevs.c +++ b/poky/meta/recipes-devtools/makedevs/makedevs/makedevs.c @@ -230,7 +230,7 @@ static void add_new_directory(char *name, char *path, unsigned long uid, unsigned long gid, unsigned long mode) { if (trace) - fprintf(stderr, "Directory: %s %s UID: %ld GID %ld MODE: %04lo", path, name, uid, gid, mode); + fprintf(stderr, "Directory: %s %s UID: %lu GID %lu MODE: %04lo", path, name, uid, gid, mode); if (mkdir(path, mode) < 0) { if (EEXIST == errno) { @@ -251,7 +251,7 @@ static void add_new_device(char *name, char *path, unsigned long uid, struct stat sb; if (trace) { - fprintf(stderr, "Device: %s %s UID: %ld GID: %ld MODE: %04lo MAJOR: %d MINOR: %d", + fprintf(stderr, "Device: %s %s UID: %lu GID: %lu MODE: %04lo MAJOR: %d MINOR: %d", path, name, uid, gid, mode, (short)(rdev >> 8), (short)(rdev & 0xff)); } @@ -292,7 +292,7 @@ static void add_new_file(char *name, char *path, unsigned long uid, unsigned long gid, unsigned long mode) { if (trace) { - fprintf(stderr, "File: %s %s UID: %ld GID: %ld MODE: %04lo\n", + fprintf(stderr, "File: %s %s UID: %lu GID: %lu MODE: %04lo\n", path, name, gid, uid, mode); } @@ -311,7 +311,7 @@ static void add_new_fifo(char *name, char *path, unsigned long uid, unsigned long gid, unsigned long mode) { if (trace) { - printf("Fifo: %s %s UID: %ld GID: %ld MODE: %04lo\n", + printf("Fifo: %s %s UID: %lu GID: %lu MODE: %04lo\n", path, name, gid, uid, mode); } @@ -360,7 +360,7 @@ static int interpret_table_entry(char *line) unsigned long mode = 0755, uid = 0, gid = 0, major = 0, minor = 0; unsigned long start = 0, increment = 1, count = 0; - if (0 > sscanf(line, "%4095s %c %lo %40s %40s %lu %lu %lu %lu %lu", path, + if (0 > sscanf(line, "%4095s %c %lo %39s %39s %lu %lu %lu %lu %lu", path, &type, &mode, usr_buf, grp_buf, &major, &minor, &start, &increment, &count)) { diff --git a/poky/meta/recipes-devtools/meson/meson.inc b/poky/meta/recipes-devtools/meson/meson.inc index ae0091c05..84bcc8409 100644 --- a/poky/meta/recipes-devtools/meson/meson.inc +++ b/poky/meta/recipes-devtools/meson/meson.inc @@ -16,6 +16,7 @@ SRC_URI = "https://github.com/mesonbuild/meson/releases/download/${PV}/meson-${P file://cross-prop-default.patch \ file://0001-mesonbuild-environment.py-check-environment-for-vari.patch \ file://0001-modules-python.py-do-not-substitute-python-s-install.patch \ + file://dbc9e971bd320f3df15c1ee74f54858e6792b183.patch \ " SRC_URI[sha256sum] = "d60f75f0dedcc4fd249dbc7519d6f3ce6df490033d276ef1cf27453ef4938d32" SRC_URI[md5sum] = "7ea7772414dda8ae11072244bf7ba991" diff --git a/poky/meta/recipes-devtools/meson/meson/dbc9e971bd320f3df15c1ee74f54858e6792b183.patch b/poky/meta/recipes-devtools/meson/meson/dbc9e971bd320f3df15c1ee74f54858e6792b183.patch new file mode 100644 index 000000000..7ea8a133e --- /dev/null +++ b/poky/meta/recipes-devtools/meson/meson/dbc9e971bd320f3df15c1ee74f54858e6792b183.patch @@ -0,0 +1,95 @@ +From dbc9e971bd320f3df15c1ee74f54858e6792b183 Mon Sep 17 00:00:00 2001 +From: Xavier Claessens <xavier.claessens@collabora.com> +Date: Fri, 11 Oct 2019 11:01:22 -0400 +Subject: [PATCH] Remove duplicated object files in static libraries + +When a static library link_whole to a bunch of other static libraries, +we have to extract all their objects recursively. But that could +introduce duplicated objects. ar is dumb enough to allow this without +error, but once the resulting static library is linked into an +executable or shared library, the linker will complain about duplicated +symbols. + +Upstream-Status: Backport +Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> + +--- + mesonbuild/backend/backends.py | 3 ++- + test cases/unit/69 static link/lib/func17.c | 4 ++++ + test cases/unit/69 static link/lib/func18.c | 6 ++++++ + test cases/unit/69 static link/lib/func19.c | 7 +++++++ + test cases/unit/69 static link/lib/meson.build | 12 ++++++++++++ + 5 files changed, 31 insertions(+), 1 deletion(-) + create mode 100644 test cases/unit/69 static link/lib/func17.c + create mode 100644 test cases/unit/69 static link/lib/func18.c + create mode 100644 test cases/unit/69 static link/lib/func19.c + +diff --git a/mesonbuild/backend/backends.py b/mesonbuild/backend/backends.py +index 947be1cbef..e54809657f 100644 +--- a/mesonbuild/backend/backends.py ++++ b/mesonbuild/backend/backends.py +@@ -281,7 +281,8 @@ def relpath(self, todir, fromdir): + os.path.join('dummyprefixdir', fromdir)) + + def flatten_object_list(self, target, proj_dir_to_build_root=''): +- return self._flatten_object_list(target, target.get_objects(), proj_dir_to_build_root) ++ obj_list = self._flatten_object_list(target, target.get_objects(), proj_dir_to_build_root) ++ return list(dict.fromkeys(obj_list)) + + def _flatten_object_list(self, target, objects, proj_dir_to_build_root): + obj_list = [] +diff --git a/test cases/unit/69 static link/lib/func17.c b/test cases/unit/69 static link/lib/func17.c +new file mode 100644 +index 0000000000..d1d8ec498c +--- /dev/null ++++ b/test cases/unit/69 static link/lib/func17.c +@@ -0,0 +1,4 @@ ++int func17() ++{ ++ return 1; ++} +diff --git a/test cases/unit/69 static link/lib/func18.c b/test cases/unit/69 static link/lib/func18.c +new file mode 100644 +index 0000000000..c149085ba4 +--- /dev/null ++++ b/test cases/unit/69 static link/lib/func18.c +@@ -0,0 +1,6 @@ ++int func17(); ++ ++int func18() ++{ ++ return func17() + 1; ++} +diff --git a/test cases/unit/69 static link/lib/func19.c b/test cases/unit/69 static link/lib/func19.c +new file mode 100644 +index 0000000000..69120e4bf8 +--- /dev/null ++++ b/test cases/unit/69 static link/lib/func19.c +@@ -0,0 +1,7 @@ ++int func17(); ++int func18(); ++ ++int func19() ++{ ++ return func17() + func18(); ++} +diff --git a/test cases/unit/69 static link/lib/meson.build b/test cases/unit/69 static link/lib/meson.build +index 5f04aab6a1..8f95fc4546 100644 +--- a/test cases/unit/69 static link/lib/meson.build ++++ b/test cases/unit/69 static link/lib/meson.build +@@ -66,3 +66,15 @@ libfunc15 = static_library('func15', 'func15.c', + libfunc16 = static_library('func16', 'func16.c', + link_with : libfunc15, + install : true) ++ ++# Verify func17.c.o gets included only once into libfunc19, otherwise ++# func19-shared would failed with duplicated symbol. ++libfunc17 = static_library('func17', 'func17.c', ++ install : false) ++libfunc18 = static_library('func18', 'func18.c', ++ link_with : libfunc17, ++ install : false) ++libfunc19 = static_library('func19', 'func19.c', ++ link_whole : [libfunc17, libfunc18], ++ install : false) ++shared_library('func19-shared', link_whole : [libfunc19]) diff --git a/poky/meta/recipes-devtools/mtools/mtools_4.0.23.bb b/poky/meta/recipes-devtools/mtools/mtools_4.0.23.bb index 2ae69797a..2093d80db 100644 --- a/poky/meta/recipes-devtools/mtools/mtools_4.0.23.bb +++ b/poky/meta/recipes-devtools/mtools/mtools_4.0.23.bb @@ -35,7 +35,7 @@ SRC_URI = "${GNU_MIRROR}/mtools/mtools-${PV}.tar.bz2 \ SRC_URI_append_class-native = " file://disable-hardcoded-configs.patch" -inherit autotools texinfo distro_features_check +inherit autotools texinfo features_check EXTRA_OECONF = "--without-x" diff --git a/poky/meta/recipes-devtools/opkg-utils/opkg-utils/pipefail.patch b/poky/meta/recipes-devtools/opkg-utils/opkg-utils/pipefail.patch new file mode 100644 index 000000000..55ddcc1fd --- /dev/null +++ b/poky/meta/recipes-devtools/opkg-utils/opkg-utils/pipefail.patch @@ -0,0 +1,31 @@ +We need opkg-build to fail if for example the tar command is passed invalid +options. Without this, we see silently created empty packaged where data.tar +is zero bytes in size. This creates hard to debug problems. + +An example is when reproducible builds are enabled and run on old hosts like +centos7 which has tar < 1.28: + +Subprocess output:tar: unrecognized option '--clamp-mtime' +Try `tar --help' or `tar --usage' for more information. + +Upstream-Status: Pending +Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> + +Index: opkg-utils-0.4.1/opkg-build +=================================================================== +--- opkg-utils-0.4.1.orig/opkg-build ++++ opkg-utils-0.4.1/opkg-build +@@ -1,4 +1,4 @@ +-#!/bin/sh ++#!/bin/bash + + : <<=cut + =head1 NAME +@@ -12,6 +12,7 @@ opkg-build - construct an .opk from a di + # Updated to work on Familiar Pre0.7rc1, with busybox tar. + # Note it Requires: binutils-ar (since the busybox ar can't create) + set -e ++set -o pipefail + + version=1.0 + diff --git a/poky/meta/recipes-devtools/opkg-utils/opkg-utils_0.4.1.bb b/poky/meta/recipes-devtools/opkg-utils/opkg-utils_0.4.1.bb index cf1e4670c..eb6c7a3a6 100644 --- a/poky/meta/recipes-devtools/opkg-utils/opkg-utils_0.4.1.bb +++ b/poky/meta/recipes-devtools/opkg-utils/opkg-utils_0.4.1.bb @@ -10,6 +10,7 @@ PROVIDES += "${@bb.utils.contains('PACKAGECONFIG', 'update-alternatives', 'virtu SRC_URI = "http://git.yoctoproject.org/cgit/cgit.cgi/${BPN}/snapshot/${BPN}-${PV}.tar.gz \ file://0001-Switch-all-scripts-to-use-Python-3.x.patch \ file://0001-opkg-build-clamp-mtimes-to-SOURCE_DATE_EPOCH.patch \ + file://pipefail.patch \ " UPSTREAM_CHECK_URI = "http://git.yoctoproject.org/cgit/cgit.cgi/opkg-utils/refs/" @@ -19,6 +20,8 @@ SRC_URI[sha256sum] = "9ea9efdd9fe13661ad251e3a2860c1c93045adcfaa6659c3e86d9748ec TARGET_CC_ARCH += "${LDFLAGS}" +RDEPENDS_${PN} += "bash" + # For native builds we use the host Python PYTHONRDEPS = "python3 python3-shell python3-io python3-math python3-crypt python3-logging python3-fcntl python3-pickle python3-compression python3-stringold" PYTHONRDEPS_class-native = "" diff --git a/poky/meta/recipes-devtools/opkg/opkg/open_inner.patch b/poky/meta/recipes-devtools/opkg/opkg/open_inner.patch new file mode 100644 index 000000000..278e099e3 --- /dev/null +++ b/poky/meta/recipes-devtools/opkg/opkg/open_inner.patch @@ -0,0 +1,46 @@ +From alejandro.delcastillo@ni.com Wed Nov 20 22:35:02 2019 +From: Alejandro del Castillo <alejandro.delcastillo@ni.com> +To: <opkg-devel@googlegroups.com>, <richard.purdie@linuxfoundation.org> +CC: Alejandro del Castillo <alejandro.delcastillo@ni.com> +Subject: [opkg][PATCH 2/2] open_inner: add support for empty payloads +Date: Wed, 20 Nov 2019 16:34:48 -0600 +Message-ID: <20191120223448.26522-3-alejandro.delcastillo@ni.com> +X-Mailer: git-send-email 2.22.0 +In-Reply-To: <20191120223448.26522-1-alejandro.delcastillo@ni.com> +References: <20191120223448.26522-1-alejandro.delcastillo@ni.com> +MIME-Version: 1.0 +Content-Type: text/plain +Content-Transfer-Encoding: 8bit + +Support for empty compressed payloads need to be explicitly enabled on
+libarchive.
+
+Signed-off-by: Alejandro del Castillo <alejandro.delcastillo@ni.com>
+ +Upstream-Status: Backport +---
+ libopkg/opkg_archive.c | 7 +++++++
+ 1 file changed, 7 insertions(+)
+
+diff --git a/libopkg/opkg_archive.c b/libopkg/opkg_archive.c
+index 0e9ccea..f19cece 100644
+--- a/libopkg/opkg_archive.c
++++ b/libopkg/opkg_archive.c
+@@ -618,6 +618,13 @@ static struct archive *open_inner(struct archive *outer)
+ goto err_cleanup;
+ }
+
++ r = archive_read_support_format_empty(inner);
++ if (r != ARCHIVE_OK) {
++ opkg_msg(ERROR, "Empty format not supported: %s\n",
++ archive_error_string(inner));
++ goto err_cleanup;
++ }
++
+ r = archive_read_open(inner, data, NULL, inner_read, inner_close);
+ if (r != ARCHIVE_OK) {
+ opkg_msg(ERROR, "Failed to open inner archive: %s\n",
+--
+2.22.0
+
+ diff --git a/poky/meta/recipes-devtools/opkg/opkg/opkg_archive.patch b/poky/meta/recipes-devtools/opkg/opkg/opkg_archive.patch new file mode 100644 index 000000000..3e1ebae95 --- /dev/null +++ b/poky/meta/recipes-devtools/opkg/opkg/opkg_archive.patch @@ -0,0 +1,54 @@ +From alejandro.delcastillo@ni.com Wed Nov 20 22:35:01 2019 +Return-Path: <richard.purdie+caf_=rpurdie=rpsys.net@linuxfoundation.org> +From: Alejandro del Castillo <alejandro.delcastillo@ni.com> +To: <opkg-devel@googlegroups.com>, <richard.purdie@linuxfoundation.org> +CC: Alejandro del Castillo <alejandro.delcastillo@ni.com> +Subject: [opkg][PATCH 1/2] opkg_archive.c: avoid double free on uncompress + error +Date: Wed, 20 Nov 2019 16:34:47 -0600 +Message-ID: <20191120223448.26522-2-alejandro.delcastillo@ni.com> +X-Mailer: git-send-email 2.22.0 +In-Reply-To: <20191120223448.26522-1-alejandro.delcastillo@ni.com> +References: <20191120223448.26522-1-alejandro.delcastillo@ni.com> +MIME-Version: 1.0 +Content-Type: text/plain +Content-Transfer-Encoding: 8bit + +The open-inner function calls archive_read_open. On error,
+archive_read_open calls inner_close, which also closes the outter
+archive. On error, return NULL directly to avoid double free.
+
+ +Upstream-Status: Backport + +Signed-off-by: Alejandro del Castillo <alejandro.delcastillo@ni.com>
+---
+ libopkg/opkg_archive.c | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/libopkg/opkg_archive.c b/libopkg/opkg_archive.c
+index 3d87db1..0e9ccea 100644
+--- a/libopkg/opkg_archive.c
++++ b/libopkg/opkg_archive.c
+@@ -622,7 +622,7 @@ static struct archive *open_inner(struct archive *outer)
+ if (r != ARCHIVE_OK) {
+ opkg_msg(ERROR, "Failed to open inner archive: %s\n",
+ archive_error_string(inner));
+- goto err_cleanup;
++ return NULL;
+ }
+
+ return inner;
+@@ -683,7 +683,7 @@ static struct archive *extract_outer(const char *filename, const char *arname)
+
+ inner = open_inner(outer);
+ if (!inner)
+- goto err_cleanup;
++ return NULL;
+
+ return inner;
+
+--
+2.22.0
+
+ diff --git a/poky/meta/recipes-devtools/opkg/opkg_0.4.1.bb b/poky/meta/recipes-devtools/opkg/opkg_0.4.1.bb index 104f07fda..f0ae8b36b 100644 --- a/poky/meta/recipes-devtools/opkg/opkg_0.4.1.bb +++ b/poky/meta/recipes-devtools/opkg/opkg_0.4.1.bb @@ -14,6 +14,8 @@ PE = "1" SRC_URI = "http://downloads.yoctoproject.org/releases/${BPN}/${BPN}-${PV}.tar.gz \ file://opkg.conf \ file://0001-opkg_conf-create-opkg.lock-in-run-instead-of-var-run.patch \ + file://opkg_archive.patch \ + file://open_inner.patch \ file://run-ptest \ " @@ -32,7 +34,10 @@ OPKGLIBDIR ??= "${target_localstatedir}/lib" PACKAGECONFIG ??= "libsolv" -PACKAGECONFIG[gpg] = "--enable-gpg,--disable-gpg,gpgme libgpg-error,gnupg" +PACKAGECONFIG[gpg] = "--enable-gpg,--disable-gpg,\ + gnupg gpgme libgpg-error,\ + ${@ "gnupg" if ("native" in d.getVar("PN")) else "gnupg-gpg"}\ + " PACKAGECONFIG[curl] = "--enable-curl,--disable-curl,curl" PACKAGECONFIG[ssl-curl] = "--enable-ssl-curl,--disable-ssl-curl,curl openssl" PACKAGECONFIG[openssl] = "--enable-openssl,--disable-openssl,openssl" diff --git a/poky/meta/recipes-devtools/patch/patch/0001-Invoke-ed-directly-instead-of-using-the-shell.patch b/poky/meta/recipes-devtools/patch/patch/0001-Invoke-ed-directly-instead-of-using-the-shell.patch index f60dfe879..d13d419f5 100644 --- a/poky/meta/recipes-devtools/patch/patch/0001-Invoke-ed-directly-instead-of-using-the-shell.patch +++ b/poky/meta/recipes-devtools/patch/patch/0001-Invoke-ed-directly-instead-of-using-the-shell.patch @@ -6,8 +6,8 @@ Subject: [PATCH] Invoke ed directly instead of using the shell * src/pch.c (do_ed_script): Invoke ed directly instead of using a shell command to avoid quoting vulnerabilities. -CVE: CVE-2019-13638 -Upstream-Status: Backport[https://git.savannah.gnu.org/cgit/patch.git/patch/?id=3fcd042d26d70856e826a42b5f93dc4854d80bf0] +CVE: CVE-2019-13638 CVE-2018-20969 +Upstream-Status: Backport [https://git.savannah.gnu.org/cgit/patch.git/patch/?id=3fcd042d26d70856e826a42b5f93dc4854d80bf0] Signed-off-by: Trevor Gamblin <trevor.gamblin@windriver.com> --- diff --git a/poky/meta/recipes-devtools/pseudo/files/0001-Add-statx.patch b/poky/meta/recipes-devtools/pseudo/files/0001-Add-statx.patch new file mode 100644 index 000000000..f01e699de --- /dev/null +++ b/poky/meta/recipes-devtools/pseudo/files/0001-Add-statx.patch @@ -0,0 +1,106 @@ +From 4e41a05de1f34ba00a68ca4f20fb49c4d1cbd2d0 Mon Sep 17 00:00:00 2001 +From: Richard Purdie <richard.purdie@linuxfoundation.org> +Date: Wed, 6 Nov 2019 12:17:46 +0000 +Subject: [PATCH] Add statx glibc/syscall support + +Modern distros (e.g. fedora30) are starting to use the new statx() syscall through +the newly exposed glibc wrapper function in software like coreutils (e.g. the ls +command). Add support to intercept this to pseudo. + +Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> +Upstream-Status: Submitted [Emailed to seebs] +--- + ports/linux/guts/statx.c | 48 ++++++++++++++++++++++++++++++++++++++++ + ports/linux/portdefs.h | 1 + + ports/linux/wrapfuncs.in | 1 + + 3 files changed, 50 insertions(+) + create mode 100644 ports/linux/guts/statx.c + +diff --git a/ports/linux/statx/guts/statx.c b/ports/linux/statx/guts/statx.c +new file mode 100644 +index 0000000..a3259c4 +--- /dev/null ++++ b/ports/linux/statx/guts/statx.c +@@ -0,0 +1,42 @@ ++/* ++ * Copyright (c) 2019 Linux Foundation ++ * Author: Richard Purdie ++ * ++ * SPDX-License-Identifier: LGPL-2.1-only ++ * ++ * int ++ * statx(int dirfd, const char *pathname, int flags, unsigned int mask, struct statx *statxbuf) { ++ * int rc = -1; ++ */ ++ pseudo_msg_t *msg; ++ PSEUDO_STATBUF buf; ++ int save_errno; ++ ++ rc = real_statx(dirfd, pathname, flags, mask, statxbuf); ++ save_errno = errno; ++ if (rc == -1) { ++ return rc; ++ } ++ ++ buf.st_uid = statxbuf->stx_uid; ++ buf.st_gid = statxbuf->stx_gid; ++ buf.st_dev = makedev(statxbuf->stx_dev_major, statxbuf->stx_dev_minor); ++ buf.st_ino = statxbuf->stx_ino; ++ buf.st_mode = statxbuf->stx_mode; ++ buf.st_rdev = makedev(statxbuf->stx_rdev_major, statxbuf->stx_rdev_minor); ++ buf.st_nlink = statxbuf->stx_nlink; ++ msg = pseudo_client_op(OP_STAT, 0, -1, dirfd, pathname, &buf); ++ if (msg && msg->result == RESULT_SUCCEED) { ++ pseudo_debug(PDBGF_FILE, "statx(path %s), flags %o, stat rc %d, stat uid %o\n", pathname, flags, rc, statxbuf->stx_uid); ++ statxbuf->stx_uid = msg->uid; ++ statxbuf->stx_gid = msg->gid; ++ statxbuf->stx_mode = msg->mode; ++ statxbuf->stx_rdev_major = major(msg->rdev); ++ statxbuf->stx_rdev_minor = minor(msg->rdev); ++ } else { ++ pseudo_debug(PDBGF_FILE, "statx(path %s) failed, flags %o, stat rc %d, stat uid %o\n", pathname, flags, rc, statxbuf->stx_uid); ++ } ++ errno = save_errno; ++/* return rc; ++ * } ++ */ +diff --git a/ports/linux/statx/portdefs.h b/ports/linux/statx/portdefs.h +new file mode 100644 +index 0000000..bf934dc +--- /dev/null ++++ b/ports/linux/statx/portdefs.h +@@ -0,0 +1,6 @@ ++/* ++ * SPDX-License-Identifier: LGPL-2.1-only ++ * ++ */ ++#include <sys/stat.h> ++#include <sys/sysmacros.h> +diff --git a/ports/linux/statx/wrapfuncs.in b/ports/linux/statx/wrapfuncs.in +new file mode 100644 +index 0000000..c9cd4c3 +--- /dev/null ++++ b/ports/linux/statx/wrapfuncs.in +@@ -0,0 +1 @@ ++int statx(int dirfd, const char *pathname, int flags, unsigned int mask, struct statx *statxbuf); +diff --git a/ports/linux/subports b/ports/linux/subports +index a29044a..49081bf 100755 +--- a/ports/linux/subports ++++ b/ports/linux/subports +@@ -54,3 +54,13 @@ else + fi + rm -f dummy.c dummy.o + ++cat > dummy.c <<EOF ++#define _GNU_SOURCE ++#include <sys/stat.h> ++struct statx x; ++EOF ++if ${CC} -c -o dummy.o dummy.c >/dev/null 2>&1; then ++ echo "linux/statx" ++fi ++rm -f dummy.c dummy.o ++ +-- +2.17.1 + diff --git a/poky/meta/recipes-devtools/pseudo/pseudo.inc b/poky/meta/recipes-devtools/pseudo/pseudo.inc index 8b3490972..7ff8e449e 100644 --- a/poky/meta/recipes-devtools/pseudo/pseudo.inc +++ b/poky/meta/recipes-devtools/pseudo/pseudo.inc @@ -30,23 +30,10 @@ PSEUDO_EXTRA_OPTS ?= "--enable-force-async --without-passwd-fallback --enable-ep # Compile for the local machine arch... do_compile () { - SQLITE_LDADD='$(SQLITE)/$(SQLITE_LIB)/libsqlite3.a' - for sqlite_link_opt in $(pkg-config sqlite3 --libs --static) - do - case "$sqlite_link_opt" in - -lsqlite3) - ;; - -l*) - SQLITE_LDADD="${SQLITE_LDADD} ${sqlite_link_opt}" - ;; - *) - ;; - esac - done if [ "${SITEINFO_BITS}" = "64" ]; then - ${S}/configure ${PSEUDO_EXTRA_OPTS} --prefix=${prefix} --libdir=${prefix}/lib/pseudo/lib${SITEINFO_BITS} --with-sqlite-lib=${baselib} --with-sqlite=${STAGING_DIR_TARGET}${exec_prefix} --cflags="${CFLAGS}" --bits=${SITEINFO_BITS} --with-static-sqlite="$SQLITE_LDADD" --without-rpath + ${S}/configure ${PSEUDO_EXTRA_OPTS} --prefix=${prefix} --libdir=${prefix}/lib/pseudo/lib${SITEINFO_BITS} --with-sqlite-lib=${baselib} --with-sqlite=${STAGING_DIR_TARGET}${exec_prefix} --cflags="${CFLAGS}" --bits=${SITEINFO_BITS} --without-rpath else - ${S}/configure ${PSEUDO_EXTRA_OPTS} --prefix=${prefix} --libdir=${prefix}/lib/pseudo/lib --with-sqlite-lib=${baselib} --with-sqlite=${STAGING_DIR_TARGET}${exec_prefix} --cflags="${CFLAGS}" --bits=${SITEINFO_BITS} --with-static-sqlite="$SQLITE_LDADD" --without-rpath + ${S}/configure ${PSEUDO_EXTRA_OPTS} --prefix=${prefix} --libdir=${prefix}/lib/pseudo/lib --with-sqlite-lib=${baselib} --with-sqlite=${STAGING_DIR_TARGET}${exec_prefix} --cflags="${CFLAGS}" --bits=${SITEINFO_BITS} --without-rpath fi oe_runmake ${MAKEOPTS} } diff --git a/poky/meta/recipes-devtools/pseudo/pseudo_git.bb b/poky/meta/recipes-devtools/pseudo/pseudo_git.bb index 78500e1cc..1f2df4a42 100644 --- a/poky/meta/recipes-devtools/pseudo/pseudo_git.bb +++ b/poky/meta/recipes-devtools/pseudo/pseudo_git.bb @@ -7,6 +7,7 @@ SRC_URI = "git://git.yoctoproject.org/pseudo \ file://moreretries.patch \ file://toomanyfiles.patch \ file://0001-maketables-wrappers-use-Python-3.patch \ + file://0001-Add-statx.patch \ " SRCREV = "060058bb29f70b244e685b3c704eb0641b736f73" diff --git a/poky/meta/recipes-devtools/python-numpy/files/aarch64/_numpyconfig.h b/poky/meta/recipes-devtools/python-numpy/files/aarch64/_numpyconfig.h deleted file mode 100644 index 109deb043..000000000 --- a/poky/meta/recipes-devtools/python-numpy/files/aarch64/_numpyconfig.h +++ /dev/null @@ -1,32 +0,0 @@ -#define NPY_HAVE_ENDIAN_H 1 -#define NPY_SIZEOF_SHORT SIZEOF_SHORT -#define NPY_SIZEOF_INT SIZEOF_INT -#define NPY_SIZEOF_LONG SIZEOF_LONG -#define NPY_SIZEOF_FLOAT 4 -#define NPY_SIZEOF_COMPLEX_FLOAT 8 -#define NPY_SIZEOF_DOUBLE 8 -#define NPY_SIZEOF_COMPLEX_DOUBLE 16 -#define NPY_SIZEOF_LONGDOUBLE 16 -#define NPY_SIZEOF_COMPLEX_LONGDOUBLE 32 -#define NPY_SIZEOF_PY_INTPTR_T 8 -#define NPY_SIZEOF_PY_LONG_LONG 8 -#define NPY_SIZEOF_LONGLONG 8 -#define NPY_SIZEOF_OFF_T 8 -#define NPY_NO_SMP 0 -#define NPY_HAVE_DECL_ISNAN -#define NPY_HAVE_DECL_ISINF -#define NPY_HAVE_DECL_ISFINITE -#define NPY_HAVE_DECL_SIGNBIT -#define NPY_USE_C99_COMPLEX 1 -#define NPY_HAVE_COMPLEX_DOUBLE 1 -#define NPY_HAVE_COMPLEX_FLOAT 1 -#define NPY_HAVE_COMPLEX_LONG_DOUBLE 1 -#define NPY_ENABLE_SEPARATE_COMPILATION 1 -#define NPY_USE_C99_FORMATS 1 -#define NPY_VISIBILITY_HIDDEN __attribute__((visibility("hidden"))) -#define NPY_ABI_VERSION 0x01000009 -#define NPY_API_VERSION 0x0000000A - -#ifndef __STDC_FORMAT_MACROS -#define __STDC_FORMAT_MACROS 1 -#endif diff --git a/poky/meta/recipes-devtools/python-numpy/files/aarch64/config.h b/poky/meta/recipes-devtools/python-numpy/files/aarch64/config.h deleted file mode 100644 index c30b868f2..000000000 --- a/poky/meta/recipes-devtools/python-numpy/files/aarch64/config.h +++ /dev/null @@ -1,139 +0,0 @@ -#define HAVE_ENDIAN_H 1 -#define SIZEOF_PY_INTPTR_T 8 -#define SIZEOF_PY_LONG_LONG 8 -#define MATHLIB m -#define HAVE_SIN 1 -#define HAVE_COS 1 -#define HAVE_TAN 1 -#define HAVE_SINH 1 -#define HAVE_COSH 1 -#define HAVE_TANH 1 -#define HAVE_FABS 1 -#define HAVE_FLOOR 1 -#define HAVE_CEIL 1 -#define HAVE_SQRT 1 -#define HAVE_LOG10 1 -#define HAVE_LOG 1 -#define HAVE_EXP 1 -#define HAVE_ASIN 1 -#define HAVE_ACOS 1 -#define HAVE_ATAN 1 -#define HAVE_FMOD 1 -#define HAVE_MODF 1 -#define HAVE_FREXP 1 -#define HAVE_LDEXP 1 -#define HAVE_RINT 1 -#define HAVE_TRUNC 1 -#define HAVE_EXP2 1 -#define HAVE_LOG2 1 -#define HAVE_ATAN2 1 -#define HAVE_POW 1 -#define HAVE_NEXTAFTER 1 -#define HAVE_SINF 1 -#define HAVE_COSF 1 -#define HAVE_TANF 1 -#define HAVE_SINHF 1 -#define HAVE_COSHF 1 -#define HAVE_TANHF 1 -#define HAVE_FABSF 1 -#define HAVE_FLOORF 1 -#define HAVE_CEILF 1 -#define HAVE_RINTF 1 -#define HAVE_TRUNCF 1 -#define HAVE_SQRTF 1 -#define HAVE_LOG10F 1 -#define HAVE_LOGF 1 -#define HAVE_LOG1PF 1 -#define HAVE_EXPF 1 -#define HAVE_EXPM1F 1 -#define HAVE_ASINF 1 -#define HAVE_ACOSF 1 -#define HAVE_ATANF 1 -#define HAVE_ASINHF 1 -#define HAVE_ACOSHF 1 -#define HAVE_ATANHF 1 -#define HAVE_HYPOTF 1 -#define HAVE_ATAN2F 1 -#define HAVE_POWF 1 -#define HAVE_FMODF 1 -#define HAVE_MODFF 1 -#define HAVE_FREXPF 1 -#define HAVE_LDEXPF 1 -#define HAVE_EXP2F 1 -#define HAVE_LOG2F 1 -#define HAVE_COPYSIGNF 1 -#define HAVE_NEXTAFTERF 1 -#define HAVE_SINL 1 -#define HAVE_COSL 1 -#define HAVE_TANL 1 -#define HAVE_SINHL 1 -#define HAVE_COSHL 1 -#define HAVE_TANHL 1 -#define HAVE_FABSL 1 -#define HAVE_FLOORL 1 -#define HAVE_CEILL 1 -#define HAVE_RINTL 1 -#define HAVE_TRUNCL 1 -#define HAVE_SQRTL 1 -#define HAVE_LOG10L 1 -#define HAVE_LOGL 1 -#define HAVE_LOG1PL 1 -#define HAVE_EXPL 1 -#define HAVE_EXPM1L 1 -#define HAVE_ASINL 1 -#define HAVE_ACOSL 1 -#define HAVE_ATANL 1 -#define HAVE_ASINHL 1 -#define HAVE_ACOSHL 1 -#define HAVE_ATANHL 1 -#define HAVE_HYPOTL 1 -#define HAVE_ATAN2L 1 -#define HAVE_POWL 1 -#define HAVE_FMODL 1 -#define HAVE_MODFL 1 -#define HAVE_FREXPL 1 -#define HAVE_LDEXPL 1 -#define HAVE_EXP2L 1 -#define HAVE_LOG2L 1 -#define HAVE_COPYSIGNL 1 -#define HAVE_NEXTAFTERL 1 -#define HAVE_DECL_SIGNBIT -#define HAVE_COMPLEX_H 1 -#define HAVE_CREAL 1 -#define HAVE_CIMAG 1 -#define HAVE_CABS 1 -#define HAVE_CARG 1 -#define HAVE_CEXP 1 -#define HAVE_CSQRT 1 -#define HAVE_CLOG 1 -#define HAVE_CCOS 1 -#define HAVE_CSIN 1 -#define HAVE_CPOW 1 -#define HAVE_CREALF 1 -#define HAVE_CIMAGF 1 -#define HAVE_CABSF 1 -#define HAVE_CARGF 1 -#define HAVE_CEXPF 1 -#define HAVE_CSQRTF 1 -#define HAVE_CLOGF 1 -#define HAVE_CCOSF 1 -#define HAVE_CSINF 1 -#define HAVE_CPOWF 1 -#define HAVE_CREALL 1 -#define HAVE_CIMAGL 1 -#define HAVE_CABSL 1 -#define HAVE_CARGL 1 -#define HAVE_CEXPL 1 -#define HAVE_CSQRTL 1 -#define HAVE_CLOGL 1 -#define HAVE_CCOSL 1 -#define HAVE_CSINL 1 -#define HAVE_CPOWL 1 -#define HAVE_LDOUBLE_IEEE_QUAD_LE 1 -#ifndef __cplusplus -/* #undef inline */ -#endif - -#ifndef _NPY_NPY_CONFIG_H_ -#error config.h should never be included directly, include npy_config.h instead -#endif diff --git a/poky/meta/recipes-devtools/python-numpy/files/arm/config.h b/poky/meta/recipes-devtools/python-numpy/files/arm/config.h deleted file mode 100644 index 17ef186d5..000000000 --- a/poky/meta/recipes-devtools/python-numpy/files/arm/config.h +++ /dev/null @@ -1,21 +0,0 @@ -/* ./src.linux-i686-2.5/numpy/core/include/numpy/config.h */ -/* #define SIZEOF_SHORT 2 */ -/* #define SIZEOF_INT 4 */ -/* #define SIZEOF_LONG 4 */ -/* #define SIZEOF_FLOAT 4 */ -/* #define SIZEOF_DOUBLE 8 */ -#define SIZEOF_LONG_DOUBLE 12 -#define SIZEOF_PY_INTPTR_T 4 -/* #define SIZEOF_LONG_LONG 8 */ -#define SIZEOF_PY_LONG_LONG 8 -/* #define CHAR_BIT 8 */ -#define MATHLIB m -#define HAVE_FLOAT_FUNCS -#define HAVE_LOG1P -#define HAVE_EXPM1 -#define HAVE_INVERSE_HYPERBOLIC -#define HAVE_INVERSE_HYPERBOLIC_FLOAT -#define HAVE_ISNAN -#define HAVE_ISINF -#define HAVE_RINT - diff --git a/poky/meta/recipes-devtools/python-numpy/files/arm/numpyconfig.h b/poky/meta/recipes-devtools/python-numpy/files/arm/numpyconfig.h deleted file mode 100644 index c4bf6547f..000000000 --- a/poky/meta/recipes-devtools/python-numpy/files/arm/numpyconfig.h +++ /dev/null @@ -1,17 +0,0 @@ -/* cat ./src.linux-i686-2.5/numpy/core/include/numpy/numpyconfig.h */ -/* - * * This file is generated by numpy/core/setup.pyc. DO NOT EDIT - * */ -#define NPY_SIZEOF_SHORT 2 -#define NPY_SIZEOF_INT 4 -#define NPY_SIZEOF_LONG 4 -#define NPY_SIZEOF_FLOAT 4 -#define NPY_SIZEOF_DOUBLE 8 -#define NPY_SIZEOF_LONGDOUBLE 12 -#define NPY_SIZEOF_PY_INTPTR_T 4 -#define NPY_NO_SMP 0 - -#define NPY_SIZEOF_LONGLONG 8 -#define NPY_SIZEOF_PY_LONG_LONG 8 -/* #define CHAR_BIT 8 */ - diff --git a/poky/meta/recipes-devtools/python-numpy/files/armeb/config.h b/poky/meta/recipes-devtools/python-numpy/files/armeb/config.h deleted file mode 100644 index 17ef186d5..000000000 --- a/poky/meta/recipes-devtools/python-numpy/files/armeb/config.h +++ /dev/null @@ -1,21 +0,0 @@ -/* ./src.linux-i686-2.5/numpy/core/include/numpy/config.h */ -/* #define SIZEOF_SHORT 2 */ -/* #define SIZEOF_INT 4 */ -/* #define SIZEOF_LONG 4 */ -/* #define SIZEOF_FLOAT 4 */ -/* #define SIZEOF_DOUBLE 8 */ -#define SIZEOF_LONG_DOUBLE 12 -#define SIZEOF_PY_INTPTR_T 4 -/* #define SIZEOF_LONG_LONG 8 */ -#define SIZEOF_PY_LONG_LONG 8 -/* #define CHAR_BIT 8 */ -#define MATHLIB m -#define HAVE_FLOAT_FUNCS -#define HAVE_LOG1P -#define HAVE_EXPM1 -#define HAVE_INVERSE_HYPERBOLIC -#define HAVE_INVERSE_HYPERBOLIC_FLOAT -#define HAVE_ISNAN -#define HAVE_ISINF -#define HAVE_RINT - diff --git a/poky/meta/recipes-devtools/python-numpy/files/armeb/numpyconfig.h b/poky/meta/recipes-devtools/python-numpy/files/armeb/numpyconfig.h deleted file mode 100644 index c4bf6547f..000000000 --- a/poky/meta/recipes-devtools/python-numpy/files/armeb/numpyconfig.h +++ /dev/null @@ -1,17 +0,0 @@ -/* cat ./src.linux-i686-2.5/numpy/core/include/numpy/numpyconfig.h */ -/* - * * This file is generated by numpy/core/setup.pyc. DO NOT EDIT - * */ -#define NPY_SIZEOF_SHORT 2 -#define NPY_SIZEOF_INT 4 -#define NPY_SIZEOF_LONG 4 -#define NPY_SIZEOF_FLOAT 4 -#define NPY_SIZEOF_DOUBLE 8 -#define NPY_SIZEOF_LONGDOUBLE 12 -#define NPY_SIZEOF_PY_INTPTR_T 4 -#define NPY_NO_SMP 0 - -#define NPY_SIZEOF_LONGLONG 8 -#define NPY_SIZEOF_PY_LONG_LONG 8 -/* #define CHAR_BIT 8 */ - diff --git a/poky/meta/recipes-devtools/python-numpy/files/mipsarchn32eb/_numpyconfig.h b/poky/meta/recipes-devtools/python-numpy/files/mipsarchn32eb/_numpyconfig.h deleted file mode 100644 index debb39009..000000000 --- a/poky/meta/recipes-devtools/python-numpy/files/mipsarchn32eb/_numpyconfig.h +++ /dev/null @@ -1,32 +0,0 @@ -#define NPY_HAVE_ENDIAN_H 1 -#define NPY_SIZEOF_SHORT SIZEOF_SHORT -#define NPY_SIZEOF_INT SIZEOF_INT -#define NPY_SIZEOF_LONG SIZEOF_LONG -#define NPY_SIZEOF_FLOAT 4 -#define NPY_SIZEOF_COMPLEX_FLOAT 8 -#define NPY_SIZEOF_DOUBLE 8 -#define NPY_SIZEOF_COMPLEX_DOUBLE 16 -#define NPY_SIZEOF_LONGDOUBLE 16 -#define NPY_SIZEOF_COMPLEX_LONGDOUBLE 32 -#define NPY_ENABLE_SEPARATE_COMPILATION 1 -#define NPY_SIZEOF_PY_INTPTR_T 8 -#define NPY_SIZEOF_PY_LONG_LONG 8 -#define NPY_SIZEOF_LONGLONG 8 -#define NPY_SIZEOF_OFF_T 8 -#define NPY_NO_SMP 0 -#define NPY_HAVE_DECL_ISNAN -#define NPY_HAVE_DECL_ISINF -#define NPY_HAVE_DECL_ISFINITE -#define NPY_HAVE_DECL_SIGNBIT -#define NPY_USE_C99_COMPLEX 1 -#define NPY_HAVE_COMPLEX_DOUBLE 1 -#define NPY_HAVE_COMPLEX_FLOAT 1 -#define NPY_HAVE_COMPLEX_LONG_DOUBLE 1 -#define NPY_USE_C99_FORMATS 1 -#define NPY_VISIBILITY_HIDDEN __attribute__((visibility("hidden"))) -#define NPY_ABI_VERSION 0x01000009 -#define NPY_API_VERSION 0x0000000A - -#ifndef __STDC_FORMAT_MACROS -#define __STDC_FORMAT_MACROS 1 -#endif diff --git a/poky/meta/recipes-devtools/python-numpy/files/mipsarchn32eb/config.h b/poky/meta/recipes-devtools/python-numpy/files/mipsarchn32eb/config.h deleted file mode 100644 index c30b868f2..000000000 --- a/poky/meta/recipes-devtools/python-numpy/files/mipsarchn32eb/config.h +++ /dev/null @@ -1,139 +0,0 @@ -#define HAVE_ENDIAN_H 1 -#define SIZEOF_PY_INTPTR_T 8 -#define SIZEOF_PY_LONG_LONG 8 -#define MATHLIB m -#define HAVE_SIN 1 -#define HAVE_COS 1 -#define HAVE_TAN 1 -#define HAVE_SINH 1 -#define HAVE_COSH 1 -#define HAVE_TANH 1 -#define HAVE_FABS 1 -#define HAVE_FLOOR 1 -#define HAVE_CEIL 1 -#define HAVE_SQRT 1 -#define HAVE_LOG10 1 -#define HAVE_LOG 1 -#define HAVE_EXP 1 -#define HAVE_ASIN 1 -#define HAVE_ACOS 1 -#define HAVE_ATAN 1 -#define HAVE_FMOD 1 -#define HAVE_MODF 1 -#define HAVE_FREXP 1 -#define HAVE_LDEXP 1 -#define HAVE_RINT 1 -#define HAVE_TRUNC 1 -#define HAVE_EXP2 1 -#define HAVE_LOG2 1 -#define HAVE_ATAN2 1 -#define HAVE_POW 1 -#define HAVE_NEXTAFTER 1 -#define HAVE_SINF 1 -#define HAVE_COSF 1 -#define HAVE_TANF 1 -#define HAVE_SINHF 1 -#define HAVE_COSHF 1 -#define HAVE_TANHF 1 -#define HAVE_FABSF 1 -#define HAVE_FLOORF 1 -#define HAVE_CEILF 1 -#define HAVE_RINTF 1 -#define HAVE_TRUNCF 1 -#define HAVE_SQRTF 1 -#define HAVE_LOG10F 1 -#define HAVE_LOGF 1 -#define HAVE_LOG1PF 1 -#define HAVE_EXPF 1 -#define HAVE_EXPM1F 1 -#define HAVE_ASINF 1 -#define HAVE_ACOSF 1 -#define HAVE_ATANF 1 -#define HAVE_ASINHF 1 -#define HAVE_ACOSHF 1 -#define HAVE_ATANHF 1 -#define HAVE_HYPOTF 1 -#define HAVE_ATAN2F 1 -#define HAVE_POWF 1 -#define HAVE_FMODF 1 -#define HAVE_MODFF 1 -#define HAVE_FREXPF 1 -#define HAVE_LDEXPF 1 -#define HAVE_EXP2F 1 -#define HAVE_LOG2F 1 -#define HAVE_COPYSIGNF 1 -#define HAVE_NEXTAFTERF 1 -#define HAVE_SINL 1 -#define HAVE_COSL 1 -#define HAVE_TANL 1 -#define HAVE_SINHL 1 -#define HAVE_COSHL 1 -#define HAVE_TANHL 1 -#define HAVE_FABSL 1 -#define HAVE_FLOORL 1 -#define HAVE_CEILL 1 -#define HAVE_RINTL 1 -#define HAVE_TRUNCL 1 -#define HAVE_SQRTL 1 -#define HAVE_LOG10L 1 -#define HAVE_LOGL 1 -#define HAVE_LOG1PL 1 -#define HAVE_EXPL 1 -#define HAVE_EXPM1L 1 -#define HAVE_ASINL 1 -#define HAVE_ACOSL 1 -#define HAVE_ATANL 1 -#define HAVE_ASINHL 1 -#define HAVE_ACOSHL 1 -#define HAVE_ATANHL 1 -#define HAVE_HYPOTL 1 -#define HAVE_ATAN2L 1 -#define HAVE_POWL 1 -#define HAVE_FMODL 1 -#define HAVE_MODFL 1 -#define HAVE_FREXPL 1 -#define HAVE_LDEXPL 1 -#define HAVE_EXP2L 1 -#define HAVE_LOG2L 1 -#define HAVE_COPYSIGNL 1 -#define HAVE_NEXTAFTERL 1 -#define HAVE_DECL_SIGNBIT -#define HAVE_COMPLEX_H 1 -#define HAVE_CREAL 1 -#define HAVE_CIMAG 1 -#define HAVE_CABS 1 -#define HAVE_CARG 1 -#define HAVE_CEXP 1 -#define HAVE_CSQRT 1 -#define HAVE_CLOG 1 -#define HAVE_CCOS 1 -#define HAVE_CSIN 1 -#define HAVE_CPOW 1 -#define HAVE_CREALF 1 -#define HAVE_CIMAGF 1 -#define HAVE_CABSF 1 -#define HAVE_CARGF 1 -#define HAVE_CEXPF 1 -#define HAVE_CSQRTF 1 -#define HAVE_CLOGF 1 -#define HAVE_CCOSF 1 -#define HAVE_CSINF 1 -#define HAVE_CPOWF 1 -#define HAVE_CREALL 1 -#define HAVE_CIMAGL 1 -#define HAVE_CABSL 1 -#define HAVE_CARGL 1 -#define HAVE_CEXPL 1 -#define HAVE_CSQRTL 1 -#define HAVE_CLOGL 1 -#define HAVE_CCOSL 1 -#define HAVE_CSINL 1 -#define HAVE_CPOWL 1 -#define HAVE_LDOUBLE_IEEE_QUAD_LE 1 -#ifndef __cplusplus -/* #undef inline */ -#endif - -#ifndef _NPY_NPY_CONFIG_H_ -#error config.h should never be included directly, include npy_config.h instead -#endif diff --git a/poky/meta/recipes-devtools/python-numpy/files/mipsarchn32el/_numpyconfig.h b/poky/meta/recipes-devtools/python-numpy/files/mipsarchn32el/_numpyconfig.h deleted file mode 100644 index 8e2b5d094..000000000 --- a/poky/meta/recipes-devtools/python-numpy/files/mipsarchn32el/_numpyconfig.h +++ /dev/null @@ -1,31 +0,0 @@ -#define NPY_HAVE_ENDIAN_H 1 -#define NPY_SIZEOF_SHORT SIZEOF_SHORT -#define NPY_SIZEOF_INT SIZEOF_INT -#define NPY_SIZEOF_LONG SIZEOF_LONG -#define NPY_SIZEOF_FLOAT 4 -#define NPY_SIZEOF_COMPLEX_FLOAT 8 -#define NPY_SIZEOF_DOUBLE 8 -#define NPY_SIZEOF_COMPLEX_DOUBLE 16 -#define NPY_SIZEOF_LONGDOUBLE 16 -#define NPY_SIZEOF_COMPLEX_LONGDOUBLE 32 -#define NPY_ENABLE_SEPARATE_COMPILATION 1 -#define NPY_SIZEOF_PY_INTPTR_T 8 -#define NPY_SIZEOF_PY_LONG_LONG 8 -#define NPY_SIZEOF_LONGLONG 8 -#define NPY_NO_SMP 0 -#define NPY_HAVE_DECL_ISNAN -#define NPY_HAVE_DECL_ISINF -#define NPY_HAVE_DECL_ISFINITE -#define NPY_HAVE_DECL_SIGNBIT -#define NPY_USE_C99_COMPLEX 1 -#define NPY_HAVE_COMPLEX_DOUBLE 1 -#define NPY_HAVE_COMPLEX_FLOAT 1 -#define NPY_HAVE_COMPLEX_LONG_DOUBLE 1 -#define NPY_USE_C99_FORMATS 1 -#define NPY_VISIBILITY_HIDDEN __attribute__((visibility("hidden"))) -#define NPY_ABI_VERSION 0x01000009 -#define NPY_API_VERSION 0x0000000A - -#ifndef __STDC_FORMAT_MACROS -#define __STDC_FORMAT_MACROS 1 -#endif diff --git a/poky/meta/recipes-devtools/python-numpy/files/mipsarchn32el/config.h b/poky/meta/recipes-devtools/python-numpy/files/mipsarchn32el/config.h deleted file mode 100644 index 48727039a..000000000 --- a/poky/meta/recipes-devtools/python-numpy/files/mipsarchn32el/config.h +++ /dev/null @@ -1,138 +0,0 @@ -#define SIZEOF_PY_INTPTR_T 8 -#define SIZEOF_PY_LONG_LONG 8 -#define MATHLIB m -#define HAVE_SIN 1 -#define HAVE_COS 1 -#define HAVE_TAN 1 -#define HAVE_SINH 1 -#define HAVE_COSH 1 -#define HAVE_TANH 1 -#define HAVE_FABS 1 -#define HAVE_FLOOR 1 -#define HAVE_CEIL 1 -#define HAVE_SQRT 1 -#define HAVE_LOG10 1 -#define HAVE_LOG 1 -#define HAVE_EXP 1 -#define HAVE_ASIN 1 -#define HAVE_ACOS 1 -#define HAVE_ATAN 1 -#define HAVE_FMOD 1 -#define HAVE_MODF 1 -#define HAVE_FREXP 1 -#define HAVE_LDEXP 1 -#define HAVE_RINT 1 -#define HAVE_TRUNC 1 -#define HAVE_EXP2 1 -#define HAVE_LOG2 1 -#define HAVE_ATAN2 1 -#define HAVE_POW 1 -#define HAVE_NEXTAFTER 1 -#define HAVE_SINF 1 -#define HAVE_COSF 1 -#define HAVE_TANF 1 -#define HAVE_SINHF 1 -#define HAVE_COSHF 1 -#define HAVE_TANHF 1 -#define HAVE_FABSF 1 -#define HAVE_FLOORF 1 -#define HAVE_CEILF 1 -#define HAVE_RINTF 1 -#define HAVE_TRUNCF 1 -#define HAVE_SQRTF 1 -#define HAVE_LOG10F 1 -#define HAVE_LOGF 1 -#define HAVE_LOG1PF 1 -#define HAVE_EXPF 1 -#define HAVE_EXPM1F 1 -#define HAVE_ASINF 1 -#define HAVE_ACOSF 1 -#define HAVE_ATANF 1 -#define HAVE_ASINHF 1 -#define HAVE_ACOSHF 1 -#define HAVE_ATANHF 1 -#define HAVE_HYPOTF 1 -#define HAVE_ATAN2F 1 -#define HAVE_POWF 1 -#define HAVE_FMODF 1 -#define HAVE_MODFF 1 -#define HAVE_FREXPF 1 -#define HAVE_LDEXPF 1 -#define HAVE_EXP2F 1 -#define HAVE_LOG2F 1 -#define HAVE_COPYSIGNF 1 -#define HAVE_NEXTAFTERF 1 -#define HAVE_SINL 1 -#define HAVE_COSL 1 -#define HAVE_TANL 1 -#define HAVE_SINHL 1 -#define HAVE_COSHL 1 -#define HAVE_TANHL 1 -#define HAVE_FABSL 1 -#define HAVE_FLOORL 1 -#define HAVE_CEILL 1 -#define HAVE_RINTL 1 -#define HAVE_TRUNCL 1 -#define HAVE_SQRTL 1 -#define HAVE_LOG10L 1 -#define HAVE_LOGL 1 -#define HAVE_LOG1PL 1 -#define HAVE_EXPL 1 -#define HAVE_EXPM1L 1 -#define HAVE_ASINL 1 -#define HAVE_ACOSL 1 -#define HAVE_ATANL 1 -#define HAVE_ASINHL 1 -#define HAVE_ACOSHL 1 -#define HAVE_ATANHL 1 -#define HAVE_HYPOTL 1 -#define HAVE_ATAN2L 1 -#define HAVE_POWL 1 -#define HAVE_FMODL 1 -#define HAVE_MODFL 1 -#define HAVE_FREXPL 1 -#define HAVE_LDEXPL 1 -#define HAVE_EXP2L 1 -#define HAVE_LOG2L 1 -#define HAVE_COPYSIGNL 1 -#define HAVE_NEXTAFTERL 1 -#define HAVE_DECL_SIGNBIT -#define HAVE_COMPLEX_H 1 -#define HAVE_CREAL 1 -#define HAVE_CIMAG 1 -#define HAVE_CABS 1 -#define HAVE_CARG 1 -#define HAVE_CEXP 1 -#define HAVE_CSQRT 1 -#define HAVE_CLOG 1 -#define HAVE_CCOS 1 -#define HAVE_CSIN 1 -#define HAVE_CPOW 1 -#define HAVE_CREALF 1 -#define HAVE_CIMAGF 1 -#define HAVE_CABSF 1 -#define HAVE_CARGF 1 -#define HAVE_CEXPF 1 -#define HAVE_CSQRTF 1 -#define HAVE_CLOGF 1 -#define HAVE_CCOSF 1 -#define HAVE_CSINF 1 -#define HAVE_CPOWF 1 -#define HAVE_CREALL 1 -#define HAVE_CIMAGL 1 -#define HAVE_CABSL 1 -#define HAVE_CARGL 1 -#define HAVE_CEXPL 1 -#define HAVE_CSQRTL 1 -#define HAVE_CLOGL 1 -#define HAVE_CCOSL 1 -#define HAVE_CSINL 1 -#define HAVE_CPOWL 1 -#define HAVE_LDOUBLE_IEEE_QUAD_LE 1 -#ifndef __cplusplus -/* #undef inline */ -#endif - -#ifndef _NPY_NPY_CONFIG_H_ -#error config.h should never be included directly, include npy_config.h instead -#endif diff --git a/poky/meta/recipes-devtools/python-numpy/files/mipsarchn64eb/_numpyconfig.h b/poky/meta/recipes-devtools/python-numpy/files/mipsarchn64eb/_numpyconfig.h deleted file mode 100644 index debb39009..000000000 --- a/poky/meta/recipes-devtools/python-numpy/files/mipsarchn64eb/_numpyconfig.h +++ /dev/null @@ -1,32 +0,0 @@ -#define NPY_HAVE_ENDIAN_H 1 -#define NPY_SIZEOF_SHORT SIZEOF_SHORT -#define NPY_SIZEOF_INT SIZEOF_INT -#define NPY_SIZEOF_LONG SIZEOF_LONG -#define NPY_SIZEOF_FLOAT 4 -#define NPY_SIZEOF_COMPLEX_FLOAT 8 -#define NPY_SIZEOF_DOUBLE 8 -#define NPY_SIZEOF_COMPLEX_DOUBLE 16 -#define NPY_SIZEOF_LONGDOUBLE 16 -#define NPY_SIZEOF_COMPLEX_LONGDOUBLE 32 -#define NPY_ENABLE_SEPARATE_COMPILATION 1 -#define NPY_SIZEOF_PY_INTPTR_T 8 -#define NPY_SIZEOF_PY_LONG_LONG 8 -#define NPY_SIZEOF_LONGLONG 8 -#define NPY_SIZEOF_OFF_T 8 -#define NPY_NO_SMP 0 -#define NPY_HAVE_DECL_ISNAN -#define NPY_HAVE_DECL_ISINF -#define NPY_HAVE_DECL_ISFINITE -#define NPY_HAVE_DECL_SIGNBIT -#define NPY_USE_C99_COMPLEX 1 -#define NPY_HAVE_COMPLEX_DOUBLE 1 -#define NPY_HAVE_COMPLEX_FLOAT 1 -#define NPY_HAVE_COMPLEX_LONG_DOUBLE 1 -#define NPY_USE_C99_FORMATS 1 -#define NPY_VISIBILITY_HIDDEN __attribute__((visibility("hidden"))) -#define NPY_ABI_VERSION 0x01000009 -#define NPY_API_VERSION 0x0000000A - -#ifndef __STDC_FORMAT_MACROS -#define __STDC_FORMAT_MACROS 1 -#endif diff --git a/poky/meta/recipes-devtools/python-numpy/files/mipsarchn64eb/config.h b/poky/meta/recipes-devtools/python-numpy/files/mipsarchn64eb/config.h deleted file mode 100644 index c30b868f2..000000000 --- a/poky/meta/recipes-devtools/python-numpy/files/mipsarchn64eb/config.h +++ /dev/null @@ -1,139 +0,0 @@ -#define HAVE_ENDIAN_H 1 -#define SIZEOF_PY_INTPTR_T 8 -#define SIZEOF_PY_LONG_LONG 8 -#define MATHLIB m -#define HAVE_SIN 1 -#define HAVE_COS 1 -#define HAVE_TAN 1 -#define HAVE_SINH 1 -#define HAVE_COSH 1 -#define HAVE_TANH 1 -#define HAVE_FABS 1 -#define HAVE_FLOOR 1 -#define HAVE_CEIL 1 -#define HAVE_SQRT 1 -#define HAVE_LOG10 1 -#define HAVE_LOG 1 -#define HAVE_EXP 1 -#define HAVE_ASIN 1 -#define HAVE_ACOS 1 -#define HAVE_ATAN 1 -#define HAVE_FMOD 1 -#define HAVE_MODF 1 -#define HAVE_FREXP 1 -#define HAVE_LDEXP 1 -#define HAVE_RINT 1 -#define HAVE_TRUNC 1 -#define HAVE_EXP2 1 -#define HAVE_LOG2 1 -#define HAVE_ATAN2 1 -#define HAVE_POW 1 -#define HAVE_NEXTAFTER 1 -#define HAVE_SINF 1 -#define HAVE_COSF 1 -#define HAVE_TANF 1 -#define HAVE_SINHF 1 -#define HAVE_COSHF 1 -#define HAVE_TANHF 1 -#define HAVE_FABSF 1 -#define HAVE_FLOORF 1 -#define HAVE_CEILF 1 -#define HAVE_RINTF 1 -#define HAVE_TRUNCF 1 -#define HAVE_SQRTF 1 -#define HAVE_LOG10F 1 -#define HAVE_LOGF 1 -#define HAVE_LOG1PF 1 -#define HAVE_EXPF 1 -#define HAVE_EXPM1F 1 -#define HAVE_ASINF 1 -#define HAVE_ACOSF 1 -#define HAVE_ATANF 1 -#define HAVE_ASINHF 1 -#define HAVE_ACOSHF 1 -#define HAVE_ATANHF 1 -#define HAVE_HYPOTF 1 -#define HAVE_ATAN2F 1 -#define HAVE_POWF 1 -#define HAVE_FMODF 1 -#define HAVE_MODFF 1 -#define HAVE_FREXPF 1 -#define HAVE_LDEXPF 1 -#define HAVE_EXP2F 1 -#define HAVE_LOG2F 1 -#define HAVE_COPYSIGNF 1 -#define HAVE_NEXTAFTERF 1 -#define HAVE_SINL 1 -#define HAVE_COSL 1 -#define HAVE_TANL 1 -#define HAVE_SINHL 1 -#define HAVE_COSHL 1 -#define HAVE_TANHL 1 -#define HAVE_FABSL 1 -#define HAVE_FLOORL 1 -#define HAVE_CEILL 1 -#define HAVE_RINTL 1 -#define HAVE_TRUNCL 1 -#define HAVE_SQRTL 1 -#define HAVE_LOG10L 1 -#define HAVE_LOGL 1 -#define HAVE_LOG1PL 1 -#define HAVE_EXPL 1 -#define HAVE_EXPM1L 1 -#define HAVE_ASINL 1 -#define HAVE_ACOSL 1 -#define HAVE_ATANL 1 -#define HAVE_ASINHL 1 -#define HAVE_ACOSHL 1 -#define HAVE_ATANHL 1 -#define HAVE_HYPOTL 1 -#define HAVE_ATAN2L 1 -#define HAVE_POWL 1 -#define HAVE_FMODL 1 -#define HAVE_MODFL 1 -#define HAVE_FREXPL 1 -#define HAVE_LDEXPL 1 -#define HAVE_EXP2L 1 -#define HAVE_LOG2L 1 -#define HAVE_COPYSIGNL 1 -#define HAVE_NEXTAFTERL 1 -#define HAVE_DECL_SIGNBIT -#define HAVE_COMPLEX_H 1 -#define HAVE_CREAL 1 -#define HAVE_CIMAG 1 -#define HAVE_CABS 1 -#define HAVE_CARG 1 -#define HAVE_CEXP 1 -#define HAVE_CSQRT 1 -#define HAVE_CLOG 1 -#define HAVE_CCOS 1 -#define HAVE_CSIN 1 -#define HAVE_CPOW 1 -#define HAVE_CREALF 1 -#define HAVE_CIMAGF 1 -#define HAVE_CABSF 1 -#define HAVE_CARGF 1 -#define HAVE_CEXPF 1 -#define HAVE_CSQRTF 1 -#define HAVE_CLOGF 1 -#define HAVE_CCOSF 1 -#define HAVE_CSINF 1 -#define HAVE_CPOWF 1 -#define HAVE_CREALL 1 -#define HAVE_CIMAGL 1 -#define HAVE_CABSL 1 -#define HAVE_CARGL 1 -#define HAVE_CEXPL 1 -#define HAVE_CSQRTL 1 -#define HAVE_CLOGL 1 -#define HAVE_CCOSL 1 -#define HAVE_CSINL 1 -#define HAVE_CPOWL 1 -#define HAVE_LDOUBLE_IEEE_QUAD_LE 1 -#ifndef __cplusplus -/* #undef inline */ -#endif - -#ifndef _NPY_NPY_CONFIG_H_ -#error config.h should never be included directly, include npy_config.h instead -#endif diff --git a/poky/meta/recipes-devtools/python-numpy/files/mipsarchn64el/_numpyconfig.h b/poky/meta/recipes-devtools/python-numpy/files/mipsarchn64el/_numpyconfig.h deleted file mode 100644 index debb39009..000000000 --- a/poky/meta/recipes-devtools/python-numpy/files/mipsarchn64el/_numpyconfig.h +++ /dev/null @@ -1,32 +0,0 @@ -#define NPY_HAVE_ENDIAN_H 1 -#define NPY_SIZEOF_SHORT SIZEOF_SHORT -#define NPY_SIZEOF_INT SIZEOF_INT -#define NPY_SIZEOF_LONG SIZEOF_LONG -#define NPY_SIZEOF_FLOAT 4 -#define NPY_SIZEOF_COMPLEX_FLOAT 8 -#define NPY_SIZEOF_DOUBLE 8 -#define NPY_SIZEOF_COMPLEX_DOUBLE 16 -#define NPY_SIZEOF_LONGDOUBLE 16 -#define NPY_SIZEOF_COMPLEX_LONGDOUBLE 32 -#define NPY_ENABLE_SEPARATE_COMPILATION 1 -#define NPY_SIZEOF_PY_INTPTR_T 8 -#define NPY_SIZEOF_PY_LONG_LONG 8 -#define NPY_SIZEOF_LONGLONG 8 -#define NPY_SIZEOF_OFF_T 8 -#define NPY_NO_SMP 0 -#define NPY_HAVE_DECL_ISNAN -#define NPY_HAVE_DECL_ISINF -#define NPY_HAVE_DECL_ISFINITE -#define NPY_HAVE_DECL_SIGNBIT -#define NPY_USE_C99_COMPLEX 1 -#define NPY_HAVE_COMPLEX_DOUBLE 1 -#define NPY_HAVE_COMPLEX_FLOAT 1 -#define NPY_HAVE_COMPLEX_LONG_DOUBLE 1 -#define NPY_USE_C99_FORMATS 1 -#define NPY_VISIBILITY_HIDDEN __attribute__((visibility("hidden"))) -#define NPY_ABI_VERSION 0x01000009 -#define NPY_API_VERSION 0x0000000A - -#ifndef __STDC_FORMAT_MACROS -#define __STDC_FORMAT_MACROS 1 -#endif diff --git a/poky/meta/recipes-devtools/python-numpy/files/mipsarchn64el/config.h b/poky/meta/recipes-devtools/python-numpy/files/mipsarchn64el/config.h deleted file mode 100644 index 48727039a..000000000 --- a/poky/meta/recipes-devtools/python-numpy/files/mipsarchn64el/config.h +++ /dev/null @@ -1,138 +0,0 @@ -#define SIZEOF_PY_INTPTR_T 8 -#define SIZEOF_PY_LONG_LONG 8 -#define MATHLIB m -#define HAVE_SIN 1 -#define HAVE_COS 1 -#define HAVE_TAN 1 -#define HAVE_SINH 1 -#define HAVE_COSH 1 -#define HAVE_TANH 1 -#define HAVE_FABS 1 -#define HAVE_FLOOR 1 -#define HAVE_CEIL 1 -#define HAVE_SQRT 1 -#define HAVE_LOG10 1 -#define HAVE_LOG 1 -#define HAVE_EXP 1 -#define HAVE_ASIN 1 -#define HAVE_ACOS 1 -#define HAVE_ATAN 1 -#define HAVE_FMOD 1 -#define HAVE_MODF 1 -#define HAVE_FREXP 1 -#define HAVE_LDEXP 1 -#define HAVE_RINT 1 -#define HAVE_TRUNC 1 -#define HAVE_EXP2 1 -#define HAVE_LOG2 1 -#define HAVE_ATAN2 1 -#define HAVE_POW 1 -#define HAVE_NEXTAFTER 1 -#define HAVE_SINF 1 -#define HAVE_COSF 1 -#define HAVE_TANF 1 -#define HAVE_SINHF 1 -#define HAVE_COSHF 1 -#define HAVE_TANHF 1 -#define HAVE_FABSF 1 -#define HAVE_FLOORF 1 -#define HAVE_CEILF 1 -#define HAVE_RINTF 1 -#define HAVE_TRUNCF 1 -#define HAVE_SQRTF 1 -#define HAVE_LOG10F 1 -#define HAVE_LOGF 1 -#define HAVE_LOG1PF 1 -#define HAVE_EXPF 1 -#define HAVE_EXPM1F 1 -#define HAVE_ASINF 1 -#define HAVE_ACOSF 1 -#define HAVE_ATANF 1 -#define HAVE_ASINHF 1 -#define HAVE_ACOSHF 1 -#define HAVE_ATANHF 1 -#define HAVE_HYPOTF 1 -#define HAVE_ATAN2F 1 -#define HAVE_POWF 1 -#define HAVE_FMODF 1 -#define HAVE_MODFF 1 -#define HAVE_FREXPF 1 -#define HAVE_LDEXPF 1 -#define HAVE_EXP2F 1 -#define HAVE_LOG2F 1 -#define HAVE_COPYSIGNF 1 -#define HAVE_NEXTAFTERF 1 -#define HAVE_SINL 1 -#define HAVE_COSL 1 -#define HAVE_TANL 1 -#define HAVE_SINHL 1 -#define HAVE_COSHL 1 -#define HAVE_TANHL 1 -#define HAVE_FABSL 1 -#define HAVE_FLOORL 1 -#define HAVE_CEILL 1 -#define HAVE_RINTL 1 -#define HAVE_TRUNCL 1 -#define HAVE_SQRTL 1 -#define HAVE_LOG10L 1 -#define HAVE_LOGL 1 -#define HAVE_LOG1PL 1 -#define HAVE_EXPL 1 -#define HAVE_EXPM1L 1 -#define HAVE_ASINL 1 -#define HAVE_ACOSL 1 -#define HAVE_ATANL 1 -#define HAVE_ASINHL 1 -#define HAVE_ACOSHL 1 -#define HAVE_ATANHL 1 -#define HAVE_HYPOTL 1 -#define HAVE_ATAN2L 1 -#define HAVE_POWL 1 -#define HAVE_FMODL 1 -#define HAVE_MODFL 1 -#define HAVE_FREXPL 1 -#define HAVE_LDEXPL 1 -#define HAVE_EXP2L 1 -#define HAVE_LOG2L 1 -#define HAVE_COPYSIGNL 1 -#define HAVE_NEXTAFTERL 1 -#define HAVE_DECL_SIGNBIT -#define HAVE_COMPLEX_H 1 -#define HAVE_CREAL 1 -#define HAVE_CIMAG 1 -#define HAVE_CABS 1 -#define HAVE_CARG 1 -#define HAVE_CEXP 1 -#define HAVE_CSQRT 1 -#define HAVE_CLOG 1 -#define HAVE_CCOS 1 -#define HAVE_CSIN 1 -#define HAVE_CPOW 1 -#define HAVE_CREALF 1 -#define HAVE_CIMAGF 1 -#define HAVE_CABSF 1 -#define HAVE_CARGF 1 -#define HAVE_CEXPF 1 -#define HAVE_CSQRTF 1 -#define HAVE_CLOGF 1 -#define HAVE_CCOSF 1 -#define HAVE_CSINF 1 -#define HAVE_CPOWF 1 -#define HAVE_CREALL 1 -#define HAVE_CIMAGL 1 -#define HAVE_CABSL 1 -#define HAVE_CARGL 1 -#define HAVE_CEXPL 1 -#define HAVE_CSQRTL 1 -#define HAVE_CLOGL 1 -#define HAVE_CCOSL 1 -#define HAVE_CSINL 1 -#define HAVE_CPOWL 1 -#define HAVE_LDOUBLE_IEEE_QUAD_LE 1 -#ifndef __cplusplus -/* #undef inline */ -#endif - -#ifndef _NPY_NPY_CONFIG_H_ -#error config.h should never be included directly, include npy_config.h instead -#endif diff --git a/poky/meta/recipes-devtools/python-numpy/files/mipsarcho32eb/_numpyconfig.h b/poky/meta/recipes-devtools/python-numpy/files/mipsarcho32eb/_numpyconfig.h deleted file mode 100644 index 4c465c216..000000000 --- a/poky/meta/recipes-devtools/python-numpy/files/mipsarcho32eb/_numpyconfig.h +++ /dev/null @@ -1,32 +0,0 @@ -#define NPY_HAVE_ENDIAN_H 1 -#define NPY_SIZEOF_SHORT SIZEOF_SHORT -#define NPY_SIZEOF_INT SIZEOF_INT -#define NPY_SIZEOF_LONG SIZEOF_LONG -#define NPY_SIZEOF_FLOAT 4 -#define NPY_SIZEOF_COMPLEX_FLOAT 8 -#define NPY_SIZEOF_DOUBLE 8 -#define NPY_SIZEOF_COMPLEX_DOUBLE 16 -#define NPY_SIZEOF_LONGDOUBLE 8 -#define NPY_SIZEOF_COMPLEX_LONGDOUBLE 16 -#define NPY_ENABLE_SEPARATE_COMPILATION 1 -#define NPY_SIZEOF_PY_INTPTR_T 4 -#define NPY_SIZEOF_PY_LONG_LONG 8 -#define NPY_SIZEOF_LONGLONG 8 -#define NPY_SIZEOF_OFF_T 8 -#define NPY_NO_SMP 0 -#define NPY_HAVE_DECL_ISNAN -#define NPY_HAVE_DECL_ISINF -#define NPY_HAVE_DECL_ISFINITE -#define NPY_HAVE_DECL_SIGNBIT -#define NPY_USE_C99_COMPLEX 1 -#define NPY_HAVE_COMPLEX_DOUBLE 1 -#define NPY_HAVE_COMPLEX_FLOAT 1 -#define NPY_HAVE_COMPLEX_LONG_DOUBLE 1 -#define NPY_USE_C99_FORMATS 1 -#define NPY_VISIBILITY_HIDDEN __attribute__((visibility("hidden"))) -#define NPY_ABI_VERSION 0x01000009 -#define NPY_API_VERSION 0x0000000A - -#ifndef __STDC_FORMAT_MACROS -#define __STDC_FORMAT_MACROS 1 -#endif diff --git a/poky/meta/recipes-devtools/python-numpy/files/mipsarcho32eb/config.h b/poky/meta/recipes-devtools/python-numpy/files/mipsarcho32eb/config.h deleted file mode 100644 index 2f6135adc..000000000 --- a/poky/meta/recipes-devtools/python-numpy/files/mipsarcho32eb/config.h +++ /dev/null @@ -1,139 +0,0 @@ -#define HAVE_ENDIAN_H 1 -#define SIZEOF_PY_INTPTR_T 4 -#define SIZEOF_PY_LONG_LONG 8 -#define MATHLIB m -#define HAVE_SIN 1 -#define HAVE_COS 1 -#define HAVE_TAN 1 -#define HAVE_SINH 1 -#define HAVE_COSH 1 -#define HAVE_TANH 1 -#define HAVE_FABS 1 -#define HAVE_FLOOR 1 -#define HAVE_CEIL 1 -#define HAVE_SQRT 1 -#define HAVE_LOG10 1 -#define HAVE_LOG 1 -#define HAVE_EXP 1 -#define HAVE_ASIN 1 -#define HAVE_ACOS 1 -#define HAVE_ATAN 1 -#define HAVE_FMOD 1 -#define HAVE_MODF 1 -#define HAVE_FREXP 1 -#define HAVE_LDEXP 1 -#define HAVE_RINT 1 -#define HAVE_TRUNC 1 -#define HAVE_EXP2 1 -#define HAVE_LOG2 1 -#define HAVE_ATAN2 1 -#define HAVE_POW 1 -#define HAVE_NEXTAFTER 1 -#define HAVE_SINF 1 -#define HAVE_COSF 1 -#define HAVE_TANF 1 -#define HAVE_SINHF 1 -#define HAVE_COSHF 1 -#define HAVE_TANHF 1 -#define HAVE_FABSF 1 -#define HAVE_FLOORF 1 -#define HAVE_CEILF 1 -#define HAVE_RINTF 1 -#define HAVE_TRUNCF 1 -#define HAVE_SQRTF 1 -#define HAVE_LOG10F 1 -#define HAVE_LOGF 1 -#define HAVE_LOG1PF 1 -#define HAVE_EXPF 1 -#define HAVE_EXPM1F 1 -#define HAVE_ASINF 1 -#define HAVE_ACOSF 1 -#define HAVE_ATANF 1 -#define HAVE_ASINHF 1 -#define HAVE_ACOSHF 1 -#define HAVE_ATANHF 1 -#define HAVE_HYPOTF 1 -#define HAVE_ATAN2F 1 -#define HAVE_POWF 1 -#define HAVE_FMODF 1 -#define HAVE_MODFF 1 -#define HAVE_FREXPF 1 -#define HAVE_LDEXPF 1 -#define HAVE_EXP2F 1 -#define HAVE_LOG2F 1 -#define HAVE_COPYSIGNF 1 -#define HAVE_NEXTAFTERF 1 -#define HAVE_SINL 1 -#define HAVE_COSL 1 -#define HAVE_TANL 1 -#define HAVE_SINHL 1 -#define HAVE_COSHL 1 -#define HAVE_TANHL 1 -#define HAVE_FABSL 1 -#define HAVE_FLOORL 1 -#define HAVE_CEILL 1 -#define HAVE_RINTL 1 -#define HAVE_TRUNCL 1 -#define HAVE_SQRTL 1 -#define HAVE_LOG10L 1 -#define HAVE_LOGL 1 -#define HAVE_LOG1PL 1 -#define HAVE_EXPL 1 -#define HAVE_EXPM1L 1 -#define HAVE_ASINL 1 -#define HAVE_ACOSL 1 -#define HAVE_ATANL 1 -#define HAVE_ASINHL 1 -#define HAVE_ACOSHL 1 -#define HAVE_ATANHL 1 -#define HAVE_HYPOTL 1 -#define HAVE_ATAN2L 1 -#define HAVE_POWL 1 -#define HAVE_FMODL 1 -#define HAVE_MODFL 1 -#define HAVE_FREXPL 1 -#define HAVE_LDEXPL 1 -#define HAVE_EXP2L 1 -#define HAVE_LOG2L 1 -#define HAVE_COPYSIGNL 1 -#define HAVE_NEXTAFTERL 1 -#define HAVE_DECL_SIGNBIT -#define HAVE_COMPLEX_H 1 -#define HAVE_CREAL 1 -#define HAVE_CIMAG 1 -#define HAVE_CABS 1 -#define HAVE_CARG 1 -#define HAVE_CEXP 1 -#define HAVE_CSQRT 1 -#define HAVE_CLOG 1 -#define HAVE_CCOS 1 -#define HAVE_CSIN 1 -#define HAVE_CPOW 1 -#define HAVE_CREALF 1 -#define HAVE_CIMAGF 1 -#define HAVE_CABSF 1 -#define HAVE_CARGF 1 -#define HAVE_CEXPF 1 -#define HAVE_CSQRTF 1 -#define HAVE_CLOGF 1 -#define HAVE_CCOSF 1 -#define HAVE_CSINF 1 -#define HAVE_CPOWF 1 -#define HAVE_CREALL 1 -#define HAVE_CIMAGL 1 -#define HAVE_CABSL 1 -#define HAVE_CARGL 1 -#define HAVE_CEXPL 1 -#define HAVE_CSQRTL 1 -#define HAVE_CLOGL 1 -#define HAVE_CCOSL 1 -#define HAVE_CSINL 1 -#define HAVE_CPOWL 1 -#define HAVE_LDOUBLE_IEEE_DOUBLE_BE 1 -#ifndef __cplusplus -/* #undef inline */ -#endif - -#ifndef _NPY_NPY_CONFIG_H_ -#error config.h should never be included directly, include npy_config.h instead -#endif diff --git a/poky/meta/recipes-devtools/python-numpy/files/mipsarcho32el/config.h b/poky/meta/recipes-devtools/python-numpy/files/mipsarcho32el/config.h deleted file mode 100644 index 17ef186d5..000000000 --- a/poky/meta/recipes-devtools/python-numpy/files/mipsarcho32el/config.h +++ /dev/null @@ -1,21 +0,0 @@ -/* ./src.linux-i686-2.5/numpy/core/include/numpy/config.h */ -/* #define SIZEOF_SHORT 2 */ -/* #define SIZEOF_INT 4 */ -/* #define SIZEOF_LONG 4 */ -/* #define SIZEOF_FLOAT 4 */ -/* #define SIZEOF_DOUBLE 8 */ -#define SIZEOF_LONG_DOUBLE 12 -#define SIZEOF_PY_INTPTR_T 4 -/* #define SIZEOF_LONG_LONG 8 */ -#define SIZEOF_PY_LONG_LONG 8 -/* #define CHAR_BIT 8 */ -#define MATHLIB m -#define HAVE_FLOAT_FUNCS -#define HAVE_LOG1P -#define HAVE_EXPM1 -#define HAVE_INVERSE_HYPERBOLIC -#define HAVE_INVERSE_HYPERBOLIC_FLOAT -#define HAVE_ISNAN -#define HAVE_ISINF -#define HAVE_RINT - diff --git a/poky/meta/recipes-devtools/python-numpy/files/mipsarcho32el/numpyconfig.h b/poky/meta/recipes-devtools/python-numpy/files/mipsarcho32el/numpyconfig.h deleted file mode 100644 index 0b7cd51af..000000000 --- a/poky/meta/recipes-devtools/python-numpy/files/mipsarcho32el/numpyconfig.h +++ /dev/null @@ -1,18 +0,0 @@ -/* cat ./src.linux-i686-2.5/numpy/core/include/numpy/numpyconfig.h */ -/* - * * This file is generated by numpy/core/setup.pyc. DO NOT EDIT - * */ -#define NPY_SIZEOF_SHORT 2 -#define NPY_SIZEOF_INT 4 -#define NPY_SIZEOF_LONG 4 -#define NPY_SIZEOF_FLOAT 4 -#define NPY_SIZEOF_DOUBLE 8 -#define NPY_SIZEOF_LONGDOUBLE 12 -#define NPY_SIZEOF_PY_INTPTR_T 4 -#define NPY_NO_SMP 0 - -#define NPY_SIZEOF_LONGLONG 8 -#define NPY_SIZEOF_PY_LONG_LONG 8 -#define NPY_SIZEOF_OFF_T 8 -/* #define CHAR_BIT 8 */ - diff --git a/poky/meta/recipes-devtools/python-numpy/files/powerpc/_numpyconfig.h b/poky/meta/recipes-devtools/python-numpy/files/powerpc/_numpyconfig.h deleted file mode 100644 index 6e7262ad9..000000000 --- a/poky/meta/recipes-devtools/python-numpy/files/powerpc/_numpyconfig.h +++ /dev/null @@ -1,32 +0,0 @@ -#define NPY_HAVE_ENDIAN_H 1 -#define NPY_SIZEOF_SHORT SIZEOF_SHORT -#define NPY_SIZEOF_INT SIZEOF_INT -#define NPY_SIZEOF_LONG SIZEOF_LONG -#define NPY_SIZEOF_FLOAT 4 -#define NPY_SIZEOF_COMPLEX_FLOAT 8 -#define NPY_SIZEOF_DOUBLE 8 -#define NPY_SIZEOF_COMPLEX_DOUBLE 16 -#define NPY_SIZEOF_LONGDOUBLE 16 -#define NPY_SIZEOF_COMPLEX_LONGDOUBLE 32 -#define NPY_ENABLE_SEPARATE_COMPILATION 1 -#define NPY_SIZEOF_PY_INTPTR_T 4 -#define NPY_SIZEOF_PY_LONG_LONG 8 -#define NPY_SIZEOF_LONGLONG 8 -#define NPY_SIZEOF_OFF_T 8 -#define NPY_NO_SMP 0 -#define NPY_HAVE_DECL_ISNAN -#define NPY_HAVE_DECL_ISINF -#define NPY_HAVE_DECL_ISFINITE -#define NPY_HAVE_DECL_SIGNBIT -#define NPY_USE_C99_COMPLEX 1 -#define NPY_HAVE_COMPLEX_DOUBLE 1 -#define NPY_HAVE_COMPLEX_FLOAT 1 -#define NPY_HAVE_COMPLEX_LONG_DOUBLE 1 -#define NPY_USE_C99_FORMATS 1 -#define NPY_VISIBILITY_HIDDEN __attribute__((visibility("hidden"))) -#define NPY_ABI_VERSION 0x01000009 -#define NPY_API_VERSION 0x0000000A - -#ifndef __STDC_FORMAT_MACROS -#define __STDC_FORMAT_MACROS 1 -#endif diff --git a/poky/meta/recipes-devtools/python-numpy/files/powerpc/config.h b/poky/meta/recipes-devtools/python-numpy/files/powerpc/config.h deleted file mode 100644 index f65d39d5d..000000000 --- a/poky/meta/recipes-devtools/python-numpy/files/powerpc/config.h +++ /dev/null @@ -1,139 +0,0 @@ -#define HAVE_ENDIAN_H 1 -#define SIZEOF_PY_INTPTR_T 4 -#define SIZEOF_PY_LONG_LONG 8 -#define MATHLIB m -#define HAVE_SIN 1 -#define HAVE_COS 1 -#define HAVE_TAN 1 -#define HAVE_SINH 1 -#define HAVE_COSH 1 -#define HAVE_TANH 1 -#define HAVE_FABS 1 -#define HAVE_FLOOR 1 -#define HAVE_CEIL 1 -#define HAVE_SQRT 1 -#define HAVE_LOG10 1 -#define HAVE_LOG 1 -#define HAVE_EXP 1 -#define HAVE_ASIN 1 -#define HAVE_ACOS 1 -#define HAVE_ATAN 1 -#define HAVE_FMOD 1 -#define HAVE_MODF 1 -#define HAVE_FREXP 1 -#define HAVE_LDEXP 1 -#define HAVE_RINT 1 -#define HAVE_TRUNC 1 -#define HAVE_EXP2 1 -#define HAVE_LOG2 1 -#define HAVE_ATAN2 1 -#define HAVE_POW 1 -#define HAVE_NEXTAFTER 1 -#define HAVE_SINF 1 -#define HAVE_COSF 1 -#define HAVE_TANF 1 -#define HAVE_SINHF 1 -#define HAVE_COSHF 1 -#define HAVE_TANHF 1 -#define HAVE_FABSF 1 -#define HAVE_FLOORF 1 -#define HAVE_CEILF 1 -#define HAVE_RINTF 1 -#define HAVE_TRUNCF 1 -#define HAVE_SQRTF 1 -#define HAVE_LOG10F 1 -#define HAVE_LOGF 1 -#define HAVE_LOG1PF 1 -#define HAVE_EXPF 1 -#define HAVE_EXPM1F 1 -#define HAVE_ASINF 1 -#define HAVE_ACOSF 1 -#define HAVE_ATANF 1 -#define HAVE_ASINHF 1 -#define HAVE_ACOSHF 1 -#define HAVE_ATANHF 1 -#define HAVE_HYPOTF 1 -#define HAVE_ATAN2F 1 -#define HAVE_POWF 1 -#define HAVE_FMODF 1 -#define HAVE_MODFF 1 -#define HAVE_FREXPF 1 -#define HAVE_LDEXPF 1 -#define HAVE_EXP2F 1 -#define HAVE_LOG2F 1 -#define HAVE_COPYSIGNF 1 -#define HAVE_NEXTAFTERF 1 -#define HAVE_SINL 1 -#define HAVE_COSL 1 -#define HAVE_TANL 1 -#define HAVE_SINHL 1 -#define HAVE_COSHL 1 -#define HAVE_TANHL 1 -#define HAVE_FABSL 1 -#define HAVE_FLOORL 1 -#define HAVE_CEILL 1 -#define HAVE_RINTL 1 -#define HAVE_TRUNCL 1 -#define HAVE_SQRTL 1 -#define HAVE_LOG10L 1 -#define HAVE_LOGL 1 -#define HAVE_LOG1PL 1 -#define HAVE_EXPL 1 -#define HAVE_EXPM1L 1 -#define HAVE_ASINL 1 -#define HAVE_ACOSL 1 -#define HAVE_ATANL 1 -#define HAVE_ASINHL 1 -#define HAVE_ACOSHL 1 -#define HAVE_ATANHL 1 -#define HAVE_HYPOTL 1 -#define HAVE_ATAN2L 1 -#define HAVE_POWL 1 -#define HAVE_FMODL 1 -#define HAVE_MODFL 1 -#define HAVE_FREXPL 1 -#define HAVE_LDEXPL 1 -#define HAVE_EXP2L 1 -#define HAVE_LOG2L 1 -#define HAVE_COPYSIGNL 1 -#define HAVE_NEXTAFTERL 1 -#define HAVE_DECL_SIGNBIT -#define HAVE_COMPLEX_H 1 -#define HAVE_CREAL 1 -#define HAVE_CIMAG 1 -#define HAVE_CABS 1 -#define HAVE_CARG 1 -#define HAVE_CEXP 1 -#define HAVE_CSQRT 1 -#define HAVE_CLOG 1 -#define HAVE_CCOS 1 -#define HAVE_CSIN 1 -#define HAVE_CPOW 1 -#define HAVE_CREALF 1 -#define HAVE_CIMAGF 1 -#define HAVE_CABSF 1 -#define HAVE_CARGF 1 -#define HAVE_CEXPF 1 -#define HAVE_CSQRTF 1 -#define HAVE_CLOGF 1 -#define HAVE_CCOSF 1 -#define HAVE_CSINF 1 -#define HAVE_CPOWF 1 -#define HAVE_CREALL 1 -#define HAVE_CIMAGL 1 -#define HAVE_CABSL 1 -#define HAVE_CARGL 1 -#define HAVE_CEXPL 1 -#define HAVE_CSQRTL 1 -#define HAVE_CLOGL 1 -#define HAVE_CCOSL 1 -#define HAVE_CSINL 1 -#define HAVE_CPOWL 1 -#define HAVE_LDOUBLE_DOUBLE_DOUBLE_BE 1 -#ifndef __cplusplus -/* #undef inline */ -#endif - -#ifndef _NPY_NPY_CONFIG_H_ -#error config.h should never be included directly, include npy_config.h instead -#endif diff --git a/poky/meta/recipes-devtools/python-numpy/files/powerpc64/_numpyconfig.h b/poky/meta/recipes-devtools/python-numpy/files/powerpc64/_numpyconfig.h deleted file mode 100644 index debb39009..000000000 --- a/poky/meta/recipes-devtools/python-numpy/files/powerpc64/_numpyconfig.h +++ /dev/null @@ -1,32 +0,0 @@ -#define NPY_HAVE_ENDIAN_H 1 -#define NPY_SIZEOF_SHORT SIZEOF_SHORT -#define NPY_SIZEOF_INT SIZEOF_INT -#define NPY_SIZEOF_LONG SIZEOF_LONG -#define NPY_SIZEOF_FLOAT 4 -#define NPY_SIZEOF_COMPLEX_FLOAT 8 -#define NPY_SIZEOF_DOUBLE 8 -#define NPY_SIZEOF_COMPLEX_DOUBLE 16 -#define NPY_SIZEOF_LONGDOUBLE 16 -#define NPY_SIZEOF_COMPLEX_LONGDOUBLE 32 -#define NPY_ENABLE_SEPARATE_COMPILATION 1 -#define NPY_SIZEOF_PY_INTPTR_T 8 -#define NPY_SIZEOF_PY_LONG_LONG 8 -#define NPY_SIZEOF_LONGLONG 8 -#define NPY_SIZEOF_OFF_T 8 -#define NPY_NO_SMP 0 -#define NPY_HAVE_DECL_ISNAN -#define NPY_HAVE_DECL_ISINF -#define NPY_HAVE_DECL_ISFINITE -#define NPY_HAVE_DECL_SIGNBIT -#define NPY_USE_C99_COMPLEX 1 -#define NPY_HAVE_COMPLEX_DOUBLE 1 -#define NPY_HAVE_COMPLEX_FLOAT 1 -#define NPY_HAVE_COMPLEX_LONG_DOUBLE 1 -#define NPY_USE_C99_FORMATS 1 -#define NPY_VISIBILITY_HIDDEN __attribute__((visibility("hidden"))) -#define NPY_ABI_VERSION 0x01000009 -#define NPY_API_VERSION 0x0000000A - -#ifndef __STDC_FORMAT_MACROS -#define __STDC_FORMAT_MACROS 1 -#endif diff --git a/poky/meta/recipes-devtools/python-numpy/files/powerpc64/config.h b/poky/meta/recipes-devtools/python-numpy/files/powerpc64/config.h deleted file mode 100644 index c30b868f2..000000000 --- a/poky/meta/recipes-devtools/python-numpy/files/powerpc64/config.h +++ /dev/null @@ -1,139 +0,0 @@ -#define HAVE_ENDIAN_H 1 -#define SIZEOF_PY_INTPTR_T 8 -#define SIZEOF_PY_LONG_LONG 8 -#define MATHLIB m -#define HAVE_SIN 1 -#define HAVE_COS 1 -#define HAVE_TAN 1 -#define HAVE_SINH 1 -#define HAVE_COSH 1 -#define HAVE_TANH 1 -#define HAVE_FABS 1 -#define HAVE_FLOOR 1 -#define HAVE_CEIL 1 -#define HAVE_SQRT 1 -#define HAVE_LOG10 1 -#define HAVE_LOG 1 -#define HAVE_EXP 1 -#define HAVE_ASIN 1 -#define HAVE_ACOS 1 -#define HAVE_ATAN 1 -#define HAVE_FMOD 1 -#define HAVE_MODF 1 -#define HAVE_FREXP 1 -#define HAVE_LDEXP 1 -#define HAVE_RINT 1 -#define HAVE_TRUNC 1 -#define HAVE_EXP2 1 -#define HAVE_LOG2 1 -#define HAVE_ATAN2 1 -#define HAVE_POW 1 -#define HAVE_NEXTAFTER 1 -#define HAVE_SINF 1 -#define HAVE_COSF 1 -#define HAVE_TANF 1 -#define HAVE_SINHF 1 -#define HAVE_COSHF 1 -#define HAVE_TANHF 1 -#define HAVE_FABSF 1 -#define HAVE_FLOORF 1 -#define HAVE_CEILF 1 -#define HAVE_RINTF 1 -#define HAVE_TRUNCF 1 -#define HAVE_SQRTF 1 -#define HAVE_LOG10F 1 -#define HAVE_LOGF 1 -#define HAVE_LOG1PF 1 -#define HAVE_EXPF 1 -#define HAVE_EXPM1F 1 -#define HAVE_ASINF 1 -#define HAVE_ACOSF 1 -#define HAVE_ATANF 1 -#define HAVE_ASINHF 1 -#define HAVE_ACOSHF 1 -#define HAVE_ATANHF 1 -#define HAVE_HYPOTF 1 -#define HAVE_ATAN2F 1 -#define HAVE_POWF 1 -#define HAVE_FMODF 1 -#define HAVE_MODFF 1 -#define HAVE_FREXPF 1 -#define HAVE_LDEXPF 1 -#define HAVE_EXP2F 1 -#define HAVE_LOG2F 1 -#define HAVE_COPYSIGNF 1 -#define HAVE_NEXTAFTERF 1 -#define HAVE_SINL 1 -#define HAVE_COSL 1 -#define HAVE_TANL 1 -#define HAVE_SINHL 1 -#define HAVE_COSHL 1 -#define HAVE_TANHL 1 -#define HAVE_FABSL 1 -#define HAVE_FLOORL 1 -#define HAVE_CEILL 1 -#define HAVE_RINTL 1 -#define HAVE_TRUNCL 1 -#define HAVE_SQRTL 1 -#define HAVE_LOG10L 1 -#define HAVE_LOGL 1 -#define HAVE_LOG1PL 1 -#define HAVE_EXPL 1 -#define HAVE_EXPM1L 1 -#define HAVE_ASINL 1 -#define HAVE_ACOSL 1 -#define HAVE_ATANL 1 -#define HAVE_ASINHL 1 -#define HAVE_ACOSHL 1 -#define HAVE_ATANHL 1 -#define HAVE_HYPOTL 1 -#define HAVE_ATAN2L 1 -#define HAVE_POWL 1 -#define HAVE_FMODL 1 -#define HAVE_MODFL 1 -#define HAVE_FREXPL 1 -#define HAVE_LDEXPL 1 -#define HAVE_EXP2L 1 -#define HAVE_LOG2L 1 -#define HAVE_COPYSIGNL 1 -#define HAVE_NEXTAFTERL 1 -#define HAVE_DECL_SIGNBIT -#define HAVE_COMPLEX_H 1 -#define HAVE_CREAL 1 -#define HAVE_CIMAG 1 -#define HAVE_CABS 1 -#define HAVE_CARG 1 -#define HAVE_CEXP 1 -#define HAVE_CSQRT 1 -#define HAVE_CLOG 1 -#define HAVE_CCOS 1 -#define HAVE_CSIN 1 -#define HAVE_CPOW 1 -#define HAVE_CREALF 1 -#define HAVE_CIMAGF 1 -#define HAVE_CABSF 1 -#define HAVE_CARGF 1 -#define HAVE_CEXPF 1 -#define HAVE_CSQRTF 1 -#define HAVE_CLOGF 1 -#define HAVE_CCOSF 1 -#define HAVE_CSINF 1 -#define HAVE_CPOWF 1 -#define HAVE_CREALL 1 -#define HAVE_CIMAGL 1 -#define HAVE_CABSL 1 -#define HAVE_CARGL 1 -#define HAVE_CEXPL 1 -#define HAVE_CSQRTL 1 -#define HAVE_CLOGL 1 -#define HAVE_CCOSL 1 -#define HAVE_CSINL 1 -#define HAVE_CPOWL 1 -#define HAVE_LDOUBLE_IEEE_QUAD_LE 1 -#ifndef __cplusplus -/* #undef inline */ -#endif - -#ifndef _NPY_NPY_CONFIG_H_ -#error config.h should never be included directly, include npy_config.h instead -#endif diff --git a/poky/meta/recipes-devtools/python-numpy/files/riscv64/_numpyconfig.h b/poky/meta/recipes-devtools/python-numpy/files/riscv64/_numpyconfig.h deleted file mode 100644 index 109deb043..000000000 --- a/poky/meta/recipes-devtools/python-numpy/files/riscv64/_numpyconfig.h +++ /dev/null @@ -1,32 +0,0 @@ -#define NPY_HAVE_ENDIAN_H 1 -#define NPY_SIZEOF_SHORT SIZEOF_SHORT -#define NPY_SIZEOF_INT SIZEOF_INT -#define NPY_SIZEOF_LONG SIZEOF_LONG -#define NPY_SIZEOF_FLOAT 4 -#define NPY_SIZEOF_COMPLEX_FLOAT 8 -#define NPY_SIZEOF_DOUBLE 8 -#define NPY_SIZEOF_COMPLEX_DOUBLE 16 -#define NPY_SIZEOF_LONGDOUBLE 16 -#define NPY_SIZEOF_COMPLEX_LONGDOUBLE 32 -#define NPY_SIZEOF_PY_INTPTR_T 8 -#define NPY_SIZEOF_PY_LONG_LONG 8 -#define NPY_SIZEOF_LONGLONG 8 -#define NPY_SIZEOF_OFF_T 8 -#define NPY_NO_SMP 0 -#define NPY_HAVE_DECL_ISNAN -#define NPY_HAVE_DECL_ISINF -#define NPY_HAVE_DECL_ISFINITE -#define NPY_HAVE_DECL_SIGNBIT -#define NPY_USE_C99_COMPLEX 1 -#define NPY_HAVE_COMPLEX_DOUBLE 1 -#define NPY_HAVE_COMPLEX_FLOAT 1 -#define NPY_HAVE_COMPLEX_LONG_DOUBLE 1 -#define NPY_ENABLE_SEPARATE_COMPILATION 1 -#define NPY_USE_C99_FORMATS 1 -#define NPY_VISIBILITY_HIDDEN __attribute__((visibility("hidden"))) -#define NPY_ABI_VERSION 0x01000009 -#define NPY_API_VERSION 0x0000000A - -#ifndef __STDC_FORMAT_MACROS -#define __STDC_FORMAT_MACROS 1 -#endif diff --git a/poky/meta/recipes-devtools/python-numpy/files/riscv64/config.h b/poky/meta/recipes-devtools/python-numpy/files/riscv64/config.h deleted file mode 100644 index c30b868f2..000000000 --- a/poky/meta/recipes-devtools/python-numpy/files/riscv64/config.h +++ /dev/null @@ -1,139 +0,0 @@ -#define HAVE_ENDIAN_H 1 -#define SIZEOF_PY_INTPTR_T 8 -#define SIZEOF_PY_LONG_LONG 8 -#define MATHLIB m -#define HAVE_SIN 1 -#define HAVE_COS 1 -#define HAVE_TAN 1 -#define HAVE_SINH 1 -#define HAVE_COSH 1 -#define HAVE_TANH 1 -#define HAVE_FABS 1 -#define HAVE_FLOOR 1 -#define HAVE_CEIL 1 -#define HAVE_SQRT 1 -#define HAVE_LOG10 1 -#define HAVE_LOG 1 -#define HAVE_EXP 1 -#define HAVE_ASIN 1 -#define HAVE_ACOS 1 -#define HAVE_ATAN 1 -#define HAVE_FMOD 1 -#define HAVE_MODF 1 -#define HAVE_FREXP 1 -#define HAVE_LDEXP 1 -#define HAVE_RINT 1 -#define HAVE_TRUNC 1 -#define HAVE_EXP2 1 -#define HAVE_LOG2 1 -#define HAVE_ATAN2 1 -#define HAVE_POW 1 -#define HAVE_NEXTAFTER 1 -#define HAVE_SINF 1 -#define HAVE_COSF 1 -#define HAVE_TANF 1 -#define HAVE_SINHF 1 -#define HAVE_COSHF 1 -#define HAVE_TANHF 1 -#define HAVE_FABSF 1 -#define HAVE_FLOORF 1 -#define HAVE_CEILF 1 -#define HAVE_RINTF 1 -#define HAVE_TRUNCF 1 -#define HAVE_SQRTF 1 -#define HAVE_LOG10F 1 -#define HAVE_LOGF 1 -#define HAVE_LOG1PF 1 -#define HAVE_EXPF 1 -#define HAVE_EXPM1F 1 -#define HAVE_ASINF 1 -#define HAVE_ACOSF 1 -#define HAVE_ATANF 1 -#define HAVE_ASINHF 1 -#define HAVE_ACOSHF 1 -#define HAVE_ATANHF 1 -#define HAVE_HYPOTF 1 -#define HAVE_ATAN2F 1 -#define HAVE_POWF 1 -#define HAVE_FMODF 1 -#define HAVE_MODFF 1 -#define HAVE_FREXPF 1 -#define HAVE_LDEXPF 1 -#define HAVE_EXP2F 1 -#define HAVE_LOG2F 1 -#define HAVE_COPYSIGNF 1 -#define HAVE_NEXTAFTERF 1 -#define HAVE_SINL 1 -#define HAVE_COSL 1 -#define HAVE_TANL 1 -#define HAVE_SINHL 1 -#define HAVE_COSHL 1 -#define HAVE_TANHL 1 -#define HAVE_FABSL 1 -#define HAVE_FLOORL 1 -#define HAVE_CEILL 1 -#define HAVE_RINTL 1 -#define HAVE_TRUNCL 1 -#define HAVE_SQRTL 1 -#define HAVE_LOG10L 1 -#define HAVE_LOGL 1 -#define HAVE_LOG1PL 1 -#define HAVE_EXPL 1 -#define HAVE_EXPM1L 1 -#define HAVE_ASINL 1 -#define HAVE_ACOSL 1 -#define HAVE_ATANL 1 -#define HAVE_ASINHL 1 -#define HAVE_ACOSHL 1 -#define HAVE_ATANHL 1 -#define HAVE_HYPOTL 1 -#define HAVE_ATAN2L 1 -#define HAVE_POWL 1 -#define HAVE_FMODL 1 -#define HAVE_MODFL 1 -#define HAVE_FREXPL 1 -#define HAVE_LDEXPL 1 -#define HAVE_EXP2L 1 -#define HAVE_LOG2L 1 -#define HAVE_COPYSIGNL 1 -#define HAVE_NEXTAFTERL 1 -#define HAVE_DECL_SIGNBIT -#define HAVE_COMPLEX_H 1 -#define HAVE_CREAL 1 -#define HAVE_CIMAG 1 -#define HAVE_CABS 1 -#define HAVE_CARG 1 -#define HAVE_CEXP 1 -#define HAVE_CSQRT 1 -#define HAVE_CLOG 1 -#define HAVE_CCOS 1 -#define HAVE_CSIN 1 -#define HAVE_CPOW 1 -#define HAVE_CREALF 1 -#define HAVE_CIMAGF 1 -#define HAVE_CABSF 1 -#define HAVE_CARGF 1 -#define HAVE_CEXPF 1 -#define HAVE_CSQRTF 1 -#define HAVE_CLOGF 1 -#define HAVE_CCOSF 1 -#define HAVE_CSINF 1 -#define HAVE_CPOWF 1 -#define HAVE_CREALL 1 -#define HAVE_CIMAGL 1 -#define HAVE_CABSL 1 -#define HAVE_CARGL 1 -#define HAVE_CEXPL 1 -#define HAVE_CSQRTL 1 -#define HAVE_CLOGL 1 -#define HAVE_CCOSL 1 -#define HAVE_CSINL 1 -#define HAVE_CPOWL 1 -#define HAVE_LDOUBLE_IEEE_QUAD_LE 1 -#ifndef __cplusplus -/* #undef inline */ -#endif - -#ifndef _NPY_NPY_CONFIG_H_ -#error config.h should never be included directly, include npy_config.h instead -#endif diff --git a/poky/meta/recipes-devtools/python-numpy/files/x86-64/_numpyconfig.h b/poky/meta/recipes-devtools/python-numpy/files/x86-64/_numpyconfig.h deleted file mode 100644 index b33036164..000000000 --- a/poky/meta/recipes-devtools/python-numpy/files/x86-64/_numpyconfig.h +++ /dev/null @@ -1,32 +0,0 @@ -#define NPY_HAVE_ENDIAN_H 1 -#define NPY_SIZEOF_SHORT SIZEOF_SHORT -#define NPY_SIZEOF_INT SIZEOF_INT -#define NPY_SIZEOF_LONG SIZEOF_LONG -#define NPY_SIZEOF_FLOAT 4 -#define NPY_SIZEOF_COMPLEX_FLOAT 8 -#define NPY_SIZEOF_DOUBLE 8 -#define NPY_SIZEOF_OFF_T 8 -#define NPY_SIZEOF_COMPLEX_DOUBLE 16 -#define NPY_SIZEOF_LONGDOUBLE 16 -#define NPY_SIZEOF_COMPLEX_LONGDOUBLE 32 -#define NPY_ENABLE_SEPARATE_COMPILATION 1 -#define NPY_SIZEOF_PY_INTPTR_T 8 -#define NPY_SIZEOF_PY_LONG_LONG 8 -#define NPY_SIZEOF_LONGLONG 8 -#define NPY_NO_SMP 0 -#define NPY_HAVE_DECL_ISNAN -#define NPY_HAVE_DECL_ISINF -#define NPY_HAVE_DECL_ISFINITE -#define NPY_HAVE_DECL_SIGNBIT -#define NPY_USE_C99_COMPLEX 1 -#define NPY_HAVE_COMPLEX_DOUBLE 1 -#define NPY_HAVE_COMPLEX_FLOAT 1 -#define NPY_HAVE_COMPLEX_LONG_DOUBLE 1 -#define NPY_USE_C99_FORMATS 1 -#define NPY_VISIBILITY_HIDDEN __attribute__((visibility("hidden"))) -#define NPY_ABI_VERSION 0x01000009 -#define NPY_API_VERSION 0x0000000A - -#ifndef __STDC_FORMAT_MACROS -#define __STDC_FORMAT_MACROS 1 -#endif diff --git a/poky/meta/recipes-devtools/python-numpy/files/x86-64/config.h b/poky/meta/recipes-devtools/python-numpy/files/x86-64/config.h deleted file mode 100644 index 0ce63b7d2..000000000 --- a/poky/meta/recipes-devtools/python-numpy/files/x86-64/config.h +++ /dev/null @@ -1,139 +0,0 @@ -#define HAVE_ENDIAN_H 1 -#define SIZEOF_PY_INTPTR_T 8 -#define SIZEOF_PY_LONG_LONG 8 -#define MATHLIB m -#define HAVE_SIN 1 -#define HAVE_COS 1 -#define HAVE_TAN 1 -#define HAVE_SINH 1 -#define HAVE_COSH 1 -#define HAVE_TANH 1 -#define HAVE_FABS 1 -#define HAVE_FLOOR 1 -#define HAVE_CEIL 1 -#define HAVE_SQRT 1 -#define HAVE_LOG10 1 -#define HAVE_LOG 1 -#define HAVE_EXP 1 -#define HAVE_ASIN 1 -#define HAVE_ACOS 1 -#define HAVE_ATAN 1 -#define HAVE_FMOD 1 -#define HAVE_MODF 1 -#define HAVE_FREXP 1 -#define HAVE_LDEXP 1 -#define HAVE_RINT 1 -#define HAVE_TRUNC 1 -#define HAVE_EXP2 1 -#define HAVE_LOG2 1 -#define HAVE_ATAN2 1 -#define HAVE_POW 1 -#define HAVE_NEXTAFTER 1 -#define HAVE_SINF 1 -#define HAVE_COSF 1 -#define HAVE_TANF 1 -#define HAVE_SINHF 1 -#define HAVE_COSHF 1 -#define HAVE_TANHF 1 -#define HAVE_FABSF 1 -#define HAVE_FLOORF 1 -#define HAVE_CEILF 1 -#define HAVE_RINTF 1 -#define HAVE_TRUNCF 1 -#define HAVE_SQRTF 1 -#define HAVE_LOG10F 1 -#define HAVE_LOGF 1 -#define HAVE_LOG1PF 1 -#define HAVE_EXPF 1 -#define HAVE_EXPM1F 1 -#define HAVE_ASINF 1 -#define HAVE_ACOSF 1 -#define HAVE_ATANF 1 -#define HAVE_ASINHF 1 -#define HAVE_ACOSHF 1 -#define HAVE_ATANHF 1 -#define HAVE_HYPOTF 1 -#define HAVE_ATAN2F 1 -#define HAVE_POWF 1 -#define HAVE_FMODF 1 -#define HAVE_MODFF 1 -#define HAVE_FREXPF 1 -#define HAVE_LDEXPF 1 -#define HAVE_EXP2F 1 -#define HAVE_LOG2F 1 -#define HAVE_COPYSIGNF 1 -#define HAVE_NEXTAFTERF 1 -#define HAVE_SINL 1 -#define HAVE_COSL 1 -#define HAVE_TANL 1 -#define HAVE_SINHL 1 -#define HAVE_COSHL 1 -#define HAVE_TANHL 1 -#define HAVE_FABSL 1 -#define HAVE_FLOORL 1 -#define HAVE_CEILL 1 -#define HAVE_RINTL 1 -#define HAVE_TRUNCL 1 -#define HAVE_SQRTL 1 -#define HAVE_LOG10L 1 -#define HAVE_LOGL 1 -#define HAVE_LOG1PL 1 -#define HAVE_EXPL 1 -#define HAVE_EXPM1L 1 -#define HAVE_ASINL 1 -#define HAVE_ACOSL 1 -#define HAVE_ATANL 1 -#define HAVE_ASINHL 1 -#define HAVE_ACOSHL 1 -#define HAVE_ATANHL 1 -#define HAVE_HYPOTL 1 -#define HAVE_ATAN2L 1 -#define HAVE_POWL 1 -#define HAVE_FMODL 1 -#define HAVE_MODFL 1 -#define HAVE_FREXPL 1 -#define HAVE_LDEXPL 1 -#define HAVE_EXP2L 1 -#define HAVE_LOG2L 1 -#define HAVE_COPYSIGNL 1 -#define HAVE_NEXTAFTERL 1 -#define HAVE_DECL_SIGNBIT -#define HAVE_COMPLEX_H 1 -#define HAVE_CREAL 1 -#define HAVE_CIMAG 1 -#define HAVE_CABS 1 -#define HAVE_CARG 1 -#define HAVE_CEXP 1 -#define HAVE_CSQRT 1 -#define HAVE_CLOG 1 -#define HAVE_CCOS 1 -#define HAVE_CSIN 1 -#define HAVE_CPOW 1 -#define HAVE_CREALF 1 -#define HAVE_CIMAGF 1 -#define HAVE_CABSF 1 -#define HAVE_CARGF 1 -#define HAVE_CEXPF 1 -#define HAVE_CSQRTF 1 -#define HAVE_CLOGF 1 -#define HAVE_CCOSF 1 -#define HAVE_CSINF 1 -#define HAVE_CPOWF 1 -#define HAVE_CREALL 1 -#define HAVE_CIMAGL 1 -#define HAVE_CABSL 1 -#define HAVE_CARGL 1 -#define HAVE_CEXPL 1 -#define HAVE_CSQRTL 1 -#define HAVE_CLOGL 1 -#define HAVE_CCOSL 1 -#define HAVE_CSINL 1 -#define HAVE_CPOWL 1 -#define HAVE_LDOUBLE_INTEL_EXTENDED_16_BYTES_LE 1 -#ifndef __cplusplus -/* #undef inline */ -#endif - -#ifndef _NPY_NPY_CONFIG_H_ -#error config.h should never be included directly, include npy_config.h instead -#endif diff --git a/poky/meta/recipes-devtools/python-numpy/files/x86/config.h b/poky/meta/recipes-devtools/python-numpy/files/x86/config.h deleted file mode 100644 index 08e41e3d9..000000000 --- a/poky/meta/recipes-devtools/python-numpy/files/x86/config.h +++ /dev/null @@ -1,108 +0,0 @@ -#define SIZEOF_PY_INTPTR_T 4 -#define SIZEOF_PY_LONG_LONG 8 -#define MATHLIB m -#define HAVE_SIN -#define HAVE_COS -#define HAVE_TAN -#define HAVE_SINH -#define HAVE_COSH -#define HAVE_TANH -#define HAVE_FABS -#define HAVE_FLOOR -#define HAVE_CEIL -#define HAVE_SQRT -#define HAVE_LOG10 -#define HAVE_LOG -#define HAVE_EXP -#define HAVE_ASIN -#define HAVE_ACOS -#define HAVE_ATAN -#define HAVE_FMOD -#define HAVE_MODF -#define HAVE_FREXP -#define HAVE_LDEXP -#define HAVE_RINT -#define HAVE_TRUNC -#define HAVE_EXP2 -#define HAVE_LOG2 -#define HAVE_ATAN2 -#define HAVE_POW -#define HAVE_NEXTAFTER -#define HAVE_SINF -#define HAVE_COSF -#define HAVE_TANF -#define HAVE_SINHF -#define HAVE_COSHF -#define HAVE_TANHF -#define HAVE_FABSF -#define HAVE_FLOORF -#define HAVE_CEILF -#define HAVE_RINTF -#define HAVE_TRUNCF -#define HAVE_SQRTF -#define HAVE_LOG10F -#define HAVE_LOGF -#define HAVE_LOG1PF -#define HAVE_EXPF -#define HAVE_EXPM1F -#define HAVE_ASINF -#define HAVE_ACOSF -#define HAVE_ATANF -#define HAVE_ASINHF -#define HAVE_ACOSHF -#define HAVE_ATANHF -#define HAVE_HYPOTF -#define HAVE_ATAN2F -#define HAVE_POWF -#define HAVE_FMODF -#define HAVE_MODFF -#define HAVE_FREXPF -#define HAVE_LDEXPF -#define HAVE_EXP2F -#define HAVE_LOG2F -#define HAVE_COPYSIGNF -#define HAVE_NEXTAFTERF -#define HAVE_SINL -#define HAVE_COSL -#define HAVE_TANL -#define HAVE_SINHL -#define HAVE_COSHL -#define HAVE_TANHL -#define HAVE_FABSL -#define HAVE_FLOORL -#define HAVE_CEILL -#define HAVE_RINTL -#define HAVE_TRUNCL -#define HAVE_SQRTL -#define HAVE_LOG10L -#define HAVE_LOGL -#define HAVE_LOG1PL -#define HAVE_EXPL -#define HAVE_EXPM1L -#define HAVE_ASINL -#define HAVE_ACOSL -#define HAVE_ATANL -#define HAVE_ASINHL -#define HAVE_ACOSHL -#define HAVE_ATANHL -#define HAVE_HYPOTL -#define HAVE_ATAN2L -#define HAVE_POWL -#define HAVE_FMODL -#define HAVE_MODFL -#define HAVE_FREXPL -#define HAVE_LDEXPL -#define HAVE_EXP2L -#define HAVE_LOG2L -#define HAVE_COPYSIGNL -#define HAVE_NEXTAFTERL -#define HAVE_DECL_SIGNBIT -#define HAVE_COMPLEX_H -#define HAVE_LDOUBLE_INTEL_EXTENDED_12_BYTES_LE 1 -#ifndef __cplusplus -/* #undef inline */ -#endif - -#ifndef _NPY_NPY_CONFIG_H_ -#error config.h should never be included directly, include npy_config.h instead -#endif diff --git a/poky/meta/recipes-devtools/python-numpy/files/x86/numpyconfig.h b/poky/meta/recipes-devtools/python-numpy/files/x86/numpyconfig.h deleted file mode 100644 index ff7938cd9..000000000 --- a/poky/meta/recipes-devtools/python-numpy/files/x86/numpyconfig.h +++ /dev/null @@ -1,24 +0,0 @@ -#ifndef _NPY_NUMPYCONFIG_H_ -#define _NPY_NUMPYCONFIG_H_ - -#include "_numpyconfig.h" - -/* - * On Mac OS X, because there is only one configuration stage for all the archs - * in universal builds, any macro which depends on the arch needs to be - * harcoded - */ -#ifdef __APPLE__ - #undef NPY_SIZEOF_LONG - #undef NPY_SIZEOF_PY_INTPTR_T - - #ifdef __LP64__ - #define NPY_SIZEOF_LONG 8 - #define NPY_SIZEOF_PY_INTPTR_T 8 - #else - #define NPY_SIZEOF_LONG 4 - #define NPY_SIZEOF_PY_INTPTR_T 4 - #endif -#endif - -#endif diff --git a/poky/meta/recipes-devtools/python-numpy/python-numpy.inc b/poky/meta/recipes-devtools/python-numpy/python-numpy.inc index a12e72f96..f68b90e6b 100644 --- a/poky/meta/recipes-devtools/python-numpy/python-numpy.inc +++ b/poky/meta/recipes-devtools/python-numpy/python-numpy.inc @@ -8,7 +8,6 @@ SRCNAME = "numpy" SRC_URI = "https://github.com/${SRCNAME}/${SRCNAME}/releases/download/v${PV}/${SRCNAME}-${PV}.tar.gz \ file://0001-Don-t-search-usr-and-so-on-for-libraries-by-default-.patch \ file://0001-npy_cpu-Add-riscv-support.patch \ - ${CONFIGFILESURI} \ file://0001-numpy-random-setup.py-remove-the-detection-of-x86-ta.patch \ " SRC_URI[md5sum] = "c48b2ad785f82cdfe28c907ce35e2a71" @@ -20,77 +19,10 @@ UPSTREAM_CHECK_REGEX = "(?P<pver>\d+(\.\d+)+)\.tar" # Needed for building with gcc 4.x from centos 7 CFLAGS_append_class-native = " -std=c99" -CONFIGFILESURI ?= "" - -CONFIGFILESURI_aarch64 = " \ - file://config.h \ - file://_numpyconfig.h \ -" -CONFIGFILESURI_arm = " \ - file://config.h \ - file://numpyconfig.h \ -" -CONFIGFILESURI_armeb = " \ - file://config.h \ - file://numpyconfig.h \ -" -CONFIGFILESURI_mipsarcho32el = " \ - file://config.h \ - file://numpyconfig.h \ -" -CONFIGFILESURI_x86 = " \ - file://config.h \ - file://numpyconfig.h \ -" -CONFIGFILESURI_x86-64 = " \ - file://config.h \ - file://_numpyconfig.h \ -" -CONFIGFILESURI_mipsarcho32eb = " \ - file://config.h \ - file://_numpyconfig.h \ -" -CONFIGFILESURI_powerpc = " \ - file://config.h \ - file://_numpyconfig.h \ -" -CONFIGFILESURI_powerpc64 = " \ - file://config.h \ - file://_numpyconfig.h \ -" -CONFIGFILESURI_mipsarchn64eb = " \ - file://config.h \ - file://_numpyconfig.h \ -" -CONFIGFILESURI_mipsarchn64el = " \ - file://config.h \ - file://_numpyconfig.h \ -" -CONFIGFILESURI_mipsarchn32eb = " \ - file://config.h \ - file://_numpyconfig.h \ -" -CONFIGFILESURI_mipsarchn32el = " \ - file://config.h \ - file://_numpyconfig.h \ -" -CONFIGFILESURI_riscv64 = " \ - file://config.h \ - file://_numpyconfig.h \ -" - S = "${WORKDIR}/numpy-${PV}" CLEANBROKEN = "1" -# Make the build fail and replace *config.h with proper one -# This is a ugly, ugly hack - Koen -do_compile_prepend_class-target() { - ${STAGING_BINDIR_NATIVE}/${PYTHON_PN}-native/${PYTHON_PN} setup.py build ${DISTUTILS_BUILD_ARGS} || \ - true - cp ${WORKDIR}/*config.h ${S}/build/$(ls ${S}/build | grep src)/numpy/core/include/numpy/ -} - FILES_${PN}-staticdev += "${PYTHON_SITEPACKAGES_DIR}/numpy/core/lib/*.a" # install what is needed for numpy.test() diff --git a/poky/meta/recipes-devtools/python/python-native/0001-python-native-fix-one-do_populate_sysroot-warning.patch b/poky/meta/recipes-devtools/python/python-native/0001-python-native-fix-one-do_populate_sysroot-warning.patch index 989818927..707ee596f 100644 --- a/poky/meta/recipes-devtools/python/python-native/0001-python-native-fix-one-do_populate_sysroot-warning.patch +++ b/poky/meta/recipes-devtools/python/python-native/0001-python-native-fix-one-do_populate_sysroot-warning.patch @@ -1,4 +1,4 @@ -From 12292444e1b3662b994bc223d92b8338fb0895ff Mon Sep 17 00:00:00 2001 +From 6cbb7529cf7ff0da3ca649fb3486facd9620d625 Mon Sep 17 00:00:00 2001 From: Changqing Li <changqing.li@windriver.com> Date: Thu, 25 Oct 2018 07:32:14 +0000 Subject: [PATCH] python-native: fix one do_populate_sysroot warning @@ -17,23 +17,24 @@ when do_populate_sysroot. use append to fix it. Upstream-Status: Inappropriate [oe-specific] Signed-off-by: Changqing Li <changqing.li@windriver.com> + --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py -index 7bf13ed..6c0f29b 100644 +index a2c8127..22f9e23 100644 --- a/setup.py +++ b/setup.py -@@ -40,7 +40,7 @@ def add_dir_to_list(dirlist, dir): - 1) 'dir' is not already in 'dirlist' - 2) 'dir' actually exists, and is a directory.""" - if dir is not None and os.path.isdir(dir) and dir not in dirlist: -- dirlist.insert(0, dir) -+ dirlist.append(dir) - - def macosx_sdk_root(): - """ +@@ -47,7 +47,7 @@ def add_dir_to_list(dirlist, dir): + else: + dir_exists = os.path.isdir(dir) + if dir_exists: +- dirlist.insert(0, dir) ++ dirlist.append(dir) + + MACOS_SDK_ROOT = None + -- -2.18.0 +2.17.1 diff --git a/poky/meta/recipes-devtools/python/python-native/debug.patch b/poky/meta/recipes-devtools/python/python-native/debug.patch deleted file mode 100644 index 361788264..000000000 --- a/poky/meta/recipes-devtools/python/python-native/debug.patch +++ /dev/null @@ -1,32 +0,0 @@ -Upstream-Status: Pending - -Index: Python-2.7.12/Lib/distutils/unixccompiler.py -=================================================================== ---- Python-2.7.12.orig/Lib/distutils/unixccompiler.py -+++ Python-2.7.12/Lib/distutils/unixccompiler.py -@@ -278,6 +278,8 @@ class UnixCCompiler(CCompiler): - - - -+ print "Looking in %s for %s" % (lib, dirs) -+ - for dir in dirs: - shared = os.path.join(dir, shared_f) - dylib = os.path.join(dir, dylib_f) -@@ -298,12 +300,16 @@ class UnixCCompiler(CCompiler): - # assuming that *all* Unix C compilers do. And of course I'm - # ignoring even GCC's "-static" option. So sue me. - if os.path.exists(dylib): -+ print "Found %s" % (dylib) - return dylib - elif os.path.exists(xcode_stub): -+ print "Found %s" % (xcode_stub) - return xcode_stub - elif os.path.exists(shared): -+ print "Found %s" % (shared) - return shared - elif os.path.exists(static): -+ print "Found %s" % (static) - return static - - # Oops, didn't find it in *any* of 'dirs' diff --git a/poky/meta/recipes-devtools/python/python-native_2.7.16.bb b/poky/meta/recipes-devtools/python/python-native_2.7.17.bb index b7442800d..936810d98 100644 --- a/poky/meta/recipes-devtools/python/python-native_2.7.16.bb +++ b/poky/meta/recipes-devtools/python/python-native_2.7.17.bb @@ -7,12 +7,11 @@ SRC_URI += "\ file://10-distutils-fix-swig-parameter.patch \ file://11-distutils-never-modify-shebang-line.patch \ file://0001-distutils-set-the-prefix-to-be-inside-staging-direct.patch \ - file://debug.patch \ file://unixccompiler.patch \ file://nohostlibs.patch \ file://multilib.patch \ file://add-md5module-support.patch \ - file://builddir.patch \ + file://0001-python-Resolve-intermediate-staging-issues.patch \ file://parallel-makeinst-create-bindir.patch \ file://revert_use_of_sysconfigdata.patch \ file://0001-python-native-fix-one-do_populate_sysroot-warning.patch \ diff --git a/poky/meta/recipes-devtools/python/python-setuptools.inc b/poky/meta/recipes-devtools/python/python-setuptools.inc index 322197eed..027e259be 100644 --- a/poky/meta/recipes-devtools/python/python-setuptools.inc +++ b/poky/meta/recipes-devtools/python/python-setuptools.inc @@ -10,8 +10,8 @@ inherit pypi SRC_URI_append_class-native = " file://0001-conditionally-do-not-fetch-code-by-easy_install.patch" -SRC_URI[md5sum] = "a3470ce184da33f0fa6c9f44f6221bc0" -SRC_URI[sha256sum] = "66b86bbae7cc7ac2e867f52dc08a6bd064d938bac59dfec71b9b565dd36d6012" +SRC_URI[md5sum] = "89a592d733b31e180a4b6ad760c0685a" +SRC_URI[sha256sum] = "7eae782ccf36b790c21bde7d86a4f303a441cd77036b25c559a602cf5186ce4d" DEPENDS += "${PYTHON_PN}" diff --git a/poky/meta/recipes-devtools/python/python-setuptools_41.2.0.bb b/poky/meta/recipes-devtools/python/python-setuptools_41.4.0.bb index cf9440495..cf9440495 100644 --- a/poky/meta/recipes-devtools/python/python-setuptools_41.2.0.bb +++ b/poky/meta/recipes-devtools/python/python-setuptools_41.4.0.bb diff --git a/poky/meta/recipes-devtools/python/python-six.inc b/poky/meta/recipes-devtools/python/python-six.inc index c706dcaf2..c386090b4 100644 --- a/poky/meta/recipes-devtools/python/python-six.inc +++ b/poky/meta/recipes-devtools/python/python-six.inc @@ -2,10 +2,10 @@ SUMMARY = "Python 2 and 3 compatibility library" HOMEPAGE = "https://pypi.python.org/pypi/six/" SECTION = "devel/python" LICENSE = "MIT" -LIC_FILES_CHKSUM = "file://LICENSE;md5=83e0f622bd5ac7d575dbd83d094d69b5" +LIC_FILES_CHKSUM = "file://LICENSE;md5=f82eb3a1a7fade60bda5980935084b62" -SRC_URI[md5sum] = "9ae5d1feed8c0215f4ae4adcd9207fcb" -SRC_URI[sha256sum] = "d16a0141ec1a18405cd4ce8b4613101da75da0e9a7aec5bdd4fa804d0e0eba73" +SRC_URI[md5sum] = "e92c23c882c7d5564ce5773fe31b2771" +SRC_URI[sha256sum] = "30f610279e8b2578cab6db20741130331735c781b56053c59c4076da27f06b66" inherit pypi diff --git a/poky/meta/recipes-devtools/python/python.inc b/poky/meta/recipes-devtools/python/python.inc index 1462b779e..a630c26e8 100644 --- a/poky/meta/recipes-devtools/python/python.inc +++ b/poky/meta/recipes-devtools/python/python.inc @@ -8,16 +8,10 @@ INC_PR = "r1" LIC_FILES_CHKSUM = "file://LICENSE;md5=e466242989bd33c1bd2b6a526a742498" SRC_URI = "http://www.python.org/ftp/python/${PV}/Python-${PV}.tar.xz \ - file://bpo-35907-cve-2019-9948.patch \ - file://bpo-35907-cve-2019-9948-fix.patch \ - file://bpo-36216-cve-2019-9636.patch \ - file://bpo-36216-cve-2019-9636-fix.patch \ - file://CVE-2019-9740.patch \ - file://CVE-2018-20852.patch \ " -SRC_URI[md5sum] = "30157d85a2c0479c09ea2cbe61f2aaf5" -SRC_URI[sha256sum] = "f222ef602647eecb6853681156d32de4450a2c39f4de93bd5b20235f2e660ed7" +SRC_URI[md5sum] = "b3b6d2c92f42a60667814358ab9f0cfd" +SRC_URI[sha256sum] = "4d43f033cdbd0aa7b7023c81b0e986fd11e653b5248dac9144d508f11812ba41" # python recipe is actually python 2.x # also, exclude pre-releases for both python 2.x and 3.x diff --git a/poky/meta/recipes-devtools/python/python/0001-2.7-bpo-34155-Dont-parse-domains-containing-GH-13079.patch b/poky/meta/recipes-devtools/python/python/0001-2.7-bpo-34155-Dont-parse-domains-containing-GH-13079.patch deleted file mode 100644 index 5415472a3..000000000 --- a/poky/meta/recipes-devtools/python/python/0001-2.7-bpo-34155-Dont-parse-domains-containing-GH-13079.patch +++ /dev/null @@ -1,90 +0,0 @@ -From 532ed09c5454bb789a301bb6f1339a0818255610 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Roberto=20C=2E=20S=C3=A1nchez?= <roberto@connexer.com> -Date: Sat, 14 Sep 2019 13:26:38 -0400 -Subject: [PATCH] [2.7] bpo-34155: Dont parse domains containing @ (GH-13079) - (GH-16006) - -This change skips parsing of email addresses where domains include a "@" character, which can be maliciously used since the local part is returned as a complete address. - -(cherry picked from commit 8cb65d1381b027f0b09ee36bfed7f35bb4dec9a9) - -Excludes changes to Lib/email/_header_value_parser.py, which did not -exist in 2.7. - -Co-authored-by: jpic <jpic@users.noreply.github.com> - -https://bugs.python.org/issue34155 - -Upstream-Status: Backport [https://github.com/python/cpython/commit/8cb65d1381b027f0b09ee36bfed7f35bb4dec9a9] - -CVE: CVE-2019-16056 - -Signed-off-by: Chen Qi <Qi.Chen@windriver.com> ---- - Lib/email/_parseaddr.py | 11 ++++++++++- - Lib/email/test/test_email.py | 14 ++++++++++++++ - .../2019-05-04-13-33-37.bpo-34155.MJll68.rst | 1 + - 3 files changed, 25 insertions(+), 1 deletion(-) - create mode 100644 Misc/NEWS.d/next/Security/2019-05-04-13-33-37.bpo-34155.MJll68.rst - -diff --git a/Lib/email/_parseaddr.py b/Lib/email/_parseaddr.py -index 690db2c22d..dc49d2e45a 100644 ---- a/Lib/email/_parseaddr.py -+++ b/Lib/email/_parseaddr.py -@@ -336,7 +336,12 @@ class AddrlistClass: - aslist.append('@') - self.pos += 1 - self.gotonext() -- return EMPTYSTRING.join(aslist) + self.getdomain() -+ domain = self.getdomain() -+ if not domain: -+ # Invalid domain, return an empty address instead of returning a -+ # local part to denote failed parsing. -+ return EMPTYSTRING -+ return EMPTYSTRING.join(aslist) + domain - - def getdomain(self): - """Get the complete domain name from an address.""" -@@ -351,6 +356,10 @@ class AddrlistClass: - elif self.field[self.pos] == '.': - self.pos += 1 - sdlist.append('.') -+ elif self.field[self.pos] == '@': -+ # bpo-34155: Don't parse domains with two `@` like -+ # `a@malicious.org@important.com`. -+ return EMPTYSTRING - elif self.field[self.pos] in self.atomends: - break - else: -diff --git a/Lib/email/test/test_email.py b/Lib/email/test/test_email.py -index 4b4dee3d34..2efe44ac5a 100644 ---- a/Lib/email/test/test_email.py -+++ b/Lib/email/test/test_email.py -@@ -2306,6 +2306,20 @@ class TestMiscellaneous(TestEmailBase): - self.assertEqual(Utils.parseaddr('<>'), ('', '')) - self.assertEqual(Utils.formataddr(Utils.parseaddr('<>')), '') - -+ def test_parseaddr_multiple_domains(self): -+ self.assertEqual( -+ Utils.parseaddr('a@b@c'), -+ ('', '') -+ ) -+ self.assertEqual( -+ Utils.parseaddr('a@b.c@c'), -+ ('', '') -+ ) -+ self.assertEqual( -+ Utils.parseaddr('a@172.17.0.1@c'), -+ ('', '') -+ ) -+ - def test_noquote_dump(self): - self.assertEqual( - Utils.formataddr(('A Silly Person', 'person@dom.ain')), -diff --git a/Misc/NEWS.d/next/Security/2019-05-04-13-33-37.bpo-34155.MJll68.rst b/Misc/NEWS.d/next/Security/2019-05-04-13-33-37.bpo-34155.MJll68.rst -new file mode 100644 -index 0000000000..50292e29ed ---- /dev/null -+++ b/Misc/NEWS.d/next/Security/2019-05-04-13-33-37.bpo-34155.MJll68.rst -@@ -0,0 +1 @@ -+Fix parsing of invalid email addresses with more than one ``@`` (e.g. a@b@c.com.) to not return the part before 2nd ``@`` as valid email address. Patch by maxking & jpic. diff --git a/poky/meta/recipes-devtools/python/python/builddir.patch b/poky/meta/recipes-devtools/python/python/0001-python-Resolve-intermediate-staging-issues.patch index ad629a022..2ff2ccc43 100644 --- a/poky/meta/recipes-devtools/python/python/builddir.patch +++ b/poky/meta/recipes-devtools/python/python/0001-python-Resolve-intermediate-staging-issues.patch @@ -1,5 +1,10 @@ -When cross compiling python, we used to need to install the Makefile, pyconfig.h -and the python library to their final location before being able to compile the +From 77bcb3238b2853d511714544e0f84a37be6c79bf Mon Sep 17 00:00:00 2001 +From: Richard Purdie <richard.purdie@linuxfoundation.org> +Date: Wed, 14 Nov 2012 14:31:24 +0000 +Subject: [PATCH] python: Resolve intermediate staging issues + +When cross compiling python, we used to need to install the Makefile, pyconfig.h +and the python library to their final location before being able to compile the rest of python. This change allows us to point python at its own source when building, avoiding a variety of sysroot staging issues and simplifying the main python recipe. @@ -7,10 +12,29 @@ python recipe. Upstream-Status: Inappropriate RP 2012/11/13 -Index: Python-2.7.9/Lib/sysconfig.py -=================================================================== ---- Python-2.7.9.orig/Lib/sysconfig.py -+++ Python-2.7.9/Lib/sysconfig.py +--- + Lib/distutils/sysconfig.py | 3 +++ + Lib/sysconfig.py | 5 ++++- + 2 files changed, 7 insertions(+), 1 deletion(-) + +diff --git a/Lib/distutils/sysconfig.py b/Lib/distutils/sysconfig.py +index 2f4b8ca..15bceb5 100644 +--- a/Lib/distutils/sysconfig.py ++++ b/Lib/distutils/sysconfig.py +@@ -31,6 +31,9 @@ else: + # sys.executable can be empty if argv[0] has been changed and Python is + # unable to retrieve the real program name + project_base = os.getcwd() ++_PYTHONBUILDDIR = os.environ.get("PYTHONBUILDDIR", None) ++if _PYTHONBUILDDIR: ++ project_base = _PYTHONBUILDDIR + if os.name == "nt" and "pcbuild" in project_base[-8:].lower(): + project_base = os.path.abspath(os.path.join(project_base, os.path.pardir)) + # PC/VS7.1 +diff --git a/Lib/sysconfig.py b/Lib/sysconfig.py +index 9c8350d..bddbe2e 100644 +--- a/Lib/sysconfig.py ++++ b/Lib/sysconfig.py @@ -93,6 +93,7 @@ _PREFIX = os.path.normpath(sys.prefix) _EXEC_PREFIX = os.path.normpath(sys.exec_prefix) _CONFIG_VARS = None @@ -30,17 +54,6 @@ Index: Python-2.7.9/Lib/sysconfig.py _PROJECT_BASE = os.path.dirname(_safe_realpath(sys.executable)) else: # sys.executable can be empty if argv[0] has been changed and Python is -Index: Python-2.7.9/Lib/distutils/sysconfig.py -=================================================================== ---- Python-2.7.9.orig/Lib/distutils/sysconfig.py -+++ Python-2.7.9/Lib/distutils/sysconfig.py -@@ -26,6 +26,9 @@ EXEC_PREFIX = os.path.normpath(sys.exec_ - # live in project/PCBuild9. If we're dealing with an x64 Windows build, - # it'll live in project/PCbuild/amd64. - project_base = os.path.dirname(os.path.abspath(sys.executable)) -+_PYTHONBUILDDIR = os.environ.get("PYTHONBUILDDIR", None) -+if _PYTHONBUILDDIR: -+ project_base = _PYTHONBUILDDIR - if os.name == "nt" and "pcbuild" in project_base[-8:].lower(): - project_base = os.path.abspath(os.path.join(project_base, os.path.pardir)) - # PC/VS7.1 +-- +2.17.1 + diff --git a/poky/meta/recipes-devtools/python/python/CVE-2018-20852.patch b/poky/meta/recipes-devtools/python/python/CVE-2018-20852.patch deleted file mode 100644 index 23c784a21..000000000 --- a/poky/meta/recipes-devtools/python/python/CVE-2018-20852.patch +++ /dev/null @@ -1,123 +0,0 @@ -From 979daae300916adb399ab5b51410b6ebd0888f13 Mon Sep 17 00:00:00 2001 -From: Xtreak <tir.karthi@gmail.com> -Date: Sat, 15 Jun 2019 20:59:43 +0530 -Subject: [PATCH] [2.7] bpo-35121: prefix dot in domain for proper subdomain - validation (GH-10258) (GH-13426) - -This is a manual backport of ca7fe5063593958e5efdf90f068582837f07bd14 since 2.7 has `http.cookiejar` in `cookielib` - - -https://bugs.python.org/issue35121 -CVE: CVE-2018-20852 -Upstream-Status: Backport [https://github.com/python/cpython/pull/13426] -Signed-off-by: Anuj Mittal <anuj.mittal@intel.com> ---- - Lib/cookielib.py | 13 ++++++-- - Lib/test/test_cookielib.py | 30 +++++++++++++++++++ - .../2019-05-20-00-35-12.bpo-35121.RRi-HU.rst | 4 +++ - 3 files changed, 45 insertions(+), 2 deletions(-) - create mode 100644 Misc/NEWS.d/next/Security/2019-05-20-00-35-12.bpo-35121.RRi-HU.rst - -diff --git a/Lib/cookielib.py b/Lib/cookielib.py -index 2dd7c48728e0..0b471a42f296 100644 ---- a/Lib/cookielib.py -+++ b/Lib/cookielib.py -@@ -1139,6 +1139,11 @@ def return_ok_domain(self, cookie, request): - req_host, erhn = eff_request_host(request) - domain = cookie.domain - -+ if domain and not domain.startswith("."): -+ dotdomain = "." + domain -+ else: -+ dotdomain = domain -+ - # strict check of non-domain cookies: Mozilla does this, MSIE5 doesn't - if (cookie.version == 0 and - (self.strict_ns_domain & self.DomainStrictNonDomain) and -@@ -1151,7 +1156,7 @@ def return_ok_domain(self, cookie, request): - _debug(" effective request-host name %s does not domain-match " - "RFC 2965 cookie domain %s", erhn, domain) - return False -- if cookie.version == 0 and not ("."+erhn).endswith(domain): -+ if cookie.version == 0 and not ("."+erhn).endswith(dotdomain): - _debug(" request-host %s does not match Netscape cookie domain " - "%s", req_host, domain) - return False -@@ -1165,7 +1170,11 @@ def domain_return_ok(self, domain, request): - req_host = "."+req_host - if not erhn.startswith("."): - erhn = "."+erhn -- if not (req_host.endswith(domain) or erhn.endswith(domain)): -+ if domain and not domain.startswith("."): -+ dotdomain = "." + domain -+ else: -+ dotdomain = domain -+ if not (req_host.endswith(dotdomain) or erhn.endswith(dotdomain)): - #_debug(" request domain %s does not match cookie domain %s", - # req_host, domain) - return False -diff --git a/Lib/test/test_cookielib.py b/Lib/test/test_cookielib.py -index f2dd9727d137..7f7ff614d61d 100644 ---- a/Lib/test/test_cookielib.py -+++ b/Lib/test/test_cookielib.py -@@ -368,6 +368,7 @@ def test_domain_return_ok(self): - ("http://foo.bar.com/", ".foo.bar.com", True), - ("http://foo.bar.com/", "foo.bar.com", True), - ("http://foo.bar.com/", ".bar.com", True), -+ ("http://foo.bar.com/", "bar.com", True), - ("http://foo.bar.com/", "com", True), - ("http://foo.com/", "rhubarb.foo.com", False), - ("http://foo.com/", ".foo.com", True), -@@ -378,6 +379,8 @@ def test_domain_return_ok(self): - ("http://foo/", "foo", True), - ("http://foo/", "foo.local", True), - ("http://foo/", ".local", True), -+ ("http://barfoo.com", ".foo.com", False), -+ ("http://barfoo.com", "foo.com", False), - ]: - request = urllib2.Request(url) - r = pol.domain_return_ok(domain, request) -@@ -938,6 +941,33 @@ def test_domain_block(self): - c.add_cookie_header(req) - self.assertFalse(req.has_header("Cookie")) - -+ c.clear() -+ -+ pol.set_blocked_domains([]) -+ req = Request("http://acme.com/") -+ res = FakeResponse(headers, "http://acme.com/") -+ cookies = c.make_cookies(res, req) -+ c.extract_cookies(res, req) -+ self.assertEqual(len(c), 1) -+ -+ req = Request("http://acme.com/") -+ c.add_cookie_header(req) -+ self.assertTrue(req.has_header("Cookie")) -+ -+ req = Request("http://badacme.com/") -+ c.add_cookie_header(req) -+ self.assertFalse(pol.return_ok(cookies[0], req)) -+ self.assertFalse(req.has_header("Cookie")) -+ -+ p = pol.set_blocked_domains(["acme.com"]) -+ req = Request("http://acme.com/") -+ c.add_cookie_header(req) -+ self.assertFalse(req.has_header("Cookie")) -+ -+ req = Request("http://badacme.com/") -+ c.add_cookie_header(req) -+ self.assertFalse(req.has_header("Cookie")) -+ - def test_secure(self): - from cookielib import CookieJar, DefaultCookiePolicy - -diff --git a/Misc/NEWS.d/next/Security/2019-05-20-00-35-12.bpo-35121.RRi-HU.rst b/Misc/NEWS.d/next/Security/2019-05-20-00-35-12.bpo-35121.RRi-HU.rst -new file mode 100644 -index 000000000000..77251806163b ---- /dev/null -+++ b/Misc/NEWS.d/next/Security/2019-05-20-00-35-12.bpo-35121.RRi-HU.rst -@@ -0,0 +1,4 @@ -+Don't send cookies of domain A without Domain attribute to domain B when -+domain A is a suffix match of domain B while using a cookiejar with -+:class:`cookielib.DefaultCookiePolicy` policy. Patch by Karthikeyan -+Singaravelan. diff --git a/poky/meta/recipes-devtools/python/python/CVE-2019-9740.patch b/poky/meta/recipes-devtools/python/python/CVE-2019-9740.patch deleted file mode 100644 index 95f43e038..000000000 --- a/poky/meta/recipes-devtools/python/python/CVE-2019-9740.patch +++ /dev/null @@ -1,216 +0,0 @@ -From bb8071a4cae5ab3fe321481dd3d73662ffb26052 Mon Sep 17 00:00:00 2001 -From: Victor Stinner <victor.stinner@gmail.com> -Date: Tue, 21 May 2019 15:12:33 +0200 -Subject: [PATCH] bpo-30458: Disallow control chars in http URLs (GH-12755) - (GH-13154) (GH-13315) -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -Disallow control chars in http URLs in urllib2.urlopen. This -addresses a potential security problem for applications that do not -sanity check their URLs where http request headers could be injected. - -Disable https related urllib tests on a build without ssl (GH-13032) -These tests require an SSL enabled build. Skip these tests when -python is built without SSL to fix test failures. - -Use httplib.InvalidURL instead of ValueError as the new error case's -exception. (GH-13044) - -Backport Co-Authored-By: Miro Hrončok <miro@hroncok.cz> - -(cherry picked from commit 7e200e0763f5b71c199aaf98bd5588f291585619) - -Notes on backport to Python 2.7: - -* test_urllib tests urllib.urlopen() which quotes the URL and so is - not vulerable to HTTP Header Injection. -* Add tests to test_urllib2 on urllib2.urlopen(). -* Reject non-ASCII characters: range 0x80-0xff. - -Upstream-Status: Backport -CVE: CVE-2019-9740 -CVE: CVE-2019-9947 -Signed-off-by: Anuj Mittal <anuj.mittal@intel.com> ---- - Lib/httplib.py | 16 ++++++ - Lib/test/test_urllib.py | 25 +++++++++ - Lib/test/test_urllib2.py | 51 ++++++++++++++++++- - Lib/test/test_xmlrpc.py | 8 ++- - .../2019-04-10-08-53-30.bpo-30458.51E-DA.rst | 1 + - 5 files changed, 99 insertions(+), 2 deletions(-) - create mode 100644 Misc/NEWS.d/next/Security/2019-04-10-08-53-30.bpo-30458.51E-DA.rst - -diff --git a/Lib/httplib.py b/Lib/httplib.py -index 60a8fb4e355f..1b41c346e090 100644 ---- a/Lib/httplib.py -+++ b/Lib/httplib.py -@@ -247,6 +247,16 @@ - _is_legal_header_name = re.compile(r'\A[^:\s][^:\r\n]*\Z').match - _is_illegal_header_value = re.compile(r'\n(?![ \t])|\r(?![ \t\n])').search - -+# These characters are not allowed within HTTP URL paths. -+# See https://tools.ietf.org/html/rfc3986#section-3.3 and the -+# https://tools.ietf.org/html/rfc3986#appendix-A pchar definition. -+# Prevents CVE-2019-9740. Includes control characters such as \r\n. -+# Restrict non-ASCII characters above \x7f (0x80-0xff). -+_contains_disallowed_url_pchar_re = re.compile('[\x00-\x20\x7f-\xff]') -+# Arguably only these _should_ allowed: -+# _is_allowed_url_pchars_re = re.compile(r"^[/!$&'()*+,;=:@%a-zA-Z0-9._~-]+$") -+# We are more lenient for assumed real world compatibility purposes. -+ - # We always set the Content-Length header for these methods because some - # servers will otherwise respond with a 411 - _METHODS_EXPECTING_BODY = {'PATCH', 'POST', 'PUT'} -@@ -927,6 +937,12 @@ def putrequest(self, method, url, skip_host=0, skip_accept_encoding=0): - self._method = method - if not url: - url = '/' -+ # Prevent CVE-2019-9740. -+ match = _contains_disallowed_url_pchar_re.search(url) -+ if match: -+ raise InvalidURL("URL can't contain control characters. %r " -+ "(found at least %r)" -+ % (url, match.group())) - hdr = '%s %s %s' % (method, url, self._http_vsn_str) - - self._output(hdr) -diff --git a/Lib/test/test_urllib.py b/Lib/test/test_urllib.py -index 1ce9201c0693..d7778d4194f3 100644 ---- a/Lib/test/test_urllib.py -+++ b/Lib/test/test_urllib.py -@@ -257,6 +257,31 @@ def test_url_fragment(self): - finally: - self.unfakehttp() - -+ def test_url_with_control_char_rejected(self): -+ for char_no in range(0, 0x21) + range(0x7f, 0x100): -+ char = chr(char_no) -+ schemeless_url = "//localhost:7777/test%s/" % char -+ self.fakehttp(b"HTTP/1.1 200 OK\r\n\r\nHello.") -+ try: -+ # urllib quotes the URL so there is no injection. -+ resp = urllib.urlopen("http:" + schemeless_url) -+ self.assertNotIn(char, resp.geturl()) -+ finally: -+ self.unfakehttp() -+ -+ def test_url_with_newline_header_injection_rejected(self): -+ self.fakehttp(b"HTTP/1.1 200 OK\r\n\r\nHello.") -+ host = "localhost:7777?a=1 HTTP/1.1\r\nX-injected: header\r\nTEST: 123" -+ schemeless_url = "//" + host + ":8080/test/?test=a" -+ try: -+ # urllib quotes the URL so there is no injection. -+ resp = urllib.urlopen("http:" + schemeless_url) -+ self.assertNotIn(' ', resp.geturl()) -+ self.assertNotIn('\r', resp.geturl()) -+ self.assertNotIn('\n', resp.geturl()) -+ finally: -+ self.unfakehttp() -+ - def test_read_bogus(self): - # urlopen() should raise IOError for many error codes. - self.fakehttp('''HTTP/1.1 401 Authentication Required -diff --git a/Lib/test/test_urllib2.py b/Lib/test/test_urllib2.py -index 6d24d5ddf83c..9531818e16b2 100644 ---- a/Lib/test/test_urllib2.py -+++ b/Lib/test/test_urllib2.py -@@ -15,6 +15,9 @@ - except ImportError: - ssl = None - -+from test.test_urllib import FakeHTTPMixin -+ -+ - # XXX - # Request - # CacheFTPHandler (hard to write) -@@ -1262,7 +1265,7 @@ def _test_basic_auth(self, opener, auth_handler, auth_header, - self.assertEqual(len(http_handler.requests), 1) - self.assertFalse(http_handler.requests[0].has_header(auth_header)) - --class MiscTests(unittest.TestCase): -+class MiscTests(unittest.TestCase, FakeHTTPMixin): - - def test_build_opener(self): - class MyHTTPHandler(urllib2.HTTPHandler): pass -@@ -1317,6 +1320,52 @@ def test_unsupported_algorithm(self): - "Unsupported digest authentication algorithm 'invalid'" - ) - -+ @unittest.skipUnless(ssl, "ssl module required") -+ def test_url_with_control_char_rejected(self): -+ for char_no in range(0, 0x21) + range(0x7f, 0x100): -+ char = chr(char_no) -+ schemeless_url = "//localhost:7777/test%s/" % char -+ self.fakehttp(b"HTTP/1.1 200 OK\r\n\r\nHello.") -+ try: -+ # We explicitly test urllib.request.urlopen() instead of the top -+ # level 'def urlopen()' function defined in this... (quite ugly) -+ # test suite. They use different url opening codepaths. Plain -+ # urlopen uses FancyURLOpener which goes via a codepath that -+ # calls urllib.parse.quote() on the URL which makes all of the -+ # above attempts at injection within the url _path_ safe. -+ escaped_char_repr = repr(char).replace('\\', r'\\') -+ InvalidURL = httplib.InvalidURL -+ with self.assertRaisesRegexp( -+ InvalidURL, "contain control.*" + escaped_char_repr): -+ urllib2.urlopen("http:" + schemeless_url) -+ with self.assertRaisesRegexp( -+ InvalidURL, "contain control.*" + escaped_char_repr): -+ urllib2.urlopen("https:" + schemeless_url) -+ finally: -+ self.unfakehttp() -+ -+ @unittest.skipUnless(ssl, "ssl module required") -+ def test_url_with_newline_header_injection_rejected(self): -+ self.fakehttp(b"HTTP/1.1 200 OK\r\n\r\nHello.") -+ host = "localhost:7777?a=1 HTTP/1.1\r\nX-injected: header\r\nTEST: 123" -+ schemeless_url = "//" + host + ":8080/test/?test=a" -+ try: -+ # We explicitly test urllib2.urlopen() instead of the top -+ # level 'def urlopen()' function defined in this... (quite ugly) -+ # test suite. They use different url opening codepaths. Plain -+ # urlopen uses FancyURLOpener which goes via a codepath that -+ # calls urllib.parse.quote() on the URL which makes all of the -+ # above attempts at injection within the url _path_ safe. -+ InvalidURL = httplib.InvalidURL -+ with self.assertRaisesRegexp( -+ InvalidURL, r"contain control.*\\r.*(found at least . .)"): -+ urllib2.urlopen("http:" + schemeless_url) -+ with self.assertRaisesRegexp(InvalidURL, r"contain control.*\\n"): -+ urllib2.urlopen("https:" + schemeless_url) -+ finally: -+ self.unfakehttp() -+ -+ - - class RequestTests(unittest.TestCase): - -diff --git a/Lib/test/test_xmlrpc.py b/Lib/test/test_xmlrpc.py -index 36b3be67fd6b..90ccb30716ff 100644 ---- a/Lib/test/test_xmlrpc.py -+++ b/Lib/test/test_xmlrpc.py -@@ -659,7 +659,13 @@ def test_dotted_attribute(self): - def test_partial_post(self): - # Check that a partial POST doesn't make the server loop: issue #14001. - conn = httplib.HTTPConnection(ADDR, PORT) -- conn.request('POST', '/RPC2 HTTP/1.0\r\nContent-Length: 100\r\n\r\nbye') -+ conn.send('POST /RPC2 HTTP/1.0\r\n' -+ 'Content-Length: 100\r\n\r\n' -+ 'bye HTTP/1.1\r\n' -+ 'Host: %s:%s\r\n' -+ 'Accept-Encoding: identity\r\n' -+ 'Content-Length: 0\r\n\r\n' -+ % (ADDR, PORT)) - conn.close() - - class SimpleServerEncodingTestCase(BaseServerTestCase): -diff --git a/Misc/NEWS.d/next/Security/2019-04-10-08-53-30.bpo-30458.51E-DA.rst b/Misc/NEWS.d/next/Security/2019-04-10-08-53-30.bpo-30458.51E-DA.rst -new file mode 100644 -index 000000000000..47cb899df1af ---- /dev/null -+++ b/Misc/NEWS.d/next/Security/2019-04-10-08-53-30.bpo-30458.51E-DA.rst -@@ -0,0 +1 @@ -+Address CVE-2019-9740 by disallowing URL paths with embedded whitespace or control characters through into the underlying http client request. Such potentially malicious header injection URLs now cause an httplib.InvalidURL exception to be raised. diff --git a/poky/meta/recipes-devtools/python/python/bpo-35907-cve-2019-9948-fix.patch b/poky/meta/recipes-devtools/python/python/bpo-35907-cve-2019-9948-fix.patch deleted file mode 100644 index b26723701..000000000 --- a/poky/meta/recipes-devtools/python/python/bpo-35907-cve-2019-9948-fix.patch +++ /dev/null @@ -1,55 +0,0 @@ -From 179a5f75f1121dab271fe8f90eb35145f9dcbbda Mon Sep 17 00:00:00 2001 -From: Sihoon Lee <push0ebp@gmail.com> -Date: Fri, 17 May 2019 02:41:06 +0900 -Subject: [PATCH] Update test_urllib.py and urllib.py\nchange assertEqual into - assertRasies in DummyURLopener test, and simplify mitigation - -Upstream-Status: Submitted https://github.com/python/cpython/pull/11842 - -CVE: CVE-2019-9948 - -Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> ---- - Lib/test/test_urllib.py | 11 +++-------- - Lib/urllib.py | 4 ++-- - 2 files changed, 5 insertions(+), 10 deletions(-) - -diff --git a/Lib/test/test_urllib.py b/Lib/test/test_urllib.py -index e5f210e62a18..1e23dfb0bb16 100644 ---- a/Lib/test/test_urllib.py -+++ b/Lib/test/test_urllib.py -@@ -1027,14 +1027,9 @@ def test_local_file_open(self): - class DummyURLopener(urllib.URLopener): - def open_local_file(self, url): - return url -- self.assertEqual(DummyURLopener().open( -- 'local-file://example'), '//example') -- self.assertEqual(DummyURLopener().open( -- 'local_file://example'), '//example') -- self.assertRaises(IOError, urllib.urlopen, -- 'local-file://example') -- self.assertRaises(IOError, urllib.urlopen, -- 'local_file://example') -+ for url in ('local_file://example', 'local-file://example'): -+ self.assertRaises(IOError, DummyURLopener().open, url) -+ self.assertRaises(IOError, urllib.urlopen, url) - - # Just commented them out. - # Can't really tell why keep failing in windows and sparc. -diff --git a/Lib/urllib.py b/Lib/urllib.py -index a24e9a5c68fb..39b834054e9e 100644 ---- a/Lib/urllib.py -+++ b/Lib/urllib.py -@@ -203,10 +203,10 @@ def open(self, fullurl, data=None): - name = 'open_' + urltype - self.type = urltype - name = name.replace('-', '_') -- -+ - # bpo-35907: # disallow the file reading with the type not allowed - if not hasattr(self, name) or \ -- (self == _urlopener and name == 'open_local_file'): -+ getattr(self, name) == self.open_local_file: - if proxy: - return self.open_unknown_proxy(proxy, fullurl, data) - else: diff --git a/poky/meta/recipes-devtools/python/python/bpo-35907-cve-2019-9948.patch b/poky/meta/recipes-devtools/python/python/bpo-35907-cve-2019-9948.patch deleted file mode 100644 index f4c225d2f..000000000 --- a/poky/meta/recipes-devtools/python/python/bpo-35907-cve-2019-9948.patch +++ /dev/null @@ -1,55 +0,0 @@ -From 8f99cc799e4393bf1112b9395b2342f81b3f45ef Mon Sep 17 00:00:00 2001 -From: push0ebp <push0ebp@shl-MacBook-Pro.local> -Date: Thu, 14 Feb 2019 02:05:46 +0900 -Subject: [PATCH] bpo-35907: Avoid file reading as disallowing the unnecessary - URL scheme in urllib - -Upstream-Status: Submitted https://github.com/python/cpython/pull/11842 - -CVE: CVE-2019-9948 - -Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> ---- - Lib/test/test_urllib.py | 12 ++++++++++++ - Lib/urllib.py | 5 ++++- - 2 files changed, 16 insertions(+), 1 deletion(-) - -diff --git a/Lib/test/test_urllib.py b/Lib/test/test_urllib.py -index 1ce9201c0693..e5f210e62a18 100644 ---- a/Lib/test/test_urllib.py -+++ b/Lib/test/test_urllib.py -@@ -1023,6 +1023,18 @@ def open_spam(self, url): - "spam://c:|windows%/:=&?~#+!$,;'@()*[]|/path/"), - "//c:|windows%/:=&?~#+!$,;'@()*[]|/path/") - -+ def test_local_file_open(self): -+ class DummyURLopener(urllib.URLopener): -+ def open_local_file(self, url): -+ return url -+ self.assertEqual(DummyURLopener().open( -+ 'local-file://example'), '//example') -+ self.assertEqual(DummyURLopener().open( -+ 'local_file://example'), '//example') -+ self.assertRaises(IOError, urllib.urlopen, -+ 'local-file://example') -+ self.assertRaises(IOError, urllib.urlopen, -+ 'local_file://example') - - # Just commented them out. - # Can't really tell why keep failing in windows and sparc. -diff --git a/Lib/urllib.py b/Lib/urllib.py -index d85504a5cb7e..a24e9a5c68fb 100644 ---- a/Lib/urllib.py -+++ b/Lib/urllib.py -@@ -203,7 +203,10 @@ def open(self, fullurl, data=None): - name = 'open_' + urltype - self.type = urltype - name = name.replace('-', '_') -- if not hasattr(self, name): -+ -+ # bpo-35907: # disallow the file reading with the type not allowed -+ if not hasattr(self, name) or \ -+ (self == _urlopener and name == 'open_local_file'): - if proxy: - return self.open_unknown_proxy(proxy, fullurl, data) - else: diff --git a/poky/meta/recipes-devtools/python/python/bpo-36216-cve-2019-9636-fix.patch b/poky/meta/recipes-devtools/python/python/bpo-36216-cve-2019-9636-fix.patch deleted file mode 100644 index 2ce4d2cde..000000000 --- a/poky/meta/recipes-devtools/python/python/bpo-36216-cve-2019-9636-fix.patch +++ /dev/null @@ -1,28 +0,0 @@ -From 06b5ee585d6e76bdbb4002f642d864d860cbbd2b Mon Sep 17 00:00:00 2001 -From: Steve Dower <steve.dower@python.org> -Date: Tue, 12 Mar 2019 08:23:33 -0700 -Subject: [PATCH] bpo-36216: Only print test messages when verbose - -CVE: CVE-2019-9636 - -Upstream-Status: Backport https://github.com/python/cpython/pull/12291/commits/06b5ee585d6e76bdbb4002f642d864d860cbbd2b - -Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> ---- - Lib/test/test_urlparse.py | 3 ++- - 1 file changed, 2 insertions(+), 1 deletion(-) - -diff --git a/Lib/test/test_urlparse.py b/Lib/test/test_urlparse.py -index 73b0228ea8e3..1830d0b28688 100644 ---- a/Lib/test/test_urlparse.py -+++ b/Lib/test/test_urlparse.py -@@ -644,7 +644,8 @@ def test_urlsplit_normalization(self): - for scheme in [u"http", u"https", u"ftp"]: - for c in denorm_chars: - url = u"{}://netloc{}false.netloc/path".format(scheme, c) -- print "Checking %r" % url -+ if test_support.verbose: -+ print "Checking %r" % url - with self.assertRaises(ValueError): - urlparse.urlsplit(url) - diff --git a/poky/meta/recipes-devtools/python/python/bpo-36216-cve-2019-9636.patch b/poky/meta/recipes-devtools/python/python/bpo-36216-cve-2019-9636.patch deleted file mode 100644 index 352b13ba9..000000000 --- a/poky/meta/recipes-devtools/python/python/bpo-36216-cve-2019-9636.patch +++ /dev/null @@ -1,111 +0,0 @@ -From 3e3669c9c41a27e1466e2c28b3906e3dd0ce3e7e Mon Sep 17 00:00:00 2001 -From: Steve Dower <steve.dower@python.org> -Date: Thu, 7 Mar 2019 08:25:22 -0800 -Subject: [PATCH] bpo-36216: Add check for characters in netloc that normalize - to separators (GH-12201) - -CVE: CVE-2019-9636 - -Upstream-Status: Backport https://github.com/python/cpython/pull/12216/commits/3e3669c9c41a27e1466e2c28b3906e3dd0ce3e7e - -Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> ---- - Doc/library/urlparse.rst | 20 ++++++++++++++++ - Lib/test/test_urlparse.py | 24 +++++++++++++++++++ - Lib/urlparse.py | 17 +++++++++++++ - .../2019-03-06-09-38-40.bpo-36216.6q1m4a.rst | 3 +++ - 4 files changed, 64 insertions(+) - create mode 100644 Misc/NEWS.d/next/Security/2019-03-06-09-38-40.bpo-36216.6q1m4a.rst - -diff --git a/Lib/test/test_urlparse.py b/Lib/test/test_urlparse.py -index 4e1ded73c266..73b0228ea8e3 100644 ---- a/Lib/test/test_urlparse.py -+++ b/Lib/test/test_urlparse.py -@@ -1,4 +1,6 @@ - from test import test_support -+import sys -+import unicodedata - import unittest - import urlparse - -@@ -624,6 +626,28 @@ def test_portseparator(self): - self.assertEqual(urlparse.urlparse("http://www.python.org:80"), - ('http','www.python.org:80','','','','')) - -+ def test_urlsplit_normalization(self): -+ # Certain characters should never occur in the netloc, -+ # including under normalization. -+ # Ensure that ALL of them are detected and cause an error -+ illegal_chars = u'/:#?@' -+ hex_chars = {'{:04X}'.format(ord(c)) for c in illegal_chars} -+ denorm_chars = [ -+ c for c in map(unichr, range(128, sys.maxunicode)) -+ if (hex_chars & set(unicodedata.decomposition(c).split())) -+ and c not in illegal_chars -+ ] -+ # Sanity check that we found at least one such character -+ self.assertIn(u'\u2100', denorm_chars) -+ self.assertIn(u'\uFF03', denorm_chars) -+ -+ for scheme in [u"http", u"https", u"ftp"]: -+ for c in denorm_chars: -+ url = u"{}://netloc{}false.netloc/path".format(scheme, c) -+ print "Checking %r" % url -+ with self.assertRaises(ValueError): -+ urlparse.urlsplit(url) -+ - def test_main(): - test_support.run_unittest(UrlParseTestCase) - -diff --git a/Lib/urlparse.py b/Lib/urlparse.py -index f7c2b032b097..54eda08651ab 100644 ---- a/Lib/urlparse.py -+++ b/Lib/urlparse.py -@@ -165,6 +165,21 @@ def _splitnetloc(url, start=0): - delim = min(delim, wdelim) # use earliest delim position - return url[start:delim], url[delim:] # return (domain, rest) - -+def _checknetloc(netloc): -+ if not netloc or not isinstance(netloc, unicode): -+ return -+ # looking for characters like \u2100 that expand to 'a/c' -+ # IDNA uses NFKC equivalence, so normalize for this check -+ import unicodedata -+ netloc2 = unicodedata.normalize('NFKC', netloc) -+ if netloc == netloc2: -+ return -+ _, _, netloc = netloc.rpartition('@') # anything to the left of '@' is okay -+ for c in '/?#@:': -+ if c in netloc2: -+ raise ValueError("netloc '" + netloc2 + "' contains invalid " + -+ "characters under NFKC normalization") -+ - def urlsplit(url, scheme='', allow_fragments=True): - """Parse a URL into 5 components: - <scheme>://<netloc>/<path>?<query>#<fragment> -@@ -193,6 +208,7 @@ def urlsplit(url, scheme='', allow_fragments=True): - url, fragment = url.split('#', 1) - if '?' in url: - url, query = url.split('?', 1) -+ _checknetloc(netloc) - v = SplitResult(scheme, netloc, url, query, fragment) - _parse_cache[key] = v - return v -@@ -216,6 +232,7 @@ def urlsplit(url, scheme='', allow_fragments=True): - url, fragment = url.split('#', 1) - if '?' in url: - url, query = url.split('?', 1) -+ _checknetloc(netloc) - v = SplitResult(scheme, netloc, url, query, fragment) - _parse_cache[key] = v - return v -diff --git a/Misc/NEWS.d/next/Security/2019-03-06-09-38-40.bpo-36216.6q1m4a.rst b/Misc/NEWS.d/next/Security/2019-03-06-09-38-40.bpo-36216.6q1m4a.rst -new file mode 100644 -index 000000000000..1e1ad92c6feb ---- /dev/null -+++ b/Misc/NEWS.d/next/Security/2019-03-06-09-38-40.bpo-36216.6q1m4a.rst -@@ -0,0 +1,3 @@ -+Changes urlsplit() to raise ValueError when the URL contains characters that -+decompose under IDNA encoding (NFKC-normalization) into characters that -+affect how the URL is parsed. -\ No newline at end of file diff --git a/poky/meta/recipes-devtools/python/python3-pip_19.2.3.bb b/poky/meta/recipes-devtools/python/python3-pip_19.3.1.bb index 019e327e0..d27e6fce5 100644 --- a/poky/meta/recipes-devtools/python/python3-pip_19.2.3.bb +++ b/poky/meta/recipes-devtools/python/python3-pip_19.3.1.bb @@ -6,8 +6,8 @@ LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=8ba06d529c955048e5ddd7c45459eb2e" DEPENDS += "python3 python3-setuptools-native" -SRC_URI[md5sum] = "f417444c66a0db1a82c8d9d2283a2f95" -SRC_URI[sha256sum] = "e7a31f147974362e6c82d84b91c7f2bdf57e4d3163d3d454e6c3e71944d67135" +SRC_URI[md5sum] = "1aaaf90fbafc50e7ba1e66ffceb00960" +SRC_URI[sha256sum] = "21207d76c1031e517668898a6b46a9fb1501c7a4710ef5dfd6a40ad9e6757ea7" inherit pypi distutils3 diff --git a/poky/meta/recipes-devtools/python/python3-setuptools_41.2.0.bb b/poky/meta/recipes-devtools/python/python3-setuptools_41.4.0.bb index 0dc1ed862..0dc1ed862 100644 --- a/poky/meta/recipes-devtools/python/python3-setuptools_41.2.0.bb +++ b/poky/meta/recipes-devtools/python/python3-setuptools_41.4.0.bb diff --git a/poky/meta/recipes-devtools/python/python3-six_1.12.0.bb b/poky/meta/recipes-devtools/python/python3-six_1.13.0.bb index 8795313be..8795313be 100644 --- a/poky/meta/recipes-devtools/python/python3-six_1.12.0.bb +++ b/poky/meta/recipes-devtools/python/python3-six_1.13.0.bb diff --git a/poky/meta/recipes-devtools/python/python3/0001-Do-not-hardcode-lib-as-location-for-site-packages-an.patch b/poky/meta/recipes-devtools/python/python3/0001-Do-not-hardcode-lib-as-location-for-site-packages-an.patch index 661f52d01..ea75262c4 100644 --- a/poky/meta/recipes-devtools/python/python3/0001-Do-not-hardcode-lib-as-location-for-site-packages-an.patch +++ b/poky/meta/recipes-devtools/python/python3/0001-Do-not-hardcode-lib-as-location-for-site-packages-an.patch @@ -70,7 +70,7 @@ index 6e81b2f..671a20e 100644 Programs/python.o: $(srcdir)/Programs/python.c @@ -856,7 +857,7 @@ regen-opcode: - Python/compile.o Python/symtable.o Python/ast_unparse.o Python/ast.o: $(srcdir)/Include/graminit.h $(srcdir)/Include/Python-ast.h + Python/compile.o Python/symtable.o Python/ast_unparse.o Python/ast.o Python/future.o Parser/parsetok.o: $(srcdir)/Include/graminit.h $(srcdir)/Include/Python-ast.h Python/getplatform.o: $(srcdir)/Python/getplatform.c - $(CC) -c $(PY_CORE_CFLAGS) -DPLATFORM='"$(MACHDEP)"' -o $@ $(srcdir)/Python/getplatform.c diff --git a/poky/meta/recipes-devtools/python/python3/0001-bpo-34155-Dont-parse-domains-containing-GH-13079.patch b/poky/meta/recipes-devtools/python/python3/0001-bpo-34155-Dont-parse-domains-containing-GH-13079.patch deleted file mode 100644 index 319e7ed07..000000000 --- a/poky/meta/recipes-devtools/python/python3/0001-bpo-34155-Dont-parse-domains-containing-GH-13079.patch +++ /dev/null @@ -1,132 +0,0 @@ -From 90d56127ae15b1e452755e62c77dc475dedf7161 Mon Sep 17 00:00:00 2001 -From: jpic <jpic@users.noreply.github.com> -Date: Wed, 17 Jul 2019 23:54:25 +0200 -Subject: [PATCH] bpo-34155: Dont parse domains containing @ (GH-13079) - -Before: - - >>> email.message_from_string('From: a@malicious.org@important.com', policy=email.policy.default)['from'].addresses - (Address(display_name='', username='a', domain='malicious.org'),) - - >>> parseaddr('a@malicious.org@important.com') - ('', 'a@malicious.org') - - After: - - >>> email.message_from_string('From: a@malicious.org@important.com', policy=email.policy.default)['from'].addresses - (Address(display_name='', username='', domain=''),) - - >>> parseaddr('a@malicious.org@important.com') - ('', 'a@') - -https://bugs.python.org/issue34155 - -Upstream-Status: Backport [https://github.com/python/cpython/commit/8cb65d1381b027f0b09ee36bfed7f35bb4dec9a9] - -CVE: CVE-2019-16056 - -Signed-off-by: Chen Qi <Qi.Chen@windriver.com> ---- - Lib/email/_header_value_parser.py | 2 ++ - Lib/email/_parseaddr.py | 11 ++++++++++- - Lib/test/test_email/test__header_value_parser.py | 10 ++++++++++ - Lib/test/test_email/test_email.py | 14 ++++++++++++++ - .../2019-05-04-13-33-37.bpo-34155.MJll68.rst | 1 + - 5 files changed, 37 insertions(+), 1 deletion(-) - create mode 100644 Misc/NEWS.d/next/Security/2019-05-04-13-33-37.bpo-34155.MJll68.rst - -diff --git a/Lib/email/_header_value_parser.py b/Lib/email/_header_value_parser.py -index fc00b4a098..bbc026ec71 100644 ---- a/Lib/email/_header_value_parser.py -+++ b/Lib/email/_header_value_parser.py -@@ -1582,6 +1582,8 @@ def get_domain(value): - token, value = get_dot_atom(value) - except errors.HeaderParseError: - token, value = get_atom(value) -+ if value and value[0] == '@': -+ raise errors.HeaderParseError('Invalid Domain') - if leader is not None: - token[:0] = [leader] - domain.append(token) -diff --git a/Lib/email/_parseaddr.py b/Lib/email/_parseaddr.py -index cdfa3729ad..41ff6f8c00 100644 ---- a/Lib/email/_parseaddr.py -+++ b/Lib/email/_parseaddr.py -@@ -379,7 +379,12 @@ class AddrlistClass: - aslist.append('@') - self.pos += 1 - self.gotonext() -- return EMPTYSTRING.join(aslist) + self.getdomain() -+ domain = self.getdomain() -+ if not domain: -+ # Invalid domain, return an empty address instead of returning a -+ # local part to denote failed parsing. -+ return EMPTYSTRING -+ return EMPTYSTRING.join(aslist) + domain - - def getdomain(self): - """Get the complete domain name from an address.""" -@@ -394,6 +399,10 @@ class AddrlistClass: - elif self.field[self.pos] == '.': - self.pos += 1 - sdlist.append('.') -+ elif self.field[self.pos] == '@': -+ # bpo-34155: Don't parse domains with two `@` like -+ # `a@malicious.org@important.com`. -+ return EMPTYSTRING - elif self.field[self.pos] in self.atomends: - break - else: -diff --git a/Lib/test/test_email/test__header_value_parser.py b/Lib/test/test_email/test__header_value_parser.py -index 693487bc96..7dc4de1b7b 100644 ---- a/Lib/test/test_email/test__header_value_parser.py -+++ b/Lib/test/test_email/test__header_value_parser.py -@@ -1438,6 +1438,16 @@ class TestParser(TestParserMixin, TestEmailBase): - self.assertEqual(addr_spec.domain, 'example.com') - self.assertEqual(addr_spec.addr_spec, 'star.a.star@example.com') - -+ def test_get_addr_spec_multiple_domains(self): -+ with self.assertRaises(errors.HeaderParseError): -+ parser.get_addr_spec('star@a.star@example.com') -+ -+ with self.assertRaises(errors.HeaderParseError): -+ parser.get_addr_spec('star@a@example.com') -+ -+ with self.assertRaises(errors.HeaderParseError): -+ parser.get_addr_spec('star@172.17.0.1@example.com') -+ - # get_obs_route - - def test_get_obs_route_simple(self): -diff --git a/Lib/test/test_email/test_email.py b/Lib/test/test_email/test_email.py -index c29cc56203..aa775881c5 100644 ---- a/Lib/test/test_email/test_email.py -+++ b/Lib/test/test_email/test_email.py -@@ -3041,6 +3041,20 @@ class TestMiscellaneous(TestEmailBase): - self.assertEqual(utils.parseaddr('<>'), ('', '')) - self.assertEqual(utils.formataddr(utils.parseaddr('<>')), '') - -+ def test_parseaddr_multiple_domains(self): -+ self.assertEqual( -+ utils.parseaddr('a@b@c'), -+ ('', '') -+ ) -+ self.assertEqual( -+ utils.parseaddr('a@b.c@c'), -+ ('', '') -+ ) -+ self.assertEqual( -+ utils.parseaddr('a@172.17.0.1@c'), -+ ('', '') -+ ) -+ - def test_noquote_dump(self): - self.assertEqual( - utils.formataddr(('A Silly Person', 'person@dom.ain')), -diff --git a/Misc/NEWS.d/next/Security/2019-05-04-13-33-37.bpo-34155.MJll68.rst b/Misc/NEWS.d/next/Security/2019-05-04-13-33-37.bpo-34155.MJll68.rst -new file mode 100644 -index 0000000000..50292e29ed ---- /dev/null -+++ b/Misc/NEWS.d/next/Security/2019-05-04-13-33-37.bpo-34155.MJll68.rst -@@ -0,0 +1 @@ -+Fix parsing of invalid email addresses with more than one ``@`` (e.g. a@b@c.com.) to not return the part before 2nd ``@`` as valid email address. Patch by maxking & jpic. diff --git a/poky/meta/recipes-devtools/python/python3/0001-python3-use-cc_basename-to-replace-CC-for-checking-c.patch b/poky/meta/recipes-devtools/python/python3/0001-python3-use-cc_basename-to-replace-CC-for-checking-c.patch index 573595462..a0ea897f4 100644 --- a/poky/meta/recipes-devtools/python/python3/0001-python3-use-cc_basename-to-replace-CC-for-checking-c.patch +++ b/poky/meta/recipes-devtools/python/python3/0001-python3-use-cc_basename-to-replace-CC-for-checking-c.patch @@ -63,7 +63,7 @@ index a7de901..4a3681f 100644 + case $cc_basename in *clang*) AC_SUBST(LLVM_AR) - AC_PATH_TARGET_TOOL(LLVM_AR, llvm-ar, '', ${llvm_path}) + AC_PATH_TOOL(LLVM_AR, llvm-ar, '', ${llvm_path}) @@ -1426,7 +1427,7 @@ then fi fi diff --git a/poky/meta/recipes-devtools/python/python3/python3-manifest.json b/poky/meta/recipes-devtools/python/python3/python3-manifest.json index 1ad85a9ff..dba92b0e3 100644 --- a/poky/meta/recipes-devtools/python/python3/python3-manifest.json +++ b/poky/meta/recipes-devtools/python/python3/python3-manifest.json @@ -210,7 +210,10 @@ "summary": "Python interpreter and core modules", "rdepends": [], "files": [ - "${bindir}/python*[!-config]", + "${bindir}/python3", + "${bindir}/python${PYTHON_MAJMIN}", + "${bindir}/python${PYTHON_MAJMIN}.real", + "${bindir}/python${PYTHON_BINABI}", "${includedir}/python${PYTHON_BINABI}/pyconfig*.h", "${prefix}/lib/python${PYTHON_MAJMIN}/config*/*[!.a]", "${libdir}/python${PYTHON_MAJMIN}/UserDict.py", @@ -487,7 +490,7 @@ "files": [ "${base_libdir}/*.a", "${base_libdir}/*.o", - "${bindir}/python*-config", + "${bindir}/python*-config*", "${datadir}/aclocal", "${datadir}/pkgconfig", "${includedir}", @@ -498,7 +501,8 @@ "${libdir}/pkgconfig" ], "rdepends": [ - "core" + "core", + "distutils" ], "summary": "Python development package" }, diff --git a/poky/meta/recipes-devtools/python/python3_3.7.4.bb b/poky/meta/recipes-devtools/python/python3_3.7.5.bb index c8b63fee9..90914f905 100644 --- a/poky/meta/recipes-devtools/python/python3_3.7.4.bb +++ b/poky/meta/recipes-devtools/python/python3_3.7.5.bb @@ -29,7 +29,6 @@ SRC_URI = "http://www.python.org/ftp/python/${PV}/Python-${PV}.tar.xz \ file://0001-Use-FLAG_REF-always-for-interned-strings.patch \ file://0001-test_locale.py-correct-the-test-output-format.patch \ file://0017-setup.py-do-not-report-missing-dependencies-for-disa.patch \ - file://0001-bpo-34155-Dont-parse-domains-containing-GH-13079.patch \ " SRC_URI_append_class-native = " \ @@ -40,8 +39,8 @@ SRC_URI_append_class-nativesdk = " \ file://0001-main.c-if-OEPYTHON3HOME-is-set-use-instead-of-PYTHON.patch \ " -SRC_URI[md5sum] = "d33e4aae66097051c2eca45ee3604803" -SRC_URI[sha256sum] = "fb799134b868199930b75f26678f18932214042639cd52b16da7fd134cd9b13f" +SRC_URI[md5sum] = "08ed8030b1183107c48f2092e79a87e2" +SRC_URI[sha256sum] = "e85a76ea9f3d6c485ec1780fca4e500725a4a7bbc63c78ebc44170de9b619d94" # exclude pre-releases for both python 2.x and 3.x UPSTREAM_CHECK_REGEX = "[Pp]ython-(?P<pver>\d+(\.\d+)+).tar" @@ -59,9 +58,9 @@ inherit autotools pkgconfig qemu ptest multilib_header update-alternatives MULTILIB_SUFFIX = "${@d.getVar('base_libdir',1).split('/')[-1]}" -ALTERNATIVE_${PN}-dev = "python-config" -ALTERNATIVE_LINK_NAME[python-config] = "${bindir}/python${PYTHON_BINABI}-config" -ALTERNATIVE_TARGET[python-config] = "${bindir}/python${PYTHON_BINABI}-config-${MULTILIB_SUFFIX}" +ALTERNATIVE_${PN}-dev = "python3-config" +ALTERNATIVE_LINK_NAME[python3-config] = "${bindir}/python${PYTHON_BINABI}-config" +ALTERNATIVE_TARGET[python3-config] = "${bindir}/python${PYTHON_BINABI}-config-${MULTILIB_SUFFIX}" DEPENDS = "bzip2-replacement-native libffi bzip2 openssl sqlite3 zlib virtual/libintl xz virtual/crypt util-linux libtirpc libnsl2" @@ -303,11 +302,14 @@ do_create_manifest[depends] += "${PN}:do_prepare_recipe_sysroot" do_create_manifest[depends] += "${PN}:do_patch" # manual dependency additions -RPROVIDES_${PN}-modules = "${PN}" RRECOMMENDS_${PN}-core_append_class-nativesdk = " nativesdk-python3-modules" RRECOMMENDS_${PN}-crypt_append_class-target = " openssl ca-certificates" RRECOMMENDS_${PN}-crypt_append_class-nativesdk = " openssl ca-certificates" +# For historical reasons PN is empty and provided by python3-modules +FILES_${PN} = "" +RPROVIDES_${PN}-modules = "${PN}" + FILES_${PN}-pydoc += "${bindir}/pydoc${PYTHON_MAJMIN} ${bindir}/pydoc3" FILES_${PN}-idle += "${bindir}/idle3 ${bindir}/idle${PYTHON_MAJMIN}" @@ -322,7 +324,7 @@ INSANE_SKIP_${PN}-dev += "dev-elf" # catch all the rest (unsorted) PACKAGES += "${PN}-misc" -RDEPENDS_${PN}-misc += "python3-core python3-email python3-codecs python3-pydoc python3-pickle" +RDEPENDS_${PN}-misc += "python3-core python3-email python3-codecs python3-pydoc python3-pickle python3-audio" RDEPENDS_${PN}-modules_append_class-target = " python3-misc" RDEPENDS_${PN}-modules_append_class-nativesdk = " python3-misc" FILES_${PN}-misc = "${libdir}/python${PYTHON_MAJMIN} ${libdir}/python${PYTHON_MAJMIN}/lib-dynload" diff --git a/poky/meta/recipes-devtools/python/python_2.7.16.bb b/poky/meta/recipes-devtools/python/python_2.7.17.bb index aec877825..5b856a509 100644 --- a/poky/meta/recipes-devtools/python/python_2.7.16.bb +++ b/poky/meta/recipes-devtools/python/python_2.7.17.bb @@ -30,7 +30,6 @@ SRC_URI += " \ file://support_SOURCE_DATE_EPOCH_in_py_compile_2.7.patch \ file://float-endian.patch \ file://0001-python2-use-cc_basename-to-replace-CC-for-checking-c.patch \ - file://0001-2.7-bpo-34155-Dont-parse-domains-containing-GH-13079.patch \ " S = "${WORKDIR}/Python-${PV}" diff --git a/poky/meta/recipes-devtools/qemu/qemu-helper-native_1.0.bb b/poky/meta/recipes-devtools/qemu/qemu-helper-native_1.0.bb index d9d9da0fa..372eebd88 100644 --- a/poky/meta/recipes-devtools/qemu/qemu-helper-native_1.0.bb +++ b/poky/meta/recipes-devtools/qemu/qemu-helper-native_1.0.bb @@ -12,7 +12,7 @@ S = "${WORKDIR}" inherit native do_compile() { - ${CC} tunctl.c -o tunctl + ${CC} ${CFLAGS} ${LDFLAGS} -Wall tunctl.c -o tunctl } do_install() { diff --git a/poky/meta/recipes-devtools/qemu/qemu-helper/tunctl.c b/poky/meta/recipes-devtools/qemu/qemu-helper/tunctl.c index 16e24a2ad..d745dd06c 100644 --- a/poky/meta/recipes-devtools/qemu/qemu-helper/tunctl.c +++ b/poky/meta/recipes-devtools/qemu/qemu-helper/tunctl.c @@ -19,7 +19,7 @@ #define TUNSETGROUP _IOW('T', 206, int) #endif -static void Usage(char *name) +static void Usage(char *name, int status) { fprintf(stderr, "Create: %s [-b] [-u owner] [-g group] [-t device-name] " "[-f tun-clone-device]\n", name); @@ -28,7 +28,7 @@ static void Usage(char *name) fprintf(stderr, "The default tun clone device is /dev/net/tun - some systems" " use\n/dev/misc/net/tun instead\n\n"); fprintf(stderr, "-b will result in brief output (just the device name)\n"); - exit(1); + exit(status); } int main(int argc, char **argv) @@ -41,7 +41,7 @@ int main(int argc, char **argv) int tap_fd, opt, delete = 0, brief = 0; char *tun = "", *file = "/dev/net/tun", *name = argv[0], *end; - while((opt = getopt(argc, argv, "bd:f:t:u:g:")) > 0){ + while((opt = getopt(argc, argv, "bd:f:t:u:g:h")) > 0){ switch(opt) { case 'b': brief = 1; @@ -63,7 +63,7 @@ int main(int argc, char **argv) if(*end != '\0'){ fprintf(stderr, "'%s' is neither a username nor a numeric uid.\n", optarg); - Usage(name); + Usage(name, 1); } break; case 'g': @@ -76,7 +76,7 @@ int main(int argc, char **argv) if(*end != '\0'){ fprintf(stderr, "'%s' is neither a groupname nor a numeric group.\n", optarg); - Usage(name); + Usage(name, 1); } break; @@ -84,8 +84,10 @@ int main(int argc, char **argv) tun = optarg; break; case 'h': + Usage(name, 0); + break; default: - Usage(name); + Usage(name, 1); } } @@ -93,7 +95,7 @@ int main(int argc, char **argv) argc -= optind; if(argc > 0) - Usage(name); + Usage(name, 1); if((tap_fd = open(file, O_RDWR)) < 0){ fprintf(stderr, "Failed to open '%s' : ", file); diff --git a/poky/meta/recipes-devtools/qemu/qemu.inc b/poky/meta/recipes-devtools/qemu/qemu.inc index 88ae68a1e..601fc2286 100644 --- a/poky/meta/recipes-devtools/qemu/qemu.inc +++ b/poky/meta/recipes-devtools/qemu/qemu.inc @@ -28,6 +28,7 @@ SRC_URI = "https://download.qemu.org/${BPN}-${PV}.tar.xz \ file://0009-Fix-webkitgtk-builds.patch \ file://0010-configure-Add-pkg-config-handling-for-libgcrypt.patch \ file://CVE-2019-15890.patch \ + file://CVE-2019-12068.patch \ " UPSTREAM_CHECK_REGEX = "qemu-(?P<pver>\d+(\.\d+)+)\.tar" @@ -94,6 +95,7 @@ do_configure_prepend_class-native() { do_configure() { ${S}/configure ${EXTRA_OECONF} } +do_configure[cleandirs] += "${B}" do_install () { export STRIP="" diff --git a/poky/meta/recipes-devtools/qemu/qemu/CVE-2019-12068.patch b/poky/meta/recipes-devtools/qemu/qemu/CVE-2019-12068.patch new file mode 100644 index 000000000..f1655e407 --- /dev/null +++ b/poky/meta/recipes-devtools/qemu/qemu/CVE-2019-12068.patch @@ -0,0 +1,108 @@ +From de594e47659029316bbf9391efb79da0a1a08e08 Mon Sep 17 00:00:00 2001 +From: Paolo Bonzini <pbonzini@redhat.com> +Date: Wed, 14 Aug 2019 17:35:21 +0530 +Subject: [PATCH] scsi: lsi: exit infinite loop while executing script + (CVE-2019-12068) + +When executing script in lsi_execute_script(), the LSI scsi adapter +emulator advances 's->dsp' index to read next opcode. This can lead +to an infinite loop if the next opcode is empty. Move the existing +loop exit after 10k iterations so that it covers no-op opcodes as +well. + +Upstream-Status: Backport [https://git.qemu.org/?p=qemu.git;a=commit;h=de594e47659029316bbf9391efb79da0a1a08e08] +CVE: CVE-2019-12068 + +Reported-by: Bugs SysSec <bugs-syssec@rub.de> +Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> +Signed-off-by: Prasad J Pandit <pjp@fedoraproject.org> +Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> + +Signed-off-by: Changqing Li <changqing.li@windriver.com> +--- + hw/scsi/lsi53c895a.c | 41 +++++++++++++++++++++++++++-------------- + 1 file changed, 27 insertions(+), 14 deletions(-) + +diff --git a/hw/scsi/lsi53c895a.c b/hw/scsi/lsi53c895a.c +index 222a286..ec53b14 100644 +--- a/hw/scsi/lsi53c895a.c ++++ b/hw/scsi/lsi53c895a.c +@@ -186,6 +186,9 @@ static const char *names[] = { + /* Flag set if this is a tagged command. */ + #define LSI_TAG_VALID (1 << 16) + ++/* Maximum instructions to process. */ ++#define LSI_MAX_INSN 10000 ++ + typedef struct lsi_request { + SCSIRequest *req; + uint32_t tag; +@@ -1133,7 +1136,21 @@ static void lsi_execute_script(LSIState *s) + + s->istat1 |= LSI_ISTAT1_SRUN; + again: +- insn_processed++; ++ if (++insn_processed > LSI_MAX_INSN) { ++ /* Some windows drivers make the device spin waiting for a memory ++ location to change. If we have been executed a lot of code then ++ assume this is the case and force an unexpected device disconnect. ++ This is apparently sufficient to beat the drivers into submission. ++ */ ++ if (!(s->sien0 & LSI_SIST0_UDC)) { ++ qemu_log_mask(LOG_GUEST_ERROR, ++ "lsi_scsi: inf. loop with UDC masked"); ++ } ++ lsi_script_scsi_interrupt(s, LSI_SIST0_UDC, 0); ++ lsi_disconnect(s); ++ trace_lsi_execute_script_stop(); ++ return; ++ } + insn = read_dword(s, s->dsp); + if (!insn) { + /* If we receive an empty opcode increment the DSP by 4 bytes +@@ -1570,19 +1587,7 @@ again: + } + } + } +- if (insn_processed > 10000 && s->waiting == LSI_NOWAIT) { +- /* Some windows drivers make the device spin waiting for a memory +- location to change. If we have been executed a lot of code then +- assume this is the case and force an unexpected device disconnect. +- This is apparently sufficient to beat the drivers into submission. +- */ +- if (!(s->sien0 & LSI_SIST0_UDC)) { +- qemu_log_mask(LOG_GUEST_ERROR, +- "lsi_scsi: inf. loop with UDC masked"); +- } +- lsi_script_scsi_interrupt(s, LSI_SIST0_UDC, 0); +- lsi_disconnect(s); +- } else if (s->istat1 & LSI_ISTAT1_SRUN && s->waiting == LSI_NOWAIT) { ++ if (s->istat1 & LSI_ISTAT1_SRUN && s->waiting == LSI_NOWAIT) { + if (s->dcntl & LSI_DCNTL_SSM) { + lsi_script_dma_interrupt(s, LSI_DSTAT_SSI); + } else { +@@ -1970,6 +1975,10 @@ static void lsi_reg_writeb(LSIState *s, int offset, uint8_t val) + case 0x2f: /* DSP[24:31] */ + s->dsp &= 0x00ffffff; + s->dsp |= val << 24; ++ /* ++ * FIXME: if s->waiting != LSI_NOWAIT, this will only execute one ++ * instruction. Is this correct? ++ */ + if ((s->dmode & LSI_DMODE_MAN) == 0 + && (s->istat1 & LSI_ISTAT1_SRUN) == 0) + lsi_execute_script(s); +@@ -1988,6 +1997,10 @@ static void lsi_reg_writeb(LSIState *s, int offset, uint8_t val) + break; + case 0x3b: /* DCNTL */ + s->dcntl = val & ~(LSI_DCNTL_PFF | LSI_DCNTL_STD); ++ /* ++ * FIXME: if s->waiting != LSI_NOWAIT, this will only execute one ++ * instruction. Is this correct? ++ */ + if ((val & LSI_DCNTL_STD) && (s->istat1 & LSI_ISTAT1_SRUN) == 0) + lsi_execute_script(s); + break; +-- +2.7.4 + diff --git a/poky/meta/recipes-devtools/ruby/ruby.inc b/poky/meta/recipes-devtools/ruby/ruby.inc index a98249afb..ce1b02f01 100644 --- a/poky/meta/recipes-devtools/ruby/ruby.inc +++ b/poky/meta/recipes-devtools/ruby/ruby.inc @@ -6,12 +6,12 @@ It is simple, straight-forward, and extensible. \ " HOMEPAGE = "http://www.ruby-lang.org/" SECTION = "devel/ruby" -LICENSE = "Ruby | BSD | GPLv2" +LICENSE = "Ruby | BSD-2-Clause | BSD-3-Clause | GPLv2 | ISC | MIT" LIC_FILES_CHKSUM = "\ file://COPYING;md5=340948e1882e579731841bf49cdc22c1 \ file://BSDL;md5=19aaf65c88a40b508d17ae4be539c4b5\ file://GPL;md5=b234ee4d69f5fce4486a80fdaf4a4263\ - file://LEGAL;md5=23a79bb4c1a40f6cc9bcb6f4e7c39799 \ + file://LEGAL;md5=4ac0b84d1f7f420bca282e1adefc7f99 \ " DEPENDS = "ruby-native zlib openssl tcl libyaml gdbm readline libffi" @@ -19,7 +19,7 @@ DEPENDS_class-native = "openssl-native libyaml-native readline-native zlib-nativ SHRT_VER = "${@oe.utils.trim_version("${PV}", 2)}" SRC_URI = "http://cache.ruby-lang.org/pub/ruby/${SHRT_VER}/ruby-${PV}.tar.gz \ - file://extmk.patch \ + file://0001-extmk-fix-cross-compilation-of-external-gems.patch \ file://0002-Obey-LDFLAGS-for-the-link-of-libruby.patch \ " UPSTREAM_CHECK_URI = "https://www.ruby-lang.org/en/downloads/" @@ -35,6 +35,6 @@ inherit autotools ptest # built. do_configure_prepend() { - sed -i "s#%%TARGET_CFLAGS%%#$TARGET_CFLAGS#; s#%%TARGET_LDFLAGS%%#$TARGET_LDFLAGS#" ${S}/common.mk + sed -i "s#%%TARGET_CFLAGS%%#$CFLAGS#; s#%%TARGET_LDFLAGS%%#$LDFLAGS#" ${S}/common.mk rm -rf ${S}/ruby/ } diff --git a/poky/meta/recipes-devtools/ruby/ruby/0001-extmk-fix-cross-compilation-of-external-gems.patch b/poky/meta/recipes-devtools/ruby/ruby/0001-extmk-fix-cross-compilation-of-external-gems.patch new file mode 100644 index 000000000..2e3156880 --- /dev/null +++ b/poky/meta/recipes-devtools/ruby/ruby/0001-extmk-fix-cross-compilation-of-external-gems.patch @@ -0,0 +1,34 @@ +From a6e12b25a54d112c899b70c89c0bec9c5e5ebf3c Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Andr=C3=A9=20Draszik?= <andre.draszik@jci.com> +Date: Mon, 30 Sep 2019 16:57:01 +0100 +Subject: [PATCH 1/3] extmk: fix cross-compilation of external gems +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Note that I (André) didn't actually write this patch, I +only updated it so that git-am works. + +Upstream-Status: Pending +Signed-off-by: André Draszik <andre.draszik@jci.com> +--- + ext/extmk.rb | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/ext/extmk.rb b/ext/extmk.rb +index 1389dc4117..e4d923d7a7 100755 +--- a/ext/extmk.rb ++++ b/ext/extmk.rb +@@ -413,8 +413,8 @@ def $mflags.defined?(var) + end + $ruby = [$ruby] + $ruby << "-I'$(topdir)'" ++$ruby << "-I'$(top_srcdir)/lib'" + unless CROSS_COMPILING +- $ruby << "-I'$(top_srcdir)/lib'" + $ruby << "-I'$(extout)/$(arch)'" << "-I'$(extout)/common'" if $extout + ENV["RUBYLIB"] = "-" + end +-- +2.23.0.rc1 + diff --git a/poky/meta/recipes-devtools/ruby/ruby/0002-Obey-LDFLAGS-for-the-link-of-libruby.patch b/poky/meta/recipes-devtools/ruby/ruby/0002-Obey-LDFLAGS-for-the-link-of-libruby.patch index 4cf579f42..5979d8bd7 100644 --- a/poky/meta/recipes-devtools/ruby/ruby/0002-Obey-LDFLAGS-for-the-link-of-libruby.patch +++ b/poky/meta/recipes-devtools/ruby/ruby/0002-Obey-LDFLAGS-for-the-link-of-libruby.patch @@ -1,25 +1,27 @@ -Upstream-Status: Pending - -From 306e95a9818d39d3349075aac9609e062b0f19ce Mon Sep 17 00:00:00 2001 +From 6d608326970b1613633d7715ebb7d628dfcd16ee Mon Sep 17 00:00:00 2001 From: Christopher Larson <chris_larson@mentor.com> Date: Thu, 5 May 2016 10:59:07 -0700 -Subject: [PATCH 2/2] Obey LDFLAGS for the link of libruby +Subject: [PATCH 2/3] Obey LDFLAGS for the link of libruby Signed-off-by: Christopher Larson <chris_larson@mentor.com> +Upstream-Status: Pending --- Makefile.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -Index: ruby-2.5.0/Makefile.in -=================================================================== ---- ruby-2.5.0.orig/Makefile.in -+++ ruby-2.5.0/Makefile.in -@@ -77,7 +77,7 @@ LIBS = @LIBS@ $(EXTLIBS) - MISSING = @LIBOBJS@ @ALLOCA@ +diff --git a/Makefile.in b/Makefile.in +index fa1e19ef37..bbd07fa34b 100644 +--- a/Makefile.in ++++ b/Makefile.in +@@ -109,7 +109,7 @@ MISSING = @LIBOBJS@ @ALLOCA@ ENABLE_SHARED = @ENABLE_SHARED@ LDSHARED = @LIBRUBY_LDSHARED@ + DLDSHARED = @DLDSHARED@ -DLDFLAGS = @LIBRUBY_DLDFLAGS@ $(XLDFLAGS) $(ARCH_FLAG) +DLDFLAGS = @LIBRUBY_DLDFLAGS@ @LDFLAGS@ $(XLDFLAGS) $(ARCH_FLAG) SOLIBS = @SOLIBS@ ENABLE_DEBUG_ENV = @ENABLE_DEBUG_ENV@ MAINLIBS = @MAINLIBS@ +-- +2.23.0.rc1 + diff --git a/poky/meta/recipes-devtools/ruby/ruby/0001-configure.ac-check-finite-isinf-isnan-as-macros-firs.patch b/poky/meta/recipes-devtools/ruby/ruby/0003-configure.ac-check-finite-isinf-isnan-as-macros-firs.patch index 4cc1fa027..1a8cff3e8 100644 --- a/poky/meta/recipes-devtools/ruby/ruby/0001-configure.ac-check-finite-isinf-isnan-as-macros-firs.patch +++ b/poky/meta/recipes-devtools/ruby/ruby/0003-configure.ac-check-finite-isinf-isnan-as-macros-firs.patch @@ -1,7 +1,7 @@ -From 3a8189530312e81d6c005c396565f985a47f3383 Mon Sep 17 00:00:00 2001 +From bd71b698bf733e6e93282cd2b1b93f51e1a33c7c Mon Sep 17 00:00:00 2001 From: nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> Date: Fri, 8 Feb 2019 07:22:55 +0000 -Subject: [PATCH] configure.ac: check finite,isinf,isnan as macros first +Subject: [PATCH 3/3] configure.ac: check finite,isinf,isnan as macros first MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @@ -12,7 +12,6 @@ git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67036 b2dd03c8-39d4-4d8f-98ff- --- Upstream-Status: Backport [https://github.com/ruby/ruby/commit/74f94b3e6ebf15b76f3b357e754095412b006e94] -(modified so as to apply cleanly here) Signed-off-by: André Draszik <andre.draszik@jci.com> --- aclocal.m4 | 1 + @@ -22,19 +21,22 @@ Signed-off-by: André Draszik <andre.draszik@jci.com> create mode 100644 tool/m4/ruby_replace_funcs.m4 diff --git a/aclocal.m4 b/aclocal.m4 -index 18ba297b05..2a907b3467 100644 +index b0fe3eb959..ed7d14ef63 100644 --- a/aclocal.m4 +++ b/aclocal.m4 -@@ -13,3 +13,4 @@ - - m4_ifndef([AC_CONFIG_MACRO_DIRS], [m4_defun([_AM_CONFIG_MACRO_DIRS], [])m4_defun([AC_CONFIG_MACRO_DIRS], [_AM_CONFIG_MACRO_DIRS($@)])]) - m4_include([acinclude.m4]) +@@ -35,6 +35,7 @@ m4_include([tool/m4/ruby_func_attribute.m4]) + m4_include([tool/m4/ruby_mingw32.m4]) + m4_include([tool/m4/ruby_prepend_option.m4]) + m4_include([tool/m4/ruby_prog_gnu_ld.m4]) +m4_include([tool/m4/ruby_replace_funcs.m4]) + m4_include([tool/m4/ruby_replace_type.m4]) + m4_include([tool/m4/ruby_rm_recursive.m4]) + m4_include([tool/m4/ruby_setjmp_type.m4]) diff --git a/configure.ac b/configure.ac -index 8a7cee55b8..b97c5b3cc9 100644 +index 2c4d2888d2..2691da6a3c 100644 --- a/configure.ac +++ b/configure.ac -@@ -1189,9 +1189,6 @@ main() +@@ -946,9 +946,6 @@ main() ac_cv_func_fsync=yes ac_cv_func_seekdir=yes ac_cv_func_telldir=yes @@ -44,7 +46,7 @@ index 8a7cee55b8..b97c5b3cc9 100644 ac_cv_func_lchown=yes ac_cv_func_link=yes ac_cv_func_readlink=yes -@@ -1239,9 +1236,6 @@ main() +@@ -999,9 +996,6 @@ main() [netbsd*], [ LIBS="-lm $LIBS" ], [dragonfly*], [ LIBS="-lm $LIBS" @@ -54,7 +56,7 @@ index 8a7cee55b8..b97c5b3cc9 100644 ], [aix*],[ LIBS="-lm $LIBS" ac_cv_func_round=no -@@ -2213,11 +2207,8 @@ AC_REPLACE_FUNCS(dup2) +@@ -1724,11 +1718,8 @@ AC_REPLACE_FUNCS(dup2) AC_REPLACE_FUNCS(erf) AC_REPLACE_FUNCS(explicit_bzero) AC_REPLACE_FUNCS(ffs) @@ -65,8 +67,8 @@ index 8a7cee55b8..b97c5b3cc9 100644 -AC_REPLACE_FUNCS(isnan) AC_REPLACE_FUNCS(lgamma_r) AC_REPLACE_FUNCS(memmove) - AC_REPLACE_FUNCS(nextafter) -@@ -2229,6 +2220,10 @@ AC_REPLACE_FUNCS(strlcpy) + AC_REPLACE_FUNCS(nan) +@@ -1741,6 +1732,10 @@ AC_REPLACE_FUNCS(strlcpy) AC_REPLACE_FUNCS(strstr) AC_REPLACE_FUNCS(tgamma) diff --git a/poky/meta/recipes-devtools/ruby/ruby/extmk.patch b/poky/meta/recipes-devtools/ruby/ruby/extmk.patch deleted file mode 100644 index 404b9af7a..000000000 --- a/poky/meta/recipes-devtools/ruby/ruby/extmk.patch +++ /dev/null @@ -1,16 +0,0 @@ -Upstream-Status: Pending -diff -ru ruby-1.8.7-p248.orig/ext/extmk.rb ruby-1.8.7-p248/ext/extmk.rb ---- ruby-1.8.7-p248.orig/ext/extmk.rb 2009-12-24 03:01:58.000000000 -0600 -+++ ruby-1.8.7-p248/ext/extmk.rb 2010-02-12 15:55:27.370061558 -0600 -@@ -413,8 +413,8 @@ def $mflags.defined?(var) - end - $ruby = [$ruby] - $ruby << "-I'$(topdir)'" -+$ruby << "-I'$(top_srcdir)/lib'" - unless CROSS_COMPILING -- $ruby << "-I'$(top_srcdir)/lib'" - $ruby << "-I'$(extout)/$(arch)'" << "-I'$(extout)/common'" if $extout - ENV["RUBYLIB"] = "-" - end --- - diff --git a/poky/meta/recipes-devtools/ruby/ruby_2.5.5.bb b/poky/meta/recipes-devtools/ruby/ruby_2.6.5.bb index 223b0371e..1828f65d5 100644 --- a/poky/meta/recipes-devtools/ruby/ruby_2.5.5.bb +++ b/poky/meta/recipes-devtools/ruby/ruby_2.6.5.bb @@ -1,12 +1,12 @@ require ruby.inc SRC_URI += " \ - file://0001-configure.ac-check-finite-isinf-isnan-as-macros-firs.patch \ + file://0003-configure.ac-check-finite-isinf-isnan-as-macros-firs.patch \ file://run-ptest \ " -SRC_URI[md5sum] = "7e156fb526b8f4bb1b30a3dd8a7ce400" -SRC_URI[sha256sum] = "28a945fdf340e6ba04fc890b98648342e3cccfd6d223a48f3810572f11b2514c" +SRC_URI[md5sum] = "8754bfb36d52c2bf1fb3d3ddc7101606" +SRC_URI[sha256sum] = "66976b716ecc1fd34f9b7c3c2b07bbd37631815377a2e3e85a5b194cfdcbed7d" PACKAGECONFIG ??= "" PACKAGECONFIG += "${@bb.utils.filter('DISTRO_FEATURES', 'ipv6', d)}" @@ -15,8 +15,6 @@ PACKAGECONFIG[valgrind] = "--with-valgrind=yes, --with-valgrind=no, valgrind" PACKAGECONFIG[gmp] = "--with-gmp=yes, --with-gmp=no, gmp" PACKAGECONFIG[ipv6] = "--enable-ipv6, --disable-ipv6," -EXTRA_AUTORECONF += "--exclude=aclocal" - EXTRA_OECONF = "\ --disable-versioned-paths \ --disable-rpath \ @@ -42,16 +40,18 @@ do_install_append_class-target () { -e 's:${RECIPE_SYSROOT}::g' \ -e 's:${BASE_WORKDIR}/${MULTIMACH_TARGET_SYS}::g' \ ${D}$rbconfig_rb - - # Find out created.rid from .installed.list - created_rid=`grep created.rid ${B}/.installed.list` - # Remove build host directories - sed -i -e 's:${WORKDIR}::g' ${D}$created_rid - } do_install_ptest () { cp -rf ${S}/test ${D}${PTEST_PATH}/ + # install test-binaries + find $(find ./.ext -path '*/-test-') -name '*.so' -print0 \ + | tar --no-recursion --null -T - --no-same-owner --preserve-permissions -cf - \ + | tar -C ${D}${libdir}/ruby/${SHRT_VER}.0/ --no-same-owner --preserve-permissions --strip-components=2 -xf - + # adjust path to not assume build directory layout + sed -e 's|File.expand_path(.*\.\./bin/erb[^)]*|File.expand_path("${bindir}/erb"|g' \ + -i ${D}${PTEST_PATH}/test/erb/test_erb_command.rb + cp -r ${S}/include ${D}/${libdir}/ruby/ test_case_rb=`grep rubygems/test_case.rb ${B}/.installed.list` sed -i -e 's:../../../test/:../../../ptest/test/:g' ${D}/$test_case_rb @@ -69,6 +69,9 @@ FILES_${PN}-rdoc += "${libdir}/ruby/*/rdoc ${bindir}/rdoc" FILES_${PN} += "${datadir}/rubygems" -FILES_${PN}-ptest_append_class-target += "${libdir}/ruby/include" +FILES_${PN}-ptest_append_class-target = "\ + ${libdir}/ruby/include \ + ${libdir}/ruby/${SHRT_VER}.0/*/-test- \ +" BBCLASSEXTEND = "native" diff --git a/poky/meta/recipes-devtools/squashfs-tools/squashfs-tools/squashfs-tools-4.3-sysmacros.patch b/poky/meta/recipes-devtools/squashfs-tools/squashfs-tools/squashfs-tools-4.3-sysmacros.patch deleted file mode 100644 index f2e88f416..000000000 --- a/poky/meta/recipes-devtools/squashfs-tools/squashfs-tools/squashfs-tools-4.3-sysmacros.patch +++ /dev/null @@ -1,32 +0,0 @@ -From https://gitweb.gentoo.org/repo/gentoo.git/tree/sys-fs/squashfs-tools/files/squashfs-tools-4.3-sysmacros.patch - -Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> - -Upstream-Status: Pending - - -sys/types.h might not always include sys/sysmacros.h for major/minor/makedev - ---- a/squashfs-tools/mksquashfs.c -+++ b/squashfs-tools/mksquashfs.c -@@ -59,6 +59,7 @@ - #else - #include <endian.h> - #include <sys/sysinfo.h> -+#include <sys/sysmacros.h> - #endif - - #include "squashfs_fs.h" ---- a/squashfs-tools/unsquashfs.c -+++ b/squashfs-tools/unsquashfs.c -@@ -40,6 +40,10 @@ - #include <limits.h> - #include <ctype.h> - -+#ifdef linux -+#include <sys/sysmacros.h> -+#endif -+ - struct cache *fragment_cache, *data_cache; - struct queue *to_reader, *to_inflate, *to_writer, *from_writer; - pthread_t *thread, *inflator_thread; diff --git a/poky/meta/recipes-devtools/squashfs-tools/squashfs-tools_git.bb b/poky/meta/recipes-devtools/squashfs-tools/squashfs-tools_git.bb index 51e4a5939..4fd33f804 100644 --- a/poky/meta/recipes-devtools/squashfs-tools/squashfs-tools_git.bb +++ b/poky/meta/recipes-devtools/squashfs-tools/squashfs-tools_git.bb @@ -5,13 +5,10 @@ SECTION = "base" LICENSE = "GPL-2" LIC_FILES_CHKSUM = "file://../COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263" -PV = "4.3+gitr${SRCPV}" -SRCREV = "f95864afe8833fe3ad782d714b41378e860977b1" +PV = "4.4" +SRCREV = "52eb4c279cd283ed9802dd1ceb686560b22ffb67" SRC_URI = "git://github.com/plougher/squashfs-tools.git;protocol=https \ - file://squashfs-tools-4.3-sysmacros.patch;striplevel=2 \ " -SRC_URI[lzma.md5sum] = "29d5ffd03a5a3e51aef6a74e9eafb759" -SRC_URI[lzma.sha256sum] = "c935fd04dd8e0e8c688a3078f3675d699679a90be81c12686837e0880aa0fa1e" S = "${WORKDIR}/git/squashfs-tools" @@ -31,13 +28,11 @@ PACKAGECONFIG[zstd] = "ZSTD_SUPPORT=1,ZSTD_SUPPORT=0,zstd" PACKAGECONFIG[reproducible] = "REPRODUCIBLE_DEFAULT=1,REPRODUCIBLE_DEFAULT=0," do_compile() { - oe_runmake mksquashfs unsquashfs + oe_runmake all } -do_install () { - install -d ${D}${sbindir} - install -m 0755 mksquashfs ${D}${sbindir}/ - install -m 0755 unsquashfs ${D}${sbindir}/ +do_install() { + oe_runmake install INSTALL_DIR=${D}${sbindir} } ARM_INSTRUCTION_SET_armv4 = "arm" diff --git a/poky/meta/recipes-devtools/strace/strace/sys_headers.patch b/poky/meta/recipes-devtools/strace/strace/sys_headers.patch new file mode 100644 index 000000000..e46f2c350 --- /dev/null +++ b/poky/meta/recipes-devtools/strace/strace/sys_headers.patch @@ -0,0 +1,25 @@ +Remove configure checks for few sys/ headers + +sys/ipc.h, sys/sem.h, sys/shm.h, and sys/msg.h are actually wrappers +for kernel headers in libc if available, here strace is trying to match +traced process's APIs to syscalls kernel structures + +Removing the checks makes it default to right kernel UAPI headers under linux/ + +Upstream-Status: Submitted [https://lists.strace.io/pipermail/strace-devel/2019-November/009222.html] +Suggested-by: Rich Felker <dalias@aerifal.cx> +Signed-off-by: Khem Raj <raj.khem@gmail.com> +--- a/configure.ac ++++ b/configure.ac +@@ -439,11 +439,7 @@ AC_CHECK_HEADERS(m4_normalize([ + sys/conf.h + sys/eventfd.h + sys/fanotify.h +- sys/ipc.h +- sys/msg.h + sys/quota.h +- sys/sem.h +- sys/shm.h + sys/signalfd.h + sys/xattr.h + ustat.h diff --git a/poky/meta/recipes-devtools/strace/strace/uintptr_t.patch b/poky/meta/recipes-devtools/strace/strace/uintptr_t.patch new file mode 100644 index 000000000..6d3dd6fb9 --- /dev/null +++ b/poky/meta/recipes-devtools/strace/strace/uintptr_t.patch @@ -0,0 +1,17 @@ +include stdint.h for getting uintptr_t definition + +fixes do_compile_ptest_base +tests/fanotify_mark.c:191:23: error: 'uintptr_t' undeclared (first use in this function); did you mean 'intptr_t'? + +Upstream-Status: Pending +Signed-off-by: Khem Raj <raj.khem@gmail.com> +--- a/tests/fanotify_mark.c ++++ b/tests/fanotify_mark.c +@@ -18,6 +18,7 @@ + + # include <limits.h> + # include <stdio.h> ++# include <stdint.h> + # include <unistd.h> + # include <sys/fanotify.h> + diff --git a/poky/meta/recipes-devtools/strace/strace_5.3.bb b/poky/meta/recipes-devtools/strace/strace_5.3.bb index 775a22fc6..b000afb30 100644 --- a/poky/meta/recipes-devtools/strace/strace_5.3.bb +++ b/poky/meta/recipes-devtools/strace/strace_5.3.bb @@ -14,6 +14,8 @@ SRC_URI = "https://strace.io/files/${PV}/strace-${PV}.tar.xz \ file://0001-caps-abbrev.awk-fix-gawk-s-path.patch \ file://0001-tests-sigaction-Check-for-mips-and-alpha-before-usin.patch \ file://ptest-spacesave.patch \ + file://uintptr_t.patch \ + file://sys_headers.patch \ " SRC_URI[md5sum] = "84f5e72de813c9b1bb6057ee8ab428d8" SRC_URI[sha256sum] = "6c131198749656401fe3efd6b4b16a07ea867e8f530867ceae8930bbc937a047" diff --git a/poky/meta/recipes-devtools/systemd-bootchart/systemd-bootchart_233.bb b/poky/meta/recipes-devtools/systemd-bootchart/systemd-bootchart_233.bb index b0433e0e9..aef883986 100644 --- a/poky/meta/recipes-devtools/systemd-bootchart/systemd-bootchart_233.bb +++ b/poky/meta/recipes-devtools/systemd-bootchart/systemd-bootchart_233.bb @@ -20,7 +20,7 @@ S = "${WORKDIR}/git" DEPENDS = "systemd libxslt-native xmlto-native docbook-xml-dtd4-native docbook-xsl-stylesheets-native intltool" -inherit pkgconfig autotools systemd distro_features_check +inherit pkgconfig autotools systemd features_check REQUIRED_DISTRO_FEATURES = "systemd" diff --git a/poky/meta/recipes-devtools/unfs3/unfs3/0001-Add-listen-action-for-a-tcp-socket.patch b/poky/meta/recipes-devtools/unfs3/unfs3/0001-Add-listen-action-for-a-tcp-socket.patch new file mode 100644 index 000000000..e9b9d3df4 --- /dev/null +++ b/poky/meta/recipes-devtools/unfs3/unfs3/0001-Add-listen-action-for-a-tcp-socket.patch @@ -0,0 +1,54 @@ +From b42ab8e1aca951dd06c113159491b3fd5cf06f2e Mon Sep 17 00:00:00 2001 +From: Haiqing Bai <Haiqing.Bai@windriver.com> +Date: Thu, 24 Oct 2019 09:39:04 +0800 +Subject: [PATCH] Add "listen" action for a tcp socket which does not call + 'listen' after 'bind' + +It is found that /usr/bin/unfsd customus 100% cpu after starting qemu with 'nfs' +option, and below lots of error messages shows when strace the process: + +poll([{fd=3, events=POLLIN|POLLPRI|POLLRDNORM|POLLRDBAND},{fd=4, events=POLLIN|POLLPRI|POLLRDNORM|POLLRDBAND}, +{fd=5, events=POLLIN|POLLPRI|POLLRDNORM|POLLRDBAND},{fd=6, events =POLLIN|POLLPRI|POLLRDNORM|POLLRDBAND}], +4, 2000) = 2 ([{fd=4, revents=POLLHUP},{fd=6, revents=POLLHUP}]) +accept(4, 0x7ffd5e6dddc0, [128]) = -1 EINVAL (Invalid argument) +accept(6, 0x7ffd5e6dddc0, [128]) = -1 EINVAL (Invalid argument) + +% time seconds usecs/call calls errors syscall +------ ----------- ----------- --------- --------- ---------------- + 70.87 0.005392 0 513886 513886 accept + 29.13 0.002216 0 256943 poll + 0.00 0.000000 0 4 read + +The root cause is that 'listen' is not called for the binded +socket. The depended libtipc does not call 'listen' if found +the incomming socket is binded, so 'accept' reports the error +in the 'for' loop and cpu consumed. + +Upstream-Status: Pending + +Signed-off-by: Haiqing Bai <Haiqing.Bai@windriver.com> +--- + daemon.c | 7 +++++++ + 1 file changed, 7 insertions(+) + +diff --git a/daemon.c b/daemon.c +index 028a181..4c85903 100644 +--- a/daemon.c ++++ b/daemon.c +@@ -814,6 +814,13 @@ static SVCXPRT *create_tcp_transport(unsigned int port) + fprintf(stderr, "Couldn't bind to tcp port %d\n", port); + exit(1); + } ++ ++ if (listen(sock, SOMAXCONN) < 0) { ++ perror("listen"); ++ fprintf(stderr, "Couldn't listen on the address \n"); ++ close(sock); ++ exit(1); ++ } + } + + transp = svctcp_create(sock, 0, 0); +-- +1.9.1 + diff --git a/poky/meta/recipes-devtools/unfs3/unfs3_git.bb b/poky/meta/recipes-devtools/unfs3/unfs3_git.bb index 79d09788d..d60cee87c 100644 --- a/poky/meta/recipes-devtools/unfs3/unfs3_git.bb +++ b/poky/meta/recipes-devtools/unfs3/unfs3_git.bb @@ -23,6 +23,7 @@ SRC_URI = "git://github.com/unfs3/unfs3.git;protocol=https \ file://tcp_no_delay.patch \ file://0001-daemon.c-Libtirpc-porting-fixes.patch \ file://0001-attr-fix-utime-for-symlink.patch \ + file://0001-Add-listen-action-for-a-tcp-socket.patch \ " SRCREV = "c12a5c69a8d59be6916cbd0e0f41c159f1962425" UPSTREAM_CHECK_GITTAGREGEX = "unfs3\-(?P<pver>.+)" diff --git a/poky/meta/recipes-devtools/vala/vala_0.46.3.bb b/poky/meta/recipes-devtools/vala/vala_0.46.4.bb index eda5738c0..c4cd6dd41 100644 --- a/poky/meta/recipes-devtools/vala/vala_0.46.3.bb +++ b/poky/meta/recipes-devtools/vala/vala_0.46.4.bb @@ -4,5 +4,5 @@ SRC_URI += "file://0001-git-version-gen-don-t-append-dirty-if-we-re-not-in-g.pat file://0001-vapigen.m4-use-PKG_CONFIG_SYSROOT_DIR.patch \ " -SRC_URI[md5sum] = "809ddac69b039ef509b61993c848613f" -SRC_URI[sha256sum] = "e29c2b1f108dc22c91bb501975a77c938aef079ca7875e1fbf41191e22cc57e3" +SRC_URI[md5sum] = "b79bbaf8929ec8ed35911b3571f5a248" +SRC_URI[sha256sum] = "4bb9b60fc0230b0db2c8a0e2a80ec29f1c10b43dc78355abba78adedbc2e03a1" diff --git a/poky/meta/recipes-extended/acpica/acpica_20190816.bb b/poky/meta/recipes-extended/acpica/acpica_20191018.bb index 8f7997477..469227576 100644 --- a/poky/meta/recipes-extended/acpica/acpica_20190816.bb +++ b/poky/meta/recipes-extended/acpica/acpica_20191018.bb @@ -9,19 +9,19 @@ ACPI tables." HOMEPAGE = "http://www.acpica.org/" SECTION = "console/tools" -LICENSE = "BSD | GPLv2" -LIC_FILES_CHKSUM = "file://generate/unix/readme.txt;md5=204407e197c1a01154a48f6c6280c3aa" +LICENSE = "Intel | BSD | GPLv2" +LIC_FILES_CHKSUM = "file://source/compiler/aslcompile.c;beginline=7;endline=150;md5=b5690d9ef8d54b2b1e1cc98aad64cd87" COMPATIBLE_HOST = "(i.86|x86_64|arm|aarch64).*-linux" DEPENDS = "bison flex bison-native" -SRC_URI = "https://acpica.org/sites/acpica/files/acpica-unix2-${PV}.tar.gz" -SRC_URI[md5sum] = "6a73b1e34715916fa31132dbe11008b0" -SRC_URI[sha256sum] = "888e80f3bb77381620a5ead208e1a1be06f3ea66ddc8cfdfa62811cae5f03752" +SRC_URI = "https://acpica.org/sites/acpica/files/acpica-unix-${PV}.tar.gz" +SRC_URI[md5sum] = "539a0252bcb42c383ceeaeb12ae9a60d" +SRC_URI[sha256sum] = "029db4014600e4b771b11a84276d2d76eb40fb26eabc85864852ef1f962be95f" UPSTREAM_CHECK_URI = "https://acpica.org/downloads" -S = "${WORKDIR}/acpica-unix2-${PV}" +S = "${WORKDIR}/acpica-unix-${PV}" inherit update-alternatives diff --git a/poky/meta/recipes-extended/ethtool/ethtool/avoid_parallel_tests.patch b/poky/meta/recipes-extended/ethtool/ethtool/avoid_parallel_tests.patch index 7c5d4f956..153ea5506 100644 --- a/poky/meta/recipes-extended/ethtool/ethtool/avoid_parallel_tests.patch +++ b/poky/meta/recipes-extended/ethtool/ethtool/avoid_parallel_tests.patch @@ -19,7 +19,7 @@ index 2127fdb..4910e6f 100644 --- a/configure.ac +++ b/configure.ac @@ -2,7 +2,7 @@ dnl Process this file with autoconf to produce a configure script. - AC_INIT(ethtool, 5.2, netdev@vger.kernel.org) + AC_INIT(ethtool, 5.3, netdev@vger.kernel.org) AC_PREREQ(2.52) AC_CONFIG_SRCDIR([ethtool.c]) -AM_INIT_AUTOMAKE([gnu]) diff --git a/poky/meta/recipes-extended/ethtool/ethtool_5.2.bb b/poky/meta/recipes-extended/ethtool/ethtool_5.3.bb index 67e7fadee..401331be3 100644 --- a/poky/meta/recipes-extended/ethtool/ethtool_5.2.bb +++ b/poky/meta/recipes-extended/ethtool/ethtool_5.3.bb @@ -11,8 +11,8 @@ SRC_URI = "${KERNELORG_MIRROR}/software/network/ethtool/ethtool-${PV}.tar.gz \ file://avoid_parallel_tests.patch \ " -SRC_URI[md5sum] = "79cff0d4af62b030ad28be90414b5c4a" -SRC_URI[sha256sum] = "8ad6cb30f6e1767d9d23a5cb5f606f3b51f83e85ebf0153c1506194f6709e90b" +SRC_URI[md5sum] = "63d1c835b861912ea0dfd52cf66a2da4" +SRC_URI[sha256sum] = "cd2d8ea360431a2ea35ff61c276bcf2afee1ad901668a0b50ae9f1c5814756bd" UPSTREAM_CHECK_URI = "https://www.kernel.org/pub/software/network/ethtool/" diff --git a/poky/meta/recipes-extended/gawk/gawk_5.0.1.bb b/poky/meta/recipes-extended/gawk/gawk_5.0.1.bb index b3eb39e4e..eaba6c78e 100644 --- a/poky/meta/recipes-extended/gawk/gawk_5.0.1.bb +++ b/poky/meta/recipes-extended/gawk/gawk_5.0.1.bb @@ -11,8 +11,8 @@ SECTION = "console/utils" LICENSE = "GPLv3" LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504" -DEPENDS += "readline" - +PACKAGECONFIG ??= "readline" +PACKAGECONFIG[readline] = "--with-readline,--without-readline,readline" PACKAGECONFIG[mpfr] = "--with-mpfr,--without-mpfr, mpfr" SRC_URI = "${GNU_MIRROR}/gawk/gawk-${PV}.tar.gz \ diff --git a/poky/meta/recipes-extended/iputils/iputils_s20190709.bb b/poky/meta/recipes-extended/iputils/iputils_s20190709.bb index d8f2470d0..3f9e9917f 100644 --- a/poky/meta/recipes-extended/iputils/iputils_s20190709.bb +++ b/poky/meta/recipes-extended/iputils/iputils_s20190709.bb @@ -17,6 +17,10 @@ S = "${WORKDIR}/git" UPSTREAM_CHECK_GITTAGREGEX = "(?P<pver>s\d+)" +# Fixed in 2000-10-10, but the versioning of iputils +# breaks the version order. +CVE_CHECK_WHITELIST += "CVE-2000-1213 CVE-2000-1214" + PACKAGECONFIG ??= "libcap libgcrypt rarpd traceroute6" PACKAGECONFIG[libcap] = "-DUSE_CAP=true, -DUSE_CAP=false, libcap" PACKAGECONFIG[libgcrypt] = "-DUSE_CRYPTO=gcrypt, -DUSE_CRYPTO=none, libgcrypt" diff --git a/poky/meta/recipes-extended/libnsl/libnsl2_git.bb b/poky/meta/recipes-extended/libnsl/libnsl2_git.bb index c3a24face..28c84af7a 100644 --- a/poky/meta/recipes-extended/libnsl/libnsl2_git.bb +++ b/poky/meta/recipes-extended/libnsl/libnsl2_git.bb @@ -12,7 +12,7 @@ DEPENDS = "libtirpc" PV = "1.2.0+git${SRCPV}" -SRCREV = "37c5ffe3038d42e9fa9ed232ad2cbca4d8f14681" +SRCREV = "4a062cf4180d99371198951e4ea5b4550efd58a3" SRC_URI = "git://github.com/thkukuk/libnsl \ " diff --git a/poky/meta/recipes-extended/libsolv/libsolv_0.7.6.bb b/poky/meta/recipes-extended/libsolv/libsolv_0.7.8.bb index 3df899308..8fe9ae046 100644 --- a/poky/meta/recipes-extended/libsolv/libsolv_0.7.6.bb +++ b/poky/meta/recipes-extended/libsolv/libsolv_0.7.8.bb @@ -10,7 +10,7 @@ DEPENDS = "expat zlib" SRC_URI = "git://github.com/openSUSE/libsolv.git \ " -SRCREV = "17ce4bc4fb52a0b32964f3b7d491c18177980be1" +SRCREV = "5205c5683ce2c8b8288534059ba40a318a2a161d" UPSTREAM_CHECK_GITTAGREGEX = "(?P<pver>\d+(\.\d+)+)" diff --git a/poky/meta/recipes-extended/libtirpc/libtirpc/musl.patch b/poky/meta/recipes-extended/libtirpc/libtirpc/musl.patch index 0c3ce603e..21cd9f958 100644 --- a/poky/meta/recipes-extended/libtirpc/libtirpc/musl.patch +++ b/poky/meta/recipes-extended/libtirpc/libtirpc/musl.patch @@ -1,13 +1,14 @@ Consider musl provided built-in defines Helps compile libtirpc with musl +bits/endian.h is not supposed to be included directly Upstream-Status: Pending Signed-off-by: Khem Raj <raj.khem@gmail.com> ---- ./tirpc/rpc/types.h.orig 2018-03-17 10:23:10.022055255 +0100 -+++ ./tirpc/rpc/types.h 2018-03-17 10:23:30.877751656 +0100 -@@ -66,7 +66,7 @@ +--- a/tirpc/rpc/types.h ++++ b/tirpc/rpc/types.h +@@ -66,7 +66,7 @@ typedef int32_t rpc_inline_t; #define mem_free(ptr, bsize) free(ptr) @@ -16,3 +17,14 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com> # define __u_char_defined # define __daddr_t_defined #endif +--- a/src/xdr_float.c ++++ b/src/xdr_float.c +@@ -83,7 +83,7 @@ static struct sgl_limits { + }; + #else + +-#include <bits/endian.h> ++#include <endian.h> + #define IEEEFP + + #endif /* vax */ diff --git a/poky/meta/recipes-extended/libtirpc/libtirpc_1.1.4.bb b/poky/meta/recipes-extended/libtirpc/libtirpc_1.1.4.bb index e73ffe7b1..633cececd 100644 --- a/poky/meta/recipes-extended/libtirpc/libtirpc_1.1.4.bb +++ b/poky/meta/recipes-extended/libtirpc/libtirpc_1.1.4.bb @@ -23,6 +23,20 @@ EXTRA_OECONF = "--disable-gssapi" do_install_append() { chown root:root ${D}${sysconfdir}/netconfig + install -d ${D}${includedir}/rpc + install -d ${D}${includedir}/rpcsvc + for link_header in ${D}${includedir}/tirpc/rpc/*; do + if [ -f $link_header -a ! -e ${D}/${includedir}/rpc/$(basename $link_header) ]; then + ln -sf ../tirpc/rpc/$(basename $link_header) ${D}${includedir}/rpc/$(basename $link_header) + fi + done + for link_header in ${D}${includedir}/tirpc/rpcsvc/*; do + if [ -f $link_header -a ! -e ${D}/${includedir}/rpcsvc/$(basename $link_header) ]; then + ln -sf ../tirpc/rpc/$(basename $link_header) ${D}${includedir}/rpcsvc/$(basename $link_header) + fi + done + ln -sf tirpc/netconfig.h ${D}/${includedir}/netconfig.h + } BBCLASSEXTEND = "native nativesdk" diff --git a/poky/meta/recipes-extended/ltp/ltp/0001-mkswap01.sh-Add-udevadm-trigger-before-swap-verifica.patch b/poky/meta/recipes-extended/ltp/ltp/0001-mkswap01.sh-Add-udevadm-trigger-before-swap-verifica.patch new file mode 100644 index 000000000..1b433d3ad --- /dev/null +++ b/poky/meta/recipes-extended/ltp/ltp/0001-mkswap01.sh-Add-udevadm-trigger-before-swap-verifica.patch @@ -0,0 +1,35 @@ +From fae8852a63d9fa6e56fb8b24eaf10560bd13757f Mon Sep 17 00:00:00 2001 +From: Yongxin Liu <yongxin.liu@windriver.com> +Date: Tue, 12 Nov 2019 11:33:50 +0800 +Subject: [PATCH] mkswap01.sh: Add "udevadm trigger" before swap verification + +Fix: https://github.com/linux-test-project/ltp/issues/458 + +Sometimes the swap device cannot show up in /dev/disk/by-uuid/ +or /dev/disk/by-lable/ due to the issue #458. When this issue +happens, "blkid -c /dev/null" and "ls /dev/disk/by-uuid/" show +different UUID of the device. + +Upstream-Status: Submitted [https://patchwork.ozlabs.org/patch/1193414] + +Signed-off-by: Yongxin Liu <yongxin.liu@windriver.com> +--- + testcases/commands/mkswap/mkswap01.sh | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/testcases/commands/mkswap/mkswap01.sh b/testcases/commands/mkswap/mkswap01.sh +index 3a348c6e6..9437c4a4e 100755 +--- a/testcases/commands/mkswap/mkswap01.sh ++++ b/testcases/commands/mkswap/mkswap01.sh +@@ -129,6 +129,8 @@ mkswap_test() + return + fi + ++ udevadm trigger --name-match=$TST_DEVICE ++ + if [ -n "$device" ]; then + mkswap_verify "$mkswap_op" "$op_arg" "$device" "$size" "$dev_file" + if [ $? -ne 0 ]; then +-- +2.14.4 + diff --git a/poky/meta/recipes-extended/ltp/ltp/0001-overcommit_memory-update-for-mm-fix-false-positive-O.patch b/poky/meta/recipes-extended/ltp/ltp/0001-overcommit_memory-update-for-mm-fix-false-positive-O.patch new file mode 100644 index 000000000..bed84712a --- /dev/null +++ b/poky/meta/recipes-extended/ltp/ltp/0001-overcommit_memory-update-for-mm-fix-false-positive-O.patch @@ -0,0 +1,57 @@ +From d656a447893dccc310c975a239f482278550c3e0 Mon Sep 17 00:00:00 2001 +From: Jan Stancek <jstancek@redhat.com> +Date: Tue, 21 May 2019 10:10:44 +0200 +Subject: [PATCH] overcommit_memory: update for "mm: fix false-positive + OVERCOMMIT_GUESS failures" + +commit 8c7829b04c52 ("mm: fix false-positive OVERCOMMIT_GUESS failures") +changes logic of __vm_enough_memory(), simplifying it to: + When in GUESS mode, catch wild allocations by comparing their request + size to total amount of ram and swap in the system. + +Testcase currently allocates mem_total + swap_total, which doesn't trigger +new condition. Make it more extreme, but assuming free_total / 2 will PASS, +and 2*sum_total will FAIL. + +Signed-off-by: Jan Stancek <jstancek@redhat.com> +Acked-by: Cyril Hrubis <chrubis@suse.cz> + +Upstream-Status: Backport [https://github.com/linux-test-project/ltp/commit/d656a447893dccc310c975a239f482278550c3e0] +Signed-off-by: He Zhe <zhe.he@windriver.com> +--- + testcases/kernel/mem/tunable/overcommit_memory.c | 11 ++++------- + 1 file changed, 4 insertions(+), 7 deletions(-) + +diff --git a/testcases/kernel/mem/tunable/overcommit_memory.c b/testcases/kernel/mem/tunable/overcommit_memory.c +index 555298f..345764d 100644 +--- a/testcases/kernel/mem/tunable/overcommit_memory.c ++++ b/testcases/kernel/mem/tunable/overcommit_memory.c +@@ -36,11 +36,10 @@ + * + * The program is designed to test the two tunables: + * +- * When overcommit_memory = 0, allocatable memory can't overextends +- * the amount of free memory. I choose the three cases: ++ * When overcommit_memory = 0, allocatable memory can't overextend ++ * the amount of total memory: + * a. less than free_total: free_total / 2, alloc should pass. +- * b. greater than free_total: free_total * 2, alloc should fail. +- * c. equal to sum_total: sum_tatal, alloc should fail ++ * b. greater than sum_total: sum_total * 2, alloc should fail. + * + * When overcommit_memory = 1, it can alloc enough much memory, I + * choose the three cases: +@@ -164,9 +163,7 @@ static void overcommit_memory_test(void) + + update_mem(); + alloc_and_check(free_total / 2, EXPECT_PASS); +- update_mem(); +- alloc_and_check(free_total * 2, EXPECT_FAIL); +- alloc_and_check(sum_total, EXPECT_FAIL); ++ alloc_and_check(sum_total * 2, EXPECT_FAIL); + + /* start to test overcommit_memory=1 */ + set_sys_tune("overcommit_memory", 1, 1); +-- +2.7.4 + diff --git a/poky/meta/recipes-extended/ltp/ltp_20190517.bb b/poky/meta/recipes-extended/ltp/ltp_20190517.bb index 465071560..47aa9675d 100644 --- a/poky/meta/recipes-extended/ltp/ltp_20190517.bb +++ b/poky/meta/recipes-extended/ltp/ltp_20190517.bb @@ -49,6 +49,8 @@ SRC_URI = "git://github.com/linux-test-project/ltp.git \ file://0001-testcases-use-python3-everywhere-to-run-python-scrip.patch \ file://0001-syscall-rt_sigtimedwait01-Fix-wrong-sigset-length-fo.patch \ file://0001-cve-2017-17052-Avoid-unsafe-exits-in-threads.patch \ + file://0001-overcommit_memory-update-for-mm-fix-false-positive-O.patch \ + file://0001-mkswap01.sh-Add-udevadm-trigger-before-swap-verifica.patch \ " S = "${WORKDIR}/git" diff --git a/poky/meta/recipes-extended/mc/files/0001-Add-option-to-control-configure-args.patch b/poky/meta/recipes-extended/mc/files/0001-Add-option-to-control-configure-args.patch new file mode 100644 index 000000000..e76aac816 --- /dev/null +++ b/poky/meta/recipes-extended/mc/files/0001-Add-option-to-control-configure-args.patch @@ -0,0 +1,99 @@ +From a54501d3c9541bc8600225aa2d42531f93c6def7 Mon Sep 17 00:00:00 2001 +From: Joshua Watt <JPEWhacker@gmail.com> +Date: Sat, 9 Nov 2019 20:01:48 -0600 +Subject: [PATCH] Add option to control configure args + +Embedding the configure time options into the executable can lead to +non-reproducible builds, since configure options often have embedded +paths. Add a configure time option to control if the configure args are +embedded so this can be disabled. + +Upstream-Status: Submitted [https://midnight-commander.org/ticket/4031] +Signed-off-by: Joshua Watt <JPEWhacker@gmail.com> +--- + configure.ac | 6 ++++++ + src/args.c | 6 ++++++ + src/textconf.c | 2 ++ + 3 files changed, 14 insertions(+) + +diff --git a/configure.ac b/configure.ac +index 19d1a76be..a1948f6b9 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -544,6 +544,12 @@ dnl Clarify do we really need GModule + AM_CONDITIONAL([HAVE_GMODULE], [test -n "$g_module_supported" && \ + test x"$textmode_x11_support" = x"yes" -o x"$enable_aspell" = x"yes"]) + ++AC_ARG_ENABLE([configure-args], ++ AS_HELP_STRING([--enable-configure-args], [Handle all compiler warnings as errors])) ++if test "x$enable_configure_args" != xno; then ++ AC_DEFINE([ENABLE_CONFIGURE_ARGS], 1, [Define to enable showing configure arguments in help]) ++fi ++ + AC_DEFINE_UNQUOTED([MC_CONFIGURE_ARGS], ["$ac_configure_args"], [MC configure arguments]) + + AC_CONFIG_FILES( +diff --git a/src/args.c b/src/args.c +index baef1a1c8..f8dc24020 100644 +--- a/src/args.c ++++ b/src/args.c +@@ -95,7 +95,9 @@ static gboolean mc_args__nouse_subshell = FALSE; + #endif /* ENABLE_SUBSHELL */ + static gboolean mc_args__show_datadirs = FALSE; + static gboolean mc_args__show_datadirs_extended = FALSE; ++#ifdef ENABLE_CONFIGURE_ARGS + static gboolean mc_args__show_configure_opts = FALSE; ++#endif + + static GOptionGroup *main_group; + +@@ -125,6 +127,7 @@ static const GOptionEntry argument_main_table[] = { + NULL + }, + ++#ifdef ENABLE_CONFIGURE_ARGS + /* show configure options */ + { + "configure-options", '\0', G_OPTION_FLAG_IN_MAIN, G_OPTION_ARG_NONE, +@@ -132,6 +135,7 @@ static const GOptionEntry argument_main_table[] = { + N_("Print configure options"), + NULL + }, ++#endif + + { + "printwd", 'P', G_OPTION_FLAG_IN_MAIN, G_OPTION_ARG_STRING, +@@ -758,11 +762,13 @@ mc_args_show_info (void) + return FALSE; + } + ++#ifdef ENABLE_CONFIGURE_ARGS + if (mc_args__show_configure_opts) + { + show_configure_options (); + return FALSE; + } ++#endif + + return TRUE; + } +diff --git a/src/textconf.c b/src/textconf.c +index 1e0613e58..f39b9e028 100644 +--- a/src/textconf.c ++++ b/src/textconf.c +@@ -232,10 +232,12 @@ show_datadirs_extended (void) + + /* --------------------------------------------------------------------------------------------- */ + ++#ifdef ENABLE_CONFIGURE_ARGS + void + show_configure_options (void) + { + (void) printf ("%s\n", MC_CONFIGURE_ARGS); + } ++#endif + + /* --------------------------------------------------------------------------------------------- */ +-- +2.23.0 + diff --git a/poky/meta/recipes-extended/mc/mc_4.8.23.bb b/poky/meta/recipes-extended/mc/mc_4.8.23.bb index 83de8dbb2..71f61b484 100644 --- a/poky/meta/recipes-extended/mc/mc_4.8.23.bb +++ b/poky/meta/recipes-extended/mc/mc_4.8.23.bb @@ -8,6 +8,7 @@ RDEPENDS_${PN} = "ncurses-terminfo" SRC_URI = "http://www.midnight-commander.org/downloads/${BPN}-${PV}.tar.bz2 \ file://0001-mc-replace-perl-w-with-use-warnings.patch \ + file://0001-Add-option-to-control-configure-args.patch \ " SRC_URI[md5sum] = "152927ac29cf0e61d7d019f261bb7d89" SRC_URI[sha256sum] = "238c4552545dcf3065359bd50753abbb150c1b22ec5a36eaa02c82808293267d" @@ -21,9 +22,11 @@ PACKAGECONFIG ??= "" PACKAGECONFIG[smb] = "--enable-vfs-smb,--disable-vfs-smb,samba," PACKAGECONFIG[sftp] = "--enable-vfs-sftp,--disable-vfs-sftp,libssh2," -EXTRA_OECONF = "--with-screen=ncurses --without-gpm-mouse --without-x" +EXTRA_OECONF = "--with-screen=ncurses --without-gpm-mouse --without-x --disable-configure-args" CACHED_CONFIGUREVARS += "ac_cv_path_PERL='/usr/bin/env perl'" +CACHED_CONFIGUREVARS += "ac_cv_path_PYTHON='/usr/bin/env python'" +CACHED_CONFIGUREVARS += "ac_cv_path_GREP='/usr/bin/env grep'" do_install_append () { sed -i -e '1s,#!.*perl,#!${bindir}/env perl,' ${D}${libexecdir}/mc/extfs.d/* diff --git a/poky/meta/recipes-extended/mdadm/mdadm_4.1.bb b/poky/meta/recipes-extended/mdadm/mdadm_4.1.bb index 639382e13..64f519e75 100644 --- a/poky/meta/recipes-extended/mdadm/mdadm_4.1.bb +++ b/poky/meta/recipes-extended/mdadm/mdadm_4.1.bb @@ -43,13 +43,12 @@ CFLAGS_append_powerpc64 = ' -D__SANE_USERSPACE_TYPES__' CFLAGS_append_mipsarchn64 = ' -D__SANE_USERSPACE_TYPES__' CFLAGS_append_mipsarchn32 = ' -D__SANE_USERSPACE_TYPES__' -EXTRA_OEMAKE = 'CHECK_RUN_DIR=0 CXFLAGS="${CFLAGS}"' +EXTRA_OEMAKE = 'CHECK_RUN_DIR=0 CXFLAGS="${CFLAGS}" SYSTEMD_DIR=${systemd_unitdir}/system \ + BINDIR="${base_sbindir}" UDEVDIR="${nonarch_base_libdir}/udev"' DEBUG_OPTIMIZATION_append = " -Wno-error" do_compile() { - # Point to right sbindir - sed -i -e "s;BINDIR = /sbin;BINDIR = $base_sbindir;" -e "s;UDEVDIR = /lib;UDEVDIR = $nonarch_base_libdir;" -e "s;SYSTEMD_DIR=/lib/systemd/system;SYSTEMD_DIR=${systemd_unitdir}/system;" ${S}/Makefile oe_runmake SYSROOT="${STAGING_DIR_TARGET}" } diff --git a/poky/meta/recipes-extended/packagegroups/packagegroup-core-full-cmdline.bb b/poky/meta/recipes-extended/packagegroups/packagegroup-core-full-cmdline.bb index 2d96d1ba3..15a8e6ded 100644 --- a/poky/meta/recipes-extended/packagegroups/packagegroup-core-full-cmdline.bb +++ b/poky/meta/recipes-extended/packagegroups/packagegroup-core-full-cmdline.bb @@ -81,6 +81,7 @@ RDEPENDS_packagegroup-core-full-cmdline-utils = "\ gawk \ gmp \ grep \ + less \ makedevs \ mc \ mc-fish \ diff --git a/poky/meta/recipes-extended/pam/libpam_1.3.1.bb b/poky/meta/recipes-extended/pam/libpam_1.3.1.bb index 6b73f0a2f..119493382 100644 --- a/poky/meta/recipes-extended/pam/libpam_1.3.1.bb +++ b/poky/meta/recipes-extended/pam/libpam_1.3.1.bb @@ -150,7 +150,7 @@ do_install() { fi } -inherit distro_features_check +inherit features_check REQUIRED_DISTRO_FEATURES = "pam" BBCLASSEXTEND = "nativesdk native" @@ -163,3 +163,5 @@ CONFFILES_${PN}-runtime += "${sysconfdir}/pam.d/common-account" CONFFILES_${PN}-runtime += "${sysconfdir}/security/limits.conf" UPSTREAM_CHECK_URI = "https://github.com/linux-pam/linux-pam/releases" + +CVE_PRODUCT = "linux-pam" diff --git a/poky/meta/recipes-extended/procps/procps_3.3.15.bb b/poky/meta/recipes-extended/procps/procps_3.3.15.bb index 9756db0e7..f240e54fd 100644 --- a/poky/meta/recipes-extended/procps/procps_3.3.15.bb +++ b/poky/meta/recipes-extended/procps/procps_3.3.15.bb @@ -4,9 +4,9 @@ the /proc filesystem. The package includes the programs ps, top, vmstat, w, kill HOMEPAGE = "https://gitlab.com/procps-ng/procps" SECTION = "base" LICENSE = "GPLv2+ & LGPLv2+" -LIC_FILES_CHKSUM="file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \ - file://COPYING.LIB;md5=4cf66a4984120007c9881cc871cf49db \ - " +LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \ + file://COPYING.LIB;md5=4cf66a4984120007c9881cc871cf49db \ + " DEPENDS = "ncurses" @@ -64,3 +64,6 @@ python __anonymous() { d.setVarFlag('ALTERNATIVE_LINK_NAME', prog, '%s/%s' % (d.getVar('base_sbindir'), prog)) } +# 'ps' isn't suitable for use as a security tool so whitelist this CVE. +# https://bugzilla.redhat.com/show_bug.cgi?id=1575473#c3 +CVE_CHECK_WHITELIST += "CVE-2018-1121" diff --git a/poky/meta/recipes-extended/psmisc/psmisc/0001-Makefile.am-create-src-directory-before-attempting-t.patch b/poky/meta/recipes-extended/psmisc/psmisc/0001-Makefile.am-create-src-directory-before-attempting-t.patch index 4d44495fd..9451303dd 100644 --- a/poky/meta/recipes-extended/psmisc/psmisc/0001-Makefile.am-create-src-directory-before-attempting-t.patch +++ b/poky/meta/recipes-extended/psmisc/psmisc/0001-Makefile.am-create-src-directory-before-attempting-t.patch @@ -1,4 +1,4 @@ -From 285877b7761d74736aca2687ed9bef2f78b82c33 Mon Sep 17 00:00:00 2001 +From dac375f640fecd45e6254a8d870ee37ec8f41670 Mon Sep 17 00:00:00 2001 From: Alexander Kanavin <alex.kanavin@gmail.com> Date: Thu, 2 Nov 2017 16:21:22 +0200 Subject: [PATCH] Makefile.am: create src directory before attempting to write @@ -8,23 +8,21 @@ Otherwise out of tree builds will fail. Upstream-Status: Pending Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> + --- Makefile.am | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile.am b/Makefile.am -index 9f61ab4..b4ced7f 100644 +index 441ae94..882969d 100644 --- a/Makefile.am +++ b/Makefile.am -@@ -79,7 +79,7 @@ EXTRA_DIST = src/signames.c README.md +@@ -86,7 +86,7 @@ EXTRA_DIST = src/signames.c README.md misc/git-version-gen CLEANFILES = src/signames.h - src/signames.h: src/signames.c Makefile + src/signames.h: src/signames.c Makefile src/$(am__dirstamp) - export LC_ALL=C ; \ + export LC_ALL=C ; mkdir -p src ; \ @CPP@ -dM $< |\ tr -s '\t ' ' ' | sort -n -k 3 | sed \ 's:#define SIG\([A-Z][A-Z]*[0-9]*\) \([0-9][0-9]*\).*$\:{\ \2,"\1" },:p;d' | \ --- -2.14.2 - diff --git a/poky/meta/recipes-extended/psmisc/psmisc_23.2.bb b/poky/meta/recipes-extended/psmisc/psmisc_23.3.bb index 38e0a4405..b3c3c7e5a 100644 --- a/poky/meta/recipes-extended/psmisc/psmisc_23.2.bb +++ b/poky/meta/recipes-extended/psmisc/psmisc_23.3.bb @@ -6,5 +6,5 @@ SRC_URI = "git://gitlab.com/psmisc/psmisc.git;protocol=https \ file://0001-Use-UINTPTR_MAX-instead-of-__WORDSIZE.patch \ file://0001-Makefile.am-create-src-directory-before-attempting-t.patch \ " -SRCREV = "44eab9a3a63394eae6b79a7ef0a042f57e0c8a8f" +SRCREV = "78bde849041e6c914a2a517ebe1255b86dc98772" S = "${WORKDIR}/git" diff --git a/poky/meta/recipes-extended/screen/screen/0001-configure.ac-fix-configure-failed-while-build-dir-ha.patch b/poky/meta/recipes-extended/screen/screen/0001-configure.ac-fix-configure-failed-while-build-dir-ha.patch deleted file mode 100644 index 1274b2794..000000000 --- a/poky/meta/recipes-extended/screen/screen/0001-configure.ac-fix-configure-failed-while-build-dir-ha.patch +++ /dev/null @@ -1,109 +0,0 @@ -From 4b258c5a9078f8df60684ab7536ce3a8ff207e08 Mon Sep 17 00:00:00 2001 -From: Hongxu Jia <hongxu.jia@windriver.com> -Date: Thu, 12 Oct 2017 10:03:57 +0000 -Subject: [PATCH] configure.ac: fix configure failed while build dir contains "yes" - -While the name of build dir contains "yes", the AC_EGREP_CPP -test always return true. - -We rarely use "yes;" to name build dir, so s/yes/yes;/g -could fix the issue - -Upstream-Status: Accepted -https://git.savannah.gnu.org/cgit/screen.git/commit/?h=screen-v4&id=8c2b4061d16756ee2ed37f08db063b8215656943 - -Signed-off-by: Jian Kang <jian.kang@windriver.com> ---- - configure.ac | 20 ++++++++++---------- - 1 file changed, 10 insertions(+), 10 deletions(-) - -diff --git a/configure.ac b/configure.ac -index 12996cd..4765af6 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -128,7 +128,7 @@ fi - - - AC_CHECKING(for Ultrix) --AC_EGREP_CPP(yes, -+AC_EGREP_CPP(yes;, - [#if defined(ultrix) || defined(__ultrix) - yes; - #endif -@@ -145,7 +145,7 @@ dnl ghazi@caip.rutgers.edu (Kaveh R. Ghazi): - dnl BBN butterfly is not POSIX, but a MACH BSD system. - dnl Do not define POSIX and TERMIO. - AC_CHECKING(for butterfly) --AC_EGREP_CPP(yes, -+AC_EGREP_CPP(yes;, - [#if defined(butterfly) - yes; - #endif -@@ -156,7 +156,7 @@ if test -n "$ULTRIX"; then - test -z "$GCC" && CC="$CC -YBSD" - fi - AC_CHECKING(for POSIX.1) --AC_EGREP_CPP(yes, -+AC_EGREP_CPP(yes;, - [#include <sys/types.h> - #include <unistd.h> - main () { -@@ -173,14 +173,14 @@ AC_TRY_COMPILE( - #include <fcntl.h>], [int x = SIGCHLD | FNDELAY;], , AC_DEFINE(SYSV)) - - AC_CHECKING(for sequent/ptx) --AC_EGREP_CPP(yes, -+AC_EGREP_CPP(yes;, - [#ifdef _SEQUENT_ - yes; - #endif - ], LIBS="$LIBS -lsocket -linet";seqptx=1) - - AC_CHECKING(SVR4) --AC_EGREP_CPP(yes, -+AC_EGREP_CPP(yes;, - [main () { - #if defined(SVR4) || defined(__SVR4) - yes; -@@ -200,9 +200,9 @@ fi - AC_CHECK_HEADERS([stropts.h string.h strings.h]) - - AC_CHECKING(for Solaris 2.x) --AC_EGREP_CPP(yes, -+AC_EGREP_CPP(yes;, - [#if defined(SVR4) && defined(sun) -- yes -+ yes; - #endif - ], LIBS="$LIBS -lsocket -lnsl -lkstat") - -@@ -697,7 +697,7 @@ else - pdir='/dev' - fi - dnl SCO uses ptyp%d --AC_EGREP_CPP(yes, -+AC_EGREP_CPP(yes;, - [#ifdef M_UNIX - yes; - #endif -@@ -880,7 +880,7 @@ fi - ) - - if test -z "$load" ; then --AC_EGREP_CPP(yes, -+AC_EGREP_CPP(yes;, - [#if defined(NeXT) || defined(apollo) || defined(linux) - yes; - #endif -@@ -1112,7 +1112,7 @@ AC_CHECKING(syslog in libbsd.a) - AC_TRY_LINK(, [closelog();], AC_NOTE(- found.), [LIBS="$oldlibs" - AC_NOTE(- bad news: syslog missing.) AC_DEFINE(NOSYSLOG)])]) - --AC_EGREP_CPP(yes, -+AC_EGREP_CPP(yes;, - [#ifdef M_UNIX - yes; - #endif --- -2.13.3 - diff --git a/poky/meta/recipes-extended/screen/screen/Avoid-mis-identifying-systems-as-SVR4.patch b/poky/meta/recipes-extended/screen/screen/Avoid-mis-identifying-systems-as-SVR4.patch deleted file mode 100644 index e184aa1f3..000000000 --- a/poky/meta/recipes-extended/screen/screen/Avoid-mis-identifying-systems-as-SVR4.patch +++ /dev/null @@ -1,57 +0,0 @@ -From 79afb676904653403145fda9e1a6a9d3ea1cb22a Mon Sep 17 00:00:00 2001 -From: Jussi Kukkonen <jussi.kukkonen@intel.com> -Date: Fri, 7 Aug 2015 11:10:32 +0300 -Subject: [PATCH 4/4] Avoid mis-identifying systems as SVR4 - -Linux can be misdetected as SVR4 because it has -libelf installed. This leads to linking with libelf, even though no -symbols from that library were actually used, and to a workaround for -a buggy getlogin() being enabled. - -It is not documented which exact SVR4 system had the bug that the -workaround was added for, so all I could do is make an educated guess -at the #defines its compiler would be likely to set. - -Modified from patch by Maarten ter Huurne. - -Upstream-Status: Submitted [http://savannah.gnu.org/bugs/?43223] - -Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com> ---- - configure.ac | 14 ++++++++++++-- - 1 file changed, 12 insertions(+), 2 deletions(-) - -diff --git a/configure.ac b/configure.ac -index dc928ae..65439ce 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -179,14 +179,24 @@ AC_EGREP_CPP(yes, - #endif - ], LIBS="$LIBS -lsocket -linet";seqptx=1) - -+AC_CHECKING(SVR4) -+AC_EGREP_CPP(yes, -+[main () { -+#if defined(SVR4) || defined(__SVR4) -+ yes; -+#endif -+], AC_NOTE(- you have a SVR4 system) AC_DEFINE(SVR4) svr4=1) -+if test -n "$svr4" ; then - oldlibs="$LIBS" - LIBS="$LIBS -lelf" - AC_CHECKING(SVR4) - AC_TRY_LINK([#include <utmpx.h> - ],, --[AC_CHECK_HEADER(dwarf.h, AC_DEFINE(SVR4) AC_DEFINE(BUGGYGETLOGIN), --[AC_CHECK_HEADER(elf.h, AC_DEFINE(SVR4) AC_DEFINE(BUGGYGETLOGIN))])] -+[AC_CHECK_HEADER(dwarf.h, AC_DEFINE(BUGGYGETLOGIN), -+[AC_CHECK_HEADER(elf.h, AC_DEFINE(BUGGYGETLOGIN))])] - ,LIBS="$oldlibs") -+fi -+ - AC_CHECK_HEADERS([stropts.h string.h strings.h]) - - AC_CHECKING(for Solaris 2.x) --- -2.1.4 - diff --git a/poky/meta/recipes-extended/screen/screen/Provide-cross-compile-alternatives-for-AC_TRY_RUN.patch b/poky/meta/recipes-extended/screen/screen/Provide-cross-compile-alternatives-for-AC_TRY_RUN.patch deleted file mode 100644 index 248bf087e..000000000 --- a/poky/meta/recipes-extended/screen/screen/Provide-cross-compile-alternatives-for-AC_TRY_RUN.patch +++ /dev/null @@ -1,137 +0,0 @@ -From cd0f7f10a3fffbc60fe55eb200474d13fe1da65b Mon Sep 17 00:00:00 2001 -From: Jussi Kukkonen <jussi.kukkonen@intel.com> -Date: Fri, 7 Aug 2015 10:34:29 +0300 -Subject: [PATCH 2/4] Provide cross compile alternatives for AC_TRY_RUN - -Modified from patch by Maarten ter Huurne. - -Upstream-Status: Submitted [http://savannah.gnu.org/bugs/?43223] - -Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com> ---- - configure.ac | 32 ++++++++++++++++++++------------ - 1 file changed, 20 insertions(+), 12 deletions(-) - -diff --git a/configure.ac b/configure.ac -index 27690a6..ce89f56 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -348,7 +348,8 @@ main() - exit(0); - } - ], AC_NOTE(- your fifos are usable) fifo=1, --AC_NOTE(- your fifos are not usable)) -+AC_NOTE(- your fifos are not usable), -+AC_NOTE(- skipping check because we are cross compiling; assuming fifos are usable) fifo=1) - rm -f /tmp/conftest* - - if test -n "$fifo"; then -@@ -396,7 +397,8 @@ main() - exit(0); - } - ], AC_NOTE(- your implementation is ok), --AC_NOTE(- you have a broken implementation) AC_DEFINE(BROKEN_PIPE) fifobr=1) -+AC_NOTE(- you have a broken implementation) AC_DEFINE(BROKEN_PIPE) fifobr=1, -+AC_NOTE(- skipping check because we are cross compiling; assuming fifo implementation is ok)) - rm -f /tmp/conftest* - fi - -@@ -458,7 +460,8 @@ main() - exit(0); - } - ], AC_NOTE(- your sockets are usable) sock=1, --AC_NOTE(- your sockets are not usable)) -+AC_NOTE(- your sockets are not usable), -+AC_NOTE(- skipping check because we are cross compiling; assuming sockets are usable) sock=1) - rm -f /tmp/conftest* - - if test -n "$sock"; then -@@ -497,7 +500,8 @@ main() - } - ],AC_NOTE(- you are normal), - AC_NOTE(- unix domain sockets are not kept in the filesystem) --AC_DEFINE(SOCK_NOT_IN_FS) socknofs=1) -+AC_DEFINE(SOCK_NOT_IN_FS) socknofs=1, -+AC_NOTE(- skipping check because we are cross compiling; assuming sockets are normal)) - rm -f /tmp/conftest* - fi - -@@ -624,7 +628,8 @@ main() - exit(0); - } - ],AC_NOTE(- select is ok), --AC_NOTE(- select can't count) AC_DEFINE(SELECT_BROKEN)) -+AC_NOTE(- select can't count) AC_DEFINE(SELECT_BROKEN), -+AC_NOTE(- skipping check because we are cross compiling; assuming select is ok)) - - dnl - dnl **** termcap or terminfo **** -@@ -666,7 +671,8 @@ main() - { - exit(strcmp(tgoto("%p1%d", 0, 1), "1") ? 0 : 1); - }], AC_NOTE(- you use the termcap database), --AC_NOTE(- you use the terminfo database) AC_DEFINE(TERMINFO)) -+AC_NOTE(- you use the terminfo database) AC_DEFINE(TERMINFO), -+AC_NOTE(- skipping check because we are cross compiling; assuming terminfo database is used) AC_DEFINE(TERMINFO)) - AC_CHECKING(ospeed) - AC_TRY_LINK(extern short ospeed;,ospeed=5;,,AC_DEFINE(NEED_OSPEED)) - -@@ -801,7 +807,8 @@ main() - else - AC_NOTE(- can't determine - assume ptys are world accessable) - fi -- ] -+ ], -+ AC_NOTE(- skipping check because we are cross compiling; assuming ptys are world accessable) - ) - rm -f conftest_grp - fi -@@ -885,7 +892,7 @@ AC_EGREP_CPP(yes, - #endif - ], load=1) - fi --if test -z "$load" ; then -+if test -z "$load" && test "$cross_compiling" = no ; then - AC_CHECKING(for kernelfile) - for core in /unix /vmunix /dynix /hp-ux /xelos /dev/ksyms /kernel/unix /kernel/genunix /unicos /mach /netbsd /386bsd /dgux /bsd /stand/vmunix; do - if test -f $core || test -c $core; then -@@ -1078,7 +1085,7 @@ main() - #endif - exit(0); - } --],,AC_DEFINE(SYSVSIGS)) -+],,AC_DEFINE(SYSVSIGS),:) - - fi - -@@ -1158,7 +1165,7 @@ main() { - if (strncmp(buf, "cdedef", 6)) - exit(1); - exit(0); /* libc version works properly. */ --}], AC_DEFINE(USEBCOPY)) -+}], AC_DEFINE(USEBCOPY),,:) - - AC_TRY_RUN([ - #define bcopy(s,d,l) memmove(d,s,l) -@@ -1173,7 +1180,8 @@ main() { - if (strncmp(buf, "cdedef", 6)) - exit(1); - exit(0); /* libc version works properly. */ --}], AC_DEFINE(USEMEMMOVE)) -+}], AC_DEFINE(USEMEMMOVE),, -+ AC_NOTE(- skipping check because we are cross compiling; use memmove) AC_DEFINE(USEMEMMOVE)) - - - AC_TRY_RUN([ -@@ -1189,7 +1197,7 @@ main() { - if (strncmp(buf, "cdedef", 6)) - exit(1); - exit(0); /* libc version works properly. */ --}], AC_DEFINE(USEMEMCPY)) -+}], AC_DEFINE(USEMEMCPY),,:) - - AC_SYS_LONG_FILE_NAMES - --- -2.1.4 - diff --git a/poky/meta/recipes-extended/screen/screen/Remove-redundant-compiler-sanity-checks.patch b/poky/meta/recipes-extended/screen/screen/Remove-redundant-compiler-sanity-checks.patch deleted file mode 100644 index cc62c12e0..000000000 --- a/poky/meta/recipes-extended/screen/screen/Remove-redundant-compiler-sanity-checks.patch +++ /dev/null @@ -1,65 +0,0 @@ -From 73b726c25f94c1b15514ed9249b927afdfbbfb94 Mon Sep 17 00:00:00 2001 -From: Jussi Kukkonen <jussi.kukkonen@intel.com> -Date: Fri, 7 Aug 2015 10:30:40 +0300 -Subject: [PATCH 1/4] Remove redundant compiler sanity checks - -AC_PROG_CC already performs sanity checks. And unlike the removed -checks, it does so in a way that supports cross compilation. - -Modified from patch by Maarten ter Huurne. - -Upstream-Status: Submitted [http://savannah.gnu.org/bugs/?43223] - -Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com> ---- - configure.ac | 27 --------------------------- - 1 file changed, 27 deletions(-) - -diff --git a/configure.ac b/configure.ac -index ffe2e37..27690a6 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -48,31 +48,6 @@ AC_PROG_GCC_TRADITIONAL - AC_ISC_POSIX - AC_USE_SYSTEM_EXTENSIONS - --AC_TRY_RUN(main(){exit(0);},,[ --if test $CC != cc ; then --AC_NOTE(Your $CC failed - restarting with CC=cc) --AC_NOTE() --CC=cc --export CC --exec $0 $configure_args --fi --]) -- --AC_TRY_RUN(main(){exit(0);},, --exec 5>&2 --eval $ac_link --AC_NOTE(CC=$CC; CFLAGS=$CFLAGS; LIBS=$LIBS;) --AC_NOTE($ac_compile) --AC_MSG_ERROR(Can't run the compiler - sorry)) -- --AC_TRY_RUN([ --main() --{ -- int __something_strange_(); -- __something_strange_(0); --} --],AC_MSG_ERROR(Your compiler does not set the exit status - sorry)) -- - AC_PROG_AWK - - AC_PROG_INSTALL -@@ -1300,8 +1275,6 @@ fi - dnl Ptx bug workaround -- insert -lc after -ltermcap - test -n "$seqptx" && LIBS="-ltermcap -lc -lsocket -linet -lnsl -lsec -lseq" - --AC_TRY_RUN(main(){exit(0);},,AC_MSG_ERROR(Can't run the compiler - internal error. Sorry.)) -- - ETCSCREENRC= - AC_MSG_CHECKING(for the global screenrc file) - AC_ARG_WITH(sys-screenrc, [ --with-sys-screenrc=path to the global screenrc file], [ ETCSCREENRC="${withval}" ]) --- -2.1.4 - diff --git a/poky/meta/recipes-extended/screen/screen/Skip-host-file-system-checks-when-cross-compiling.patch b/poky/meta/recipes-extended/screen/screen/Skip-host-file-system-checks-when-cross-compiling.patch deleted file mode 100644 index d7e55a445..000000000 --- a/poky/meta/recipes-extended/screen/screen/Skip-host-file-system-checks-when-cross-compiling.patch +++ /dev/null @@ -1,135 +0,0 @@ -From d0b20e4cacc60ad62a2150ce07388cb5a25c2040 Mon Sep 17 00:00:00 2001 -From: Jussi Kukkonen <jussi.kukkonen@intel.com> -Date: Fri, 7 Aug 2015 11:09:01 +0300 -Subject: [PATCH 3/4] Skip host file system checks when cross-compiling - -Modified from patch by Maarten ter Huurne. - -Upstream-Status: Submitted [http://savannah.gnu.org/bugs/?43223] - -Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com> ---- - configure.ac | 23 +++++++++++++++++++---- - 1 file changed, 19 insertions(+), 4 deletions(-) - -diff --git a/configure.ac b/configure.ac -index ce89f56..dc928ae 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -85,7 +85,7 @@ AC_ARG_ENABLE(socket-dir, - dnl - dnl **** special unix variants **** - dnl --if test -n "$ISC"; then -+if test "$cross_compiling" = no && test -n "$ISC" ; then - AC_DEFINE(ISC) LIBS="$LIBS -linet" - fi - -@@ -96,10 +96,11 @@ dnl AC_DEFINE(OSF1) # this disables MIPS again.... - dnl fi - dnl fi - --if test -f /sysV68 ; then -+if test "$cross_compiling" = no && test -f /sysV68 ; then - AC_DEFINE(sysV68) - fi - -+if test "$cross_compiling" = no ; then - AC_CHECKING(for MIPS) - if test -f /lib/libmld.a || test -f /usr/lib/libmld.a || test -f /usr/lib/cmplrs/cc/libmld.a; then - oldlibs="$LIBS" -@@ -123,6 +124,7 @@ AC_DEFINE(USE_WAIT2) LIBS="$LIBS -lbsd" ; CC="$CC -I/usr/include/bsd" - )) - fi - fi -+fi - - - AC_CHECKING(for Ultrix) -@@ -132,7 +134,7 @@ AC_EGREP_CPP(yes, - #endif - ], ULTRIX=1) - --if test -f /usr/lib/libpyr.a ; then -+if test "$cross_compiling" = no && test -f /usr/lib/libpyr.a ; then - oldlibs="$LIBS" - LIBS="$LIBS -lpyr" - AC_CHECKING(Pyramid OSX) -@@ -679,17 +681,21 @@ AC_TRY_LINK(extern short ospeed;,ospeed=5;,,AC_DEFINE(NEED_OSPEED)) - dnl - dnl **** PTY specific things **** - dnl -+if test "$cross_compiling" = no ; then - AC_CHECKING(for /dev/ptc) - if test -r /dev/ptc; then - AC_DEFINE(HAVE_DEV_PTC) - fi -+fi - -+if test "$cross_compiling" = no ; then - AC_CHECKING(for SVR4 ptys) - sysvr4ptys= - if test -c /dev/ptmx ; then - AC_TRY_LINK([],[ptsname(0);grantpt(0);unlockpt(0);],[AC_DEFINE(HAVE_SVR4_PTYS) - sysvr4ptys=1]) - fi -+fi - - AC_CHECK_FUNCS(getpt) - -@@ -699,6 +705,7 @@ AC_CHECK_FUNCS(openpty,, - [AC_CHECK_LIB(util,openpty, [AC_DEFINE(HAVE_OPENPTY)] [LIBS="$LIBS -lutil"])]) - fi - -+if test "$cross_compiling" = no ; then - AC_CHECKING(for ptyranges) - if test -d /dev/ptym ; then - pdir='/dev/ptym' -@@ -722,6 +729,7 @@ p1=`echo $ptys | tr ' ' '\012' | sed -e 's/^.*\(.\)$/\1/g' | sort -u | tr -d '\ - AC_DEFINE_UNQUOTED(PTYRANGE0,"$p0") - AC_DEFINE_UNQUOTED(PTYRANGE1,"$p1") - fi -+fi - - dnl **** pty mode/group handling **** - dnl -@@ -869,14 +877,16 @@ fi - dnl - dnl **** loadav **** - dnl -+if test "$cross_compiling" = no ; then - AC_CHECKING(for libutil(s)) - test -f /usr/lib/libutils.a && LIBS="$LIBS -lutils" - test -f /usr/lib/libutil.a && LIBS="$LIBS -lutil" -+fi - - AC_CHECKING(getloadavg) - AC_TRY_LINK(,[getloadavg((double *)0, 0);], - AC_DEFINE(LOADAV_GETLOADAVG) load=1, --if test -f /usr/lib/libkvm.a ; then -+if test "$cross_compiling" = no && test -f /usr/lib/libkvm.a ; then - olibs="$LIBS" - LIBS="$LIBS -lkvm" - AC_CHECKING(getloadavg with -lkvm) -@@ -1094,13 +1104,18 @@ dnl **** libraries **** - dnl - - AC_CHECKING(for crypt and sec libraries) -+if test "$cross_compiling" = no ; then - test -f /lib/libcrypt_d.a || test -f /usr/lib/libcrypt_d.a && LIBS="$LIBS -lcrypt_d" -+fi - oldlibs="$LIBS" - LIBS="$LIBS -lcrypt" - AC_CHECKING(crypt) - AC_TRY_LINK(,,,LIBS="$oldlibs") -+if test "$cross_compiling" = no ; then - test -f /lib/libsec.a || test -f /usr/lib/libsec.a && LIBS="$LIBS -lsec" - test -f /lib/libshadow.a || test -f /usr/lib/libshadow.a && LIBS="$LIBS -lshadow" -+fi -+ - oldlibs="$LIBS" - LIBS="$LIBS -lsun" - AC_CHECKING(IRIX sun library) --- -2.1.4 - diff --git a/poky/meta/recipes-extended/screen/screen_4.6.2.bb b/poky/meta/recipes-extended/screen/screen_4.7.0.bb index 21b476ddb..67aa5f1fc 100644 --- a/poky/meta/recipes-extended/screen/screen_4.6.2.bb +++ b/poky/meta/recipes-extended/screen/screen_4.7.0.bb @@ -17,18 +17,13 @@ RDEPENDS_${PN} = "base-files" SRC_URI = "${GNU_MIRROR}/screen/screen-${PV}.tar.gz \ ${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'file://screen.pam', '', d)} \ - file://Remove-redundant-compiler-sanity-checks.patch \ - file://Provide-cross-compile-alternatives-for-AC_TRY_RUN.patch \ - file://Skip-host-file-system-checks-when-cross-compiling.patch \ - file://Avoid-mis-identifying-systems-as-SVR4.patch \ file://0002-comm.h-now-depends-on-term.h.patch \ file://0001-fix-for-multijob-build.patch \ - file://0001-configure.ac-fix-configure-failed-while-build-dir-ha.patch \ file://0001-Remove-more-compatibility-stuff.patch \ " -SRC_URI[md5sum] = "a0f529d3333b128dfaa324d978ba73a8" -SRC_URI[sha256sum] = "1b6922520e6a0ce5e28768d620b0f640a6631397f95ccb043b70b91bb503fa3a" +SRC_URI[md5sum] = "b8971ebd68d046f2814d1040cb8e6641" +SRC_URI[sha256sum] = "da775328fa783bd2a787d722014dbd99c6093effc11f337827604c2efc5d20c1" inherit autotools texinfo diff --git a/poky/meta/recipes-extended/stress-ng/stress-ng/0001-bash-completion-remove-the-shebang-at-the-start.patch b/poky/meta/recipes-extended/stress-ng/stress-ng/0001-bash-completion-remove-the-shebang-at-the-start.patch deleted file mode 100644 index 66d99dd88..000000000 --- a/poky/meta/recipes-extended/stress-ng/stress-ng/0001-bash-completion-remove-the-shebang-at-the-start.patch +++ /dev/null @@ -1,23 +0,0 @@ -From 042147675c7c2ea7dd65b2597f2e350376a710aa Mon Sep 17 00:00:00 2001 -From: Alexander Kanavin <alex.kanavin@gmail.com> -Date: Tue, 6 Aug 2019 17:28:56 +0200 -Subject: [PATCH] bash-completion: remove the shebang at the start - -bash completion files do not need to specify that. - -Upstream-Status: Pending -Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> ---- - bash-completion/stress-ng | 2 -- - 1 file changed, 2 deletions(-) - -diff --git a/bash-completion/stress-ng b/bash-completion/stress-ng -index 8b1421c..7f195be 100755 ---- a/bash-completion/stress-ng -+++ b/bash-completion/stress-ng -@@ -1,5 +1,3 @@ --#!/bin/bash --# - # stress-ng tab completion for bash. - # - # Copyright (C) 2019 Canonical diff --git a/poky/meta/recipes-extended/stress-ng/stress-ng_0.10.00.bb b/poky/meta/recipes-extended/stress-ng/stress-ng_0.10.10.bb index 7d194b305..47a98f3aa 100644 --- a/poky/meta/recipes-extended/stress-ng/stress-ng_0.10.00.bb +++ b/poky/meta/recipes-extended/stress-ng/stress-ng_0.10.10.bb @@ -7,10 +7,9 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263" SRC_URI = "https://kernel.ubuntu.com/~cking/tarballs/${BPN}/${BP}.tar.xz \ file://0001-Do-not-preserve-ownership-when-installing-example-jo.patch \ - file://0001-bash-completion-remove-the-shebang-at-the-start.patch \ " -SRC_URI[md5sum] = "46aa41d37690324ceab4febfcc549018" -SRC_URI[sha256sum] = "d09dd2a1aea549e478995bf9be90b38906a4cdf33ea7b245ef9d46aa5213c074" +SRC_URI[md5sum] = "ad4de38d6ff1ccf3640573e967dfb136" +SRC_URI[sha256sum] = "031de5ebc44b49992c11633f10aae96da05a85b326aebdffd88ba8c445d23cf4" DEPENDS = "coreutils-native" diff --git a/poky/meta/recipes-extended/sudo/sudo/CVE-2019-14287-1.patch b/poky/meta/recipes-extended/sudo/sudo/CVE-2019-14287-1.patch new file mode 100644 index 000000000..2a11e3f7e --- /dev/null +++ b/poky/meta/recipes-extended/sudo/sudo/CVE-2019-14287-1.patch @@ -0,0 +1,178 @@ +From f752ae5cee163253730ff7cdf293e34a91aa5520 Mon Sep 17 00:00:00 2001 +From: "Todd C. Miller" <Todd.Miller@sudo.ws> +Date: Thu, 10 Oct 2019 10:04:13 -0600 +Subject: [PATCH] Treat an ID of -1 as invalid since that means "no change". + Fixes CVE-2019-14287. Found by Joe Vennix from Apple Information Security. + +Upstream-Status: Backport [https://github.com/sudo-project/sudo/commit/f752ae5cee163253730ff7cdf293e34a91aa5520] +CVE: CVE-2019-14287 + +Signed-off-by: Changqing Li <changqing.li@windriver.com> + +--- + lib/util/strtoid.c | 100 ++++++++++++++++++++++++++++------------------------- + 1 files changed, 53 insertions(+), 46 deletions(-) + +diff --git a/lib/util/strtoid.c b/lib/util/strtoid.c +index 2dfce75..6b3916b 100644 +--- a/lib/util/strtoid.c ++++ b/lib/util/strtoid.c +@@ -49,6 +49,27 @@ + #include "sudo_util.h" + + /* ++ * Make sure that the ID ends with a valid separator char. ++ */ ++static bool ++valid_separator(const char *p, const char *ep, const char *sep) ++{ ++ bool valid = false; ++ debug_decl(valid_separator, SUDO_DEBUG_UTIL) ++ ++ if (ep != p) { ++ /* check for valid separator (including '\0') */ ++ if (sep == NULL) ++ sep = ""; ++ do { ++ if (*ep == *sep) ++ valid = true; ++ } while (*sep++ != '\0'); ++ } ++ debug_return_bool(valid); ++} ++ ++/* + * Parse a uid/gid in string form. + * If sep is non-NULL, it contains valid separator characters (e.g. comma, space) + * If endp is non-NULL it is set to the next char after the ID. +@@ -62,36 +83,33 @@ sudo_strtoid_v1(const char *p, const char *sep, char **endp, const char **errstr + char *ep; + id_t ret = 0; + long long llval; +- bool valid = false; + debug_decl(sudo_strtoid, SUDO_DEBUG_UTIL) + + /* skip leading space so we can pick up the sign, if any */ + while (isspace((unsigned char)*p)) + p++; +- if (sep == NULL) +- sep = ""; ++ ++ /* While id_t may be 64-bit signed, uid_t and gid_t are 32-bit unsigned. */ + errno = 0; + llval = strtoll(p, &ep, 10); +- if (ep != p) { +- /* check for valid separator (including '\0') */ +- do { +- if (*ep == *sep) +- valid = true; +- } while (*sep++ != '\0'); ++ if ((errno == ERANGE && llval == LLONG_MAX) || llval > (id_t)UINT_MAX) { ++ errno = ERANGE; ++ if (errstr != NULL) ++ *errstr = N_("value too large"); ++ goto done; + } +- if (!valid) { ++ if ((errno == ERANGE && llval == LLONG_MIN) || llval < INT_MIN) { ++ errno = ERANGE; + if (errstr != NULL) +- *errstr = N_("invalid value"); +- errno = EINVAL; ++ *errstr = N_("value too small"); + goto done; + } +- if (errno == ERANGE) { +- if (errstr != NULL) { +- if (llval == LLONG_MAX) +- *errstr = N_("value too large"); +- else +- *errstr = N_("value too small"); +- } ++ ++ /* Disallow id -1, which means "no change". */ ++ if (!valid_separator(p, ep, sep) || llval == -1 || llval == (id_t)UINT_MAX) { ++ if (errstr != NULL) ++ *errstr = N_("invalid value"); ++ errno = EINVAL; + goto done; + } + ret = (id_t)llval; +@@ -108,30 +126,15 @@ sudo_strtoid_v1(const char *p, const char *sep, char **endp, const char **errstr + { + char *ep; + id_t ret = 0; +- bool valid = false; + debug_decl(sudo_strtoid, SUDO_DEBUG_UTIL) + + /* skip leading space so we can pick up the sign, if any */ + while (isspace((unsigned char)*p)) + p++; +- if (sep == NULL) +- sep = ""; ++ + errno = 0; + if (*p == '-') { + long lval = strtol(p, &ep, 10); +- if (ep != p) { +- /* check for valid separator (including '\0') */ +- do { +- if (*ep == *sep) +- valid = true; +- } while (*sep++ != '\0'); +- } +- if (!valid) { +- if (errstr != NULL) +- *errstr = N_("invalid value"); +- errno = EINVAL; +- goto done; +- } + if ((errno == ERANGE && lval == LONG_MAX) || lval > INT_MAX) { + errno = ERANGE; + if (errstr != NULL) +@@ -144,28 +147,31 @@ sudo_strtoid_v1(const char *p, const char *sep, char **endp, const char **errstr + *errstr = N_("value too small"); + goto done; + } +- ret = (id_t)lval; +- } else { +- unsigned long ulval = strtoul(p, &ep, 10); +- if (ep != p) { +- /* check for valid separator (including '\0') */ +- do { +- if (*ep == *sep) +- valid = true; +- } while (*sep++ != '\0'); +- } +- if (!valid) { ++ ++ /* Disallow id -1, which means "no change". */ ++ if (!valid_separator(p, ep, sep) || lval == -1) { + if (errstr != NULL) + *errstr = N_("invalid value"); + errno = EINVAL; + goto done; + } ++ ret = (id_t)lval; ++ } else { ++ unsigned long ulval = strtoul(p, &ep, 10); + if ((errno == ERANGE && ulval == ULONG_MAX) || ulval > UINT_MAX) { + errno = ERANGE; + if (errstr != NULL) + *errstr = N_("value too large"); + goto done; + } ++ ++ /* Disallow id -1, which means "no change". */ ++ if (!valid_separator(p, ep, sep) || ulval == UINT_MAX) { ++ if (errstr != NULL) ++ *errstr = N_("invalid value"); ++ errno = EINVAL; ++ goto done; ++ } + ret = (id_t)ulval; + } + if (errstr != NULL) +-- +2.7.4 + diff --git a/poky/meta/recipes-extended/sudo/sudo/CVE-2019-14287-2.patch b/poky/meta/recipes-extended/sudo/sudo/CVE-2019-14287-2.patch new file mode 100644 index 000000000..453a8b09a --- /dev/null +++ b/poky/meta/recipes-extended/sudo/sudo/CVE-2019-14287-2.patch @@ -0,0 +1,112 @@ +From 396bc57feff3e360007634f62448b64e0626390c Mon Sep 17 00:00:00 2001 +From: "Todd C. Miller" <Todd.Miller@sudo.ws> +Date: Thu, 10 Oct 2019 10:04:13 -0600 +Subject: [PATCH] Add sudo_strtoid() tests for -1 and range errors. Also adjust + testsudoers/test5 which relied upon gid -1 parsing. + +Upstream-Status: Backport [https://github.com/sudo-project/sudo/commit/396bc57] +CVE: CVE-2019-14287 + +Signed-off-by: Changqing Li <changqing.li@windriver.com> + +--- + lib/util/regress/atofoo/atofoo_test.c | 36 ++++++++++++++++------ + plugins/sudoers/regress/testsudoers/test5.out.ok | 2 +- + plugins/sudoers/regress/testsudoers/test5.sh | 2 +- + 3 files changed, 29 insertions(+), 11 deletions(-) + +diff --git a/lib/util/regress/atofoo/atofoo_test.c b/lib/util/regress/atofoo/atofoo_test.c +index 031a7ed..fb41c1a 100644 +--- a/lib/util/regress/atofoo/atofoo_test.c ++++ b/lib/util/regress/atofoo/atofoo_test.c +@@ -26,6 +26,7 @@ + #else + # include "compat/stdbool.h" + #endif ++#include <errno.h> + + #include "sudo_compat.h" + #include "sudo_util.h" +@@ -80,15 +81,20 @@ static struct strtoid_data { + id_t id; + const char *sep; + const char *ep; ++ int errnum; + } strtoid_data[] = { +- { "0,1", 0, ",", "," }, +- { "10", 10, NULL, NULL }, +- { "-2", -2, NULL, NULL }, ++ { "0,1", 0, ",", ",", 0 }, ++ { "10", 10, NULL, NULL, 0 }, ++ { "-1", 0, NULL, NULL, EINVAL }, ++ { "4294967295", 0, NULL, NULL, EINVAL }, ++ { "4294967296", 0, NULL, NULL, ERANGE }, ++ { "-2147483649", 0, NULL, NULL, ERANGE }, ++ { "-2", -2, NULL, NULL, 0 }, + #if SIZEOF_ID_T != SIZEOF_LONG_LONG +- { "-2", (id_t)4294967294U, NULL, NULL }, ++ { "-2", (id_t)4294967294U, NULL, NULL, 0 }, + #endif +- { "4294967294", (id_t)4294967294U, NULL, NULL }, +- { NULL, 0, NULL, NULL } ++ { "4294967294", (id_t)4294967294U, NULL, NULL, 0 }, ++ { NULL, 0, NULL, NULL, 0 } + }; + + static int +@@ -104,11 +110,23 @@ test_strtoid(int *ntests) + (*ntests)++; + errstr = "some error"; + value = sudo_strtoid(d->idstr, d->sep, &ep, &errstr); +- if (errstr != NULL) { +- if (d->id != (id_t)-1) { +- sudo_warnx_nodebug("FAIL: %s: %s", d->idstr, errstr); ++ if (d->errnum != 0) { ++ if (errstr == NULL) { ++ sudo_warnx_nodebug("FAIL: %s: missing errstr for errno %d", ++ d->idstr, d->errnum); ++ errors++; ++ } else if (value != 0) { ++ sudo_warnx_nodebug("FAIL: %s should return 0 on error", ++ d->idstr); ++ errors++; ++ } else if (errno != d->errnum) { ++ sudo_warnx_nodebug("FAIL: %s: errno mismatch, %d != %d", ++ d->idstr, errno, d->errnum); + errors++; + } ++ } else if (errstr != NULL) { ++ sudo_warnx_nodebug("FAIL: %s: %s", d->idstr, errstr); ++ errors++; + } else if (value != d->id) { + sudo_warnx_nodebug("FAIL: %s != %u", d->idstr, (unsigned int)d->id); + errors++; +diff --git a/plugins/sudoers/regress/testsudoers/test5.out.ok b/plugins/sudoers/regress/testsudoers/test5.out.ok +index 5e319c9..cecf700 100644 +--- a/plugins/sudoers/regress/testsudoers/test5.out.ok ++++ b/plugins/sudoers/regress/testsudoers/test5.out.ok +@@ -4,7 +4,7 @@ Parse error in sudoers near line 1. + Entries for user root: + + Command unmatched +-testsudoers: test5.inc should be owned by gid 4294967295 ++testsudoers: test5.inc should be owned by gid 4294967294 + Parse error in sudoers near line 1. + + Entries for user root: +diff --git a/plugins/sudoers/regress/testsudoers/test5.sh b/plugins/sudoers/regress/testsudoers/test5.sh +index 9e690a6..94d585c 100755 +--- a/plugins/sudoers/regress/testsudoers/test5.sh ++++ b/plugins/sudoers/regress/testsudoers/test5.sh +@@ -24,7 +24,7 @@ EOF + + # Test group writable + chmod 664 $TESTFILE +-./testsudoers -U $MYUID -G -1 root id <<EOF ++./testsudoers -U $MYUID -G -2 root id <<EOF + #include $TESTFILE + EOF + +-- +2.7.4 + diff --git a/poky/meta/recipes-extended/sudo/sudo_1.8.27.bb b/poky/meta/recipes-extended/sudo/sudo_1.8.27.bb index 9d2d6bd42..0a11a1b28 100644 --- a/poky/meta/recipes-extended/sudo/sudo_1.8.27.bb +++ b/poky/meta/recipes-extended/sudo/sudo_1.8.27.bb @@ -1,8 +1,10 @@ require sudo.inc -SRC_URI = "http://www.sudo.ws/sudo/dist/sudo-${PV}.tar.gz \ +SRC_URI = "https://www.sudo.ws/dist/sudo-${PV}.tar.gz \ ${@bb.utils.contains('DISTRO_FEATURES', 'pam', '${PAM_SRC_URI}', '', d)} \ file://0001-Include-sys-types.h-for-id_t-definition.patch \ + file://CVE-2019-14287-1.patch \ + file://CVE-2019-14287-2.patch \ " PAM_SRC_URI = "file://sudo.pam" diff --git a/poky/meta/recipes-extended/sysstat/sysstat.inc b/poky/meta/recipes-extended/sysstat/sysstat.inc index 5a7d2114c..77cc6f2cf 100644 --- a/poky/meta/recipes-extended/sysstat/sysstat.inc +++ b/poky/meta/recipes-extended/sysstat/sysstat.inc @@ -10,14 +10,13 @@ SRC_URI = "http://pagesperso-orange.fr/sebastien.godard/${BP}.tar.xz \ " UPSTREAM_CHECK_URI = "http://sebastien.godard.pagesperso-orange.fr/download.html" -UPSTREAM_VERSION_UNKNOWN = "1" DEPENDS += "base-passwd" # autotools-brokensep as this package doesn't use automake inherit autotools-brokensep gettext systemd upstream-version-is-even -PACKAGECONFIG ??= "" +PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'systemd', d)}" PACKAGECONFIG[lm-sensors] = "--enable-sensors,--disable-sensors,lmsensors,lmsensors-libsensors" PACKAGECONFIG[cron] = "--enable-install-cron --enable-copy-only,--disable-install-cron --disable-copy-only" PACKAGECONFIG[systemd] = "--with-systemdsystemunitdir=${systemd_system_unitdir}" @@ -46,10 +45,12 @@ do_install() { echo "d ${localstatedir}/log/sa - - - -" \ > ${D}${sysconfdir}/tmpfiles.d/sysstat.conf - if ${@bb.utils.contains('PACKAGECONFIG', 'cron', 'false', 'true', d)}; then + # Unless both cron and systemd are enabled, install our own + # systemd unit file. Otherwise the package will install one. + if ${@bb.utils.contains('PACKAGECONFIG', 'cron systemd', 'false', 'true', d)}; then install -d ${D}${systemd_unitdir}/system install -m 0644 ${WORKDIR}/sysstat.service ${D}${systemd_unitdir}/system - sed -i -e 's#@LIBDIR@#${libdir}#g' ${D}${systemd_unitdir}/system/sysstat.service + sed -i -e 's#@LIBEXECDIR@#${libexecdir}#g' ${D}${systemd_unitdir}/system/sysstat.service fi fi } @@ -62,6 +63,6 @@ pkg_postinst_${PN} () { fi } -FILES_${PN} += "${libdir}/sa ${systemd_system_unitdir}" +FILES_${PN} += "${systemd_system_unitdir}" TARGET_CC_ARCH += "${LDFLAGS}" diff --git a/poky/meta/recipes-extended/sysstat/sysstat/0001-Fix-232-Memory-corruption-bug-due-to-Integer-Overflo.patch b/poky/meta/recipes-extended/sysstat/sysstat/0001-Fix-232-Memory-corruption-bug-due-to-Integer-Overflo.patch new file mode 100644 index 000000000..46b111806 --- /dev/null +++ b/poky/meta/recipes-extended/sysstat/sysstat/0001-Fix-232-Memory-corruption-bug-due-to-Integer-Overflo.patch @@ -0,0 +1,46 @@ +From 603ae4ed8cd65abf0776ef7f68354a5c24a3411c Mon Sep 17 00:00:00 2001 +From: Sebastien GODARD <sysstat@users.noreply.github.com> +Date: Tue, 15 Oct 2019 14:39:33 +0800 +Subject: [PATCH] Fix #232: Memory corruption bug due to Integer Overflow in + remap_struct() + +Try to avoid integer overflow when reading a corrupted binary datafile +with sadf. + +Upstream-Status: Backport [https://github.com/sysstat/sysstat/commit/83fad9c895d1ac13f76af5883b7451b3302beef5] +CVE: CVE-2019-16167 + +Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com> +Signed-off-by: Wenlin Kang <wenlin.kang@windriver.com> +--- + sa_common.c | 7 +++++-- + 1 file changed, 5 insertions(+), 2 deletions(-) + +diff --git a/sa_common.c b/sa_common.c +index 395c11c..cfa9007 100644 +--- a/sa_common.c ++++ b/sa_common.c +@@ -1336,7 +1336,8 @@ int remap_struct(unsigned int gtypes_nr[], unsigned int ftypes_nr[], + /* Remap [unsigned] int fields */ + d = gtypes_nr[1] - ftypes_nr[1]; + if (d) { +- if (ftypes_nr[1] * UL_ALIGNMENT_WIDTH < ftypes_nr[1]) ++ if (gtypes_nr[0] * ULL_ALIGNMENT_WIDTH + ++ ftypes_nr[1] * UL_ALIGNMENT_WIDTH < ftypes_nr[1]) + /* Overflow */ + return -1; + +@@ -1365,7 +1366,9 @@ int remap_struct(unsigned int gtypes_nr[], unsigned int ftypes_nr[], + /* Remap possible fields (like strings of chars) following int fields */ + d = gtypes_nr[2] - ftypes_nr[2]; + if (d) { +- if (ftypes_nr[2] * U_ALIGNMENT_WIDTH < ftypes_nr[2]) ++ if (gtypes_nr[0] * ULL_ALIGNMENT_WIDTH + ++ gtypes_nr[1] * UL_ALIGNMENT_WIDTH + ++ ftypes_nr[2] * U_ALIGNMENT_WIDTH < ftypes_nr[2]) + /* Overflow */ + return -1; + +-- +1.9.1 + diff --git a/poky/meta/recipes-extended/sysstat/sysstat/sysstat.service b/poky/meta/recipes-extended/sysstat/sysstat/sysstat.service index aff07109f..ca46befb9 100644 --- a/poky/meta/recipes-extended/sysstat/sysstat/sysstat.service +++ b/poky/meta/recipes-extended/sysstat/sysstat/sysstat.service @@ -5,7 +5,7 @@ Description=Resets System Activity Logs Type=oneshot RemainAfterExit=yes User=root -ExecStart=@LIBDIR@/sa/sa1 --boot +ExecStart=@LIBEXECDIR@/sa/sa1 --boot [Install] WantedBy=multi-user.target diff --git a/poky/meta/recipes-extended/sysstat/sysstat_12.1.6.bb b/poky/meta/recipes-extended/sysstat/sysstat_12.1.6.bb index 8cf8c36d9..362888d50 100644 --- a/poky/meta/recipes-extended/sysstat/sysstat_12.1.6.bb +++ b/poky/meta/recipes-extended/sysstat/sysstat_12.1.6.bb @@ -2,7 +2,9 @@ require sysstat.inc LIC_FILES_CHKSUM = "file://COPYING;md5=a23a74b3f4caf9616230789d94217acb" -SRC_URI += "file://0001-Include-needed-headers-explicitly.patch" +SRC_URI += "file://0001-Include-needed-headers-explicitly.patch \ + file://0001-Fix-232-Memory-corruption-bug-due-to-Integer-Overflo.patch \ +" SRC_URI[md5sum] = "d8e3bbb9c873dd370f6d33664e326570" SRC_URI[sha256sum] = "f752f3c406153a6fc446496f1102872505ace3f0931d975c1d664c81ec09f129" diff --git a/poky/meta/recipes-extended/xdg-utils/xdg-utils_1.1.3.bb b/poky/meta/recipes-extended/xdg-utils/xdg-utils_1.1.3.bb index 8e4663819..7788b5f3c 100644 --- a/poky/meta/recipes-extended/xdg-utils/xdg-utils_1.1.3.bb +++ b/poky/meta/recipes-extended/xdg-utils/xdg-utils_1.1.3.bb @@ -28,7 +28,7 @@ SRC_URI[sha256sum] = "d798b08af8a8e2063ddde6c9fa3398ca81484f27dec642c5627ffcaa0d UPSTREAM_CHECK_REGEX = "xdg-utils-(?P<pver>((\d+[\.\-_]*)+)((rc|alpha|beta)\d+)?)\.(tar\.gz|tgz)" # Needs brokensep as this doesn't use automake -inherit autotools-brokensep distro_features_check +inherit autotools-brokensep features_check # The xprop requires x11 in DISTRO_FEATURES REQUIRED_DISTRO_FEATURES = "x11" diff --git a/poky/meta/recipes-gnome/epiphany/epiphany_3.34.1.bb b/poky/meta/recipes-gnome/epiphany/epiphany_3.34.1.bb index f5f086391..cebd55dc8 100644 --- a/poky/meta/recipes-gnome/epiphany/epiphany_3.34.1.bb +++ b/poky/meta/recipes-gnome/epiphany/epiphany_3.34.1.bb @@ -1,4 +1,5 @@ SUMMARY = "WebKit based web browser for GNOME" +BUGTRACKER = "https://gitlab.gnome.org/GNOME/epiphany" LICENSE = "GPLv3+" LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504" @@ -7,7 +8,7 @@ DEPENDS = "libsoup-2.4 webkitgtk gtk+3 iso-codes avahi libnotify gcr \ glib-2.0 glib-2.0-native json-glib libdazzle" GNOMEBASEBUILDCLASS = "meson" -inherit gnomebase gsettings distro_features_check upstream-version-is-even gettext +inherit gnomebase gsettings features_check upstream-version-is-even gettext REQUIRED_DISTRO_FEATURES = "x11 opengl" SRC_URI = "${GNOME_MIRROR}/${GNOMEBN}/${@gnome_verdir("${PV}")}/${GNOMEBN}-${PV}.tar.${GNOME_COMPRESS_TYPE};name=archive \ diff --git a/poky/meta/recipes-gnome/gcr/gcr_3.28.1.bb b/poky/meta/recipes-gnome/gcr/gcr_3.34.0.bb index 2299199c3..e3e899963 100644 --- a/poky/meta/recipes-gnome/gcr/gcr_3.28.1.bb +++ b/poky/meta/recipes-gnome/gcr/gcr_3.34.0.bb @@ -1,19 +1,22 @@ SUMMARY = "A library for bits of crypto UI and parsing etc" -HOMEPAGE = "http://www.gnome.org/" -BUGTRACKER = "https://bugzilla.gnome.org/" +DESCRIPTION = "GCR is a library for displaying certificates, and crypto UI, \ +accessing key stores. It also provides the viewer for crypto files on the \ +GNOME desktop." +HOMEPAGE = "https://gitlab.gnome.org/GNOME/gcr" +BUGTRACKER = "https://gitlab.gnome.org/GNOME/gcr/issues" LICENSE = "GPLv2" LIC_FILES_CHKSUM = "file://COPYING;md5=55ca817ccb7d5b5b66355690e9abc605" -DEPENDS = "intltool-native gtk+3 p11-kit glib-2.0 libgcrypt \ +DEPENDS = "gtk+3 p11-kit glib-2.0 libgcrypt \ ${@bb.utils.contains('GI_DATA_ENABLED', 'True', 'libxslt-native', '', d)}" -inherit gnomebase gtk-icon-cache gtk-doc distro_features_check upstream-version-is-even vala gobject-introspection +inherit gnomebase gtk-icon-cache gtk-doc features_check upstream-version-is-even vala gobject-introspection gettext # depends on gtk+3, but also x11 through gtk+-x11 REQUIRED_DISTRO_FEATURES = "x11" -SRC_URI[archive.md5sum] = "afd88cacfd54c1ac5b3e0eb35e3aa674" -SRC_URI[archive.sha256sum] = "95204aa2111c301778ebfbe60975ce3ed698c958430ffcc2a785ac5e593d168b" +SRC_URI[archive.md5sum] = "4af28919fb1dd36d93603e8230283b6f" +SRC_URI[archive.sha256sum] = "29df50974a90987af694c0fb8926a6b366e68cacd8abd813817cfe1eb5d54524" FILES_${PN} += " \ ${datadir}/dbus-1 \ diff --git a/poky/meta/recipes-gnome/gdk-pixbuf/gdk-pixbuf_2.38.2.bb b/poky/meta/recipes-gnome/gdk-pixbuf/gdk-pixbuf_2.38.2.bb index 0f3a63d89..c99510609 100644 --- a/poky/meta/recipes-gnome/gdk-pixbuf/gdk-pixbuf_2.38.2.bb +++ b/poky/meta/recipes-gnome/gdk-pixbuf/gdk-pixbuf_2.38.2.bb @@ -1,6 +1,9 @@ SUMMARY = "Image loading library for GTK+" -HOMEPAGE = "http://www.gtk.org/" -BUGTRACKER = "https://bugzilla.gnome.org/" +DESCRIPTION = "The GDK Pixbuf library provides: Image loading and saving \ +facilities, fast scaling and compositing of pixbufs and Simple animation \ +loading (ie. animated GIFs)" +HOMEPAGE = "https://wiki.gnome.org/Projects/GdkPixbuf" +BUGTRACKER = "https://gitlab.gnome.org/GNOME/gdk-pixbuf/issues" LICENSE = "LGPLv2.1" LIC_FILES_CHKSUM = "file://COPYING;md5=4fbd65380cdd255951079008b364516c \ diff --git a/poky/meta/recipes-gnome/gnome/adwaita-icon-theme/0001-Don-t-use-AC_CANONICAL_HOST.patch b/poky/meta/recipes-gnome/gnome/adwaita-icon-theme/0001-Don-t-use-AC_CANONICAL_HOST.patch index 4a9836331..a062aa63d 100644 --- a/poky/meta/recipes-gnome/gnome/adwaita-icon-theme/0001-Don-t-use-AC_CANONICAL_HOST.patch +++ b/poky/meta/recipes-gnome/gnome/adwaita-icon-theme/0001-Don-t-use-AC_CANONICAL_HOST.patch @@ -19,7 +19,7 @@ index 4a84501..52dbb8e 100644 +++ b/configure.ac @@ -3,7 +3,6 @@ AC_PREREQ(2.53) - AC_INIT([adwaita-icon-theme], [3.32.0], + AC_INIT([adwaita-icon-theme], [3.34.0], [http://bugzilla.gnome.org/enter_bug.cgi?product=adwaita-icon-theme]) -AC_CANONICAL_HOST AC_CONFIG_MACRO_DIR([m4]) diff --git a/poky/meta/recipes-gnome/gnome/adwaita-icon-theme_3.32.0.bb b/poky/meta/recipes-gnome/gnome/adwaita-icon-theme_3.34.0.bb index 02676f440..3f6b60fbd 100644 --- a/poky/meta/recipes-gnome/gnome/adwaita-icon-theme_3.32.0.bb +++ b/poky/meta/recipes-gnome/gnome/adwaita-icon-theme_3.34.0.bb @@ -1,6 +1,6 @@ SUMMARY = "GTK+ icon theme" -HOMEPAGE = "http://ftp.gnome.org/pub/GNOME/sources/adwaita-icon-theme/" -BUGTRACKER = "https://bugzilla.gnome.org/" +HOMEPAGE = "https://gitlab.gnome.org/GNOME/adwaita-icon-theme" +BUGTRACKER = "https://gitlab.gnome.org/GNOME/adwaita-icon-theme/issues" SECTION = "x11/gnome" LICENSE = "LGPL-3.0 | CC-BY-SA-3.0" @@ -14,8 +14,8 @@ SRC_URI = "${GNOME_MIRROR}/${BPN}/${MAJ_VER}/${BPN}-${PV}.tar.xz \ file://0001-Run-installation-commands-as-shell-jobs.patch \ " -SRC_URI[md5sum] = "4b16278cfed860a86c8221de62eec151" -SRC_URI[sha256sum] = "698db6e407bb987baec736c6a30216dfc0317e3ca2403c7adf3a5aa46c193286" +SRC_URI[md5sum] = "41b860c17efe065849b0cbf46e88811a" +SRC_URI[sha256sum] = "40b7e91f8263552b64d0f9beff33150291b086618ce498c71bf10035e48c7c7f" DEPENDS += "librsvg-native" diff --git a/poky/meta/recipes-gnome/gnome/gconf_3.2.6.bb b/poky/meta/recipes-gnome/gnome/gconf_3.2.6.bb index e6742f37d..b8466d483 100644 --- a/poky/meta/recipes-gnome/gnome/gconf_3.2.6.bb +++ b/poky/meta/recipes-gnome/gnome/gconf_3.2.6.bb @@ -1,4 +1,7 @@ SUMMARY = "GNOME configuration system" +DESCRIPTION = "GConf is a system for storing application preferences. \ +It is intended for user preferences; not configuration of something like \ +Apache, or arbitrary data storage." SECTION = "x11/gnome" HOMEPAGE = "https://projects.gnome.org/gconf/" LICENSE = "LGPLv2+" diff --git a/poky/meta/recipes-gnome/gobject-introspection/gobject-introspection_1.62.0.bb b/poky/meta/recipes-gnome/gobject-introspection/gobject-introspection_1.62.0.bb index c925115fb..a9739cc55 100644 --- a/poky/meta/recipes-gnome/gobject-introspection/gobject-introspection_1.62.0.bb +++ b/poky/meta/recipes-gnome/gobject-introspection/gobject-introspection_1.62.0.bb @@ -1,6 +1,10 @@ SUMMARY = "Middleware layer between GObject-using C libraries and language bindings" +DESCRIPTION = "GObject Introspection is a project for providing machine \ +readable introspection data of the API of C libraries. This introspection \ +data can be used in several different use cases, for example automatic code \ +generation for bindings, API verification and documentation generation." HOMEPAGE = "https://wiki.gnome.org/action/show/Projects/GObjectIntrospection" -BUGTRACKER = "https://bugzilla.gnome.org/" +BUGTRACKER = "https://gitlab.gnome.org/GNOME/gobject-introspection/issues" SECTION = "libs" LICENSE = "LGPLv2+ & GPLv2+" LIC_FILES_CHKSUM = "file://COPYING;md5=c434e8128a68bedd59b80b2ac1eb1c4a \ @@ -92,7 +96,7 @@ EOF # Write out a wrapper for g-ir-scanner itself, which will be used when building introspection files # for glib-based packages. This wrapper calls the native version of the scanner, and tells it to use - # a qemu wrapper for running transient target binaries produced by the scanner, and an include directory + # a qemu wrapper for running transient target binaries produced by the scanner, and an include directory # from the target sysroot. cat > ${B}/g-ir-scanner-wrapper << EOF #!/bin/sh @@ -132,7 +136,7 @@ do_compile_prepend() { export GIR_EXTRA_LIBS_PATH=$B/.libs } -# Our wrappers need to be available system-wide, because they will be used +# Our wrappers need to be available system-wide, because they will be used # to build introspection files for all other gobject-based packages do_install_append_class-target() { install -d ${D}${bindir}/ diff --git a/poky/meta/recipes-gnome/gsettings-desktop-schemas/gsettings-desktop-schemas_3.32.0.bb b/poky/meta/recipes-gnome/gsettings-desktop-schemas/gsettings-desktop-schemas_3.32.0.bb deleted file mode 100644 index 859f70466..000000000 --- a/poky/meta/recipes-gnome/gsettings-desktop-schemas/gsettings-desktop-schemas_3.32.0.bb +++ /dev/null @@ -1,16 +0,0 @@ -SUMMARY = "GNOME desktop-wide GSettings schemas" -HOMEPAGE = "http://live.gnome.org/gsettings-desktop-schemas" -BUGTRACKER = "https://bugzilla.gnome.org/" - -LICENSE = "LGPLv2.1" -LIC_FILES_CHKSUM = "file://COPYING;md5=4fbd65380cdd255951079008b364516c" - -DEPENDS = "glib-2.0" - -GNOMEBASEBUILDCLASS = "meson" - -inherit gnomebase gsettings gobject-introspection gettext upstream-version-is-even - -SRC_URI[archive.md5sum] = "0c2d468a482c12594757442c983aa8ea" -SRC_URI[archive.sha256sum] = "2d59b4b3a548859dfae46314ee4666787a00d5c82db382e97df7aa9d0e310a35" -SRC_URI += "file://0001-Do-not-skip-gir-installation-for-cross-compiling.patch" diff --git a/poky/meta/recipes-gnome/gsettings-desktop-schemas/gsettings-desktop-schemas_3.34.0.bb b/poky/meta/recipes-gnome/gsettings-desktop-schemas/gsettings-desktop-schemas_3.34.0.bb new file mode 100644 index 000000000..eea578bb6 --- /dev/null +++ b/poky/meta/recipes-gnome/gsettings-desktop-schemas/gsettings-desktop-schemas_3.34.0.bb @@ -0,0 +1,18 @@ +SUMMARY = "GNOME desktop-wide GSettings schemas" +DESCRIPTION = "GSettings desktop-wide schemas contains a collection of \ +GSettings schemas for settings shared by various components of a desktop." +HOMEPAGE = "https://gitlab.gnome.org/GNOME/gsettings-desktop-schemas" +BUGTRACKER = "https://gitlab.gnome.org/GNOME/gsettings-desktop-schemas/issues" + +LICENSE = "LGPLv2.1" +LIC_FILES_CHKSUM = "file://COPYING;md5=4fbd65380cdd255951079008b364516c" + +DEPENDS = "glib-2.0" + +GNOMEBASEBUILDCLASS = "meson" + +inherit gnomebase gsettings gobject-introspection gettext upstream-version-is-even + +SRC_URI[archive.md5sum] = "9759ef53fb2e53fc8d19190e58f2c332" +SRC_URI[archive.sha256sum] = "288b04260f7040b0e004a8d59c773cfb4e32df4f1b4a0f9d705c51afccc95ead" +SRC_URI += "file://0001-Do-not-skip-gir-installation-for-cross-compiling.patch" diff --git a/poky/meta/recipes-gnome/gtk+/gtk+3.inc b/poky/meta/recipes-gnome/gtk+/gtk+3.inc index dc6768c4e..e1f1e0db3 100644 --- a/poky/meta/recipes-gnome/gtk+/gtk+3.inc +++ b/poky/meta/recipes-gnome/gtk+/gtk+3.inc @@ -10,7 +10,7 @@ DEPENDS = "glib-2.0 cairo pango atk jpeg libpng gdk-pixbuf \ LICENSE = "LGPLv2 & LGPLv2+ & LGPLv2.1+" -inherit autotools gettext pkgconfig gtk-doc update-alternatives gtk-immodules-cache gsettings distro_features_check gobject-introspection +inherit autotools gettext pkgconfig gtk-doc update-alternatives gtk-immodules-cache gsettings features_check gobject-introspection BBCLASSEXTEND = "native nativesdk" diff --git a/poky/meta/recipes-gnome/hicolor-icon-theme/hicolor-icon-theme_0.17.bb b/poky/meta/recipes-gnome/hicolor-icon-theme/hicolor-icon-theme_0.17.bb index fb8033448..aad7eff25 100644 --- a/poky/meta/recipes-gnome/hicolor-icon-theme/hicolor-icon-theme_0.17.bb +++ b/poky/meta/recipes-gnome/hicolor-icon-theme/hicolor-icon-theme_0.17.bb @@ -1,5 +1,7 @@ SUMMARY = "Default icon theme that all icon themes automatically inherit from" -HOMEPAGE = "http://icon-theme.freedesktop.org/wiki/HicolorTheme" +DESCRIPTION = "The hicolor-icon-theme package contains a default fallback \ +theme for implementations of the icon theme specification." +HOMEPAGE = "https://www.freedesktop.org/wiki/Software/icon-theme" BUGTRACKER = "https://bugs.freedesktop.org/" LICENSE = "GPLv2" diff --git a/poky/meta/recipes-gnome/json-glib/json-glib_1.4.4.bb b/poky/meta/recipes-gnome/json-glib/json-glib_1.4.4.bb index 1c663f93e..5143d73ed 100644 --- a/poky/meta/recipes-gnome/json-glib/json-glib_1.4.4.bb +++ b/poky/meta/recipes-gnome/json-glib/json-glib_1.4.4.bb @@ -3,7 +3,8 @@ DESCRIPTION = "Use JSON-GLib it is possible to parse and generate valid JSON\ data structures, using a DOM-like API. JSON-GLib also offers GObject \ integration, providing the ability to serialize and deserialize GObject \ instances to and from JSON data types." -HOMEPAGE = "http://live.gnome.org/JsonGlib" +HOMEPAGE = "https://wiki.gnome.org/Projects/JsonGlib" +BUGTRACKER = "https://gitlab.gnome.org/GNOME/json-glib/issues" LICENSE = "LGPLv2.1" LIC_FILES_CHKSUM = "file://COPYING;md5=7fbc338309ac38fefcd64b04bb903e34" diff --git a/poky/meta/recipes-gnome/libdazzle/libdazzle_3.34.1.bb b/poky/meta/recipes-gnome/libdazzle/libdazzle_3.34.1.bb index cf61ed501..1c8b2c86e 100644 --- a/poky/meta/recipes-gnome/libdazzle/libdazzle_3.34.1.bb +++ b/poky/meta/recipes-gnome/libdazzle/libdazzle_3.34.1.bb @@ -1,9 +1,14 @@ SUMMARY = "The libdazzle library is a companion library to GObject and Gtk+." +DESCRIPTION = "A wide range of components from utilities for GIO, widgets for \ +GTK+, an animation framework, state machines, paneling and high-performance \ +counters are included." LICENSE = "GPLv3+" +HOMEPAGE = "https://gitlab.gnome.org/GNOME/libdazzle" +BUGTRACKER = "https://gitlab.gnome.org/GNOME/libdazzle/issues" LIC_FILES_CHKSUM = "file://COPYING;md5=8f0e2cd40e05189ec81232da84bd6e1a" GNOMEBASEBUILDCLASS = "meson" -inherit gnomebase upstream-version-is-even vala distro_features_check gobject-introspection +inherit gnomebase upstream-version-is-even vala features_check gobject-introspection DEPENDS = "glib-2.0-native glib-2.0 gtk+3" diff --git a/poky/meta/recipes-gnome/libgudev/libgudev_233.bb b/poky/meta/recipes-gnome/libgudev/libgudev_233.bb index a9f6bdd65..8bc379ff6 100644 --- a/poky/meta/recipes-gnome/libgudev/libgudev_233.bb +++ b/poky/meta/recipes-gnome/libgudev/libgudev_233.bb @@ -1,5 +1,10 @@ SUMMARY = "GObject wrapper for libudev" +DESCRIPTION = "This library makes it much simpler to use libudev from programs \ +already using GObject. It also makes it possible to easily use libudev from \ +other programming languages, such as Javascript, because of GObject \ +introspection support." HOMEPAGE = "https://wiki.gnome.org/Projects/libgudev" +BUGTRACKER = "https://gitlab.gnome.org/GNOME/libgudev/issues" SRC_URI[archive.sha256sum] = "587c4970eb23f4e2deee2cb1fb7838c94a78c578f41ce12cac0a3f4a80dabb03" SRC_URI[archive.md5sum] = "d59a317a40aaa02a2226056c0bb4d3e1" diff --git a/poky/meta/recipes-gnome/libnotify/libnotify_0.7.8.bb b/poky/meta/recipes-gnome/libnotify/libnotify_0.7.8.bb index 1c9084d91..0306b04f4 100644 --- a/poky/meta/recipes-gnome/libnotify/libnotify_0.7.8.bb +++ b/poky/meta/recipes-gnome/libnotify/libnotify_0.7.8.bb @@ -1,12 +1,13 @@ SUMMARY = "Library for sending desktop notifications to a notification daemon" -HOMEPAGE = "http://www.gnome.org" +HOMEPAGE = "https://gitlab.gnome.org/GNOME/libnotify" +BUGTRACKER = "https://gitlab.gnome.org/GNOME/libnotify/issues" SECTION = "libs" LICENSE = "LGPLv2.1" LIC_FILES_CHKSUM = "file://COPYING;md5=7fbc338309ac38fefcd64b04bb903e34" DEPENDS = "dbus gtk+3 glib-2.0" -inherit gnomebase gtk-doc distro_features_check gobject-introspection +inherit gnomebase gtk-doc features_check gobject-introspection # depends on gtk+3 ANY_OF_DISTRO_FEATURES = "${GTK3DISTROFEATURES}" diff --git a/poky/meta/recipes-gnome/librsvg/librsvg_2.40.20.bb b/poky/meta/recipes-gnome/librsvg/librsvg_2.40.20.bb index 6a798e6a9..7f98127fd 100644 --- a/poky/meta/recipes-gnome/librsvg/librsvg_2.40.20.bb +++ b/poky/meta/recipes-gnome/librsvg/librsvg_2.40.20.bb @@ -1,6 +1,10 @@ SUMMARY = "Library for rendering SVG files" -HOMEPAGE = "http://ftp.gnome.org/pub/GNOME/sources/librsvg/" -BUGTRACKER = "https://bugzilla.gnome.org/" +DESCRIPTION = "A small library to render Scalable Vector Graphics (SVG), \ +associated with the GNOME Project. It renders SVG files to Cairo surfaces. \ +Cairo is the 2D, antialiased drawing library that GNOME uses to draw things to \ +the screen or to generate output for printing." +HOMEPAGE = "https://gitlab.gnome.org/GNOME/librsvg" +BUGTRACKER = "https://gitlab.gnome.org/GNOME/librsvg/issues" RECIPE_NO_UPDATE_REASON = "Versions from 2.41.0 requires Rust compiler to build it" diff --git a/poky/meta/recipes-gnome/libsecret/libsecret_0.19.1.bb b/poky/meta/recipes-gnome/libsecret/libsecret_0.19.1.bb index 0d7607523..3da2a4aca 100644 --- a/poky/meta/recipes-gnome/libsecret/libsecret_0.19.1.bb +++ b/poky/meta/recipes-gnome/libsecret/libsecret_0.19.1.bb @@ -1,5 +1,10 @@ SUMMARY = "libsecret is a library for storing and retrieving passwords and other secrets" +DESCRIPTION = "A GObject-based library for accessing the Secret Service API of \ +the freedesktop.org project, a cross-desktop effort to access passwords, \ +tokens and other types of secrets. libsecret provides a convenient wrapper \ +for these methods so consumers do not have to call the low-level DBus methods." LICENSE = "LGPLv2.1" +BUGTRACKER = "https://gitlab.gnome.org/GNOME/libsecret/issues" LIC_FILES_CHKSUM = "file://COPYING;md5=23c2a5e0106b99d75238986559bb5fc6" inherit gnomebase gtk-doc vala gobject-introspection manpages diff --git a/poky/meta/recipes-graphics/cairo/cairo_1.16.0.bb b/poky/meta/recipes-graphics/cairo/cairo_1.16.0.bb index f32e9ba1b..e3de3f616 100644 --- a/poky/meta/recipes-graphics/cairo/cairo_1.16.0.bb +++ b/poky/meta/recipes-graphics/cairo/cairo_1.16.0.bb @@ -10,12 +10,12 @@ HOMEPAGE = "http://cairographics.org" BUGTRACKER = "http://bugs.freedesktop.org" SECTION = "libs" -LICENSE = "MPL-1.1 & LGPLv2.1 & GPLv3+" -LICENSE_${PN} = "MPL-1.1 & LGPLv2.1" -LICENSE_${PN}-dev = "MPL-1.1 & LGPLv2.1" -LICENSE_${PN}-doc = "MPL-1.1 & LGPLv2.1" -LICENSE_${PN}-gobject = "MPL-1.1 & LGPLv2.1" -LICENSE_${PN}-script-interpreter = "MPL-1.1 & LGPLv2.1" +LICENSE = "(MPL-1.1 | LGPLv2.1) & GPLv3+" +LICENSE_${PN} = "MPL-1.1 | LGPLv2.1" +LICENSE_${PN}-dev = "MPL-1.1 | LGPLv2.1" +LICENSE_${PN}-doc = "MPL-1.1 | LGPLv2.1" +LICENSE_${PN}-gobject = "MPL-1.1 | LGPLv2.1" +LICENSE_${PN}-script-interpreter = "MPL-1.1 | LGPLv2.1" LICENSE_${PN}-perf-utils = "GPLv3+" LIC_FILES_CHKSUM = "file://COPYING;md5=e73e999e0c72b5ac9012424fa157ad77" diff --git a/poky/meta/recipes-graphics/clutter/clutter-1.0.inc b/poky/meta/recipes-graphics/clutter/clutter-1.0.inc index 6dbbf4d80..5dc45ebf2 100644 --- a/poky/meta/recipes-graphics/clutter/clutter-1.0.inc +++ b/poky/meta/recipes-graphics/clutter/clutter-1.0.inc @@ -1,8 +1,11 @@ SUMMARY = "Graphics library for creating hardware-accelerated user interfaces" +DESCRIPTION = "Clutter is an Open GL based interactive canvas library, \ +designed for creating fast, mainly 2D single window applications such as media \ +box UIs, presentations, kiosk style applications and so on." HOMEPAGE = "http://www.clutter-project.org/" LICENSE = "LGPLv2.1+" -inherit clutter ptest-gnome distro_features_check upstream-version-is-even gobject-introspection +inherit clutter ptest-gnome features_check upstream-version-is-even gobject-introspection # depends on cogl-1.0 which needs opengl REQUIRED_DISTRO_FEATURES ?= "opengl" diff --git a/poky/meta/recipes-graphics/clutter/clutter-gst-3.0.inc b/poky/meta/recipes-graphics/clutter/clutter-gst-3.0.inc index 4c877982b..fc3eade88 100644 --- a/poky/meta/recipes-graphics/clutter/clutter-gst-3.0.inc +++ b/poky/meta/recipes-graphics/clutter/clutter-gst-3.0.inc @@ -2,7 +2,7 @@ SUMMARY = "GStreamer integration library for Clutter" HOMEPAGE = "http://www.clutter-project.org/" LICENSE = "LGPLv2+" -inherit clutter distro_features_check upstream-version-is-even gobject-introspection +inherit clutter features_check upstream-version-is-even gobject-introspection # depends on clutter-1.0 which depends on cogl-1.0 REQUIRED_DISTRO_FEATURES ?= "opengl" diff --git a/poky/meta/recipes-graphics/clutter/clutter-gtk-1.0.inc b/poky/meta/recipes-graphics/clutter/clutter-gtk-1.0.inc index 11826a6f0..7bf227855 100644 --- a/poky/meta/recipes-graphics/clutter/clutter-gtk-1.0.inc +++ b/poky/meta/recipes-graphics/clutter/clutter-gtk-1.0.inc @@ -3,7 +3,7 @@ HOMEPAGE = "http://www.clutter-project.org/" LICENSE = "LGPLv2+" CLUTTERBASEBUILDCLASS = "meson" -inherit clutter distro_features_check upstream-version-is-even gobject-introspection gtk-doc +inherit clutter features_check upstream-version-is-even gobject-introspection gtk-doc # depends on clutter-1.0 which depends on cogl-1.0 REQUIRED_DISTRO_FEATURES ?= "opengl" diff --git a/poky/meta/recipes-graphics/cogl/cogl-1.0.inc b/poky/meta/recipes-graphics/cogl/cogl-1.0.inc index 443616316..d8d06651d 100644 --- a/poky/meta/recipes-graphics/cogl/cogl-1.0.inc +++ b/poky/meta/recipes-graphics/cogl/cogl-1.0.inc @@ -1,8 +1,12 @@ SUMMARY = "Modern 3D graphics API with associated utility APIs" +DESCRIPTION = "Cogl is a small open source library for using 3D graphics \ +hardware for rendering. The API departs from the flat state machine style of \ +OpenGL and is designed to make it easy to write orthogonal components that \ +can render without stepping on each others toes." HOMEPAGE = "http://wiki.clutter-project.org/wiki/Cogl" LICENSE = "MIT" -inherit clutter distro_features_check upstream-version-is-even gobject-introspection +inherit clutter features_check upstream-version-is-even gobject-introspection # cogl-1.0 needs opengl to build REQUIRED_DISTRO_FEATURES ?= "opengl" diff --git a/poky/meta/recipes-graphics/drm/libdrm_2.4.99.bb b/poky/meta/recipes-graphics/drm/libdrm_2.4.100.bb index fa3eb08f4..485942567 100644 --- a/poky/meta/recipes-graphics/drm/libdrm_2.4.99.bb +++ b/poky/meta/recipes-graphics/drm/libdrm_2.4.100.bb @@ -12,8 +12,8 @@ DEPENDS = "libpthread-stubs" SRC_URI = "http://dri.freedesktop.org/libdrm/${BP}.tar.bz2 \ file://musl-ioctl.patch" -SRC_URI[md5sum] = "72539626815b35159a63d45bc4c14ee6" -SRC_URI[sha256sum] = "4dbf539c7ed25dbb2055090b77ab87508fc46be39a9379d15fed4b5517e1da5e" +SRC_URI[md5sum] = "f47bc87e28198ba527e6b44ffdd62f65" +SRC_URI[sha256sum] = "c77cc828186c9ceec3e56ae202b43ee99eb932b4a87255038a80e8a1060d0a5d" inherit meson pkgconfig manpages diff --git a/poky/meta/recipes-graphics/glew/glew_2.1.0.bb b/poky/meta/recipes-graphics/glew/glew_2.1.0.bb index 18e6909aa..f6f43406f 100644 --- a/poky/meta/recipes-graphics/glew/glew_2.1.0.bb +++ b/poky/meta/recipes-graphics/glew/glew_2.1.0.bb @@ -15,7 +15,7 @@ SRC_URI[sha256sum] = "04de91e7e6763039bc11940095cd9c7f880baba82196a7765f727ac05a UPSTREAM_CHECK_URI = "http://sourceforge.net/projects/glew/files/glew" UPSTREAM_CHECK_REGEX = "/glew/(?P<pver>(\d+[\.\-_]*)+)/" -inherit lib_package pkgconfig distro_features_check +inherit lib_package pkgconfig features_check REQUIRED_DISTRO_FEATURES = "opengl" diff --git a/poky/meta/recipes-graphics/harfbuzz/harfbuzz_2.6.1.bb b/poky/meta/recipes-graphics/harfbuzz/harfbuzz_2.6.4.bb index 99cd4cd70..ee08c12be 100644 --- a/poky/meta/recipes-graphics/harfbuzz/harfbuzz_2.6.1.bb +++ b/poky/meta/recipes-graphics/harfbuzz/harfbuzz_2.6.4.bb @@ -8,8 +8,8 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=e11f5c3149cdec4bb309babb020b32b9 \ file://src/hb-ucd.cc;beginline=1;endline=15;md5=29d4dcb6410429195df67efe3382d8bc" SRC_URI = "http://www.freedesktop.org/software/harfbuzz/release/${BP}.tar.xz" -SRC_URI[md5sum] = "89b758a2eb14d56a94406cf914b62388" -SRC_URI[sha256sum] = "c651fb3faaa338aeb280726837c2384064cdc17ef40539228d88a1260960844f" +SRC_URI[md5sum] = "2b3a4dfdb3e5e50055f941978944da9f" +SRC_URI[sha256sum] = "9413b8d96132d699687ef914ebb8c50440efc87b3f775d25856d7ec347c03c12" inherit autotools pkgconfig lib_package gtk-doc @@ -21,7 +21,7 @@ PACKAGECONFIG[glib] = "--with-glib,--without-glib,glib-2.0" PACKAGECONFIG[graphite] = "--with-graphite2,--without-graphite2,graphite2" PACKAGECONFIG[icu] = "--with-icu,--without-icu,icu" -PACKAGES =+ "${PN}-icu ${PN}-icu-dev" +PACKAGES =+ "${PN}-icu ${PN}-icu-dev ${PN}-subset" LEAD_SONAME = "libharfbuzz.so" @@ -36,5 +36,6 @@ FILES_${PN}-icu-dev = "${libdir}/libharfbuzz-icu.la \ ${libdir}/libharfbuzz-icu.so \ ${libdir}/pkgconfig/harfbuzz-icu.pc \ " +FILES_${PN}-subset = "${libdir}/libharfbuzz-subset.so.*" BBCLASSEXTEND = "native nativesdk" diff --git a/poky/meta/recipes-graphics/images/core-image-weston.bb b/poky/meta/recipes-graphics/images/core-image-weston.bb index e36655ffc..f5102e198 100644 --- a/poky/meta/recipes-graphics/images/core-image-weston.bb +++ b/poky/meta/recipes-graphics/images/core-image-weston.bb @@ -4,7 +4,7 @@ IMAGE_FEATURES += "splash package-management ssh-server-dropbear hwcodecs" LICENSE = "MIT" -inherit core-image distro_features_check +inherit core-image features_check REQUIRED_DISTRO_FEATURES = "wayland" diff --git a/poky/meta/recipes-graphics/images/core-image-x11.bb b/poky/meta/recipes-graphics/images/core-image-x11.bb index cd5374949..52407759f 100644 --- a/poky/meta/recipes-graphics/images/core-image-x11.bb +++ b/poky/meta/recipes-graphics/images/core-image-x11.bb @@ -4,7 +4,7 @@ IMAGE_FEATURES += "splash package-management x11-base" LICENSE = "MIT" -inherit core-image distro_features_check +inherit core-image features_check REQUIRED_DISTRO_FEATURES = "x11" diff --git a/poky/meta/recipes-graphics/kmscube/kmscube_git.bb b/poky/meta/recipes-graphics/kmscube/kmscube_git.bb index 2b6837fef..82720045b 100644 --- a/poky/meta/recipes-graphics/kmscube/kmscube_git.bb +++ b/poky/meta/recipes-graphics/kmscube/kmscube_git.bb @@ -13,7 +13,7 @@ UPSTREAM_CHECK_COMMITS = "1" S = "${WORKDIR}/git" -inherit meson pkgconfig distro_features_check +inherit meson pkgconfig features_check REQUIRED_DISTRO_FEATURES = "opengl" diff --git a/poky/meta/recipes-graphics/libepoxy/libepoxy_1.5.3.bb b/poky/meta/recipes-graphics/libepoxy/libepoxy_1.5.3.bb index 825453ab2..71a2c9135 100644 --- a/poky/meta/recipes-graphics/libepoxy/libepoxy_1.5.3.bb +++ b/poky/meta/recipes-graphics/libepoxy/libepoxy_1.5.3.bb @@ -1,4 +1,8 @@ SUMMARY = "OpenGL function pointer management library" +DESCRIPTION = "It hides the complexity of dlopen(), dlsym(), \ +glXGetProcAddress(), eglGetProcAddress(), etc. from the app developer, with \ +very little knowledge needed on their part. They get to read GL specs and \ +write code using undecorated function names like glCompileShader()." HOMEPAGE = "https://github.com/anholt/libepoxy/" SECTION = "libs" @@ -11,7 +15,7 @@ SRC_URI[md5sum] = "e2845de8d2782b2d31c01ae8d7cd4cbb" SRC_URI[sha256sum] = "002958c5528321edd53440235d3c44e71b5b1e09b9177e8daf677450b6c4433d" UPSTREAM_CHECK_URI = "https://github.com/anholt/libepoxy/releases" -inherit meson pkgconfig distro_features_check +inherit meson pkgconfig features_check REQUIRED_DISTRO_FEATURES = "opengl" REQUIRED_DISTRO_FEATURES_class-native = "" diff --git a/poky/meta/recipes-graphics/libfakekey/libfakekey_git.bb b/poky/meta/recipes-graphics/libfakekey/libfakekey_git.bb index 4b803dbae..ab6f5ac9e 100644 --- a/poky/meta/recipes-graphics/libfakekey/libfakekey_git.bb +++ b/poky/meta/recipes-graphics/libfakekey/libfakekey_git.bb @@ -17,7 +17,7 @@ SRC_URI = "git://git.yoctoproject.org/${BPN}" S = "${WORKDIR}/git" -inherit autotools pkgconfig gettext distro_features_check +inherit autotools pkgconfig gettext features_check # The libxtst requires x11 in DISTRO_FEATURES REQUIRED_DISTRO_FEATURES = "x11" diff --git a/poky/meta/recipes-graphics/libmatchbox/libmatchbox_1.12.bb b/poky/meta/recipes-graphics/libmatchbox/libmatchbox_1.12.bb index ce45e4814..1a3167797 100644 --- a/poky/meta/recipes-graphics/libmatchbox/libmatchbox_1.12.bb +++ b/poky/meta/recipes-graphics/libmatchbox/libmatchbox_1.12.bb @@ -1,4 +1,8 @@ SUMMARY = "Matchbox window manager core library" +DESCRIPTION = "Matchbox is an Open Source base environment for the X Window \ +System running on non-desktop embedded platforms such as handhelds, set-top \ +boxes, kiosks and anything else for which screen space, input mechanisms or \ +system resources are limited." SECTION = "x11/libs" HOMEPAGE = "http://matchbox-project.org/" BUGTRACKER = "http://bugzilla.yoctoproject.com/" @@ -17,7 +21,7 @@ SRC_URI = "git://git.yoctoproject.org/${BPN}" S = "${WORKDIR}/git" -inherit autotools pkgconfig distro_features_check +inherit autotools pkgconfig features_check # depends on virtual/libx11 REQUIRED_DISTRO_FEATURES = "x11" diff --git a/poky/meta/recipes-graphics/libsdl2/libsdl2/0001-Fixed-bug-4538-validate-image-size-when-loading-BMP-.patch b/poky/meta/recipes-graphics/libsdl2/libsdl2/0001-Fixed-bug-4538-validate-image-size-when-loading-BMP-.patch new file mode 100644 index 000000000..674decccb --- /dev/null +++ b/poky/meta/recipes-graphics/libsdl2/libsdl2/0001-Fixed-bug-4538-validate-image-size-when-loading-BMP-.patch @@ -0,0 +1,34 @@ +From 85138c1ec673e05263ae666baf61f79384daf7e0 Mon Sep 17 00:00:00 2001 +From: Sam Lantinga <slouken@libsdl.org> +Date: Tue, 30 Jul 2019 11:00:00 -0700 +Subject: [PATCH] Fixed bug 4538 - validate image size when loading BMP files + +Upstream-Status: Backport +[https://hg.libsdl.org/SDL/rev/e7ba650a643a] + +CVE: CVE-2019-13616 + +Signed-off-by: Yi Zhao <yi.zhao@windriver.com> +--- + src/video/SDL_bmp.c | 5 +++++ + 1 file changed, 5 insertions(+) + +diff --git a/src/video/SDL_bmp.c b/src/video/SDL_bmp.c +index 0b68918..a06b0c9 100644 +--- a/src/video/SDL_bmp.c ++++ b/src/video/SDL_bmp.c +@@ -226,6 +226,11 @@ SDL_LoadBMP_RW(SDL_RWops * src, int freesrc) + SDL_RWseek(src, (biSize - headerSize), RW_SEEK_CUR); + } + } ++ if (biWidth <= 0 || biHeight == 0) { ++ SDL_SetError("BMP file with bad dimensions (%dx%d)", biWidth, biHeight); ++ was_error = SDL_TRUE; ++ goto done; ++ } + if (biHeight < 0) { + topDown = SDL_TRUE; + biHeight = -biHeight; +-- +2.7.4 + diff --git a/poky/meta/recipes-graphics/libsdl2/libsdl2/0001-configure-check-for-build-dir-when-building-version-.patch b/poky/meta/recipes-graphics/libsdl2/libsdl2/0001-configure-check-for-build-dir-when-building-version-.patch new file mode 100644 index 000000000..b383bd654 --- /dev/null +++ b/poky/meta/recipes-graphics/libsdl2/libsdl2/0001-configure-check-for-build-dir-when-building-version-.patch @@ -0,0 +1,53 @@ +# HG changeset patch +# User Anuj Mittal <am.devel@gmail.com> +# Date 1573631462 -10800 +# Node ID 1fb1880d5edfc7c5a370846e13f90b260263627c +# Parent 007002587d5d34d781c2b628c05e992e0ac5f52d +configure: check for build dir when building version res (fix bug #4858) +Fixes a race where we try to build version res file in build directory +before it has even been created. Prevents errors like: + +/bin/bash ../SDL2-2.0.10/build-scripts/updaterev.sh +/bin/bash ../SDL2-2.0.10/build-scripts/mkinstalldirs build +mkdir -p -- build +x86_64-pokysdk-mingw32-windres --include-dir=/home/pokybuild/yocto-worker/meta-mingw/build/build/tmp/work/x86_64-nativesdk-mingw32-pokysdk-mingw32/nativesdk-libsdl2/2.0.10-r0/recipe-sysroot/opt/poky/3.0/sysroots/x86_64-pokysdk-mingw32/usr/include ../SDL2-2.0.10/src/main/windows/version.rc build/version.o +x86_64-pokysdk-mingw32-windres: build/version.o: No such file or directory +Makefile:692: recipe for target 'build/version.o' failed +make: *** [build/version.o] Error 1 +make: *** Waiting for unfinished jobs.... +touch build/.created +WARNING: exit code 1 from a shell command. + +Extension of fix: +https://hg.libsdl.org/SDL/rev/99d8b18acf8a + +Upstream-Status: Backport +Signed-off-by: Anuj Mittal <am.devel@gmail.com> +--- + configure.ac | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff -r 007002587d5d -r 1fb1880d5edf configure +--- a/configure Tue Nov 12 17:24:37 2019 -0500 ++++ b/configure Wed Nov 13 10:51:02 2019 +0300 +@@ -25493,7 +25493,7 @@ + VERSION_DEPENDS=`echo $VERSION_SOURCES` + VERSION_OBJECTS=`echo "$VERSION_OBJECTS" | sed 's,[^ ]*/\([^ ]*\)\.rc,$(objects)/\1.o,g'` + VERSION_DEPENDS=`echo "$VERSION_DEPENDS" | sed "s,\\([^ ]*\\)/\\([^ ]*\\)\\.rc,\\\\ +-\\$(objects)/\\2.o: \\1/\\2.rc\\\\ ++\\$(objects)/\\2.o: \\1/\\2.rc \\$(objects)/.created\\\\ + \\$(WINDRES) \\$< \\$@,g"` + + SDLMAIN_OBJECTS=`echo $SDLMAIN_SOURCES` +diff -r 007002587d5d -r 1fb1880d5edf configure.ac +--- a/configure.ac Tue Nov 12 17:24:37 2019 -0500 ++++ b/configure.ac Wed Nov 13 10:51:02 2019 +0300 +@@ -4177,7 +4177,7 @@ + VERSION_DEPENDS=`echo $VERSION_SOURCES` + VERSION_OBJECTS=`echo "$VERSION_OBJECTS" | sed 's,[[^ ]]*/\([[^ ]]*\)\.rc,$(objects)/\1.o,g'` + VERSION_DEPENDS=`echo "$VERSION_DEPENDS" | sed "s,\\([[^ ]]*\\)/\\([[^ ]]*\\)\\.rc,\\\\ +-\\$(objects)/\\2.o: \\1/\\2.rc\\\\ ++\\$(objects)/\\2.o: \\1/\\2.rc \\$(objects)/.created\\\\ + \\$(WINDRES) \\$< \\$@,g"` + + SDLMAIN_OBJECTS=`echo $SDLMAIN_SOURCES` diff --git a/poky/meta/recipes-graphics/libsdl2/libsdl2/0002-Fixed-bug-4797-SDL-fails-to-compile-with-Mesa-Master.patch b/poky/meta/recipes-graphics/libsdl2/libsdl2/0002-Fixed-bug-4797-SDL-fails-to-compile-with-Mesa-Master.patch new file mode 100644 index 000000000..8f5b6a0ce --- /dev/null +++ b/poky/meta/recipes-graphics/libsdl2/libsdl2/0002-Fixed-bug-4797-SDL-fails-to-compile-with-Mesa-Master.patch @@ -0,0 +1,41 @@ +# HG changeset patch +# User Sylvain Becker <sylvain.becker@gmail.com> +# Date 1570898876 -7200 +# Sat Oct 12 18:47:56 2019 +0200 +# Node ID 369b01006eb2f6fd563f7c315d29ae3fe503c432 +# Parent 4cbaffd0083b8cd17070dbd9d4ab1ce0fa9fca2d +Fixed bug 4797 - SDL fails to compile with Mesa Master (thanks Michael Olbrich!) + +fix building with Mesa 19.2 + +With Mesa 19.2 building fails with: + +/include/GLES/gl.h:63:25: error: conflicting types for 'GLsizeiptr' + +The same type is defined in include/SDL_opengl.h for OpenGL and the two +headers should not be included at the same time. +This was just never noticed because the same header guard '__gl_h_' was +used. This was changed in Mesa. The result is this error. + +Fix this the same way GLES2 already handles this: Don't include the GLES +header when the OpenGL header was already included. +(https://hg.libsdl.org/SDL/rev/a60b3c292f0f) + +Upstream-Status: Backport [https://hg.libsdl.org/SDL/rev/369b01006eb2] +Signed-off-by: Alistair Francis <alistair.francis@wdc.com> + +diff --git a/src/video/SDL_video.c b/src/video/SDL_video.c +--- a/src/video/SDL_video.c ++++ b/src/video/SDL_video.c +@@ -37,9 +37,9 @@ + #include "SDL_opengl.h" + #endif /* SDL_VIDEO_OPENGL */ + +-#if SDL_VIDEO_OPENGL_ES ++#if SDL_VIDEO_OPENGL_ES && !SDL_VIDEO_OPENGL + #include "SDL_opengles.h" +-#endif /* SDL_VIDEO_OPENGL_ES */ ++#endif /* SDL_VIDEO_OPENGL_ES && !SDL_VIDEO_OPENGL */ + + /* GL and GLES2 headers conflict on Linux 32 bits */ + #if SDL_VIDEO_OPENGL_ES2 && !SDL_VIDEO_OPENGL diff --git a/poky/meta/recipes-graphics/libsdl2/libsdl2_2.0.10.bb b/poky/meta/recipes-graphics/libsdl2/libsdl2_2.0.10.bb index 3a0654b86..ac4a35604 100644 --- a/poky/meta/recipes-graphics/libsdl2/libsdl2_2.0.10.bb +++ b/poky/meta/recipes-graphics/libsdl2/libsdl2_2.0.10.bb @@ -14,6 +14,9 @@ PROVIDES = "virtual/libsdl2" SRC_URI = "http://www.libsdl.org/release/SDL2-${PV}.tar.gz \ file://more-gen-depends.patch \ + file://0001-Fixed-bug-4538-validate-image-size-when-loading-BMP-.patch \ + file://0002-Fixed-bug-4797-SDL-fails-to-compile-with-Mesa-Master.patch \ + file://0001-configure-check-for-build-dir-when-building-version-.patch \ " S = "${WORKDIR}/SDL2-${PV}" diff --git a/poky/meta/recipes-graphics/libva/libva-utils_2.5.0.bb b/poky/meta/recipes-graphics/libva/libva-utils_2.5.0.bb index fc013d75c..f68d0cf8b 100644 --- a/poky/meta/recipes-graphics/libva/libva-utils_2.5.0.bb +++ b/poky/meta/recipes-graphics/libva/libva-utils_2.5.0.bb @@ -25,7 +25,7 @@ UPSTREAM_CHECK_URI = "https://github.com/intel/libva-utils/releases" DEPENDS = "libva" -inherit autotools pkgconfig distro_features_check +inherit autotools pkgconfig features_check # depends on libva which requires opengl REQUIRED_DISTRO_FEATURES = "opengl" diff --git a/poky/meta/recipes-graphics/libva/libva_2.5.0.bb b/poky/meta/recipes-graphics/libva/libva_2.5.0.bb index e75648b2b..73e2e01c3 100644 --- a/poky/meta/recipes-graphics/libva/libva_2.5.0.bb +++ b/poky/meta/recipes-graphics/libva/libva_2.5.0.bb @@ -26,7 +26,7 @@ UPSTREAM_CHECK_URI = "https://github.com/intel/libva/releases" DEPENDS = "libdrm virtual/mesa" -inherit autotools pkgconfig distro_features_check +inherit autotools pkgconfig features_check REQUIRED_DISTRO_FEATURES = "opengl" diff --git a/poky/meta/recipes-graphics/matchbox-session/matchbox-session_0.1.bb b/poky/meta/recipes-graphics/matchbox-session/matchbox-session_0.1.bb index cbaf05436..57a3024ea 100644 --- a/poky/meta/recipes-graphics/matchbox-session/matchbox-session_0.1.bb +++ b/poky/meta/recipes-graphics/matchbox-session/matchbox-session_0.1.bb @@ -1,4 +1,5 @@ SUMMARY = "Custom Matchbox session files" +DESCRIPTION = "Very simple session manager for matchbox tools" HOMEPAGE = "http://www.matchbox-project.org/" BUGTRACKER = "http://bugzilla.yoctoproject.org/" diff --git a/poky/meta/recipes-graphics/matchbox-wm/matchbox-wm_1.2.2.bb b/poky/meta/recipes-graphics/matchbox-wm/matchbox-wm_1.2.2.bb index 815a75f36..b9961c398 100644 --- a/poky/meta/recipes-graphics/matchbox-wm/matchbox-wm_1.2.2.bb +++ b/poky/meta/recipes-graphics/matchbox-wm/matchbox-wm_1.2.2.bb @@ -17,7 +17,7 @@ SRC_URI = "git://git.yoctoproject.org/matchbox-window-manager \ S = "${WORKDIR}/git" -inherit autotools pkgconfig distro_features_check +inherit autotools pkgconfig features_check # depends on virtual/libx11 REQUIRED_DISTRO_FEATURES = "x11" diff --git a/poky/meta/recipes-graphics/mesa/files/0001-meson.build-check-for-all-linux-host_os-combinations.patch b/poky/meta/recipes-graphics/mesa/files/0001-meson.build-check-for-all-linux-host_os-combinations.patch index 9fba5da4b..1869e1105 100644 --- a/poky/meta/recipes-graphics/mesa/files/0001-meson.build-check-for-all-linux-host_os-combinations.patch +++ b/poky/meta/recipes-graphics/mesa/files/0001-meson.build-check-for-all-linux-host_os-combinations.patch @@ -1,8 +1,7 @@ -From ea966884e39aae9571c038fab55f3c1663d17850 Mon Sep 17 00:00:00 2001 -From: Fabio Berton <fabio.berton@ossystems.com.br> -Date: Wed, 12 Jun 2019 13:40:20 -0300 +From b6d9bc97cb0e8c540a45dba5440b036fb940ff95 Mon Sep 17 00:00:00 2001 +From: Alistair Francis <alistair.francis@wdc.com> +Date: Mon, 11 Nov 2019 09:38:15 -0800 Subject: [PATCH] meson.build: check for all linux host_os combinations -Organization: O.S. Systems Software LTDA. Make sure that we are also looking for our host_os combinations like linux-musl etc. when assuming support for DRM/KMS. @@ -14,29 +13,31 @@ Upstream-Status: Pending Signed-off-by: Anuj Mittal <anuj.mittal@intel.com> Signed-off-by: Fabio Berton <fabio.berton@ossystems.com.br> Signed-off-by: Otavio Salvador <otavio@ossystems.com.br> +Signed-off-by: Alistair Francis <alistair.francis@wdc.com> + --- meson.build | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/meson.build b/meson.build -index 567a81afd6f..b33b430aed4 100644 +index d584152..a1f098c 100644 --- a/meson.build +++ b/meson.build -@@ -107,7 +107,7 @@ with_any_opengl = with_opengl or with_gles1 or with_gles2 +@@ -117,7 +117,7 @@ with_any_opengl = with_opengl or with_gles1 or with_gles2 # Only build shared_glapi if at least one OpenGL API is enabled with_shared_glapi = get_option('shared-glapi') and with_any_opengl --system_has_kms_drm = ['openbsd', 'netbsd', 'freebsd', 'gnu/kfreebsd', 'dragonfly', 'linux'].contains(host_machine.system()) +-system_has_kms_drm = ['openbsd', 'netbsd', 'freebsd', 'gnu/kfreebsd', 'dragonfly', 'linux', 'sunos'].contains(host_machine.system()) +system_has_kms_drm = ['openbsd', 'netbsd', 'freebsd', 'dragonfly'].contains(host_machine.system()) or host_machine.system().startswith('linux') dri_drivers = get_option('dri-drivers') if dri_drivers.contains('auto') -@@ -845,7 +845,7 @@ if cc.compiles('int foo(void) __attribute__((__noreturn__));', +@@ -856,7 +856,7 @@ if cc.compiles('__uint128_t foo(void) { return 0; }', endif # TODO: this is very incomplete -if ['linux', 'cygwin', 'gnu', 'gnu/kfreebsd'].contains(host_machine.system()) +if ['cygwin', 'gnu', 'gnu/kfreebsd'].contains(host_machine.system()) or host_machine.system().startswith('linux') pre_args += '-D_GNU_SOURCE' - endif - + elif host_machine.system() == 'sunos' + pre_args += '-D__EXTENSIONS__' diff --git a/poky/meta/recipes-graphics/mesa/files/0002-meson.build-make-TLS-ELF-optional.patch b/poky/meta/recipes-graphics/mesa/files/0002-meson.build-make-TLS-ELF-optional.patch new file mode 100644 index 000000000..199ed572d --- /dev/null +++ b/poky/meta/recipes-graphics/mesa/files/0002-meson.build-make-TLS-ELF-optional.patch @@ -0,0 +1,46 @@ +From af6923544de02ded648a736e07b9bd8b7c52dba9 Mon Sep 17 00:00:00 2001 +From: Alistair Francis <alistair.francis@wdc.com> +Date: Wed, 23 Oct 2019 09:46:28 -0700 +Subject: [PATCH] meson.build: make TLS ELF optional + +USE_ELF_TLS has replaced GLX_USE_TLS so this patch is the original "make +TLS GLX optional again" patch updated to the latest mesa. + +Upstream-Status: Inappropriate [configuration] +Signed-off-by: Alistair Francis <alistair.francis@wdc.com> + +--- + meson.build | 2 +- + meson_options.txt | 6 ++++++ + 2 files changed, 7 insertions(+), 1 deletion(-) + +diff --git a/meson.build b/meson.build +index a1f098c..1e31eb4 100644 +--- a/meson.build ++++ b/meson.build +@@ -378,7 +378,7 @@ if with_egl and not (with_platform_drm or with_platform_surfaceless or with_plat + endif + + # Android uses emutls for versions <= P/28. For USE_ELF_TLS we need ELF TLS. +-if not with_platform_android or get_option('platform-sdk-version') >= 29 ++if (not with_platform_android or get_option('platform-sdk-version') >= 29) and get_option('elf-tls') + pre_args += '-DUSE_ELF_TLS' + endif + +diff --git a/meson_options.txt b/meson_options.txt +index b768c15..76cef24 100644 +--- a/meson_options.txt ++++ b/meson_options.txt +@@ -333,6 +333,12 @@ option( + value : true, + description : 'Enable direct rendering in GLX and EGL for DRI', + ) ++option( ++ 'elf-tls', ++ type : 'boolean', ++ value : true, ++ description : 'Enable TLS support in ELF', ++) + option( + 'I-love-half-baked-turnips', + type : 'boolean', diff --git a/poky/meta/recipes-graphics/mesa/files/0002-meson.build-make-TLS-GLX-optional-again.patch b/poky/meta/recipes-graphics/mesa/files/0002-meson.build-make-TLS-GLX-optional-again.patch deleted file mode 100644 index 641bacf1d..000000000 --- a/poky/meta/recipes-graphics/mesa/files/0002-meson.build-make-TLS-GLX-optional-again.patch +++ /dev/null @@ -1,52 +0,0 @@ -From cee8e48c5344124e5d84307cb0c48ee0c9b3e684 Mon Sep 17 00:00:00 2001 -From: Fabio Berton <fabio.berton@ossystems.com.br> -Date: Wed, 12 Jun 2019 14:15:57 -0300 -Subject: [PATCH] meson.build: make TLS GLX optional again -Organization: O.S. Systems Software LTDA. - -This was optional with autotools, and needs to be disabled -when using musl C library, for instance. - -Upstream-Status: Pending - -Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> -Signed-off-by: Fabio Berton <fabio.berton@ossystems.com.br> -Signed-off-by: Otavio Salvador <otavio@ossystems.com.br> ---- - meson.build | 4 +++- - meson_options.txt | 7 +++++++ - 2 files changed, 10 insertions(+), 1 deletion(-) - -diff --git a/meson.build b/meson.build -index b33b430aed4..0e50bb26c0a 100644 ---- a/meson.build -+++ b/meson.build -@@ -369,7 +369,9 @@ if with_egl and not (with_platform_drm or with_platform_surfaceless or with_plat - endif - endif - --pre_args += '-DGLX_USE_TLS' -+if get_option('glx-tls') -+ pre_args += '-DGLX_USE_TLS' -+endif - if with_glx != 'disabled' - if not (with_platform_x11 and with_any_opengl) - error('Cannot build GLX support without X11 platform support and at least one OpenGL API') -diff --git a/meson_options.txt b/meson_options.txt -index 1f72faabee8..fcd49efea27 100644 ---- a/meson_options.txt -+++ b/meson_options.txt -@@ -339,6 +339,13 @@ option( - value : true, - description : 'Enable direct rendering in GLX and EGL for DRI', - ) -+option( -+ 'glx-tls', -+ type : 'boolean', -+ value : true, -+ description : 'Enable TLS support in GLX', -+) -+ - option( - 'I-love-half-baked-turnips', - type : 'boolean', diff --git a/poky/meta/recipes-graphics/mesa/files/0003-Allow-enable-DRI-without-DRI-drivers.patch b/poky/meta/recipes-graphics/mesa/files/0003-Allow-enable-DRI-without-DRI-drivers.patch index 3458c1919..c20a1f7c5 100644 --- a/poky/meta/recipes-graphics/mesa/files/0003-Allow-enable-DRI-without-DRI-drivers.patch +++ b/poky/meta/recipes-graphics/mesa/files/0003-Allow-enable-DRI-without-DRI-drivers.patch @@ -1,34 +1,34 @@ -From f1482e88c2295b9c7288f5b273335a8e18039de8 Mon Sep 17 00:00:00 2001 +From 5ad6515238bc042cccf9959abad44fdee9aeb07f Mon Sep 17 00:00:00 2001 From: Fabio Berton <fabio.berton@ossystems.com.br> Date: Wed, 12 Jun 2019 14:18:31 -0300 Subject: [PATCH] Allow enable DRI without DRI drivers -Organization: O.S. Systems Software LTDA. Upstream-Status: Pending Signed-off-by: Andrei Gherzan <andrei@gherzan.ro> Signed-off-by: Fabio Berton <fabio.berton@ossystems.com.br> Signed-off-by: Otavio Salvador <otavio@ossystems.com.br> + --- meson.build | 2 +- meson_options.txt | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/meson.build b/meson.build -index 0e50bb26c0a..de065c290d6 100644 +index 1e31eb4..512eec6 100644 --- a/meson.build +++ b/meson.build -@@ -137,7 +137,7 @@ with_dri_r200 = dri_drivers.contains('r200') +@@ -147,7 +147,7 @@ with_dri_r200 = dri_drivers.contains('r200') with_dri_nouveau = dri_drivers.contains('nouveau') with_dri_swrast = dri_drivers.contains('swrast') -with_dri = dri_drivers.length() != 0 and dri_drivers != [''] -+with_dri = get_option('dri') or (_drivers.length() != 0 and _drivers != ['']) ++with_dri = get_option('dri') or (dri_drivers.length() != 0 and dri_drivers != ['']) gallium_drivers = get_option('gallium-drivers') if gallium_drivers.contains('auto') diff --git a/meson_options.txt b/meson_options.txt -index fcd49efea27..0529200b3bb 100644 +index 76cef24..a8abd04 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -34,6 +34,12 @@ option( diff --git a/poky/meta/recipes-graphics/mesa/files/0004-Revert-mesa-Enable-asm-unconditionally-now-that-gen_.patch b/poky/meta/recipes-graphics/mesa/files/0004-Revert-mesa-Enable-asm-unconditionally-now-that-gen_.patch new file mode 100644 index 000000000..b5658d0c9 --- /dev/null +++ b/poky/meta/recipes-graphics/mesa/files/0004-Revert-mesa-Enable-asm-unconditionally-now-that-gen_.patch @@ -0,0 +1,147 @@ +From 1b1cb6e5ea25eaa98573328b9565728a08245997 Mon Sep 17 00:00:00 2001 +From: Alistair Francis <alistair@alistair23.me> +Date: Thu, 14 Nov 2019 09:06:02 -0800 +Subject: [PATCH] Revert "mesa: Enable asm unconditionally, now that + gen_matypes is gone." + +This reverts commit 20294dceebc23236e33b22578245f7e6f41b6997. + +Upstream-Status: Inappropriate [configuration] +Signed-off-by: Alistair Francis <alistair@alistair23.me> + +--- + meson.build | 94 ++++++++++++++++++++++++++++++----------------- + meson_options.txt | 6 +++ + 2 files changed, 67 insertions(+), 33 deletions(-) + +diff --git a/meson.build b/meson.build +index 512eec6..a2bcc3a 100644 +--- a/meson.build ++++ b/meson.build +@@ -49,6 +49,7 @@ with_vulkan_icd_dir = get_option('vulkan-icd-dir') + with_tests = get_option('build-tests') + with_valgrind = get_option('valgrind') + with_libunwind = get_option('libunwind') ++with_asm = get_option('asm') + with_glx_read_only_text = get_option('glx-read-only-text') + with_glx_direct = get_option('glx-direct') + with_osmesa = get_option('osmesa') +@@ -985,41 +986,68 @@ endif + + # TODO: shared/static? Is this even worth doing? + ++# When cross compiling we generally need to turn off the use of assembly, ++# because mesa's assembly relies on building an executable for the host system, ++# and running it to get information about struct sizes. There is at least one ++# case of cross compiling where we can use asm, and that's x86_64 -> x86 when ++# host OS == build OS, since in that case the build machine can run the host's ++# binaries. ++if with_asm and meson.is_cross_build() ++ if build_machine.system() != host_machine.system() ++ # TODO: It may be possible to do this with an exe_wrapper (like wine). ++ message('Cross compiling from one OS to another, disabling assembly.') ++ with_asm = false ++ elif not (build_machine.cpu_family().startswith('x86') and host_machine.cpu_family() == 'x86') ++ # FIXME: Gentoo always sets -m32 for x86_64 -> x86 builds, resulting in an ++ # x86 -> x86 cross compile. We use startswith rather than == to handle this ++ # case. ++ # TODO: There may be other cases where the 64 bit version of the ++ # architecture can run 32 bit binaries (aarch64 and armv7 for example) ++ message(''' ++ Cross compiling to different architectures, and the host cannot run ++ the build machine's binaries. Disabling assembly. ++ ''') ++ with_asm = false ++ endif ++endif ++ + with_asm_arch = '' +-if host_machine.cpu_family() == 'x86' +- if system_has_kms_drm or host_machine.system() == 'gnu' +- with_asm_arch = 'x86' +- pre_args += ['-DUSE_X86_ASM', '-DUSE_MMX_ASM', '-DUSE_3DNOW_ASM', +- '-DUSE_SSE_ASM'] +- +- if with_glx_read_only_text +- pre_args += ['-DGLX_X86_READONLY_TEXT'] ++if with_asm ++ if host_machine.cpu_family() == 'x86' ++ if system_has_kms_drm or host_machine.system() == 'gnu' ++ with_asm_arch = 'x86' ++ pre_args += ['-DUSE_X86_ASM', '-DUSE_MMX_ASM', '-DUSE_3DNOW_ASM', ++ '-DUSE_SSE_ASM'] ++ ++ if with_glx_read_only_text ++ pre_args += ['-DGLX_X86_READONLY_TEXT'] ++ endif ++ endif ++ elif host_machine.cpu_family() == 'x86_64' ++ if system_has_kms_drm ++ with_asm_arch = 'x86_64' ++ pre_args += ['-DUSE_X86_64_ASM'] ++ endif ++ elif host_machine.cpu_family() == 'arm' ++ if system_has_kms_drm ++ with_asm_arch = 'arm' ++ pre_args += ['-DUSE_ARM_ASM'] ++ endif ++ elif host_machine.cpu_family() == 'aarch64' ++ if system_has_kms_drm ++ with_asm_arch = 'aarch64' ++ pre_args += ['-DUSE_AARCH64_ASM'] ++ endif ++ elif host_machine.cpu_family() == 'sparc64' ++ if system_has_kms_drm ++ with_asm_arch = 'sparc' ++ pre_args += ['-DUSE_SPARC_ASM'] ++ endif ++ elif host_machine.cpu_family().startswith('ppc64') and host_machine.endian() == 'little' ++ if system_has_kms_drm ++ with_asm_arch = 'ppc64le' ++ pre_args += ['-DUSE_PPC64LE_ASM'] + endif +- endif +-elif host_machine.cpu_family() == 'x86_64' +- if system_has_kms_drm +- with_asm_arch = 'x86_64' +- pre_args += ['-DUSE_X86_64_ASM'] +- endif +-elif host_machine.cpu_family() == 'arm' +- if system_has_kms_drm +- with_asm_arch = 'arm' +- pre_args += ['-DUSE_ARM_ASM'] +- endif +-elif host_machine.cpu_family() == 'aarch64' +- if system_has_kms_drm +- with_asm_arch = 'aarch64' +- pre_args += ['-DUSE_AARCH64_ASM'] +- endif +-elif host_machine.cpu_family() == 'sparc64' +- if system_has_kms_drm +- with_asm_arch = 'sparc' +- pre_args += ['-DUSE_SPARC_ASM'] +- endif +-elif host_machine.cpu_family().startswith('ppc64') and host_machine.endian() == 'little' +- if system_has_kms_drm +- with_asm_arch = 'ppc64le' +- pre_args += ['-DUSE_PPC64LE_ASM'] + endif + endif + +diff --git a/meson_options.txt b/meson_options.txt +index a8abd04..0f4bd80 100644 +--- a/meson_options.txt ++++ b/meson_options.txt +@@ -233,6 +233,12 @@ option( + value : false, + description : 'Enable GLVND support.' + ) ++option( ++ 'asm', ++ type : 'boolean', ++ value : true, ++ description : 'Build assembly code if possible' ++) + option( + 'glx-read-only-text', + type : 'boolean', diff --git a/poky/meta/recipes-graphics/mesa/libglu_9.0.1.bb b/poky/meta/recipes-graphics/mesa/libglu_9.0.1.bb index 068fb19e2..703f131f7 100644 --- a/poky/meta/recipes-graphics/mesa/libglu_9.0.1.bb +++ b/poky/meta/recipes-graphics/mesa/libglu_9.0.1.bb @@ -21,7 +21,7 @@ S = "${WORKDIR}/glu-${PV}" DEPENDS = "virtual/libgl" -inherit autotools pkgconfig distro_features_check +inherit autotools pkgconfig features_check # Requires libGL.so which is provided by mesa when x11 in DISTRO_FEATURES REQUIRED_DISTRO_FEATURES = "x11 opengl" diff --git a/poky/meta/recipes-graphics/mesa/mesa-demos_8.4.0.bb b/poky/meta/recipes-graphics/mesa/mesa-demos_8.4.0.bb index 129a47df4..38bdbded2 100644 --- a/poky/meta/recipes-graphics/mesa/mesa-demos_8.4.0.bb +++ b/poky/meta/recipes-graphics/mesa/mesa-demos_8.4.0.bb @@ -22,7 +22,7 @@ SRC_URI = "https://mesa.freedesktop.org/archive/demos/${BPN}-${PV}.tar.bz2 \ SRC_URI[md5sum] = "6b65a02622765522176d00f553086fa3" SRC_URI[sha256sum] = "01e99c94a0184e63e796728af89bfac559795fb2a0d6f506fa900455ca5fff7d" -inherit autotools pkgconfig distro_features_check +inherit autotools pkgconfig features_check # depends on virtual/egl, virtual/libgl ... REQUIRED_DISTRO_FEATURES = "opengl x11" diff --git a/poky/meta/recipes-graphics/mesa/mesa-gl_19.1.6.bb b/poky/meta/recipes-graphics/mesa/mesa-gl_19.2.4.bb index d4b1c1c45..d4b1c1c45 100644 --- a/poky/meta/recipes-graphics/mesa/mesa-gl_19.1.6.bb +++ b/poky/meta/recipes-graphics/mesa/mesa-gl_19.2.4.bb diff --git a/poky/meta/recipes-graphics/mesa/mesa.inc b/poky/meta/recipes-graphics/mesa/mesa.inc index 9e5808ee2..5838207e6 100644 --- a/poky/meta/recipes-graphics/mesa/mesa.inc +++ b/poky/meta/recipes-graphics/mesa/mesa.inc @@ -10,7 +10,7 @@ HOMEPAGE = "http://mesa3d.org" BUGTRACKER = "https://bugs.freedesktop.org" SECTION = "x11" LICENSE = "MIT" -LIC_FILES_CHKSUM = "file://docs/license.html;md5=725f991a1cc322aa7a0cd3a2016621c4" +LIC_FILES_CHKSUM = "file://docs/license.html;md5=3a4999caf82cc503ac8b9e37c235782e" PE = "2" @@ -24,7 +24,7 @@ PROVIDES = " \ virtual/mesa \ " -inherit meson pkgconfig python3native gettext distro_features_check +inherit meson pkgconfig python3native gettext features_check # Unset these to stop python trying to report the target Python setup _PYTHON_SYSCONFIGDATA_NAME[unexport] = "1" @@ -57,12 +57,12 @@ PACKAGECONFIG_class-target ??= "${@bb.utils.filter('DISTRO_FEATURES', 'wayland v ${@bb.utils.contains('DISTRO_FEATURES', 'opengl', 'opengl egl gles gbm dri gallium', '', d)} \ ${@bb.utils.contains('DISTRO_FEATURES', 'x11 opengl', 'x11 dri3', '', d)} \ ${@bb.utils.contains('DISTRO_FEATURES', 'x11 vulkan', 'dri3', '', d)} \ - glx-tls \ + elf-tls \ " -PACKAGECONFIG_class-native ?= "gbm dri egl opengl glx-tls" -PACKAGECONFIG_class-nativesdk ?= "gbm dri egl opengl glx-tls" +PACKAGECONFIG_class-native ?= "gbm dri egl opengl elf-tls" +PACKAGECONFIG_class-nativesdk ?= "gbm dri egl opengl elf-tls" -PACKAGECONFIG_remove_libc-musl = "glx-tls" +PACKAGECONFIG_remove_libc-musl = "elf-tls" # "gbm" requires "dri", "opengl" PACKAGECONFIG[gbm] = "-Dgbm=true,-Dgbm=false" @@ -70,7 +70,7 @@ PACKAGECONFIG[gbm] = "-Dgbm=true,-Dgbm=false" X11_DEPS = "xorgproto virtual/libx11 libxext libxxf86vm libxdamage libxfixes xrandr" # "x11" requires "opengl" PACKAGECONFIG[x11] = ",-Dglx=disabled,${X11_DEPS}" -PACKAGECONFIG[glx-tls] = "-Dglx-tls=true, -Dglx-tls=false" +PACKAGECONFIG[elf-tls] = "-Delf-tls=true, -Delf-tls=false" PACKAGECONFIG[xvmc] = "-Dgallium-xvmc=true,-Dgallium-xvmc=false,libxvmc" PACKAGECONFIG[wayland] = ",,wayland-native wayland libdrm wayland-protocols" diff --git a/poky/meta/recipes-graphics/mesa/mesa_19.1.6.bb b/poky/meta/recipes-graphics/mesa/mesa_19.2.4.bb index 19221e9e2..f4b33df22 100644 --- a/poky/meta/recipes-graphics/mesa/mesa_19.1.6.bb +++ b/poky/meta/recipes-graphics/mesa/mesa_19.2.4.bb @@ -2,12 +2,13 @@ require ${BPN}.inc SRC_URI = "https://mesa.freedesktop.org/archive/mesa-${PV}.tar.xz \ file://0001-meson.build-check-for-all-linux-host_os-combinations.patch \ - file://0002-meson.build-make-TLS-GLX-optional-again.patch \ + file://0002-meson.build-make-TLS-ELF-optional.patch \ file://0003-Allow-enable-DRI-without-DRI-drivers.patch \ + file://0004-Revert-mesa-Enable-asm-unconditionally-now-that-gen_.patch \ " -SRC_URI[md5sum] = "7dbb40b8d10e89bee0a5bfc85350647b" -SRC_URI[sha256sum] = "2a369b7b48545c6486e7e44913ad022daca097c8bd937bf30dcf3f17a94d3496" +SRC_URI[md5sum] = "5c047732b81651ddb341597528b4b096" +SRC_URI[sha256sum] = "09000a0f7dbbd82e193b81a8f1bf0c118eab7ca975c0329181968596e548e30f" UPSTREAM_CHECK_GITTAGREGEX = "mesa-(?P<pver>\d+(\.\d+)+)" diff --git a/poky/meta/recipes-graphics/mx/mx.inc b/poky/meta/recipes-graphics/mx/mx.inc index d30483748..714a06f0a 100644 --- a/poky/meta/recipes-graphics/mx/mx.inc +++ b/poky/meta/recipes-graphics/mx/mx.inc @@ -1,7 +1,7 @@ SUMMARY = "Clutter based UI widget library" LICENSE = "LGPLv2.1" -inherit clutter autotools distro_features_check gobject-introspection gtk-doc +inherit clutter autotools features_check gobject-introspection gtk-doc # depends on clutter-1.0 which depends on cogl-1.0 REQUIRED_DISTRO_FEATURES = "opengl" diff --git a/poky/meta/recipes-graphics/packagegroups/packagegroup-core-clutter.bb b/poky/meta/recipes-graphics/packagegroups/packagegroup-core-clutter.bb index 87c700e02..2e7b47dd4 100644 --- a/poky/meta/recipes-graphics/packagegroups/packagegroup-core-clutter.bb +++ b/poky/meta/recipes-graphics/packagegroups/packagegroup-core-clutter.bb @@ -6,7 +6,7 @@ SUMMARY = "Clutter package groups" PR = "r6" -inherit packagegroup distro_features_check +inherit packagegroup features_check # rdepends on clutter-* REQUIRED_DISTRO_FEATURES = "opengl" diff --git a/poky/meta/recipes-graphics/packagegroups/packagegroup-core-x11-base.bb b/poky/meta/recipes-graphics/packagegroups/packagegroup-core-x11-base.bb index 7ea72d55a..9ca2705a5 100644 --- a/poky/meta/recipes-graphics/packagegroups/packagegroup-core-x11-base.bb +++ b/poky/meta/recipes-graphics/packagegroups/packagegroup-core-x11-base.bb @@ -2,7 +2,7 @@ SUMMARY = "Basic X11 session" DESCRIPTION = "Packages required to set up a basic working X11 session" PR = "r1" -inherit packagegroup distro_features_check +inherit packagegroup features_check # rdepends on matchbox-wm REQUIRED_DISTRO_FEATURES = "x11" diff --git a/poky/meta/recipes-graphics/packagegroups/packagegroup-core-x11-xserver.bb b/poky/meta/recipes-graphics/packagegroups/packagegroup-core-x11-xserver.bb index 97dcac5f7..a0b944a67 100644 --- a/poky/meta/recipes-graphics/packagegroups/packagegroup-core-x11-xserver.bb +++ b/poky/meta/recipes-graphics/packagegroups/packagegroup-core-x11-xserver.bb @@ -7,7 +7,7 @@ PR = "r40" PACKAGE_ARCH = "${MACHINE_ARCH}" -inherit packagegroup distro_features_check +inherit packagegroup features_check # rdepends on XSERVER REQUIRED_DISTRO_FEATURES = "x11" diff --git a/poky/meta/recipes-graphics/packagegroups/packagegroup-core-x11.bb b/poky/meta/recipes-graphics/packagegroups/packagegroup-core-x11.bb index 001db9e5e..cddf1932f 100644 --- a/poky/meta/recipes-graphics/packagegroups/packagegroup-core-x11.bb +++ b/poky/meta/recipes-graphics/packagegroups/packagegroup-core-x11.bb @@ -4,7 +4,7 @@ PR = "r40" -inherit packagegroup distro_features_check +inherit packagegroup features_check REQUIRED_DISTRO_FEATURES = "x11" PACKAGES = "${PN} ${PN}-utils" diff --git a/poky/meta/recipes-graphics/piglit/piglit_git.bb b/poky/meta/recipes-graphics/piglit/piglit_git.bb index d489f82b1..696d438c5 100644 --- a/poky/meta/recipes-graphics/piglit/piglit_git.bb +++ b/poky/meta/recipes-graphics/piglit/piglit_git.bb @@ -1,4 +1,6 @@ SUMMARY = "OpenGL driver testing framework" +DESCRIPTION = "Piglit is an open-source test suite for OpenGL and OpenCL \ +implementations." LICENSE = "MIT & LGPLv2+ & GPLv3 & GPLv2+ & BSD-3-Clause" LIC_FILES_CHKSUM = "file://COPYING;md5=b2beded7103a3d8a442a2a0391d607b0" @@ -19,7 +21,7 @@ X11_RDEPS = "${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'mesa-demos', '', d) DEPENDS = "libpng waffle libxkbcommon virtual/libgl python3-mako-native python3-numpy-native python3-six-native virtual/egl" -inherit cmake pkgconfig python3native distro_features_check bash-completion +inherit cmake pkgconfig python3native features_check bash-completion # depends on virtual/libgl REQUIRED_DISTRO_FEATURES += "opengl" diff --git a/poky/meta/recipes-graphics/pong-clock/pong-clock_1.0.bb b/poky/meta/recipes-graphics/pong-clock/pong-clock_1.0.bb index cdfe38a22..c3c237eee 100644 --- a/poky/meta/recipes-graphics/pong-clock/pong-clock_1.0.bb +++ b/poky/meta/recipes-graphics/pong-clock/pong-clock_1.0.bb @@ -2,7 +2,7 @@ SUMMARY = "A clock combined with a game of pong" LICENSE = "GPLv2+" DEPENDS = "virtual/libx11 xdmcp xau" -inherit distro_features_check pkgconfig +inherit features_check pkgconfig # depends on virtual/libx11 REQUIRED_DISTRO_FEATURES = "x11" diff --git a/poky/meta/recipes-graphics/startup-notification/startup-notification_0.12.bb b/poky/meta/recipes-graphics/startup-notification/startup-notification_0.12.bb index 6c1b93cd0..a26ab44fa 100644 --- a/poky/meta/recipes-graphics/startup-notification/startup-notification_0.12.bb +++ b/poky/meta/recipes-graphics/startup-notification/startup-notification_0.12.bb @@ -17,7 +17,7 @@ SECTION = "libs" DEPENDS = "virtual/libx11 libsm xcb-util" -inherit autotools pkgconfig distro_features_check +inherit autotools pkgconfig features_check # depends on virtual/libx11 REQUIRED_DISTRO_FEATURES = "x11" diff --git a/poky/meta/recipes-graphics/virglrenderer/virglrenderer_0.8.0.bb b/poky/meta/recipes-graphics/virglrenderer/virglrenderer_0.8.0.bb index d2b11c103..4420d84ae 100644 --- a/poky/meta/recipes-graphics/virglrenderer/virglrenderer_0.8.0.bb +++ b/poky/meta/recipes-graphics/virglrenderer/virglrenderer_0.8.0.bb @@ -1,4 +1,8 @@ SUMMARY = "VirGL virtual OpenGL renderer" +DESCRIPTION = "Virgil is a research project to investigate the possibility of \ +creating a virtual 3D GPU for use inside qemu virtual machines, that allows \ +the guest operating system to use the capabilities of the host GPU to \ +accelerate 3D rendering." HOMEPAGE = "https://virgil3d.github.io/" LICENSE = "MIT" @@ -12,7 +16,7 @@ SRC_URI = "git://anongit.freedesktop.org/virglrenderer \ S = "${WORKDIR}/git" -inherit autotools pkgconfig distro_features_check +inherit autotools pkgconfig features_check BBCLASSEXTEND = "native nativesdk" diff --git a/poky/meta/recipes-graphics/vulkan/vulkan-demos_git.bb b/poky/meta/recipes-graphics/vulkan/vulkan-demos_git.bb index d2041d7d4..74dc2ad67 100644 --- a/poky/meta/recipes-graphics/vulkan/vulkan-demos_git.bb +++ b/poky/meta/recipes-graphics/vulkan/vulkan-demos_git.bb @@ -20,7 +20,7 @@ S = "${WORKDIR}/git" REQUIRED_DISTRO_FEATURES = 'vulkan' -inherit cmake distro_features_check +inherit cmake features_check DEPENDS = "vulkan-loader assimp" do_install_append () { diff --git a/poky/meta/recipes-graphics/vulkan/vulkan-loader_1.1.108.bb b/poky/meta/recipes-graphics/vulkan/vulkan-loader_1.1.108.bb index 2fd6c4448..a539c5a3c 100644 --- a/poky/meta/recipes-graphics/vulkan/vulkan-loader_1.1.108.bb +++ b/poky/meta/recipes-graphics/vulkan/vulkan-loader_1.1.108.bb @@ -16,7 +16,7 @@ S = "${WORKDIR}/git" REQUIRED_DISTRO_FEATURES = "vulkan" -inherit cmake distro_features_check +inherit cmake features_check ANY_OF_DISTRO_FEATURES = "x11 wayland" DEPENDS += "vulkan-headers" diff --git a/poky/meta/recipes-graphics/vulkan/vulkan-tools_1.1.108.bb b/poky/meta/recipes-graphics/vulkan/vulkan-tools_1.1.108.bb index 26cdee3c1..4ac1bafd1 100644 --- a/poky/meta/recipes-graphics/vulkan/vulkan-tools_1.1.108.bb +++ b/poky/meta/recipes-graphics/vulkan/vulkan-tools_1.1.108.bb @@ -10,7 +10,7 @@ SRCREV = "3ccd7f6ebae3e1919adf837718c04feb6c2acc61" S = "${WORKDIR}/git" -inherit cmake distro_features_check +inherit cmake features_check ANY_OF_DISTRO_FEATURES = "x11 wayland" REQUIRED_DISTRO_FEATURES = "vulkan" diff --git a/poky/meta/recipes-graphics/waffle/waffle_1.6.0.bb b/poky/meta/recipes-graphics/waffle/waffle_1.6.0.bb index 8a1d5748f..52cb1df89 100644 --- a/poky/meta/recipes-graphics/waffle/waffle_1.6.0.bb +++ b/poky/meta/recipes-graphics/waffle/waffle_1.6.0.bb @@ -9,7 +9,7 @@ SRC_URI[sha256sum] = "d9c899f710c50cfdd00f5f4cdfeaef0687d8497362239bdde93bed6c90 UPSTREAM_CHECK_URI = "http://www.waffle-gl.org/releases.html" -inherit meson distro_features_check lib_package bash-completion +inherit meson features_check lib_package bash-completion # This should be overridden per-machine to reflect the capabilities of the GL # stack. diff --git a/poky/meta/recipes-graphics/wayland/libinput_1.14.1.bb b/poky/meta/recipes-graphics/wayland/libinput_1.14.3.bb index 38bc8d2c3..f06a8d28f 100644 --- a/poky/meta/recipes-graphics/wayland/libinput_1.14.1.bb +++ b/poky/meta/recipes-graphics/wayland/libinput_1.14.3.bb @@ -1,4 +1,9 @@ SUMMARY = "Library to handle input devices in Wayland compositors" +DESCRIPTION = "libinput is a library to handle input devices in Wayland \ +compositors and to provide a generic X.Org input driver. It provides \ +device detection, device handling, input device event processing and \ +abstraction so minimize the amount of custom input code compositors need to \ +provide the common set of functionality that users expect." HOMEPAGE = "http://www.freedesktop.org/wiki/Software/libinput/" SECTION = "libs" @@ -8,8 +13,8 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=1f2ea9ebff3a2c6d458faf58492efb63" DEPENDS = "libevdev udev mtdev" SRC_URI = "http://www.freedesktop.org/software/${BPN}/${BP}.tar.xz" -SRC_URI[md5sum] = "da29a704dc6f7ea2d5aac754db046340" -SRC_URI[sha256sum] = "e333a3242835c019ca37d2cef8b51a87d3138eb47444119c0153dc7a8656ee70" +SRC_URI[md5sum] = "d052faa64eb6d2e649e582cc0fcf6e32" +SRC_URI[sha256sum] = "0feb3a0589709cc1032893bfaf4c49150d5360bd9782bec888f9e4dd9044c5b7" UPSTREAM_CHECK_REGEX = "libinput-(?P<pver>\d+\.\d+\.(?!9\d+)\d+)" diff --git a/poky/meta/recipes-graphics/wayland/wayland/0001-scanner-Add-configure-check-for-strndup.patch b/poky/meta/recipes-graphics/wayland/wayland/0001-scanner-Add-configure-check-for-strndup.patch new file mode 100644 index 000000000..c4435875a --- /dev/null +++ b/poky/meta/recipes-graphics/wayland/wayland/0001-scanner-Add-configure-check-for-strndup.patch @@ -0,0 +1,50 @@ +From 3c8b4467a1ca229e72fb5223787ed400a19c65c0 Mon Sep 17 00:00:00 2001 +From: Joshua Watt <JPEWhacker@gmail.com> +Date: Fri, 25 Oct 2019 21:03:23 -0500 +Subject: [PATCH] scanner: Add configure check for strndup + +Some platforms may not have strndup() (e.g. MinGW), so provide a +equivalent implementation if it's not found. + +Upstream-Status: Accepted [4a1f348c20157db7bd7c759fdeb23fbe8729c571] +Signed-off-by: Joshua Watt <JPEWhacker@gmail.com> +--- + configure.ac | 2 +- + src/scanner.c | 11 +++++++++++ + 2 files changed, 12 insertions(+), 1 deletion(-) + +diff --git a/configure.ac b/configure.ac +index 8d56f2b..1c99e21 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -63,7 +63,7 @@ fi + AC_SUBST(GCC_CFLAGS) + + AC_CHECK_HEADERS([sys/prctl.h]) +-AC_CHECK_FUNCS([accept4 mkostemp posix_fallocate prctl]) ++AC_CHECK_FUNCS([accept4 mkostemp posix_fallocate prctl strndup]) + + AC_ARG_ENABLE([libraries], + [AC_HELP_STRING([--disable-libraries], +diff --git a/src/scanner.c b/src/scanner.c +index a94be5d..27004bc 100644 +--- a/src/scanner.c ++++ b/src/scanner.c +@@ -916,6 +916,17 @@ verify_arguments(struct parse_context *ctx, + + } + ++#ifndef HAVE_STRNDUP ++char * ++strndup(const char *s, size_t size) ++{ ++ char *r = malloc(size + 1); ++ strncpy(r, s, size); ++ r[size] = '\0'; ++ return r; ++} ++#endif ++ + static void + end_element(void *data, const XML_Char *name) + { diff --git a/poky/meta/recipes-graphics/wayland/wayland/0002-Move-wl_priv_signal-to-wayland-server-private.h.patch b/poky/meta/recipes-graphics/wayland/wayland/0002-Move-wl_priv_signal-to-wayland-server-private.h.patch new file mode 100644 index 000000000..b05b875ab --- /dev/null +++ b/poky/meta/recipes-graphics/wayland/wayland/0002-Move-wl_priv_signal-to-wayland-server-private.h.patch @@ -0,0 +1,166 @@ +From e746f3bf7c8bb2f5dcf9e93edffc23b56eff12d0 Mon Sep 17 00:00:00 2001 +From: Joshua Watt <JPEWhacker@gmail.com> +Date: Tue, 5 Nov 2019 09:09:50 -0600 +Subject: [PATCH] Move wl_priv_signal to wayland-server-private.h + +Including wayland-server-core.h in wayland-private.h is problematic +because wayland-private.h is included by wayland-scanner which should be +able to build against non-POSIX platforms (e.g. MinGW). The only reason +that wayland-server-core.h was included in wayland-private.h was for the +wl_private_signal definitions, so move those to a +wayland-server-private.h file that can be included by both +wayland-server.c and the tests. + +Upstream-Status: Accepted [e7d88f35eb89cf0cc77cbddd834cacc63683a9cc] +Signed-off-by: Joshua Watt <JPEWhacker@gmail.com> +--- + Makefile.am | 3 +- + src/wayland-private.h | 22 +-------------- + src/wayland-server-private.h | 53 ++++++++++++++++++++++++++++++++++++ + src/wayland-server.c | 1 + + tests/newsignal-test.c | 2 +- + 5 files changed, 58 insertions(+), 23 deletions(-) + create mode 100644 src/wayland-server-private.h + +diff --git a/Makefile.am b/Makefile.am +index f47d055..026d981 100644 +--- a/Makefile.am ++++ b/Makefile.am +@@ -56,7 +56,8 @@ libwayland_private_la_SOURCES = \ + src/connection.c \ + src/wayland-os.c \ + src/wayland-os.h \ +- src/wayland-private.h ++ src/wayland-private.h \ ++ src/wayland-server-private.h + + include_HEADERS = \ + src/wayland-util.h \ +diff --git a/src/wayland-private.h b/src/wayland-private.h +index 29516ec..dc7d12f 100644 +--- a/src/wayland-private.h ++++ b/src/wayland-private.h +@@ -31,11 +31,11 @@ + #include <stdarg.h> + #include <stdlib.h> + #include <stdint.h> ++#include <stdbool.h> + + #define WL_HIDE_DEPRECATED 1 + + #include "wayland-util.h" +-#include "wayland-server-core.h" + + /* Invalid memory address */ + #define WL_ARRAY_POISON_PTR (void *) 4 +@@ -236,26 +236,6 @@ zalloc(size_t s) + return calloc(1, s); + } + +-struct wl_priv_signal { +- struct wl_list listener_list; +- struct wl_list emit_list; +-}; +- +-void +-wl_priv_signal_init(struct wl_priv_signal *signal); +- +-void +-wl_priv_signal_add(struct wl_priv_signal *signal, struct wl_listener *listener); +- +-struct wl_listener * +-wl_priv_signal_get(struct wl_priv_signal *signal, wl_notify_func_t notify); +- +-void +-wl_priv_signal_emit(struct wl_priv_signal *signal, void *data); +- +-void +-wl_priv_signal_final_emit(struct wl_priv_signal *signal, void *data); +- + void + wl_connection_close_fds_in(struct wl_connection *connection, int max); + +diff --git a/src/wayland-server-private.h b/src/wayland-server-private.h +new file mode 100644 +index 0000000..23fa458 +--- /dev/null ++++ b/src/wayland-server-private.h +@@ -0,0 +1,53 @@ ++/* ++ * Copyright © 2008-2011 Kristian Høgsberg ++ * Copyright © 2011 Intel Corporation ++ * Copyright © 2013 Jason Ekstrand ++ * ++ * Permission is hereby granted, free of charge, to any person obtaining ++ * a copy of this software and associated documentation files (the ++ * "Software"), to deal in the Software without restriction, including ++ * without limitation the rights to use, copy, modify, merge, publish, ++ * distribute, sublicense, and/or sell copies of the Software, and to ++ * permit persons to whom the Software is furnished to do so, subject to ++ * the following conditions: ++ * ++ * The above copyright notice and this permission notice (including the ++ * next paragraph) shall be included in all copies or substantial ++ * portions of the Software. ++ * ++ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, ++ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF ++ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND ++ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS ++ * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ++ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN ++ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE ++ * SOFTWARE. ++ */ ++ ++#ifndef WAYLAND_SERVER_PRIVATE_H ++#define WAYLAND_SERVER_PRIVATE_H ++ ++#include "wayland-server-core.h" ++ ++struct wl_priv_signal { ++ struct wl_list listener_list; ++ struct wl_list emit_list; ++}; ++ ++void ++wl_priv_signal_init(struct wl_priv_signal *signal); ++ ++void ++wl_priv_signal_add(struct wl_priv_signal *signal, struct wl_listener *listener); ++ ++struct wl_listener * ++wl_priv_signal_get(struct wl_priv_signal *signal, wl_notify_func_t notify); ++ ++void ++wl_priv_signal_emit(struct wl_priv_signal *signal, void *data); ++ ++void ++wl_priv_signal_final_emit(struct wl_priv_signal *signal, void *data); ++ ++#endif +diff --git a/src/wayland-server.c b/src/wayland-server.c +index 19f6a76..d6f0206 100644 +--- a/src/wayland-server.c ++++ b/src/wayland-server.c +@@ -45,6 +45,7 @@ + + #include "wayland-util.h" + #include "wayland-private.h" ++#include "wayland-server-private.h" + #include "wayland-server.h" + #include "wayland-os.h" + +diff --git a/tests/newsignal-test.c b/tests/newsignal-test.c +index 47c429b..f3a7bd9 100644 +--- a/tests/newsignal-test.c ++++ b/tests/newsignal-test.c +@@ -26,7 +26,7 @@ + #include <assert.h> + + #include "test-runner.h" +-#include "wayland-private.h" ++#include "wayland-server-private.h" + + static void + signal_notify(struct wl_listener *listener, void *data) diff --git a/poky/meta/recipes-graphics/wayland/wayland_1.17.0.bb b/poky/meta/recipes-graphics/wayland/wayland_1.17.0.bb index d34bb3974..2b5a8f945 100644 --- a/poky/meta/recipes-graphics/wayland/wayland_1.17.0.bb +++ b/poky/meta/recipes-graphics/wayland/wayland_1.17.0.bb @@ -14,6 +14,8 @@ DEPENDS = "expat libxml2 libffi wayland-native" SRC_URI = "https://wayland.freedesktop.org/releases/${BPN}-${PV}.tar.xz \ file://fixpathinpcfiles.patch \ + file://0001-scanner-Add-configure-check-for-strndup.patch \ + file://0002-Move-wl_priv_signal-to-wayland-server-private.h.patch \ " SRC_URI[md5sum] = "d91f970aea11fd549eae023d06f91af3" SRC_URI[sha256sum] = "72aa11b8ac6e22f4777302c9251e8fec7655dc22f9d94ee676c6b276f95f91a4" diff --git a/poky/meta/recipes-graphics/wayland/weston-init.bb b/poky/meta/recipes-graphics/wayland/weston-init.bb index 8b6689717..e3e739e2b 100644 --- a/poky/meta/recipes-graphics/wayland/weston-init.bb +++ b/poky/meta/recipes-graphics/wayland/weston-init.bb @@ -30,7 +30,7 @@ do_install() { sed -i 's,@LOCALSTATEDIR@,${localstatedir},g' ${D}${bindir}/weston-start } -inherit update-rc.d distro_features_check systemd +inherit update-rc.d features_check systemd # rdepends on weston which depends on virtual/egl REQUIRED_DISTRO_FEATURES = "opengl" diff --git a/poky/meta/recipes-graphics/wayland/weston_7.0.0.bb b/poky/meta/recipes-graphics/wayland/weston_7.0.0.bb index d21275414..e6548d354 100644 --- a/poky/meta/recipes-graphics/wayland/weston_7.0.0.bb +++ b/poky/meta/recipes-graphics/wayland/weston_7.0.0.bb @@ -16,7 +16,7 @@ SRC_URI[sha256sum] = "a00a6d207b6a45f95f4401c604772a307c3767e5e2beecf3d879110c43 UPSTREAM_CHECK_URI = "https://wayland.freedesktop.org/releases.html" -inherit meson pkgconfig useradd distro_features_check +inherit meson pkgconfig useradd features_check # depends on virtual/egl REQUIRED_DISTRO_FEATURES = "opengl" diff --git a/poky/meta/recipes-graphics/x11-common/xserver-nodm-init_3.0.bb b/poky/meta/recipes-graphics/x11-common/xserver-nodm-init_3.0.bb index a77c56445..385fea5e8 100644 --- a/poky/meta/recipes-graphics/x11-common/xserver-nodm-init_3.0.bb +++ b/poky/meta/recipes-graphics/x11-common/xserver-nodm-init_3.0.bb @@ -17,7 +17,7 @@ S = "${WORKDIR}" # Since we refer to ROOTLESS_X which is normally enabled per-machine PACKAGE_ARCH = "${MACHINE_ARCH}" -inherit update-rc.d systemd distro_features_check +inherit update-rc.d systemd features_check REQUIRED_DISTRO_FEATURES = "x11" diff --git a/poky/meta/recipes-graphics/xinput-calibrator/xinput-calibrator_git.bb b/poky/meta/recipes-graphics/xinput-calibrator/xinput-calibrator_git.bb index 9873d3f33..4f831932e 100644 --- a/poky/meta/recipes-graphics/xinput-calibrator/xinput-calibrator_git.bb +++ b/poky/meta/recipes-graphics/xinput-calibrator/xinput-calibrator_git.bb @@ -7,7 +7,7 @@ DEPENDS = "virtual/libx11 libxi libxrandr" PV = "0.7.5+git${SRCPV}" PR = "r6" -inherit autotools pkgconfig distro_features_check +inherit autotools pkgconfig features_check # depends on virtual/libx11 REQUIRED_DISTRO_FEATURES = "x11" diff --git a/poky/meta/recipes-graphics/xorg-app/xorg-app-common.inc b/poky/meta/recipes-graphics/xorg-app/xorg-app-common.inc index 3529cb26e..101b3dfff 100644 --- a/poky/meta/recipes-graphics/xorg-app/xorg-app-common.inc +++ b/poky/meta/recipes-graphics/xorg-app/xorg-app-common.inc @@ -12,6 +12,6 @@ INC_PR = "r8" SRC_URI = "${XORG_MIRROR}/individual/app/${BPN}-${PV}.tar.bz2" -inherit autotools pkgconfig distro_features_check +inherit autotools pkgconfig features_check FILES_${PN} += " ${libdir}/X11/${BPN} ${datadir}/X11/app-defaults/" diff --git a/poky/meta/recipes-graphics/xorg-driver/xorg-driver-common.inc b/poky/meta/recipes-graphics/xorg-driver/xorg-driver-common.inc index e657c65b4..54f04b11e 100644 --- a/poky/meta/recipes-graphics/xorg-driver/xorg-driver-common.inc +++ b/poky/meta/recipes-graphics/xorg-driver/xorg-driver-common.inc @@ -13,7 +13,7 @@ SRC_URI = "${XORG_MIRROR}/individual/driver/${BPN}-${PV}.tar.bz2" FILES_${PN} += " ${libdir}/xorg/modules/drivers/*.so" -inherit autotools pkgconfig distro_features_check +inherit autotools pkgconfig features_check # depends on virtual/xserver REQUIRED_DISTRO_FEATURES = "x11" diff --git a/poky/meta/recipes-graphics/xorg-font/xorg-font-common.inc b/poky/meta/recipes-graphics/xorg-font/xorg-font-common.inc index cdbebcf78..f18c8aefc 100644 --- a/poky/meta/recipes-graphics/xorg-font/xorg-font-common.inc +++ b/poky/meta/recipes-graphics/xorg-font/xorg-font-common.inc @@ -14,7 +14,7 @@ INC_PR = "r2" SRC_URI = "${XORG_MIRROR}/individual/font/${XORG_PN}-${PV}.tar.bz2" S = "${WORKDIR}/${XORG_PN}-${PV}" -inherit autotools pkgconfig distro_features_check +inherit autotools pkgconfig features_check # The mkfontscale-native requires x11 in DISTRO_FEATURES REQUIRED_DISTRO_FEATURES = "x11" diff --git a/poky/meta/recipes-graphics/xorg-font/xorg-minimal-fonts.bb b/poky/meta/recipes-graphics/xorg-font/xorg-minimal-fonts.bb index 9bcd1b2fa..1ea08a6c9 100644 --- a/poky/meta/recipes-graphics/xorg-font/xorg-minimal-fonts.bb +++ b/poky/meta/recipes-graphics/xorg-font/xorg-minimal-fonts.bb @@ -13,7 +13,7 @@ SRC_URI = "file://misc" PE = "1" PR = "r2" -inherit allarch distro_features_check +inherit allarch features_check # The font-alias requires x11 in DISTRO_FEATURES REQUIRED_DISTRO_FEATURES = "x11" diff --git a/poky/meta/recipes-graphics/xorg-lib/libx11/no-host-libtool.patch b/poky/meta/recipes-graphics/xorg-lib/libx11/no-host-libtool.patch deleted file mode 100644 index 56d9983b1..000000000 --- a/poky/meta/recipes-graphics/xorg-lib/libx11/no-host-libtool.patch +++ /dev/null @@ -1,45 +0,0 @@ -Upstream-Status: Backport [https://gitlab.freedesktop.org/xorg/lib/libx11/merge_requests/22] -Signed-off-by: Ross Burton <ross.burton@intel.com> - -From edc7680ed5a03cedb5facf14693823455e12c29c Mon Sep 17 00:00:00 2001 -From: Ross Burton <ross.burton@intel.com> -Date: Tue, 6 Aug 2019 14:53:43 +0100 -Subject: [PATCH libX11] src/util/Makefile: explicitly reset LINK to not use - libtool - -Simply looking at libtool redefines LINK globally to use libtool, which when -you're trying to cross-compile to Windows can cause complications. - -As in src/util/ we're simply building a small binary for the build host, reset -LINK to the automake default so that the traditional compile/link steps occur -without libtool. - -Also remove -all-static from LDFLAGS as that is a libtool-specific argument -intended to solve this problem. - -Closes: #100 -Signed-off-by: Ross Burton <ross.burton@intel.com> ---- - src/util/Makefile.am | 3 ++- - 1 file changed, 2 insertions(+), 1 deletion(-) - -diff --git a/src/util/Makefile.am b/src/util/Makefile.am -index 37314370..b7236530 100644 ---- a/src/util/Makefile.am -+++ b/src/util/Makefile.am -@@ -7,10 +7,11 @@ AM_CFLAGS = \ - AM_CPPFLAGS = \ - -I$(top_srcdir)/include - -+LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ - CC = @CC_FOR_BUILD@ - CPPFLAGS = @CPPFLAGS_FOR_BUILD@ - CFLAGS = @CFLAGS_FOR_BUILD@ --LDFLAGS = @LDFLAGS_FOR_BUILD@ -all-static -+LDFLAGS = @LDFLAGS_FOR_BUILD@ - LIBS = - EXEEXT = @EXEEXT_FOR_BUILD@ - --- -2.20.1 - diff --git a/poky/meta/recipes-graphics/xorg-lib/libx11/no-host-x.patch b/poky/meta/recipes-graphics/xorg-lib/libx11/no-host-x.patch deleted file mode 100644 index 803f8b408..000000000 --- a/poky/meta/recipes-graphics/xorg-lib/libx11/no-host-x.patch +++ /dev/null @@ -1,40 +0,0 @@ -Upstream-Status: Backport -Signed-off-by: Ross Burton <ross.burton@intel.com> - -From cf2ef27831173c5ed6f98be3c39caff18fd4e7f1 Mon Sep 17 00:00:00 2001 -From: Adam Jackson <ajax@redhat.com> -Date: Mon, 17 Jun 2019 13:36:08 -0400 -Subject: [PATCH 1/2] makekeys: Detach ourselves from X headers entirely - -Subsequent to a121b7b0c210efe10bf93453b29050282324c906 we are no longer -building makekeys with enough -I/foo/bar to find the X11 headers, so if -they're not in a system include path, things fail. Since this utility is -only needed at build time, there's no real reason to demand the X -headers be installed for both the build and target machines if cross- -compiling, we can just assume a vaguely ANSI environment instead. - -Tested-by: Niclas Zeising <zeising@daemonic.se> -Reviewed-by: Keith Packard <keithp@keithp.com> -Reviewed-by: Matt Turner <mattst88@gmail.com> ---- - src/util/makekeys.c | 4 +++- - 1 file changed, 3 insertions(+), 1 deletion(-) - -diff --git a/src/util/makekeys.c b/src/util/makekeys.c -index bcb5b7d5..07563315 100644 ---- a/src/util/makekeys.c -+++ b/src/util/makekeys.c -@@ -35,8 +35,10 @@ from The Open Group. - #include <stdio.h> - #include <stdlib.h> - #include <string.h> -+#include <stdint.h> -+#include <inttypes.h> - --#include "../Xresinternal.h" -+typedef uint32_t Signature; - - #define KTNUM 4000 - --- -2.20.1 diff --git a/poky/meta/recipes-graphics/xorg-lib/libx11_1.6.8.bb b/poky/meta/recipes-graphics/xorg-lib/libx11_1.6.8.bb deleted file mode 100644 index 0d27bc2bc..000000000 --- a/poky/meta/recipes-graphics/xorg-lib/libx11_1.6.8.bb +++ /dev/null @@ -1,7 +0,0 @@ -require libx11.inc - -SRC_URI += "file://disable_tests.patch" - -inherit gettext - -BBCLASSEXTEND = "native nativesdk" diff --git a/poky/meta/recipes-graphics/xorg-lib/libx11.inc b/poky/meta/recipes-graphics/xorg-lib/libx11_1.6.9.bb index cce0cb992..8c2a57c67 100644 --- a/poky/meta/recipes-graphics/xorg-lib/libx11.inc +++ b/poky/meta/recipes-graphics/xorg-lib/libx11_1.6.9.bb @@ -11,11 +11,10 @@ FILESEXTRAPATHS =. "${FILE_DIRNAME}/libx11:" PE = "1" SRC_URI += "file://Fix-hanging-issue-in-_XReply.patch \ - file://no-host-libtool.patch \ - file://no-host-x.patch" + file://disable_tests.patch" -SRC_URI[md5sum] = "c5fa5a86a20e3591bed6c046498d4b8f" -SRC_URI[sha256sum] = "b289a845c189e251e0e884cc0f9269bbe97c238df3741e854ec4c17c21e473d5" +SRC_URI[md5sum] = "55adbfb6d4370ecac5e70598c4e7eed2" +SRC_URI[sha256sum] = "9cc7e8d000d6193fa5af580d50d689380b8287052270f5bb26a5fb6b58b2bed1" PROVIDES = "virtual/libx11" @@ -37,6 +36,10 @@ CPPFLAGS_FOR_BUILD += "-D_GNU_SOURCE" PACKAGES =+ "${PN}-xcb" +inherit gettext + FILES_${PN} += "${datadir}/X11/XKeysymDB ${datadir}/X11/XErrorDB ${datadir}/X11/Xcms.txt" FILES_${PN}-xcb += "${libdir}/libX11-xcb.so.*" FILES_${PN}-locale += "${datadir}/X11/locale ${libdir}/X11/locale" + +BBCLASSEXTEND = "native nativesdk" diff --git a/poky/meta/recipes-graphics/xorg-lib/libxcb_1.13.1.bb b/poky/meta/recipes-graphics/xorg-lib/libxcb_1.13.1.bb index b0afc01df..9befc51b5 100644 --- a/poky/meta/recipes-graphics/xorg-lib/libxcb_1.13.1.bb +++ b/poky/meta/recipes-graphics/xorg-lib/libxcb_1.13.1.bb @@ -25,7 +25,7 @@ PACKAGES_DYNAMIC = "^libxcb-.*" FILES_${PN} = "${libdir}/libxcb.so.*" -inherit autotools pkgconfig distro_features_check +inherit autotools pkgconfig features_check # The libxau and others requires x11 in DISTRO_FEATURES REQUIRED_DISTRO_FEATURES = "x11" diff --git a/poky/meta/recipes-graphics/xorg-lib/libxvmc_1.0.11.bb b/poky/meta/recipes-graphics/xorg-lib/libxvmc_1.0.12.bb index d95f809ed..29ed0c43d 100644 --- a/poky/meta/recipes-graphics/xorg-lib/libxvmc_1.0.11.bb +++ b/poky/meta/recipes-graphics/xorg-lib/libxvmc_1.0.12.bb @@ -15,5 +15,5 @@ PE = "1" XORG_PN = "libXvMC" -SRC_URI[md5sum] = "707175185a2e0490b8173686c657324f" -SRC_URI[sha256sum] = "4a2e34d444a683a7c010b01b23cefe2b8043a063ce4dc6a9b855836b5262622d" +SRC_URI[md5sum] = "3569ff7f3e26864d986d6a21147eaa58" +SRC_URI[sha256sum] = "6b3da7977b3f7eaf4f0ac6470ab1e562298d82c4e79077765787963ab7966dcd" diff --git a/poky/meta/recipes-graphics/xorg-lib/xcb-util.inc b/poky/meta/recipes-graphics/xorg-lib/xcb-util.inc index 99d04f9d4..0e5ab70b2 100644 --- a/poky/meta/recipes-graphics/xorg-lib/xcb-util.inc +++ b/poky/meta/recipes-graphics/xorg-lib/xcb-util.inc @@ -18,6 +18,6 @@ DEPENDS += "gperf-native" SRC_URI = "http://xcb.freedesktop.org/dist/${BPN}-${PV}.tar.bz2" -inherit autotools pkgconfig distro_features_check +inherit autotools pkgconfig features_check REQUIRED_DISTRO_FEATURES = "x11" diff --git a/poky/meta/recipes-graphics/xorg-lib/xorg-lib-common.inc b/poky/meta/recipes-graphics/xorg-lib/xorg-lib-common.inc index 09df0109c..a566eaa45 100644 --- a/poky/meta/recipes-graphics/xorg-lib/xorg-lib-common.inc +++ b/poky/meta/recipes-graphics/xorg-lib/xorg-lib-common.inc @@ -11,7 +11,7 @@ SRC_URI = "${XORG_MIRROR}/individual/lib/${XORG_PN}-${PV}.tar.bz2" S = "${WORKDIR}/${XORG_PN}-${PV}" -inherit autotools distro_features_check pkgconfig +inherit autotools features_check pkgconfig EXTRA_OECONF = "--disable-specs --without-groff --without-ps2pdf --without-fop" diff --git a/poky/meta/recipes-graphics/xorg-proto/xorgproto_2019.1.bb b/poky/meta/recipes-graphics/xorg-proto/xorgproto_2019.2.bb index 2c7ce2a56..8acbe895a 100644 --- a/poky/meta/recipes-graphics/xorg-proto/xorgproto_2019.1.bb +++ b/poky/meta/recipes-graphics/xorg-proto/xorgproto_2019.2.bb @@ -1,6 +1,6 @@ require xorg-proto-common.inc -SUMMARY = "XCalibrate: Touchscreen calibration headers" +SUMMARY = "X Window System unified protocol definitions" DESCRIPTION = "This package provides the headers and specification documents defining \ the core protocol and (many) extensions for the X Window System" @@ -8,7 +8,7 @@ the core protocol and (many) extensions for the X Window System" LICENSE = "MIT-style" LIC_FILES_CHKSUM = "file://COPYING-x11proto;md5=b9e051107d5628966739a0b2e9b32676" -SRC_URI[md5sum] = "802ccb9e977ba3cf94ba798ddb2898a4" -SRC_URI[sha256sum] = "a6daaa7a6cbc8e374032d83ff7f47d41be98f1e0f4475d66a4da3aa766a0d49b" +SRC_URI[md5sum] = "a02dcaff48b4141b949ac99dfc344d86" +SRC_URI[sha256sum] = "46ecd0156c561d41e8aa87ce79340910cdf38373b759e737fcbba5df508e7b8e" BBCLASSEXTEND = "native nativesdk" diff --git a/poky/meta/recipes-graphics/xorg-xserver/xserver-xorg.inc b/poky/meta/recipes-graphics/xorg-xserver/xserver-xorg.inc index 44315f59d..a0ae65c78 100644 --- a/poky/meta/recipes-graphics/xorg-xserver/xserver-xorg.inc +++ b/poky/meta/recipes-graphics/xorg-xserver/xserver-xorg.inc @@ -24,7 +24,7 @@ S = "${WORKDIR}/${XORG_PN}-${PV}" inherit autotools pkgconfig -inherit distro_features_check +inherit features_check REQUIRED_DISTRO_FEATURES = "x11" LIB_DEPS = "pixman libxfont2 xtrans libxau libxext libxdmcp libdrm libxkbfile libpciaccess" diff --git a/poky/meta/recipes-graphics/xrestop/xrestop_0.4.bb b/poky/meta/recipes-graphics/xrestop/xrestop_0.4.bb index ce5df0393..c7b8716f6 100644 --- a/poky/meta/recipes-graphics/xrestop/xrestop_0.4.bb +++ b/poky/meta/recipes-graphics/xrestop/xrestop_0.4.bb @@ -19,6 +19,6 @@ SRC_URI = "http://downloads.yoctoproject.org/releases/xrestop/xrestop-${PV}.tar. SRC_URI[md5sum] = "d8a54596cbaf037e62b80c4585a3ca9b" SRC_URI[sha256sum] = "67c2fc94a7ecedbaae0d1837e82e93d1d98f4a6d759828860e552119af3ce257" -inherit autotools pkgconfig distro_features_check +inherit autotools pkgconfig features_check # depends on virtual/libx11 REQUIRED_DISTRO_FEATURES = "x11" diff --git a/poky/meta/recipes-kernel/linux-firmware/linux-firmware_20190815.bb b/poky/meta/recipes-kernel/linux-firmware/linux-firmware_20190815.bb index 518638806..d83000b64 100644 --- a/poky/meta/recipes-kernel/linux-firmware/linux-firmware_20190815.bb +++ b/poky/meta/recipes-kernel/linux-firmware/linux-firmware_20190815.bb @@ -273,6 +273,7 @@ PACKAGES =+ "${PN}-ralink-license ${PN}-ralink \ ${PN}-bcm4358 \ ${PN}-bcm43602 \ ${PN}-bcm4366b \ + ${PN}-bcm4366c \ ${PN}-bcm4371 \ ${PN}-bcm4373 \ ${PN}-bcm43xx \ @@ -571,7 +572,7 @@ FILES_${PN}-bcm43xx-hdr = "${nonarch_base_libdir}/firmware/brcm/bcm43xx_hdr-0.fw FILES_${PN}-bcm4329-fullmac = "${nonarch_base_libdir}/firmware/brcm/bcm4329-fullmac-4.bin" FILES_${PN}-bcm43236b = "${nonarch_base_libdir}/firmware/brcm/brcmfmac43236b.bin" FILES_${PN}-bcm4329 = "${nonarch_base_libdir}/firmware/brcm/brcmfmac4329-sdio.bin" -FILES_${PN}-bcm4330 = "${nonarch_base_libdir}/firmware/brcm/brcmfmac4330-sdio.bin" +FILES_${PN}-bcm4330 = "${nonarch_base_libdir}/firmware/brcm/brcmfmac4330-sdio.*" FILES_${PN}-bcm4334 = "${nonarch_base_libdir}/firmware/brcm/brcmfmac4334-sdio.bin" FILES_${PN}-bcm4335 = "${nonarch_base_libdir}/firmware/brcm/brcmfmac4335-sdio.bin" FILES_${PN}-bcm4339 = "${nonarch_base_libdir}/firmware/brcm/brcmfmac4339-sdio.bin" @@ -582,8 +583,8 @@ FILES_${PN}-bcm43242a = "${nonarch_base_libdir}/firmware/brcm/brcmfmac43242a.bin FILES_${PN}-bcm43143 = "${nonarch_base_libdir}/firmware/brcm/brcmfmac43143.bin \ ${nonarch_base_libdir}/firmware/brcm/brcmfmac43143-sdio.bin \ " -FILES_${PN}-bcm43430a0 = "${nonarch_base_libdir}/firmware/brcm/brcmfmac43430a0-sdio.bin" -FILES_${PN}-bcm43455 = "${nonarch_base_libdir}/firmware/brcm/brcmfmac43455-sdio.bin" +FILES_${PN}-bcm43430a0 = "${nonarch_base_libdir}/firmware/brcm/brcmfmac43430a0-sdio.*" +FILES_${PN}-bcm43455 = "${nonarch_base_libdir}/firmware/brcm/brcmfmac43455-sdio.*" FILES_${PN}-bcm4350c2 = "${nonarch_base_libdir}/firmware/brcm/brcmfmac4350c2-pcie.bin" FILES_${PN}-bcm4350 = "${nonarch_base_libdir}/firmware/brcm/brcmfmac4350-pcie.bin" FILES_${PN}-bcm4356 = "${nonarch_base_libdir}/firmware/brcm/brcmfmac4356-sdio.bin" @@ -594,6 +595,7 @@ FILES_${PN}-bcm43602 = "${nonarch_base_libdir}/firmware/brcm/brcmfmac43602-pcie. ${nonarch_base_libdir}/firmware/brcm/brcmfmac43602-pcie.ap.bin \ " FILES_${PN}-bcm4366b = "${nonarch_base_libdir}/firmware/brcm/brcmfmac4366b-pcie.bin" +FILES_${PN}-bcm4366c = "${nonarch_base_libdir}/firmware/brcm/brcmfmac4366c-pcie.bin" FILES_${PN}-bcm4371 = "${nonarch_base_libdir}/firmware/brcm/brcmfmac4371-pcie.bin" # for i in `grep brcm WHENCE | grep ^File | sed 's/File: brcm.//g'`; do pkg=`echo $i | sed 's/-[sp40].*//g; s/\.bin//g; s/brcmfmac/bcm/g; s/_hdr/-hdr/g; s/BCM/bcm-0bb4-0306/g'`; echo -e "LICENSE_\${PN}-$pkg = \"Firmware-broadcom_bcm43xx\"\nRDEPENDS_\${PN}-$pkg += \"\${PN}-broadcom-license\""; done @@ -647,6 +649,8 @@ LICENSE_${PN}-bcm43602 = "Firmware-broadcom_bcm43xx" RDEPENDS_${PN}-bcm43602 += "${PN}-broadcom-license" LICENSE_${PN}-bcm4366b = "Firmware-broadcom_bcm43xx" RDEPENDS_${PN}-bcm4366b += "${PN}-broadcom-license" +LICENSE_${PN}-bcm4366c = "Firmware-broadcom_bcm43xx" +RDEPENDS_${PN}-bcm4366c += "${PN}-broadcom-license" LICENSE_${PN}-bcm4371 = "Firmware-broadcom_bcm43xx" RDEPENDS_${PN}-bcm4371 += "${PN}-broadcom-license" @@ -656,11 +660,11 @@ LICENSE_${PN}-cypress-license = "Firmware-cypress" FILES_${PN}-cypress-license = "${nonarch_base_libdir}/firmware/LICENCE.cypress" FILES_${PN}-bcm-0bb4-0306 = "${nonarch_base_libdir}/firmware/brcm/BCM-0bb4-0306.hcd" -FILES_${PN}-bcm43340 = "${nonarch_base_libdir}/firmware/brcm/brcmfmac43340-sdio.bin" -FILES_${PN}-bcm43362 = "${nonarch_base_libdir}/firmware/brcm/brcmfmac43362-sdio.bin" -FILES_${PN}-bcm43430 = "${nonarch_base_libdir}/firmware/brcm/brcmfmac43430-sdio.bin" +FILES_${PN}-bcm43340 = "${nonarch_base_libdir}/firmware/brcm/brcmfmac43340-sdio.*" +FILES_${PN}-bcm43362 = "${nonarch_base_libdir}/firmware/brcm/brcmfmac43362-sdio.*" +FILES_${PN}-bcm43430 = "${nonarch_base_libdir}/firmware/brcm/brcmfmac43430-sdio.*" FILES_${PN}-bcm4354 = "${nonarch_base_libdir}/firmware/brcm/brcmfmac4354-sdio.bin" -FILES_${PN}-bcm4356-pcie = "${nonarch_base_libdir}/firmware/brcm/brcmfmac4356-pcie.bin" +FILES_${PN}-bcm4356-pcie = "${nonarch_base_libdir}/firmware/brcm/brcmfmac4356-pcie.*" FILES_${PN}-bcm4373 = "${nonarch_base_libdir}/firmware/brcm/brcmfmac4373-sdio.bin \ ${nonarch_base_libdir}/firmware/brcm/brcmfmac4373.bin \ " diff --git a/poky/meta/recipes-kernel/linux/linux-yocto-rt_4.19.bb b/poky/meta/recipes-kernel/linux/linux-yocto-rt_4.19.bb index 1edcd7eda..32edb6026 100644 --- a/poky/meta/recipes-kernel/linux/linux-yocto-rt_4.19.bb +++ b/poky/meta/recipes-kernel/linux/linux-yocto-rt_4.19.bb @@ -11,13 +11,13 @@ python () { raise bb.parse.SkipRecipe("Set PREFERRED_PROVIDER_virtual/kernel to linux-yocto-rt to enable it") } -SRCREV_machine ?= "02f0c38dd20819c0e9d279e3b1e95280101ea8ab" -SRCREV_meta ?= "a7cb57afb9fb9787079c28a1028d797632105e56" +SRCREV_machine ?= "0e4a79e608e92830693e511a3dd282ce7c3b3f41" +SRCREV_meta ?= "ad6f8b357720ca8167a090713b7746230cf4b314" SRC_URI = "git://git.yoctoproject.org/linux-yocto.git;branch=${KBRANCH};name=machine \ git://git.yoctoproject.org/yocto-kernel-cache;type=kmeta;name=meta;branch=yocto-4.19;destsuffix=${KMETA}" -LINUX_VERSION ?= "4.19.72" +LINUX_VERSION ?= "4.19.78" LIC_FILES_CHKSUM = "file://COPYING;md5=bbea815ee2795b2f4230826c0c6b8814" diff --git a/poky/meta/recipes-kernel/linux/linux-yocto-rt_5.2.bb b/poky/meta/recipes-kernel/linux/linux-yocto-rt_5.2.bb index e3fe54441..423331e19 100644 --- a/poky/meta/recipes-kernel/linux/linux-yocto-rt_5.2.bb +++ b/poky/meta/recipes-kernel/linux/linux-yocto-rt_5.2.bb @@ -11,13 +11,13 @@ python () { raise bb.parse.SkipRecipe("Set PREFERRED_PROVIDER_virtual/kernel to linux-yocto-rt to enable it") } -SRCREV_machine ?= "0a9f6ee2443b54c614107728ca76485916010023" -SRCREV_meta ?= "b867b78b5019ae455af97dec7794cff7527d7624" +SRCREV_machine ?= "55e3ee387b073d8d609e8899859561340d8b6911" +SRCREV_meta ?= "bd0762cd138f1624b5a5f8669cfa3ac2b71cb87b" SRC_URI = "git://git.yoctoproject.org/linux-yocto.git;branch=${KBRANCH};name=machine \ git://git.yoctoproject.org/yocto-kernel-cache;type=kmeta;name=meta;branch=yocto-5.2;destsuffix=${KMETA}" -LINUX_VERSION ?= "5.2.17" +LINUX_VERSION ?= "5.2.20" LIC_FILES_CHKSUM = "file://COPYING;md5=bbea815ee2795b2f4230826c0c6b8814" diff --git a/poky/meta/recipes-kernel/linux/linux-yocto-tiny_4.19.bb b/poky/meta/recipes-kernel/linux/linux-yocto-tiny_4.19.bb index 446bce3a8..0682aef50 100644 --- a/poky/meta/recipes-kernel/linux/linux-yocto-tiny_4.19.bb +++ b/poky/meta/recipes-kernel/linux/linux-yocto-tiny_4.19.bb @@ -6,7 +6,7 @@ KCONFIG_MODE = "--allnoconfig" require recipes-kernel/linux/linux-yocto.inc -LINUX_VERSION ?= "4.19.72" +LINUX_VERSION ?= "4.19.78" LIC_FILES_CHKSUM = "file://COPYING;md5=bbea815ee2795b2f4230826c0c6b8814" DEPENDS += "${@bb.utils.contains('ARCH', 'x86', 'elfutils-native', '', d)}" @@ -15,9 +15,9 @@ DEPENDS += "openssl-native util-linux-native" KMETA = "kernel-meta" KCONF_BSP_AUDIT_LEVEL = "2" -SRCREV_machine_qemuarm ?= "283b870cef5f79a6f07465828a51f27a6aed4c50" -SRCREV_machine ?= "2d7c98a6748a64ca36fd1d2e60c517b16326df61" -SRCREV_meta ?= "a7cb57afb9fb9787079c28a1028d797632105e56" +SRCREV_machine_qemuarm ?= "be50001808f00efee538c2a3e7c0a5a2a2df65da" +SRCREV_machine ?= "a915fbeae8ed987402f69666d90bef15a01c5823" +SRCREV_meta ?= "ad6f8b357720ca8167a090713b7746230cf4b314" PV = "${LINUX_VERSION}+git${SRCPV}" diff --git a/poky/meta/recipes-kernel/linux/linux-yocto-tiny_5.2.bb b/poky/meta/recipes-kernel/linux/linux-yocto-tiny_5.2.bb index f3f546866..f7239d022 100644 --- a/poky/meta/recipes-kernel/linux/linux-yocto-tiny_5.2.bb +++ b/poky/meta/recipes-kernel/linux/linux-yocto-tiny_5.2.bb @@ -6,7 +6,7 @@ KCONFIG_MODE = "--allnoconfig" require recipes-kernel/linux/linux-yocto.inc -LINUX_VERSION ?= "5.2.17" +LINUX_VERSION ?= "5.2.20" LIC_FILES_CHKSUM = "file://COPYING;md5=bbea815ee2795b2f4230826c0c6b8814" DEPENDS += "${@bb.utils.contains('ARCH', 'x86', 'elfutils-native', '', d)}" @@ -15,9 +15,9 @@ DEPENDS += "openssl-native util-linux-native" KMETA = "kernel-meta" KCONF_BSP_AUDIT_LEVEL = "2" -SRCREV_machine_qemuarm ?= "aaa66d462ec17345dadd69b1ec0f3fcc83e82536" -SRCREV_machine ?= "255a750d28cd45df8923c3aba1e82c322757a50d" -SRCREV_meta ?= "b867b78b5019ae455af97dec7794cff7527d7624" +SRCREV_machine_qemuarm ?= "501d680535903acc00808c36f2cc07f2dc725adc" +SRCREV_machine ?= "dd25a04fc5e2e4549fc9b86157a01e0c72b53b03" +SRCREV_meta ?= "bd0762cd138f1624b5a5f8669cfa3ac2b71cb87b" PV = "${LINUX_VERSION}+git${SRCPV}" diff --git a/poky/meta/recipes-kernel/linux/linux-yocto_4.19.bb b/poky/meta/recipes-kernel/linux/linux-yocto_4.19.bb index 96debc42d..d8cb20f2f 100644 --- a/poky/meta/recipes-kernel/linux/linux-yocto_4.19.bb +++ b/poky/meta/recipes-kernel/linux/linux-yocto_4.19.bb @@ -11,22 +11,22 @@ KBRANCH_qemux86 ?= "v4.19/standard/base" KBRANCH_qemux86-64 ?= "v4.19/standard/base" KBRANCH_qemumips64 ?= "v4.19/standard/mti-malta64" -SRCREV_machine_qemuarm ?= "b0be447bc9053d07f3438999778bd077679ae756" -SRCREV_machine_qemuarm64 ?= "2d7c98a6748a64ca36fd1d2e60c517b16326df61" -SRCREV_machine_qemumips ?= "3c8b21d0a335b5f418682969448574dfd0011f02" -SRCREV_machine_qemuppc ?= "2d7c98a6748a64ca36fd1d2e60c517b16326df61" -SRCREV_machine_qemux86 ?= "2d7c98a6748a64ca36fd1d2e60c517b16326df61" -SRCREV_machine_qemux86-64 ?= "2d7c98a6748a64ca36fd1d2e60c517b16326df61" -SRCREV_machine_qemumips64 ?= "2854797711fee4061fb760c2b6e0e3d3135195ab" -SRCREV_machine ?= "2d7c98a6748a64ca36fd1d2e60c517b16326df61" -SRCREV_meta ?= "a7cb57afb9fb9787079c28a1028d797632105e56" +SRCREV_machine_qemuarm ?= "7fde51abcaf389193ce5d87ebfb8e8fb66a9271a" +SRCREV_machine_qemuarm64 ?= "a915fbeae8ed987402f69666d90bef15a01c5823" +SRCREV_machine_qemumips ?= "8ac68d42beb24b275ac0d2a54a0a2291970e5dde" +SRCREV_machine_qemuppc ?= "a915fbeae8ed987402f69666d90bef15a01c5823" +SRCREV_machine_qemux86 ?= "a915fbeae8ed987402f69666d90bef15a01c5823" +SRCREV_machine_qemux86-64 ?= "a915fbeae8ed987402f69666d90bef15a01c5823" +SRCREV_machine_qemumips64 ?= "ea2cb8731306f734bf0227575e04cafac7dfade0" +SRCREV_machine ?= "a915fbeae8ed987402f69666d90bef15a01c5823" +SRCREV_meta ?= "ad6f8b357720ca8167a090713b7746230cf4b314" SRC_URI = "git://git.yoctoproject.org/linux-yocto.git;name=machine;branch=${KBRANCH}; \ git://git.yoctoproject.org/yocto-kernel-cache;type=kmeta;name=meta;branch=yocto-4.19;destsuffix=${KMETA} \ " LIC_FILES_CHKSUM = "file://COPYING;md5=bbea815ee2795b2f4230826c0c6b8814" -LINUX_VERSION ?= "4.19.72" +LINUX_VERSION ?= "4.19.78" DEPENDS += "${@bb.utils.contains('ARCH', 'x86', 'elfutils-native', '', d)}" DEPENDS += "openssl-native util-linux-native" diff --git a/poky/meta/recipes-kernel/linux/linux-yocto_5.2.bb b/poky/meta/recipes-kernel/linux/linux-yocto_5.2.bb index 1a2c3ffcd..8f75f67c3 100644 --- a/poky/meta/recipes-kernel/linux/linux-yocto_5.2.bb +++ b/poky/meta/recipes-kernel/linux/linux-yocto_5.2.bb @@ -12,16 +12,16 @@ KBRANCH_qemux86 ?= "v5.2/standard/base" KBRANCH_qemux86-64 ?= "v5.2/standard/base" KBRANCH_qemumips64 ?= "v5.2/standard/mti-malta64" -SRCREV_machine_qemuarm ?= "47b80ef7bd932830f299ed76e2302df631ae4fbe" -SRCREV_machine_qemuarm64 ?= "255a750d28cd45df8923c3aba1e82c322757a50d" -SRCREV_machine_qemumips ?= "45ff64cb3f87c38db6f46353ea93005d049b0cf6" -SRCREV_machine_qemuppc ?= "255a750d28cd45df8923c3aba1e82c322757a50d" -SRCREV_machine_qemuriscv64 ?= "255a750d28cd45df8923c3aba1e82c322757a50d" -SRCREV_machine_qemux86 ?= "255a750d28cd45df8923c3aba1e82c322757a50d" -SRCREV_machine_qemux86-64 ?= "255a750d28cd45df8923c3aba1e82c322757a50d" -SRCREV_machine_qemumips64 ?= "ea0fd387a459803ac60e9b8a1729f2fc7d3215f1" -SRCREV_machine ?= "255a750d28cd45df8923c3aba1e82c322757a50d" -SRCREV_meta ?= "b867b78b5019ae455af97dec7794cff7527d7624" +SRCREV_machine_qemuarm ?= "fcbe51dfa0a763a07e4cd66204d6c0ba054663ce" +SRCREV_machine_qemuarm64 ?= "dd25a04fc5e2e4549fc9b86157a01e0c72b53b03" +SRCREV_machine_qemumips ?= "9cad7bb8bcd3686f580a3363847ee9c9e86928b1" +SRCREV_machine_qemuppc ?= "dd25a04fc5e2e4549fc9b86157a01e0c72b53b03" +SRCREV_machine_qemuriscv64 ?= "dd25a04fc5e2e4549fc9b86157a01e0c72b53b03" +SRCREV_machine_qemux86 ?= "dd25a04fc5e2e4549fc9b86157a01e0c72b53b03" +SRCREV_machine_qemux86-64 ?= "dd25a04fc5e2e4549fc9b86157a01e0c72b53b03" +SRCREV_machine_qemumips64 ?= "dc2be1a546e937374590ce3858b717489ded2c21" +SRCREV_machine ?= "dd25a04fc5e2e4549fc9b86157a01e0c72b53b03" +SRCREV_meta ?= "bd0762cd138f1624b5a5f8669cfa3ac2b71cb87b" # remap qemuarm to qemuarma15 for the 5.2 kernel # KMACHINE_qemuarm ?= "qemuarma15" @@ -30,7 +30,7 @@ SRC_URI = "git://git.yoctoproject.org/linux-yocto.git;name=machine;branch=${KBRA git://git.yoctoproject.org/yocto-kernel-cache;type=kmeta;name=meta;branch=yocto-5.2;destsuffix=${KMETA}" LIC_FILES_CHKSUM = "file://COPYING;md5=bbea815ee2795b2f4230826c0c6b8814" -LINUX_VERSION ?= "5.2.17" +LINUX_VERSION ?= "5.2.20" DEPENDS += "${@bb.utils.contains('ARCH', 'x86', 'elfutils-native', '', d)}" DEPENDS += "openssl-native util-linux-native" diff --git a/poky/meta/recipes-kernel/perf/perf.bb b/poky/meta/recipes-kernel/perf/perf.bb index 8201c0cb6..5f0ba7c18 100644 --- a/poky/meta/recipes-kernel/perf/perf.bb +++ b/poky/meta/recipes-kernel/perf/perf.bb @@ -25,6 +25,7 @@ PACKAGECONFIG[jvmti] = ",NO_JVMTI=1" # libaudit support would need scripting to be enabled PACKAGECONFIG[audit] = ",NO_LIBAUDIT=1,audit" PACKAGECONFIG[manpages] = ",,xmlto-native asciidoc-native" +PACKAGECONFIG[cap] = ",,libcap" # libunwind is not yet ported for some architectures PACKAGECONFIG_remove_arc = "libunwind" @@ -105,7 +106,6 @@ EXTRA_OEMAKE += "\ EXTRA_OEMAKE_append_task-configure = " JOBS=1" PERF_SRC ?= "Makefile \ - include \ tools/arch \ tools/build \ tools/include \ @@ -113,6 +113,8 @@ PERF_SRC ?= "Makefile \ tools/Makefile \ tools/perf \ tools/scripts \ + scripts/ \ + arch/${ARCH}/Makefile \ " PERF_EXTRA_LDFLAGS = "" @@ -151,6 +153,8 @@ python copy_perf_source_from_kernel() { if os.path.isdir(src): oe.path.copyhardlinktree(src, dest) else: + src_path = os.path.dirname(s) + os.makedirs(os.path.join(dest_dir,src_path),exist_ok=True) bb.utils.copyfile(src, dest) } @@ -243,9 +247,6 @@ do_configure_prepend () { # so we copy it from the sysroot unistd.h to the perf unistd.h install -D -m0644 ${STAGING_INCDIR}/asm-generic/unistd.h ${S}/tools/include/uapi/asm-generic/unistd.h install -D -m0644 ${STAGING_INCDIR}/asm-generic/unistd.h ${S}/include/uapi/asm-generic/unistd.h - - # bits.h can have the same issue as unistd.h, so we make the tools variant take precedence - [ -e ${S}/tools/include/linux/bits.h ] && install -D -m0644 ${S}/tools/include/linux/bits.h ${S}/include/linux/bits.h } python do_package_prepend() { diff --git a/poky/meta/recipes-kernel/systemtap/systemtap_git.bb b/poky/meta/recipes-kernel/systemtap/systemtap_git.bb index 6ee3e1c0f..1c9f2aed1 100644 --- a/poky/meta/recipes-kernel/systemtap/systemtap_git.bb +++ b/poky/meta/recipes-kernel/systemtap/systemtap_git.bb @@ -51,10 +51,13 @@ do_install_append () { rm ${D}${libexecdir}/${PN}/stap-env fi - # Fix makefile hardcoded path assumptions for systemd (assumes $prefix) - install -d `dirname ${D}${systemd_unitdir}` - mv ${D}${prefix}/lib/systemd `dirname ${D}${systemd_unitdir}` - rmdir ${D}${prefix}/lib --ignore-fail-on-non-empty + if [ ${D}${prefix}/lib != `dirname ${D}${systemd_unitdir}` ]; then + # Fix makefile hardcoded path assumptions for systemd (assumes $prefix) + # without usrmerge distro feature enabled + install -d `dirname ${D}${systemd_unitdir}` + mv ${D}${prefix}/lib/systemd `dirname ${D}${systemd_unitdir}` + rmdir ${D}${prefix}/lib --ignore-fail-on-non-empty + fi # Ensure correct ownership for files copied in chown root:root ${D}${sysconfdir}/stap-exporter/* -R diff --git a/poky/meta/recipes-multimedia/ffmpeg/ffmpeg_4.2.1.bb b/poky/meta/recipes-multimedia/ffmpeg/ffmpeg_4.2.1.bb index ec306afaa..5ac18ba3f 100644 --- a/poky/meta/recipes-multimedia/ffmpeg/ffmpeg_4.2.1.bb +++ b/poky/meta/recipes-multimedia/ffmpeg/ffmpeg_4.2.1.bb @@ -102,8 +102,8 @@ EXTRA_OECONF = " \ --arch=${TARGET_ARCH} \ --target-os="linux" \ --enable-cross-compile \ - --extra-cflags="${TARGET_CFLAGS} ${HOST_CC_ARCH}${TOOLCHAIN_OPTIONS}" \ - --extra-ldflags="${TARGET_LDFLAGS}" \ + --extra-cflags="${CFLAGS} ${HOST_CC_ARCH}${TOOLCHAIN_OPTIONS}" \ + --extra-ldflags="${LDFLAGS}" \ --sysroot="${STAGING_DIR_TARGET}" \ ${EXTRA_FFCONF} \ --libdir=${libdir} \ diff --git a/poky/meta/recipes-multimedia/gstreamer/gst-examples_git.bb b/poky/meta/recipes-multimedia/gstreamer/gst-examples_1.16.0.bb index f2a3afbbf..cc7a7e78e 100644 --- a/poky/meta/recipes-multimedia/gstreamer/gst-examples_git.bb +++ b/poky/meta/recipes-multimedia/gstreamer/gst-examples_1.16.0.bb @@ -10,11 +10,10 @@ SRC_URI = "git://gitlab.freedesktop.org/gstreamer/gst-examples.git;protocol=http " SRCREV = "d953c127c1146b50d5676618299933950685dcd7" -PV = "1.16.0" S = "${WORKDIR}/git" -inherit meson pkgconfig distro_features_check +inherit meson pkgconfig features_check ANY_OF_DISTRO_FEATURES = "${GTK3DISTROFEATURES}" diff --git a/poky/meta/recipes-multimedia/gstreamer/gst-validate_1.16.0.bb b/poky/meta/recipes-multimedia/gstreamer/gst-validate_1.16.1.bb index 1f4370619..7d602eabc 100644 --- a/poky/meta/recipes-multimedia/gstreamer/gst-validate_1.16.0.bb +++ b/poky/meta/recipes-multimedia/gstreamer/gst-validate_1.16.1.bb @@ -9,8 +9,8 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=a6f89e2100d9b6cdffcea4f398e37343" SRC_URI = "https://gstreamer.freedesktop.org/src/${BPN}/${BP}.tar.xz \ file://0001-connect-has-a-different-signature-on-musl.patch \ " -SRC_URI[md5sum] = "c5c57f3325a2e62aae4a8ec4931f7711" -SRC_URI[sha256sum] = "9331ae48a173a048243539730cc7a88607777762dea4aebbc3ab55981e68d6c9" +SRC_URI[md5sum] = "793e75f4717f718ad204c554d577b160" +SRC_URI[sha256sum] = "7f079b9b2a127604b98e297037dc8847ef50f4ce2b508aa2df0cac5b77562899" DEPENDS = "json-glib glib-2.0 glib-2.0-native gstreamer1.0 gstreamer1.0-plugins-base" RRECOMMENDS_${PN} = "git" diff --git a/poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-libav/gtkdoc-no-tree.patch b/poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-libav/gtkdoc-no-tree.patch deleted file mode 100644 index a36fdc9a1..000000000 --- a/poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-libav/gtkdoc-no-tree.patch +++ /dev/null @@ -1,35 +0,0 @@ -Upstream-Status: Backport -Signed-off-by: Ross Burton <ross.burton@intel.com> - -From 6f720cebe632d7dc187c6907857d67ce1f7313d6 Mon Sep 17 00:00:00 2001 -From: Ross Burton <ross.burton@intel.com> -Date: Mon, 9 Sep 2019 22:48:49 +0100 -Subject: [PATCH] docs: don't include the type hierarchy - -gtk-doc can't generate a type hierarchy when scanning gst-libav, and gtk-doc -1.30 onwards doesn't write a file if there is no type hierarchy (unlike previous -releases, which wrote an empty file). This results in the build failing with -gtk-doc 1.30 onwards, so remove the type hierarchy section from the -documentation as it doesn't serve any purpose. - -Fixes https://gitlab.freedesktop.org/gstreamer/gst-libav/issues/57 ---- - docs/plugins/gst-libav-plugins-docs.sgml | 5 ----- - 1 file changed, 5 deletions(-) - -diff --git a/docs/plugins/gst-libav-plugins-docs.sgml b/docs/plugins/gst-libav-plugins-docs.sgml -index 75c68f4..f68d554 100644 ---- a/docs/plugins/gst-libav-plugins-docs.sgml -+++ b/docs/plugins/gst-libav-plugins-docs.sgml -@@ -32,9 +32,4 @@ - <title>gst-libav Plugins</title> - <xi:include href="xml/plugin-libav.xml" /> - </chapter> -- -- <chapter> -- <title>Object Hierarchy</title> -- <xi:include href="xml/tree_index.sgml" /> -- </chapter> - </book> --- -2.22.0 diff --git a/poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-libav_1.16.0.bb b/poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-libav_1.16.1.bb index d2629b506..10955ff16 100644 --- a/poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-libav_1.16.0.bb +++ b/poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-libav_1.16.1.bb @@ -12,16 +12,15 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \ file://gst-libs/ext/libav/COPYING.LGPLv2.1;md5=bd7a443320af8c812e4c18d1b79df004 \ file://gst-libs/ext/libav/COPYING.LGPLv3;md5=e6a600fd5e1d9cbde2d983680233ad02" -SRC_URI = "http://gstreamer.freedesktop.org/src/gst-libav/gst-libav-${PV}.tar.xz \ +SRC_URI = "https://gstreamer.freedesktop.org/src/gst-libav/gst-libav-${PV}.tar.xz \ file://0001-Disable-yasm-for-libav-when-disable-yasm.patch \ file://workaround-to-build-gst-libav-for-i586-with-gcc.patch \ file://mips64_cpu_detection.patch \ file://0001-configure-check-for-armv7ve-variant.patch \ file://0001-fix-host-contamination.patch \ - file://gtkdoc-no-tree.patch \ " -SRC_URI[md5sum] = "e3a201a45985ddc1327cd496046ca818" -SRC_URI[sha256sum] = "dfac119043a9cfdcacd7acde77f674ab172cf2537b5812be52f49e9cddc53d9a" +SRC_URI[md5sum] = "58023f4c71bbd711061e350fcd76c09d" +SRC_URI[sha256sum] = "e8a5748ae9a4a7be9696512182ea9ffa6efe0be9b7976916548e9d4381ca61c4" S = "${WORKDIR}/gst-libav-${PV}" diff --git a/poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-omx_1.16.0.bb b/poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-omx_1.16.1.bb index d94bad36f..cb2f7045a 100644 --- a/poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-omx_1.16.0.bb +++ b/poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-omx_1.16.1.bb @@ -7,10 +7,10 @@ LICENSE_FLAGS = "commercial" LIC_FILES_CHKSUM = "file://COPYING;md5=4fbd65380cdd255951079008b364516c \ file://omx/gstomx.h;beginline=1;endline=21;md5=5c8e1fca32704488e76d2ba9ddfa935f" -SRC_URI = "http://gstreamer.freedesktop.org/src/gst-omx/gst-omx-${PV}.tar.xz" +SRC_URI = "https://gstreamer.freedesktop.org/src/gst-omx/gst-omx-${PV}.tar.xz" -SRC_URI[md5sum] = "c6f8554513980682099a2a9832250b01" -SRC_URI[sha256sum] = "fef77cddc02784608451c46b9def880b63230a246decf8900f2da2ed54a8af4a" +SRC_URI[md5sum] = "89772e7a277fd0abfc250eaf8e4e9ce9" +SRC_URI[sha256sum] = "cbf54121a2cba575d460833e8132265781252ce32cf5b8f9fa8753e42ab24bb2" S = "${WORKDIR}/gst-omx-${PV}" diff --git a/poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_1.16.0.bb b/poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_1.16.1.bb index f9289e92d..1731be844 100644 --- a/poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_1.16.0.bb +++ b/poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_1.16.1.bb @@ -1,15 +1,15 @@ require gstreamer1.0-plugins.inc SRC_URI = " \ - http://gstreamer.freedesktop.org/src/gst-plugins-bad/gst-plugins-bad-${PV}.tar.xz \ + https://gstreamer.freedesktop.org/src/gst-plugins-bad/gst-plugins-bad-${PV}.tar.xz \ file://configure-allow-to-disable-libssh2.patch \ file://fix-maybe-uninitialized-warnings-when-compiling-with-Os.patch \ file://avoid-including-sys-poll.h-directly.patch \ file://ensure-valid-sentinels-for-gst_structure_get-etc.patch \ file://0001-introspection.m4-prefix-pkgconfig-paths-with-PKG_CON.patch \ " -SRC_URI[md5sum] = "e9e562d86c1527c44d904500dd35e326" -SRC_URI[sha256sum] = "22139de35626ada6090bdfa3423b27b7fc15a0198331d25c95e6b12cb1072b05" +SRC_URI[md5sum] = "24d4d30ecc67d5cbc77c0475bcea1210" +SRC_URI[sha256sum] = "56481c95339b8985af13bac19b18bc8da7118c2a7d9440ed70e7dcd799c2adb5" S = "${WORKDIR}/gst-plugins-bad-${PV}" diff --git a/poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_1.16.0.bb b/poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_1.16.1.bb index 1d6f15e9c..cb99fba5f 100644 --- a/poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_1.16.0.bb +++ b/poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_1.16.1.bb @@ -5,7 +5,7 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=6762ed442b3822387a51c92d928ead0d \ file://common/coverage/coverage-report.pl;beginline=2;endline=17;md5=a4e1830fce078028c8f0974161272607" SRC_URI = " \ - http://gstreamer.freedesktop.org/src/gst-plugins-base/gst-plugins-base-${PV}.tar.xz \ + https://gstreamer.freedesktop.org/src/gst-plugins-base/gst-plugins-base-${PV}.tar.xz \ file://get-caps-from-src-pad-when-query-caps.patch \ file://0003-ssaparse-enhance-SSA-text-lines-parsing.patch \ file://make-gio_unix_2_0-dependency-configurable.patch \ @@ -18,8 +18,8 @@ SRC_URI = " \ file://0001-gstreamer-gl.pc.in-don-t-append-GL_CFLAGS-to-CFLAGS.patch \ file://link-with-libvchostif.patch \ " -SRC_URI[md5sum] = "41dde92930710c75cdb49169c5cc6dfc" -SRC_URI[sha256sum] = "4093aa7b51e28fb24dfd603893fead8d1b7782f088b05ed0f22a21ef176fb5ae" +SRC_URI[md5sum] = "b5eb0651bab70bf1714f103bdd66ce47" +SRC_URI[sha256sum] = "5c3cc489933d0597087c9bc6ba251c93693d64554bcc563539a084fa2d5fcb2b" S = "${WORKDIR}/gst-plugins-base-${PV}" diff --git a/poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good/0001-scaletempo-Advertise-interleaved-layout-in-caps-temp.patch b/poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good/0001-scaletempo-Advertise-interleaved-layout-in-caps-temp.patch deleted file mode 100644 index caa080c8e..000000000 --- a/poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good/0001-scaletempo-Advertise-interleaved-layout-in-caps-temp.patch +++ /dev/null @@ -1,37 +0,0 @@ -From aadfa5f20f53601785e417fe3fcbe6d574880988 Mon Sep 17 00:00:00 2001 -From: Philippe Normand <philn@igalia.com> -Date: Tue, 23 Apr 2019 10:10:01 +0100 -Subject: [PATCH] scaletempo: Advertise interleaved layout in caps templates - -Scaletempo doesn't support non-interleaved layout. Not explicitely stating this -would trigger critical warnings and a caps negotiation failure when scaletempo -is used as playbin audio-filter. - -Patch suggested by George Kiagiadakis <george.kiagiadakis@collabora.com>. - -Fixes #591 -Upstream-Status: Backport [merged, on track for 1.16.1.] ---- - gst/audiofx/gstscaletempo.c | 6 +++--- - 1 file changed, 3 insertions(+), 3 deletions(-) - -diff --git a/gst/audiofx/gstscaletempo.c b/gst/audiofx/gstscaletempo.c -index 3a719719a..83ee8fe24 100644 ---- a/gst/audiofx/gstscaletempo.c -+++ b/gst/audiofx/gstscaletempo.c -@@ -93,9 +93,9 @@ enum - - #define SUPPORTED_CAPS \ - GST_STATIC_CAPS ( \ -- GST_AUDIO_CAPS_MAKE (GST_AUDIO_NE (F32)) "; " \ -- GST_AUDIO_CAPS_MAKE (GST_AUDIO_NE (F64)) "; " \ -- GST_AUDIO_CAPS_MAKE (GST_AUDIO_NE (S16)) \ -+ GST_AUDIO_CAPS_MAKE (GST_AUDIO_NE (F32)) ", layout=(string)interleaved; " \ -+ GST_AUDIO_CAPS_MAKE (GST_AUDIO_NE (F64)) ", layout=(string)interleaved; " \ -+ GST_AUDIO_CAPS_MAKE (GST_AUDIO_NE (S16)) ", layout=(string)interleaved" \ - ) - - static GstStaticPadTemplate sink_template = GST_STATIC_PAD_TEMPLATE ("sink", --- -2.20.1 - diff --git a/poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good/headerfix.patch b/poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good/headerfix.patch deleted file mode 100644 index 34d25a0a4..000000000 --- a/poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good/headerfix.patch +++ /dev/null @@ -1,43 +0,0 @@ -Things break with overlapping defines between glib and gstreamer with glibc 2.30. - -Discussion in the link below, basically internal __ prefixed variables -shouldn't be redefined. - -Upstream-Status: Submitted [https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/issues/635] -RP 2019/8/6 - -Index: gst-plugins-good-1.16.0/sys/v4l2/ext/types-compat.h -=================================================================== ---- gst-plugins-good-1.16.0.orig/sys/v4l2/ext/types-compat.h -+++ gst-plugins-good-1.16.0/sys/v4l2/ext/types-compat.h -@@ -24,29 +24,6 @@ - #ifndef __TYPES_COMPAT_H__ - #define __TYPES_COMPAT_H__ - --/* From linux/types.h */ --#ifndef __bitwise__ --# ifdef __CHECKER__ --# define __bitwise__ __attribute__((bitwise)) --# else --# define __bitwise__ --# endif --#endif -- --#ifndef __bitwise --# ifdef __CHECK_ENDIAN__ --# define __bitwise __bitwise__ --# else --# define __bitwise --# endif --#endif -- --#define __u64 guint64 --#define __u32 guint32 --#define __u16 guint16 --#define __u8 guint8 --#define __s64 gint64 --#define __s32 gint32 --#define __le32 guint32 __bitwise -+#include <linux/types.h> - - #endif /* __TYPES_COMPAT_H__ */ diff --git a/poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good_1.16.0.bb b/poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good_1.16.1.bb index 5751467db..0fa7b86ff 100644 --- a/poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good_1.16.0.bb +++ b/poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good_1.16.1.bb @@ -1,14 +1,12 @@ require gstreamer1.0-plugins.inc SRC_URI = " \ - http://gstreamer.freedesktop.org/src/gst-plugins-good/gst-plugins-good-${PV}.tar.xz \ - file://0001-scaletempo-Advertise-interleaved-layout-in-caps-temp.patch \ + https://gstreamer.freedesktop.org/src/gst-plugins-good/gst-plugins-good-${PV}.tar.xz \ file://0001-introspection.m4-prefix-pkgconfig-paths-with-PKG_CON.patch \ - file://headerfix.patch \ " -SRC_URI[md5sum] = "d1a7b442994d9522418de4af4330e034" -SRC_URI[sha256sum] = "654adef33380d604112f702c2927574cfc285e31307b79e584113858838bb0fd" +SRC_URI[md5sum] = "515987ee763256840a11bd8ea098f2bf" +SRC_URI[sha256sum] = "9fbabe69018fcec707df0b71150168776040cde6c1a26bb5a82a136755fa8f1f" S = "${WORKDIR}/gst-plugins-good-${PV}" diff --git a/poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-ugly_1.16.0.bb b/poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-ugly_1.16.1.bb index 11a0e790e..ecab31889 100644 --- a/poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-ugly_1.16.0.bb +++ b/poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-ugly_1.16.1.bb @@ -7,11 +7,11 @@ LICENSE = "GPLv2+ & LGPLv2.1+ & LGPLv2+" LICENSE_FLAGS = "commercial" SRC_URI = " \ - http://gstreamer.freedesktop.org/src/gst-plugins-ugly/gst-plugins-ugly-${PV}.tar.xz \ + https://gstreamer.freedesktop.org/src/gst-plugins-ugly/gst-plugins-ugly-${PV}.tar.xz \ file://0001-introspection.m4-prefix-pkgconfig-paths-with-PKG_CON.patch \ " -SRC_URI[md5sum] = "1ec343c58d4b17d682f7befa8453c11c" -SRC_URI[sha256sum] = "e30964c5f031c32289e0b25e176c3c95a5737f2052dfc81d0f7427ef0233a4c2" +SRC_URI[md5sum] = "668795903cb4971fba9aa89abdea8369" +SRC_URI[sha256sum] = "4bf913b2ca5195ac3b53b5e3ade2dc7c45d2258507552ddc850c5fa425968a1d" S = "${WORKDIR}/gst-plugins-ugly-${PV}" diff --git a/poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-python_1.16.0.bb b/poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-python_1.16.1.bb index 0f3aac190..c722f028b 100644 --- a/poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-python_1.16.0.bb +++ b/poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-python_1.16.1.bb @@ -5,9 +5,9 @@ SECTION = "multimedia" LICENSE = "LGPLv2.1" LIC_FILES_CHKSUM = "file://COPYING;md5=c34deae4e395ca07e725ab0076a5f740" -SRC_URI = "http://gstreamer.freedesktop.org/src/${PNREAL}/${PNREAL}-${PV}.tar.xz" -SRC_URI[md5sum] = "877b2ed2aaffdb62e63f38ea9469b70f" -SRC_URI[sha256sum] = "55dc7aaed1855565f9b9ef842d93e93bfc5cb2b376faef6af5b463e1774e2d38" +SRC_URI = "https://gstreamer.freedesktop.org/src/${PNREAL}/${PNREAL}-${PV}.tar.xz" +SRC_URI[md5sum] = "499645fbd1790c5845c02a3998dccc1b" +SRC_URI[sha256sum] = "b469c8955126f41b8ce0bf689b7029f182cd305f422b3a8df35b780bd8347489" DEPENDS = "gstreamer1.0 python3-pygobject" RDEPENDS_${PN} += "gstreamer1.0 python3-pygobject" @@ -20,7 +20,7 @@ S = "${WORKDIR}/${PNREAL}-${PV}" REQUIRED_DISTRO_FEATURES = "gobject-introspection-data" UNKNOWN_CONFIGURE_WHITELIST_append = " --enable-introspection --disable-introspection" -inherit autotools pkgconfig distutils3-base upstream-version-is-even gobject-introspection distro_features_check +inherit autotools pkgconfig distutils3-base upstream-version-is-even gobject-introspection features_check EXTRA_OECONF += "--with-libpython-dir=${libdir}" diff --git a/poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-rtsp-server_1.16.0.bb b/poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-rtsp-server_1.16.1.bb index 042938b88..45302ef4f 100644 --- a/poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-rtsp-server_1.16.0.bb +++ b/poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-rtsp-server_1.16.1.bb @@ -8,13 +8,13 @@ DEPENDS = "gstreamer1.0 gstreamer1.0-plugins-base" PNREAL = "gst-rtsp-server" -SRC_URI = "http://gstreamer.freedesktop.org/src/${PNREAL}/${PNREAL}-${PV}.tar.xz \ +SRC_URI = "https://gstreamer.freedesktop.org/src/${PNREAL}/${PNREAL}-${PV}.tar.xz \ file://0001-introspection.m4-prefix-pkgconfig-paths-with-PKG_CON.patch \ file://gtk-doc-tweaks.patch \ " -SRC_URI[md5sum] = "adc4460239ec2eccf58ad9752ce53bfd" -SRC_URI[sha256sum] = "198e9eec1a3e32dc810d3fbf3a714850a22c6288d4a5c8e802c5ff984af03f19" +SRC_URI[md5sum] = "380d6a42e856c32fcefa508ad57129e0" +SRC_URI[sha256sum] = "b0abacad2f86f60d63781d2b24443c5668733e8b08664bbef94124906d700144" S = "${WORKDIR}/${PNREAL}-${PV}" diff --git a/poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-vaapi_1.16.0.bb b/poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-vaapi_1.16.1.bb index e5dfb6124..b8c2126d9 100644 --- a/poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-vaapi_1.16.0.bb +++ b/poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-vaapi_1.16.1.bb @@ -13,13 +13,13 @@ SRC_URI = "https://gstreamer.freedesktop.org/src/${REALPN}/${REALPN}-${PV}.tar.x file://0001-vaapsink-downgrade-to-marginal.patch \ " -SRC_URI[md5sum] = "8c3f9ee3e47cbdb75a94f7183460b721" -SRC_URI[sha256sum] = "4e7fce626ee0590dca74b5a8341d25bac76307945131a970b414fc5895f5171f" +SRC_URI[md5sum] = "15b08f76777359d87b0b4a561db05f1f" +SRC_URI[sha256sum] = "cb570f6f1e78cb364fbe3c4fb8751824ee9db0c942ba61b62380b9b5abb7603a" S = "${WORKDIR}/${REALPN}-${PV}" DEPENDS = "libva gstreamer1.0 gstreamer1.0-plugins-base gstreamer1.0-plugins-bad" -inherit autotools pkgconfig gtk-doc distro_features_check upstream-version-is-even +inherit autotools pkgconfig gtk-doc features_check upstream-version-is-even REQUIRED_DISTRO_FEATURES ?= "opengl" diff --git a/poky/meta/recipes-multimedia/gstreamer/gstreamer1.0_1.16.0.bb b/poky/meta/recipes-multimedia/gstreamer/gstreamer1.0_1.16.1.bb index da2d14cd9..ff92f63ba 100644 --- a/poky/meta/recipes-multimedia/gstreamer/gstreamer1.0_1.16.0.bb +++ b/poky/meta/recipes-multimedia/gstreamer/gstreamer1.0_1.16.1.bb @@ -20,15 +20,15 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=6762ed442b3822387a51c92d928ead0d \ S = "${WORKDIR}/gstreamer-${PV}" SRC_URI = " \ - http://gstreamer.freedesktop.org/src/gstreamer/gstreamer-${PV}.tar.xz \ + https://gstreamer.freedesktop.org/src/gstreamer/gstreamer-${PV}.tar.xz \ file://0001-introspection.m4-prefix-pkgconfig-paths-with-PKG_CON.patch \ file://gtk-doc-tweaks.patch \ file://0001-gst-gstpluginloader.c-when-env-var-is-set-do-not-fal.patch \ file://add-a-target-to-compile-tests.patch \ file://run-ptest \ " -SRC_URI[md5sum] = "862b7e4263d946bc2ef31b3c582e5587" -SRC_URI[sha256sum] = "0e8e2f7118be437cba879353970cf83c2acced825ecb9275ba05d9186ef07c00" +SRC_URI[md5sum] = "c505fb818b36988daaa846e9e63eabe8" +SRC_URI[sha256sum] = "02211c3447c4daa55919c5c0f43a82a6fbb51740d57fc3af0639d46f1cf4377d" PACKAGECONFIG ??= "${@bb.utils.contains('PTEST_ENABLED', '1', 'tests', '', d)} \ " diff --git a/poky/meta/recipes-multimedia/libpng/libpng_1.6.37.bb b/poky/meta/recipes-multimedia/libpng/libpng_1.6.37.bb index 66af2f3d6..2ed87a843 100644 --- a/poky/meta/recipes-multimedia/libpng/libpng_1.6.37.bb +++ b/poky/meta/recipes-multimedia/libpng/libpng_1.6.37.bb @@ -29,3 +29,6 @@ PACKAGES =+ "${PN}-tools" FILES_${PN}-tools = "${bindir}/png-fix-itxt ${bindir}/pngfix ${bindir}/pngcp" BBCLASSEXTEND = "native nativesdk" + +# CVE-2019-17371 is actually a memory leak in gif2png 2.x +CVE_CHECK_WHITELIST += "CVE-2019-17371" diff --git a/poky/meta/recipes-multimedia/libsndfile/libsndfile1_1.0.28.bb b/poky/meta/recipes-multimedia/libsndfile/libsndfile1_1.0.28.bb index ffb45855a..7855008f3 100644 --- a/poky/meta/recipes-multimedia/libsndfile/libsndfile1_1.0.28.bb +++ b/poky/meta/recipes-multimedia/libsndfile/libsndfile1_1.0.28.bb @@ -33,3 +33,7 @@ PACKAGECONFIG[alsa] = "--enable-alsa,--disable-alsa,alsa-lib" PACKAGECONFIG[regtest] = "--enable-sqlite,--disable-sqlite,sqlite3" inherit autotools lib_package pkgconfig + +# This can't be replicated and is just a memory leak. +# https://github.com/erikd/libsndfile/issues/398 +CVE_CHECK_WHITELIST += "CVE-2018-13419" diff --git a/poky/meta/recipes-multimedia/libtiff/tiff/CVE-2019-14973.patch b/poky/meta/recipes-multimedia/libtiff/tiff/CVE-2019-14973.patch deleted file mode 100644 index 8345295d0..000000000 --- a/poky/meta/recipes-multimedia/libtiff/tiff/CVE-2019-14973.patch +++ /dev/null @@ -1,415 +0,0 @@ -From 95ac1e3fcc6b643b5bd100f2ea54faca0a003315 Mon Sep 17 00:00:00 2001 -From: Trevor Gamblin <trevor.gamblin@windriver.com> -Date: Fri, 20 Sep 2019 09:33:22 -0400 -Subject: [PATCH] libtiff-fix-CVE-2019-14973 - -Upstream-Status: Backport [https://gitlab.com/libtiff/libtiff/commit/2218055ca67d84be596a13080e8f50f22116555c] -CVE: CVE-2019-14973 - -Signed-off-by: Trevor Gamblin <trevor.gamblin@windriver.com> ---- - libtiff/tif_aux.c | 49 +++++++++++++++++++++++++++++++++++++----- - libtiff/tif_getimage.c | 6 ++---- - libtiff/tif_luv.c | 8 +------ - libtiff/tif_pixarlog.c | 7 +----- - libtiff/tif_read.c | 38 +++++++++----------------------- - libtiff/tif_strip.c | 35 ++++-------------------------- - libtiff/tif_tile.c | 27 +++-------------------- - libtiff/tiffiop.h | 7 +++++- - 8 files changed, 71 insertions(+), 106 deletions(-) - -diff --git a/libtiff/tif_aux.c b/libtiff/tif_aux.c -index 4ece162f..33fb8a44 100644 ---- a/libtiff/tif_aux.c -+++ b/libtiff/tif_aux.c -@@ -57,18 +57,57 @@ _TIFFMultiply64(TIFF* tif, uint64 first, uint64 second, const char* where) - return bytes; - } - -+tmsize_t -+_TIFFMultiplySSize(TIFF* tif, tmsize_t first, tmsize_t second, const char* where) -+{ -+ if( first <= 0 || second <= 0 ) -+ { -+ if( tif != NULL && where != NULL ) -+ { -+ TIFFErrorExt(tif->tif_clientdata, where, -+ "Invalid argument to _TIFFMultiplySSize() in %s", where); -+ } -+ return 0; -+ } -+ -+ if( first > TIFF_TMSIZE_T_MAX / second ) -+ { -+ if( tif != NULL && where != NULL ) -+ { -+ TIFFErrorExt(tif->tif_clientdata, where, -+ "Integer overflow in %s", where); -+ } -+ return 0; -+ } -+ return first * second; -+} -+ -+tmsize_t _TIFFCastUInt64ToSSize(TIFF* tif, uint64 val, const char* module) -+{ -+ if( val > (uint64)TIFF_TMSIZE_T_MAX ) -+ { -+ if( tif != NULL && module != NULL ) -+ { -+ TIFFErrorExt(tif->tif_clientdata,module,"Integer overflow"); -+ } -+ return 0; -+ } -+ return (tmsize_t)val; -+} -+ - void* - _TIFFCheckRealloc(TIFF* tif, void* buffer, - tmsize_t nmemb, tmsize_t elem_size, const char* what) - { - void* cp = NULL; -- tmsize_t bytes = nmemb * elem_size; -- -+ tmsize_t count = _TIFFMultiplySSize(tif, nmemb, elem_size, NULL); - /* -- * XXX: Check for integer overflow. -+ * Check for integer overflow. - */ -- if (nmemb && elem_size && bytes / elem_size == nmemb) -- cp = _TIFFrealloc(buffer, bytes); -+ if (count != 0) -+ { -+ cp = _TIFFrealloc(buffer, count); -+ } - - if (cp == NULL) { - TIFFErrorExt(tif->tif_clientdata, tif->tif_name, -diff --git a/libtiff/tif_getimage.c b/libtiff/tif_getimage.c -index 6a9d5a7c..2106ca21 100644 ---- a/libtiff/tif_getimage.c -+++ b/libtiff/tif_getimage.c -@@ -755,9 +755,8 @@ gtTileSeparate(TIFFRGBAImage* img, uint32* raster, uint32 w, uint32 h) - uint32 leftmost_tw; - - tilesize = TIFFTileSize(tif); -- bufsize = TIFFSafeMultiply(tmsize_t,alpha?4:3,tilesize); -+ bufsize = _TIFFMultiplySSize(tif, alpha?4:3,tilesize, "gtTileSeparate"); - if (bufsize == 0) { -- TIFFErrorExt(tif->tif_clientdata, TIFFFileName(tif), "Integer overflow in %s", "gtTileSeparate"); - return (0); - } - -@@ -1019,9 +1018,8 @@ gtStripSeparate(TIFFRGBAImage* img, uint32* raster, uint32 w, uint32 h) - uint16 colorchannels; - - stripsize = TIFFStripSize(tif); -- bufsize = TIFFSafeMultiply(tmsize_t,alpha?4:3,stripsize); -+ bufsize = _TIFFMultiplySSize(tif,alpha?4:3,stripsize, "gtStripSeparate"); - if (bufsize == 0) { -- TIFFErrorExt(tif->tif_clientdata, TIFFFileName(tif), "Integer overflow in %s", "gtStripSeparate"); - return (0); - } - -diff --git a/libtiff/tif_luv.c b/libtiff/tif_luv.c -index aa35ea07..46d2dff2 100644 ---- a/libtiff/tif_luv.c -+++ b/libtiff/tif_luv.c -@@ -1264,16 +1264,10 @@ LogL16GuessDataFmt(TIFFDirectory *td) - return (SGILOGDATAFMT_UNKNOWN); - } - -- --#define TIFF_SIZE_T_MAX ((size_t) ~ ((size_t)0)) --#define TIFF_TMSIZE_T_MAX (tmsize_t)(TIFF_SIZE_T_MAX >> 1) -- - static tmsize_t - multiply_ms(tmsize_t m1, tmsize_t m2) - { -- if( m1 == 0 || m2 > TIFF_TMSIZE_T_MAX / m1 ) -- return 0; -- return m1 * m2; -+ return _TIFFMultiplySSize(NULL, m1, m2, NULL); - } - - static int -diff --git a/libtiff/tif_pixarlog.c b/libtiff/tif_pixarlog.c -index 7438d692..b52a3ee4 100644 ---- a/libtiff/tif_pixarlog.c -+++ b/libtiff/tif_pixarlog.c -@@ -634,15 +634,10 @@ PixarLogGuessDataFmt(TIFFDirectory *td) - return guess; - } - --#define TIFF_SIZE_T_MAX ((size_t) ~ ((size_t)0)) --#define TIFF_TMSIZE_T_MAX (tmsize_t)(TIFF_SIZE_T_MAX >> 1) -- - static tmsize_t - multiply_ms(tmsize_t m1, tmsize_t m2) - { -- if( m1 == 0 || m2 > TIFF_TMSIZE_T_MAX / m1 ) -- return 0; -- return m1 * m2; -+ return _TIFFMultiplySSize(NULL, m1, m2, NULL); - } - - static tmsize_t -diff --git a/libtiff/tif_read.c b/libtiff/tif_read.c -index e63810cc..8db39d7a 100644 ---- a/libtiff/tif_read.c -+++ b/libtiff/tif_read.c -@@ -29,9 +29,6 @@ - #include "tiffiop.h" - #include <stdio.h> - --#define TIFF_SIZE_T_MAX ((size_t) ~ ((size_t)0)) --#define TIFF_TMSIZE_T_MAX (tmsize_t)(TIFF_SIZE_T_MAX >> 1) -- - int TIFFFillStrip(TIFF* tif, uint32 strip); - int TIFFFillTile(TIFF* tif, uint32 tile); - static int TIFFStartStrip(TIFF* tif, uint32 strip); -@@ -49,6 +46,8 @@ TIFFReadRawTile1(TIFF* tif, uint32 tile, void* buf, tmsize_t size, const char* m - #define THRESHOLD_MULTIPLIER 10 - #define MAX_THRESHOLD (THRESHOLD_MULTIPLIER * THRESHOLD_MULTIPLIER * THRESHOLD_MULTIPLIER * INITIAL_THRESHOLD) - -+#define TIFF_INT64_MAX ((((int64)0x7FFFFFFF) << 32) | 0xFFFFFFFF) -+ - /* Read 'size' bytes in tif_rawdata buffer starting at offset 'rawdata_offset' - * Returns 1 in case of success, 0 otherwise. */ - static int TIFFReadAndRealloc( TIFF* tif, tmsize_t size, -@@ -734,23 +733,8 @@ TIFFReadRawStrip(TIFF* tif, uint32 strip, void* buf, tmsize_t size) - return ((tmsize_t)(-1)); - } - bytecount = td->td_stripbytecount[strip]; -- if ((int64)bytecount <= 0) { --#if defined(__WIN32__) && (defined(_MSC_VER) || defined(__MINGW32__)) -- TIFFErrorExt(tif->tif_clientdata, module, -- "%I64u: Invalid strip byte count, strip %lu", -- (unsigned __int64) bytecount, -- (unsigned long) strip); --#else -- TIFFErrorExt(tif->tif_clientdata, module, -- "%llu: Invalid strip byte count, strip %lu", -- (unsigned long long) bytecount, -- (unsigned long) strip); --#endif -- return ((tmsize_t)(-1)); -- } -- bytecountm = (tmsize_t)bytecount; -- if ((uint64)bytecountm!=bytecount) { -- TIFFErrorExt(tif->tif_clientdata, module, "Integer overflow"); -+ bytecountm = _TIFFCastUInt64ToSSize(tif, bytecount, module); -+ if (bytecountm == 0) { - return ((tmsize_t)(-1)); - } - if (size != (tmsize_t)(-1) && size < bytecountm) -@@ -774,7 +758,7 @@ TIFFFillStrip(TIFF* tif, uint32 strip) - if ((tif->tif_flags&TIFF_NOREADRAW)==0) - { - uint64 bytecount = td->td_stripbytecount[strip]; -- if ((int64)bytecount <= 0) { -+ if( bytecount == 0 || bytecount > (uint64)TIFF_INT64_MAX ) { - #if defined(__WIN32__) && (defined(_MSC_VER) || defined(__MINGW32__)) - TIFFErrorExt(tif->tif_clientdata, module, - "Invalid strip byte count %I64u, strip %lu", -@@ -801,7 +785,7 @@ TIFFFillStrip(TIFF* tif, uint32 strip) - (bytecount - 4096) / 10 > (uint64)stripsize ) - { - uint64 newbytecount = (uint64)stripsize * 10 + 4096; -- if( (int64)newbytecount >= 0 ) -+ if( newbytecount == 0 || newbytecount > (uint64)TIFF_INT64_MAX ) - { - #if defined(__WIN32__) && (defined(_MSC_VER) || defined(__MINGW32__)) - TIFFWarningExt(tif->tif_clientdata, module, -@@ -1196,10 +1180,8 @@ TIFFReadRawTile(TIFF* tif, uint32 tile, void* buf, tmsize_t size) - bytecount64 = td->td_stripbytecount[tile]; - if (size != (tmsize_t)(-1) && (uint64)size < bytecount64) - bytecount64 = (uint64)size; -- bytecountm = (tmsize_t)bytecount64; -- if ((uint64)bytecountm!=bytecount64) -- { -- TIFFErrorExt(tif->tif_clientdata,module,"Integer overflow"); -+ bytecountm = _TIFFCastUInt64ToSSize(tif, bytecount64, module); -+ if( bytecountm == 0 ) { - return ((tmsize_t)(-1)); - } - return (TIFFReadRawTile1(tif, tile, buf, bytecountm, module)); -@@ -1221,7 +1203,7 @@ TIFFFillTile(TIFF* tif, uint32 tile) - if ((tif->tif_flags&TIFF_NOREADRAW)==0) - { - uint64 bytecount = td->td_stripbytecount[tile]; -- if ((int64)bytecount <= 0) { -+ if( bytecount == 0 || bytecount > (uint64)TIFF_INT64_MAX ) { - #if defined(__WIN32__) && (defined(_MSC_VER) || defined(__MINGW32__)) - TIFFErrorExt(tif->tif_clientdata, module, - "%I64u: Invalid tile byte count, tile %lu", -@@ -1248,7 +1230,7 @@ TIFFFillTile(TIFF* tif, uint32 tile) - (bytecount - 4096) / 10 > (uint64)stripsize ) - { - uint64 newbytecount = (uint64)stripsize * 10 + 4096; -- if( (int64)newbytecount >= 0 ) -+ if( newbytecount == 0 || newbytecount > (uint64)TIFF_INT64_MAX ) - { - #if defined(__WIN32__) && (defined(_MSC_VER) || defined(__MINGW32__)) - TIFFWarningExt(tif->tif_clientdata, module, -diff --git a/libtiff/tif_strip.c b/libtiff/tif_strip.c -index 5b76fba5..2366acf0 100644 ---- a/libtiff/tif_strip.c -+++ b/libtiff/tif_strip.c -@@ -129,15 +129,8 @@ TIFFVStripSize(TIFF* tif, uint32 nrows) - { - static const char module[] = "TIFFVStripSize"; - uint64 m; -- tmsize_t n; - m=TIFFVStripSize64(tif,nrows); -- n=(tmsize_t)m; -- if ((uint64)n!=m) -- { -- TIFFErrorExt(tif->tif_clientdata,module,"Integer overflow"); -- n=0; -- } -- return(n); -+ return _TIFFCastUInt64ToSSize(tif, m, module); - } - - /* -@@ -211,15 +204,8 @@ TIFFStripSize(TIFF* tif) - { - static const char module[] = "TIFFStripSize"; - uint64 m; -- tmsize_t n; - m=TIFFStripSize64(tif); -- n=(tmsize_t)m; -- if ((uint64)n!=m) -- { -- TIFFErrorExt(tif->tif_clientdata,module,"Integer overflow"); -- n=0; -- } -- return(n); -+ return _TIFFCastUInt64ToSSize(tif, m, module); - } - - /* -@@ -330,14 +316,8 @@ TIFFScanlineSize(TIFF* tif) - { - static const char module[] = "TIFFScanlineSize"; - uint64 m; -- tmsize_t n; - m=TIFFScanlineSize64(tif); -- n=(tmsize_t)m; -- if ((uint64)n!=m) { -- TIFFErrorExt(tif->tif_clientdata,module,"Integer arithmetic overflow"); -- n=0; -- } -- return(n); -+ return _TIFFCastUInt64ToSSize(tif, m, module); - } - - /* -@@ -366,15 +346,8 @@ TIFFRasterScanlineSize(TIFF* tif) - { - static const char module[] = "TIFFRasterScanlineSize"; - uint64 m; -- tmsize_t n; - m=TIFFRasterScanlineSize64(tif); -- n=(tmsize_t)m; -- if ((uint64)n!=m) -- { -- TIFFErrorExt(tif->tif_clientdata,module,"Integer arithmetic overflow"); -- n=0; -- } -- return(n); -+ return _TIFFCastUInt64ToSSize(tif, m, module); - } - - /* vim: set ts=8 sts=8 sw=8 noet: */ -diff --git a/libtiff/tif_tile.c b/libtiff/tif_tile.c -index 58fe9354..661cc771 100644 ---- a/libtiff/tif_tile.c -+++ b/libtiff/tif_tile.c -@@ -181,15 +181,8 @@ TIFFTileRowSize(TIFF* tif) - { - static const char module[] = "TIFFTileRowSize"; - uint64 m; -- tmsize_t n; - m=TIFFTileRowSize64(tif); -- n=(tmsize_t)m; -- if ((uint64)n!=m) -- { -- TIFFErrorExt(tif->tif_clientdata,module,"Integer overflow"); -- n=0; -- } -- return(n); -+ return _TIFFCastUInt64ToSSize(tif, m, module); - } - - /* -@@ -248,15 +241,8 @@ TIFFVTileSize(TIFF* tif, uint32 nrows) - { - static const char module[] = "TIFFVTileSize"; - uint64 m; -- tmsize_t n; - m=TIFFVTileSize64(tif,nrows); -- n=(tmsize_t)m; -- if ((uint64)n!=m) -- { -- TIFFErrorExt(tif->tif_clientdata,module,"Integer overflow"); -- n=0; -- } -- return(n); -+ return _TIFFCastUInt64ToSSize(tif, m, module); - } - - /* -@@ -272,15 +258,8 @@ TIFFTileSize(TIFF* tif) - { - static const char module[] = "TIFFTileSize"; - uint64 m; -- tmsize_t n; - m=TIFFTileSize64(tif); -- n=(tmsize_t)m; -- if ((uint64)n!=m) -- { -- TIFFErrorExt(tif->tif_clientdata,module,"Integer overflow"); -- n=0; -- } -- return(n); -+ return _TIFFCastUInt64ToSSize(tif, m, module); - } - - /* -diff --git a/libtiff/tiffiop.h b/libtiff/tiffiop.h -index 186c291f..558484fe 100644 ---- a/libtiff/tiffiop.h -+++ b/libtiff/tiffiop.h -@@ -77,6 +77,9 @@ extern int snprintf(char* str, size_t size, const char* format, ...); - #define FALSE 0 - #endif - -+#define TIFF_SIZE_T_MAX ((size_t) ~ ((size_t)0)) -+#define TIFF_TMSIZE_T_MAX (tmsize_t)(TIFF_SIZE_T_MAX >> 1) -+ - typedef struct client_info { - struct client_info *next; - void *data; -@@ -258,7 +261,7 @@ struct tiff { - #define TIFFhowmany8_64(x) (((x)&0x07)?((uint64)(x)>>3)+1:(uint64)(x)>>3) - #define TIFFroundup_64(x, y) (TIFFhowmany_64(x,y)*(y)) - --/* Safe multiply which returns zero if there is an integer overflow */ -+/* Safe multiply which returns zero if there is an *unsigned* integer overflow. This macro is not safe for *signed* integer types */ - #define TIFFSafeMultiply(t,v,m) ((((t)(m) != (t)0) && (((t)(((v)*(m))/(m))) == (t)(v))) ? (t)((v)*(m)) : (t)0) - - #define TIFFmax(A,B) ((A)>(B)?(A):(B)) -@@ -368,6 +371,8 @@ extern TIFFErrorHandlerExt _TIFFerrorHandlerExt; - - extern uint32 _TIFFMultiply32(TIFF*, uint32, uint32, const char*); - extern uint64 _TIFFMultiply64(TIFF*, uint64, uint64, const char*); -+extern tmsize_t _TIFFMultiplySSize(TIFF*, tmsize_t, tmsize_t, const char*); -+extern tmsize_t _TIFFCastUInt64ToSSize(TIFF*, uint64, const char*); - extern void* _TIFFCheckMalloc(TIFF*, tmsize_t, tmsize_t, const char*); - extern void* _TIFFCheckRealloc(TIFF*, void*, tmsize_t, tmsize_t, const char*); - --- -2.17.1 - diff --git a/poky/meta/recipes-multimedia/libtiff/tiff/CVE-2019-6128.patch b/poky/meta/recipes-multimedia/libtiff/tiff/CVE-2019-6128.patch deleted file mode 100644 index 6f1fd4d44..000000000 --- a/poky/meta/recipes-multimedia/libtiff/tiff/CVE-2019-6128.patch +++ /dev/null @@ -1,52 +0,0 @@ -CVE: CVE-2019-6128 -Upstream-Status: Backport -Signed-off-by: Ross Burton <ross.burton@intel.com> - -From 0c74a9f49b8d7a36b17b54a7428b3526d20f88a8 Mon Sep 17 00:00:00 2001 -From: Scott Gayou <github.scott@gmail.com> -Date: Wed, 23 Jan 2019 15:03:53 -0500 -Subject: [PATCH] Fix for simple memory leak that was assigned CVE-2019-6128. - -pal2rgb failed to free memory on a few errors. This was reported -here: http://bugzilla.maptools.org/show_bug.cgi?id=2836. ---- - tools/pal2rgb.c | 7 ++++++- - 1 file changed, 6 insertions(+), 1 deletion(-) - -diff --git a/tools/pal2rgb.c b/tools/pal2rgb.c -index 01d8502ec..9492f1cf1 100644 ---- a/tools/pal2rgb.c -+++ b/tools/pal2rgb.c -@@ -118,12 +118,14 @@ main(int argc, char* argv[]) - shortv != PHOTOMETRIC_PALETTE) { - fprintf(stderr, "%s: Expecting a palette image.\n", - argv[optind]); -+ (void) TIFFClose(in); - return (-1); - } - if (!TIFFGetField(in, TIFFTAG_COLORMAP, &rmap, &gmap, &bmap)) { - fprintf(stderr, - "%s: No colormap (not a valid palette image).\n", - argv[optind]); -+ (void) TIFFClose(in); - return (-1); - } - bitspersample = 0; -@@ -131,11 +133,14 @@ main(int argc, char* argv[]) - if (bitspersample != 8) { - fprintf(stderr, "%s: Sorry, can only handle 8-bit images.\n", - argv[optind]); -+ (void) TIFFClose(in); - return (-1); - } - out = TIFFOpen(argv[optind+1], "w"); -- if (out == NULL) -+ if (out == NULL) { -+ (void) TIFFClose(in); - return (-2); -+ } - cpTags(in, out); - TIFFGetField(in, TIFFTAG_IMAGEWIDTH, &imagewidth); - TIFFGetField(in, TIFFTAG_IMAGELENGTH, &imagelength); --- -2.21.0 diff --git a/poky/meta/recipes-multimedia/libtiff/tiff/CVE-2019-7663.patch b/poky/meta/recipes-multimedia/libtiff/tiff/CVE-2019-7663.patch deleted file mode 100644 index f244fb2f3..000000000 --- a/poky/meta/recipes-multimedia/libtiff/tiff/CVE-2019-7663.patch +++ /dev/null @@ -1,77 +0,0 @@ -CVE: CVE-2019-7663 -Upstream-Status: Backport -Signed-off-by: Ross Burton <ross.burton@intel.com> - -From c6fc6c1fa895024c86285c58efd6424cf8078f32 Mon Sep 17 00:00:00 2001 -From: Thomas Bernard <miniupnp@free.fr> -Date: Mon, 11 Feb 2019 10:05:33 +0100 -Subject: [PATCH 1/2] check that (Tile Width)*(Samples/Pixel) do no overflow - -fixes bug 2833 ---- - tools/tiffcp.c | 8 +++++++- - 1 file changed, 7 insertions(+), 1 deletion(-) - -diff --git a/tools/tiffcp.c b/tools/tiffcp.c -index 2f406e2d..f0ee2c02 100644 ---- a/tools/tiffcp.c -+++ b/tools/tiffcp.c -@@ -1408,7 +1408,7 @@ DECLAREreadFunc(readSeparateTilesIntoBuffer) - int status = 1; - uint32 imagew = TIFFRasterScanlineSize(in); - uint32 tilew = TIFFTileRowSize(in); -- int iskew = imagew - tilew*spp; -+ int iskew; - tsize_t tilesize = TIFFTileSize(in); - tdata_t tilebuf; - uint8* bufp = (uint8*) buf; -@@ -1416,6 +1416,12 @@ DECLAREreadFunc(readSeparateTilesIntoBuffer) - uint32 row; - uint16 bps = 0, bytes_per_sample; - -+ if (spp > (0x7fffffff / tilew)) -+ { -+ TIFFError(TIFFFileName(in), "Error, cannot handle that much samples per tile row (Tile Width * Samples/Pixel)"); -+ return 0; -+ } -+ iskew = imagew - tilew*spp; - tilebuf = _TIFFmalloc(tilesize); - if (tilebuf == 0) - return 0; --- -2.20.1 - - -From da6454aa80b9bb3154dfab4e8b21637de47531e0 Mon Sep 17 00:00:00 2001 -From: Thomas Bernard <miniupnp@free.fr> -Date: Mon, 11 Feb 2019 21:42:03 +0100 -Subject: [PATCH 2/2] tiffcp.c: use INT_MAX - ---- - tools/tiffcp.c | 3 ++- - 1 file changed, 2 insertions(+), 1 deletion(-) - -diff --git a/tools/tiffcp.c b/tools/tiffcp.c -index f0ee2c02..8c81aa4f 100644 ---- a/tools/tiffcp.c -+++ b/tools/tiffcp.c -@@ -41,6 +41,7 @@ - #include <stdio.h> - #include <stdlib.h> - #include <string.h> -+#include <limits.h> - - #include <ctype.h> - -@@ -1416,7 +1417,7 @@ DECLAREreadFunc(readSeparateTilesIntoBuffer) - uint32 row; - uint16 bps = 0, bytes_per_sample; - -- if (spp > (0x7fffffff / tilew)) -+ if (spp > (INT_MAX / tilew)) - { - TIFFError(TIFFFileName(in), "Error, cannot handle that much samples per tile row (Tile Width * Samples/Pixel)"); - return 0; --- -2.20.1 - diff --git a/poky/meta/recipes-multimedia/libtiff/tiff_4.0.10.bb b/poky/meta/recipes-multimedia/libtiff/tiff_4.1.0.bb index 0432763cc..1f92c1851 100644 --- a/poky/meta/recipes-multimedia/libtiff/tiff_4.0.10.bb +++ b/poky/meta/recipes-multimedia/libtiff/tiff_4.1.0.bb @@ -5,12 +5,9 @@ LIC_FILES_CHKSUM = "file://COPYRIGHT;md5=34da3db46fab7501992f9615d7e158cf" CVE_PRODUCT = "libtiff" SRC_URI = "http://download.osgeo.org/libtiff/tiff-${PV}.tar.gz \ - file://CVE-2019-6128.patch \ - file://CVE-2019-7663.patch \ - file://CVE-2019-14973.patch \ -" -SRC_URI[md5sum] = "114192d7ebe537912a2b97408832e7fd" -SRC_URI[sha256sum] = "2c52d11ccaf767457db0c46795d9c7d1a8d8f76f68b0b800a3dfe45786b996e4" + " +SRC_URI[md5sum] = "2165e7aba557463acc0664e71a3ed424" +SRC_URI[sha256sum] = "5d29f32517dadb6dbcd1255ea5bbc93a2b54b94fbf83653b4d65c7d6775b8634" # exclude betas UPSTREAM_CHECK_REGEX = "tiff-(?P<pver>\d+(\.\d+)+).tar" diff --git a/poky/meta/recipes-multimedia/mpg123/mpg123_1.25.12.bb b/poky/meta/recipes-multimedia/mpg123/mpg123_1.25.13.bb index a18b2f441..125574fcf 100644 --- a/poky/meta/recipes-multimedia/mpg123/mpg123_1.25.12.bb +++ b/poky/meta/recipes-multimedia/mpg123/mpg123_1.25.13.bb @@ -11,8 +11,8 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=1e86753638d3cf2512528b99079bc4f3" SRC_URI = "https://www.mpg123.de/download/${BP}.tar.bz2 \ file://sdl2.patch" -SRC_URI[md5sum] = "ddb38254966eb38c77f220d456a1839d" -SRC_URI[sha256sum] = "1ffec7c9683dfb86ea9040d6a53d6ea819ecdda215df347f79def08f1fe731d1" +SRC_URI[md5sum] = "294a6c30546504ec3d0deac2b2ea22be" +SRC_URI[sha256sum] = "90306848359c793fd43b9906e52201df18775742dc3c81c06ab67a806509890a" inherit autotools pkgconfig diff --git a/poky/meta/recipes-sato/l3afpad/l3afpad_git.bb b/poky/meta/recipes-sato/l3afpad/l3afpad_git.bb index ccfda2658..8906c748e 100644 --- a/poky/meta/recipes-sato/l3afpad/l3afpad_git.bb +++ b/poky/meta/recipes-sato/l3afpad/l3afpad_git.bb @@ -17,7 +17,7 @@ SRCREV ="3cdccdc9505643e50f8208171d9eee5de11a42ff" S = "${WORKDIR}/git" -inherit autotools pkgconfig distro_features_check +inherit autotools pkgconfig features_check ANY_OF_DISTRO_FEATURES = "${GTK3DISTROFEATURES}" diff --git a/poky/meta/recipes-sato/matchbox-config-gtk/matchbox-config-gtk_0.2.bb b/poky/meta/recipes-sato/matchbox-config-gtk/matchbox-config-gtk_0.2.bb index b993a9454..547e851c1 100644 --- a/poky/meta/recipes-sato/matchbox-config-gtk/matchbox-config-gtk_0.2.bb +++ b/poky/meta/recipes-sato/matchbox-config-gtk/matchbox-config-gtk_0.2.bb @@ -17,7 +17,7 @@ UPSTREAM_CHECK_GITTAGREGEX = "(?P<pver>(\d+(\.\d+)+))" S = "${WORKDIR}/git" -inherit autotools pkgconfig distro_features_check +inherit autotools pkgconfig features_check # The settings-daemon requires x11 in DISTRO_FEATURES REQUIRED_DISTRO_FEATURES = "x11" diff --git a/poky/meta/recipes-sato/matchbox-desktop/matchbox-desktop_2.2.bb b/poky/meta/recipes-sato/matchbox-desktop/matchbox-desktop_2.2.bb index b0cdfa2ae..5c23e8520 100644 --- a/poky/meta/recipes-sato/matchbox-desktop/matchbox-desktop_2.2.bb +++ b/poky/meta/recipes-sato/matchbox-desktop/matchbox-desktop_2.2.bb @@ -20,7 +20,7 @@ EXTRA_OECONF = "--enable-startup-notification --with-dbus" S = "${WORKDIR}/git" -inherit autotools pkgconfig distro_features_check +inherit autotools pkgconfig features_check # The startup-notification requires x11 in DISTRO_FEATURES REQUIRED_DISTRO_FEATURES = "x11" diff --git a/poky/meta/recipes-sato/matchbox-keyboard/matchbox-keyboard_0.1.1.bb b/poky/meta/recipes-sato/matchbox-keyboard/matchbox-keyboard_0.1.1.bb index 465f1349a..dfc7fbad5 100644 --- a/poky/meta/recipes-sato/matchbox-keyboard/matchbox-keyboard_0.1.1.bb +++ b/poky/meta/recipes-sato/matchbox-keyboard/matchbox-keyboard_0.1.1.bb @@ -18,7 +18,7 @@ SRC_URI = "git://git.yoctoproject.org/${BPN};branch=matchbox-keyboard-0-1 \ S = "${WORKDIR}/git" -inherit autotools pkgconfig gettext gtk-immodules-cache distro_features_check +inherit autotools pkgconfig gettext gtk-immodules-cache features_check # The libxft, libfakekey and matchbox-panel-2 requires x11 in DISTRO_FEATURES REQUIRED_DISTRO_FEATURES = "x11" diff --git a/poky/meta/recipes-sato/matchbox-panel-2/matchbox-panel-2_2.11.bb b/poky/meta/recipes-sato/matchbox-panel-2/matchbox-panel-2_2.11.bb index 421740f98..2e6f5b708 100644 --- a/poky/meta/recipes-sato/matchbox-panel-2/matchbox-panel-2_2.11.bb +++ b/poky/meta/recipes-sato/matchbox-panel-2/matchbox-panel-2_2.11.bb @@ -37,4 +37,4 @@ FILES_${PN} += "${libdir}/matchbox-panel/*.so \ ${datadir}/icons/" FILES_${PN}-dev += "${libdir}/matchbox-panel/*.la" -inherit autotools pkgconfig distro_features_check gettext +inherit autotools pkgconfig features_check gettext diff --git a/poky/meta/recipes-sato/matchbox-sato/matchbox-session-sato_0.1.bb b/poky/meta/recipes-sato/matchbox-sato/matchbox-session-sato_0.1.bb index 8230e9514..966c5b5b9 100644 --- a/poky/meta/recipes-sato/matchbox-sato/matchbox-session-sato_0.1.bb +++ b/poky/meta/recipes-sato/matchbox-sato/matchbox-session-sato_0.1.bb @@ -13,7 +13,7 @@ PR = "r30" # based on the machine architecture. PACKAGE_ARCH = "${MACHINE_ARCH}" -inherit distro_features_check +inherit features_check # The matchbox-theme-sato requires x11 in DISTRO_FEATURES REQUIRED_DISTRO_FEATURES = "x11" diff --git a/poky/meta/recipes-sato/matchbox-terminal/matchbox-terminal_0.2.bb b/poky/meta/recipes-sato/matchbox-terminal/matchbox-terminal_0.2.bb index 7f5eda304..9f00281dd 100644 --- a/poky/meta/recipes-sato/matchbox-terminal/matchbox-terminal_0.2.bb +++ b/poky/meta/recipes-sato/matchbox-terminal/matchbox-terminal_0.2.bb @@ -16,6 +16,6 @@ UPSTREAM_CHECK_GITTAGREGEX = "(?P<pver>(\d+(\.\d+)+))" S = "${WORKDIR}/git" -inherit autotools pkgconfig distro_features_check +inherit autotools pkgconfig features_check ANY_OF_DISTRO_FEATURES = "${GTK3DISTROFEATURES}" diff --git a/poky/meta/recipes-sato/matchbox-theme-sato/matchbox-theme-sato.inc b/poky/meta/recipes-sato/matchbox-theme-sato/matchbox-theme-sato.inc index d947e1ab0..ce683e963 100644 --- a/poky/meta/recipes-sato/matchbox-theme-sato/matchbox-theme-sato.inc +++ b/poky/meta/recipes-sato/matchbox-theme-sato/matchbox-theme-sato.inc @@ -8,7 +8,7 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=aae86bb34b0a83716ca09f4e783d6ba4" DEPENDS = "matchbox-wm" SECTION = "x11/wm" -inherit autotools pkgconfig distro_features_check +inherit autotools pkgconfig features_check FILES_${PN} += "${datadir}/themes" diff --git a/poky/meta/recipes-sato/packagegroups/packagegroup-core-x11-sato.bb b/poky/meta/recipes-sato/packagegroups/packagegroup-core-x11-sato.bb index 7e14ece93..ed3f1a69a 100644 --- a/poky/meta/recipes-sato/packagegroups/packagegroup-core-x11-sato.bb +++ b/poky/meta/recipes-sato/packagegroups/packagegroup-core-x11-sato.bb @@ -7,7 +7,7 @@ PR = "r33" PACKAGE_ARCH = "${MACHINE_ARCH}" -inherit packagegroup distro_features_check +inherit packagegroup features_check REQUIRED_DISTRO_FEATURES = "x11" PACKAGES = "${PN} ${PN}-base ${PN}-apps ${PN}-games" diff --git a/poky/meta/recipes-sato/pcmanfm/pcmanfm_1.3.1.bb b/poky/meta/recipes-sato/pcmanfm/pcmanfm_1.3.1.bb index a5e3a1ad3..c88e1ed8d 100644 --- a/poky/meta/recipes-sato/pcmanfm/pcmanfm_1.3.1.bb +++ b/poky/meta/recipes-sato/pcmanfm/pcmanfm_1.3.1.bb @@ -21,7 +21,7 @@ SRC_URI[sha256sum] = "6804043b3ee3a703edde41c724946174b505fe958703eadbd7e0876ece UPSTREAM_CHECK_URI = "http://sourceforge.net/projects/pcmanfm/files/PCManFM%20%2B%20Libfm%20%28tarball%20release%29/PCManFM/" -inherit autotools pkgconfig distro_features_check +inherit autotools pkgconfig features_check # The startup-notification requires x11 in DISTRO_FEATURES REQUIRED_DISTRO_FEATURES = "x11" diff --git a/poky/meta/recipes-sato/puzzles/puzzles_git.bb b/poky/meta/recipes-sato/puzzles/puzzles_git.bb index 59b952522..5ee9164b8 100644 --- a/poky/meta/recipes-sato/puzzles/puzzles_git.bb +++ b/poky/meta/recipes-sato/puzzles/puzzles_git.bb @@ -24,7 +24,7 @@ PV = "0.0+git${SRCPV}" S = "${WORKDIR}/git" -inherit autotools distro_features_check pkgconfig +inherit autotools features_check pkgconfig PACKAGECONFIG ??= "gtk3" PACKAGECONFIG[gtk2] = "--with-gtk=2,,gtk+," diff --git a/poky/meta/recipes-sato/sato-screenshot/sato-screenshot_0.3.bb b/poky/meta/recipes-sato/sato-screenshot/sato-screenshot_0.3.bb index f3305aef7..f6dac2cf8 100644 --- a/poky/meta/recipes-sato/sato-screenshot/sato-screenshot_0.3.bb +++ b/poky/meta/recipes-sato/sato-screenshot/sato-screenshot_0.3.bb @@ -16,7 +16,7 @@ UPSTREAM_CHECK_GITTAGREGEX = "(?P<pver>(\d+(\.\d+)+))" S = "${WORKDIR}/git" -inherit autotools pkgconfig distro_features_check +inherit autotools pkgconfig features_check FILES_${PN} += "${libdir}/matchbox-panel/*.so" diff --git a/poky/meta/recipes-sato/settings-daemon/settings-daemon_0.0.2.bb b/poky/meta/recipes-sato/settings-daemon/settings-daemon_0.0.2.bb index bb6b69b90..227fd54b7 100644 --- a/poky/meta/recipes-sato/settings-daemon/settings-daemon_0.0.2.bb +++ b/poky/meta/recipes-sato/settings-daemon/settings-daemon_0.0.2.bb @@ -17,7 +17,7 @@ UPSTREAM_CHECK_GITTAGREGEX = "(?P<pver>(\d+(\.\d+)+))" S = "${WORKDIR}/git" -inherit autotools pkgconfig gconf distro_features_check +inherit autotools pkgconfig gconf features_check FILES_${PN} = "${bindir}/* ${sysconfdir}" diff --git a/poky/meta/recipes-sato/webkit/webkitgtk_2.26.1.bb b/poky/meta/recipes-sato/webkit/webkitgtk_2.26.2.bb index 77e51e7d2..0139f0101 100644 --- a/poky/meta/recipes-sato/webkit/webkitgtk_2.26.1.bb +++ b/poky/meta/recipes-sato/webkit/webkitgtk_2.26.2.bb @@ -21,10 +21,10 @@ SRC_URI = "http://www.webkitgtk.org/releases/${BPN}-${PV}.tar.xz \ file://include_array.patch \ " -SRC_URI[md5sum] = "08145bd6c1587230f135921c142bc150" -SRC_URI[sha256sum] = "6b4b21801d2b1008422a1075dbd6fb4ae8b5127503faf657cf9671289d9cd155" +SRC_URI[md5sum] = "65e06fe73ee166447894aaea95038e3b" +SRC_URI[sha256sum] = "6b80f0637a80818559ac8fd50db3b394f41cb61904fb9b3ed65fa51635806512" -inherit cmake pkgconfig gobject-introspection perlnative distro_features_check upstream-version-is-even gtk-doc +inherit cmake pkgconfig gobject-introspection perlnative features_check upstream-version-is-even gtk-doc REQUIRED_DISTRO_FEATURES = "x11 opengl" @@ -99,8 +99,6 @@ EXTRA_OECMAKE_append_x86-x32 = " -DENABLE_JIT=OFF " SECURITY_CFLAGS_remove_aarch64 = "-fpie" SECURITY_CFLAGS_append_aarch64 = " -fPIE" -LDFLAGS_append_toolchain-clang = " -rtlib=compiler-rt" - FILES_${PN} += "${libdir}/webkit2gtk-4.0/injected-bundle/libwebkit2gtkinjectedbundle.so" RRECOMMENDS_${PN} += "ca-certificates shared-mime-info" diff --git a/poky/meta/recipes-support/aspell/aspell_0.60.7.bb b/poky/meta/recipes-support/aspell/aspell_0.60.8.bb index da99d1263..629987810 100644 --- a/poky/meta/recipes-support/aspell/aspell_0.60.7.bb +++ b/poky/meta/recipes-support/aspell/aspell_0.60.8.bb @@ -4,11 +4,9 @@ SECTION = "console/utils" LICENSE = "LGPLv2 | LGPLv2.1" LIC_FILES_CHKSUM = "file://COPYING;md5=7fbc338309ac38fefcd64b04bb903e34" -PR = "r1" - SRC_URI = "${GNU_MIRROR}/aspell/aspell-${PV}.tar.gz" -SRC_URI[md5sum] = "8ef2252609c511cd2bb26f3a3932ef28" -SRC_URI[sha256sum] = "5ca8fc8cb0370cc6c9eb5b64c6d1bc5d57b3750dbf17887726c3407d833b70e4" +SRC_URI[md5sum] = "012fa9209203ae4e5a61c2a668fd10e3" +SRC_URI[sha256sum] = "f9b77e515334a751b2e60daab5db23499e26c9209f5e7b7443b05235ad0226f2" PACKAGECONFIG ??= "" PACKAGECONFIG[curses] = "--enable-curses,--disable-curses,ncurses" diff --git a/poky/meta/recipes-support/atk/at-spi2-atk_2.32.0.bb b/poky/meta/recipes-support/atk/at-spi2-atk_2.32.0.bb index bcf1c9c77..d3a9de1e4 100644 --- a/poky/meta/recipes-support/atk/at-spi2-atk_2.32.0.bb +++ b/poky/meta/recipes-support/atk/at-spi2-atk_2.32.0.bb @@ -9,7 +9,7 @@ SRC_URI[archive.sha256sum] = "0b51e6d339fa2bcca3a3e3159ccea574c67b107f1ac8b00047 DEPENDS = "dbus glib-2.0 glib-2.0-native atk at-spi2-core libxml2" GNOMEBASEBUILDCLASS = "meson" -inherit gnomebase distro_features_check upstream-version-is-even +inherit gnomebase features_check upstream-version-is-even PACKAGES =+ "${PN}-gnome ${PN}-gtk2" diff --git a/poky/meta/recipes-support/boost/boost/0001-dont-setup-compiler-flags-m32-m64.patch b/poky/meta/recipes-support/boost/boost/0001-dont-setup-compiler-flags-m32-m64.patch new file mode 100644 index 000000000..78b19225d --- /dev/null +++ b/poky/meta/recipes-support/boost/boost/0001-dont-setup-compiler-flags-m32-m64.patch @@ -0,0 +1,42 @@ +From 59402e3a61d14eb7ce8c2019ea1a87ad4bd28605 Mon Sep 17 00:00:00 2001 +From: Anuj Mittal <anuj.mittal@intel.com> +Date: Thu, 14 Nov 2019 10:13:53 +0800 +Subject: [PATCH] dont setup compiler flags -m32/-m64 + +We don't want these to be setup by boost as we pass our own flags. + +Upstream-Status: Inappropriate [OE-specific] + +Signed-off-by: Anuj Mittal <anuj.mittal@intel.com> +--- + tools/build/src/tools/gcc.jam | 14 -------------- + 1 file changed, 14 deletions(-) + +diff --git a/tools/build/src/tools/gcc.jam b/tools/build/src/tools/gcc.jam +index c7e3cf3..24486e0 100644 +--- a/tools/build/src/tools/gcc.jam ++++ b/tools/build/src/tools/gcc.jam +@@ -430,20 +430,6 @@ local rule compile-link-flags ( * ) + } + + { +- # Handle address-model +- compile-link-flags <target-os>aix/<address-model>32 : -maix32 ; +- compile-link-flags <target-os>aix/<address-model>64 : -maix64 ; +- +- compile-link-flags <target-os>hpux/<address-model>32 : -milp32 ; +- compile-link-flags <target-os>hpux/<address-model>64 : -mlp64 ; +- +- local generic-os = [ set.difference $(all-os) : aix hpux ] ; +- local arch = power sparc x86 ; +- compile-link-flags <target-os>$(generic-os)/<architecture>$(arch)/<address-model>32 : -m32 ; +- compile-link-flags <target-os>$(generic-os)/<architecture>$(arch)/<address-model>64 : -m64 ; +-} +- +-{ + # Handle threading + local rule threading-flags ( * ) + { +-- +2.7.4 + diff --git a/poky/meta/recipes-support/boost/boost_1.71.0.bb b/poky/meta/recipes-support/boost/boost_1.71.0.bb index 324b46f16..5e9e0d87d 100644 --- a/poky/meta/recipes-support/boost/boost_1.71.0.bb +++ b/poky/meta/recipes-support/boost/boost_1.71.0.bb @@ -6,4 +6,5 @@ SRC_URI += "file://arm-intrinsics.patch \ file://boost-math-disable-pch-for-gcc.patch \ file://0001-Apply-boost-1.62.0-no-forced-flags.patch.patch \ file://0001-Don-t-set-up-arch-instruction-set-flags-we-do-that-o.patch \ + file://0001-dont-setup-compiler-flags-m32-m64.patch \ " diff --git a/poky/meta/recipes-support/consolekit/consolekit_0.4.6.bb b/poky/meta/recipes-support/consolekit/consolekit_0.4.6.bb index a17f739d4..89f2d77b6 100644 --- a/poky/meta/recipes-support/consolekit/consolekit_0.4.6.bb +++ b/poky/meta/recipes-support/consolekit/consolekit_0.4.6.bb @@ -9,7 +9,7 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=59530bdf33659b29e73d4adb9f9f6552 \ DEPENDS = "glib-2.0 glib-2.0-native dbus dbus-glib virtual/libx11" RDEPENDS_${PN} += "base-files" -inherit autotools pkgconfig distro_features_check +inherit autotools pkgconfig features_check # depends on virtual/libx11 REQUIRED_DISTRO_FEATURES = "x11" diff --git a/poky/meta/recipes-support/curl/curl_7.66.0.bb b/poky/meta/recipes-support/curl/curl_7.67.0.bb index d1975f246..e08e08ed4 100644 --- a/poky/meta/recipes-support/curl/curl_7.66.0.bb +++ b/poky/meta/recipes-support/curl/curl_7.67.0.bb @@ -9,8 +9,8 @@ SRC_URI = "http://curl.haxx.se/download/curl-${PV}.tar.bz2 \ file://0001-replace-krb5-config-with-pkg-config.patch \ " -SRC_URI[md5sum] = "c238aa394e3aa47ca4fcb0491774149f" -SRC_URI[sha256sum] = "6618234e0235c420a21f4cb4c2dd0badde76e6139668739085a70c4e2fe7a141" +SRC_URI[md5sum] = "7be288f6fd5b7b5e402ef3b36a461a24" +SRC_URI[sha256sum] = "dd5f6956821a548bf4b44f067a530ce9445cc8094fd3e7e3fc7854815858586c" CVE_PRODUCT = "curl libcurl" inherit autotools pkgconfig binconfig multilib_header diff --git a/poky/meta/recipes-support/gnupg/gnupg_2.2.17.bb b/poky/meta/recipes-support/gnupg/gnupg_2.2.17.bb index 689cf8a75..bb8885f1c 100644 --- a/poky/meta/recipes-support/gnupg/gnupg_2.2.17.bb +++ b/poky/meta/recipes-support/gnupg/gnupg_2.2.17.bb @@ -29,6 +29,21 @@ EXTRA_OECONF = "--disable-ldap \ --with-readline=${STAGING_LIBDIR}/.. \ --enable-gpg-is-gpg2 \ " + +# A minimal package containing just enough to run gpg+gpgagent (E.g. use gpgme in opkg) +PACKAGES =+ "${PN}-gpg" +FILES_${PN}-gpg = " \ + ${bindir}/gpg \ + ${bindir}/gpg2 \ + ${bindir}/gpg-agent \ +" + +# Normal package (gnupg) should depend on minimal package (gnupg-gpg) +# to ensure all tools are included. This is done only in non-native +# builds. Native builds don't have sub-packages, so appending RDEPENDS +# in this case breaks recipe parsing. +RDEPENDS_${PN} += "${@ "" if ("native" in d.getVar("PN")) else (d.getVar("PN") + "-gpg")}" + RRECOMMENDS_${PN} = "pinentry" do_configure_prepend () { @@ -55,4 +70,4 @@ PACKAGECONFIG ??= "gnutls" PACKAGECONFIG[gnutls] = "--enable-gnutls, --disable-gnutls, gnutls" PACKAGECONFIG[sqlite3] = "--enable-sqlite, --disable-sqlite, sqlite3" -BBCLASSEXTEND = "native" +BBCLASSEXTEND = "native nativesdk" diff --git a/poky/meta/recipes-support/libcap-ng/libcap-ng-python_0.7.9.bb b/poky/meta/recipes-support/libcap-ng/libcap-ng-python_0.7.10.bb index 43f76dc56..43f76dc56 100644 --- a/poky/meta/recipes-support/libcap-ng/libcap-ng-python_0.7.9.bb +++ b/poky/meta/recipes-support/libcap-ng/libcap-ng-python_0.7.10.bb diff --git a/poky/meta/recipes-support/libcap-ng/libcap-ng.inc b/poky/meta/recipes-support/libcap-ng/libcap-ng.inc index 739b91fd2..aec83896e 100644 --- a/poky/meta/recipes-support/libcap-ng/libcap-ng.inc +++ b/poky/meta/recipes-support/libcap-ng/libcap-ng.inc @@ -11,7 +11,7 @@ SRC_URI = "http://people.redhat.com/sgrubb/libcap-ng/libcap-ng-${PV}.tar.gz \ file://python.patch \ " -SRC_URI[md5sum] = "2398d695508fab9ce33668c53a89b0e9" -SRC_URI[sha256sum] = "4a1532bcf3731aade40936f6d6a586ed5a66ca4c7455e1338d1f6c3e09221328" +SRC_URI[md5sum] = "57dc267e2949cdecb651a929f9206572" +SRC_URI[sha256sum] = "a84ca7b4e0444283ed269b7a29f5b6187f647c82e2b876636b49b9a744f0ffbf" -BBCLASSEXTEND = "native nativesdk"
\ No newline at end of file +BBCLASSEXTEND = "native nativesdk" diff --git a/poky/meta/recipes-support/libcap-ng/libcap-ng_0.7.9.bb b/poky/meta/recipes-support/libcap-ng/libcap-ng_0.7.10.bb index 6e6de4549..a9a046571 100644 --- a/poky/meta/recipes-support/libcap-ng/libcap-ng_0.7.9.bb +++ b/poky/meta/recipes-support/libcap-ng/libcap-ng_0.7.10.bb @@ -3,6 +3,7 @@ require libcap-ng.inc inherit lib_package autotools EXTRA_OECONF += "--without-python --without-python3" +LDFLAGS_append_class-native = " -pthread" BBCLASSEXTEND = "native nativesdk" diff --git a/poky/meta/recipes-support/libcheck/libcheck_0.12.0.bb b/poky/meta/recipes-support/libcheck/libcheck_0.13.0.bb index 25ac2c4b2..226417f99 100644 --- a/poky/meta/recipes-support/libcheck/libcheck_0.12.0.bb +++ b/poky/meta/recipes-support/libcheck/libcheck_0.13.0.bb @@ -7,8 +7,8 @@ LIC_FILES_CHKSUM = "file://COPYING.LESSER;md5=2d5025d4aa3495befef8f17206a5b0a1" SRC_URI = "https://github.com/${BPN}/check/releases/download/${PV}/check-${PV}.tar.gz \ file://not-echo-compiler-info-to-check_stdint.h.patch" -SRC_URI[md5sum] = "31b17c6075820a434119592941186f70" -SRC_URI[sha256sum] = "464201098bee00e90f5c4bdfa94a5d3ead8d641f9025b560a27755a83b824234" +SRC_URI[md5sum] = "2c730c40b08482eaeb10132517970593" +SRC_URI[sha256sum] = "c4336b31447acc7e3266854f73ec188cdb15554d0edd44739631da174a569909" UPSTREAM_CHECK_URI = "https://github.com/libcheck/check/releases/" S = "${WORKDIR}/check-${PV}" diff --git a/poky/meta/recipes-support/libevent/libevent_2.1.11.bb b/poky/meta/recipes-support/libevent/libevent_2.1.11.bb index f005ab8bd..8c7c49e7d 100644 --- a/poky/meta/recipes-support/libevent/libevent_2.1.11.bb +++ b/poky/meta/recipes-support/libevent/libevent_2.1.11.bb @@ -31,9 +31,17 @@ inherit ptest multilib_header DEPENDS = "zlib" +PACKAGES_DYNAMIC = "^${PN}-.*$" +python split_libevent_libs () { + do_split_packages(d, '${libdir}', r'^libevent_([a-z]*)-.*\.so\..*', '${PN}-%s', '${SUMMARY} (%s)', prepend=True, allow_links=True) +} +PACKAGESPLITFUNCS_prepend = "split_libevent_libs " + BBCLASSEXTEND = "native nativesdk" do_install_append() { + rm ${D}${bindir}/event_rpcgen.py + rmdir ${D}${bindir} oe_multilib_header event2/event-config.h } diff --git a/poky/meta/recipes-support/libfm/libfm_1.3.1.bb b/poky/meta/recipes-support/libfm/libfm_1.3.1.bb index 65a6f8e78..918fe3ece 100644 --- a/poky/meta/recipes-support/libfm/libfm_1.3.1.bb +++ b/poky/meta/recipes-support/libfm/libfm_1.3.1.bb @@ -19,7 +19,7 @@ SRC_URI = "${SOURCEFORGE_MIRROR}/pcmanfm/libfm-${PV}.tar.xz \ SRC_URI[md5sum] = "c15ecd2c9317e2c385cd3f046d0b61ba" SRC_URI[sha256sum] = "96b1244bde41ca0eef0332cfb5c67bb16725dfd102128f3e6f74fadc13a1cfe4" -inherit autotools pkgconfig gtk-doc gettext distro_features_check +inherit autotools pkgconfig gtk-doc gettext features_check ANY_OF_DISTRO_FEATURES = "${GTK3DISTROFEATURES}" EXTRA_OECONF = "--with-gtk=3" diff --git a/poky/meta/recipes-support/libgcrypt/files/0001-Prefetch-GCM-look-up-tables.patch b/poky/meta/recipes-support/libgcrypt/files/0001-Prefetch-GCM-look-up-tables.patch new file mode 100644 index 000000000..4df96f001 --- /dev/null +++ b/poky/meta/recipes-support/libgcrypt/files/0001-Prefetch-GCM-look-up-tables.patch @@ -0,0 +1,90 @@ +From 1374254c2904ab5b18ba4a890856824a102d4705 Mon Sep 17 00:00:00 2001 +From: Jussi Kivilinna <jussi.kivilinna@iki.fi> +Date: Sat, 27 Apr 2019 19:33:28 +0300 +Subject: [PATCH 1/3] Prefetch GCM look-up tables + +* cipher/cipher-gcm.c (prefetch_table, do_prefetch_tables) +(prefetch_tables): New. +(ghash_internal): Call prefetch_tables. +-- + +Signed-off-by: Jussi Kivilinna <jussi.kivilinna@iki.fi> + +Upstream-Status: Backport +[https://github.com/gpg/libgcrypt/commit/1374254c2904ab5b18ba4a890856824a102d4705] + +CVE: CVE-2019-12904 + +Signed-off-by: Yi Zhao <yi.zhao@windriver.com> +--- + cipher/cipher-gcm.c | 33 +++++++++++++++++++++++++++++++++ + 1 file changed, 33 insertions(+) + +diff --git a/cipher/cipher-gcm.c b/cipher/cipher-gcm.c +index c19f09f..11f119a 100644 +--- a/cipher/cipher-gcm.c ++++ b/cipher/cipher-gcm.c +@@ -118,6 +118,34 @@ static const u16 gcmR[256] = { + 0xbbf0, 0xba32, 0xb874, 0xb9b6, 0xbcf8, 0xbd3a, 0xbf7c, 0xbebe, + }; + ++static inline ++void prefetch_table(const void *tab, size_t len) ++{ ++ const volatile byte *vtab = tab; ++ size_t i; ++ ++ for (i = 0; i < len; i += 8 * 32) ++ { ++ (void)vtab[i + 0 * 32]; ++ (void)vtab[i + 1 * 32]; ++ (void)vtab[i + 2 * 32]; ++ (void)vtab[i + 3 * 32]; ++ (void)vtab[i + 4 * 32]; ++ (void)vtab[i + 5 * 32]; ++ (void)vtab[i + 6 * 32]; ++ (void)vtab[i + 7 * 32]; ++ } ++ ++ (void)vtab[len - 1]; ++} ++ ++static inline void ++do_prefetch_tables (const void *gcmM, size_t gcmM_size) ++{ ++ prefetch_table(gcmM, gcmM_size); ++ prefetch_table(gcmR, sizeof(gcmR)); ++} ++ + #ifdef GCM_TABLES_USE_U64 + static void + bshift (u64 * b0, u64 * b1) +@@ -365,6 +393,8 @@ do_ghash (unsigned char *result, const unsigned char *buf, const u32 *gcmM) + #define fillM(c) \ + do_fillM (c->u_mode.gcm.u_ghash_key.key, c->u_mode.gcm.gcm_table) + #define GHASH(c, result, buf) do_ghash (result, buf, c->u_mode.gcm.gcm_table) ++#define prefetch_tables(c) \ ++ do_prefetch_tables(c->u_mode.gcm.gcm_table, sizeof(c->u_mode.gcm.gcm_table)) + + #else + +@@ -430,6 +460,7 @@ do_ghash (unsigned char *hsub, unsigned char *result, const unsigned char *buf) + + #define fillM(c) do { } while (0) + #define GHASH(c, result, buf) do_ghash (c->u_mode.gcm.u_ghash_key.key, result, buf) ++#define prefetch_tables(c) do {} while (0) + + #endif /* !GCM_USE_TABLES */ + +@@ -441,6 +472,8 @@ ghash_internal (gcry_cipher_hd_t c, byte *result, const byte *buf, + const unsigned int blocksize = GCRY_GCM_BLOCK_LEN; + unsigned int burn = 0; + ++ prefetch_tables (c); ++ + while (nblocks) + { + burn = GHASH (c, result, buf); +-- +2.7.4 + diff --git a/poky/meta/recipes-support/libgcrypt/files/0001-Add-and-use-pkg-config-for-libgcrypt-instead-of-conf.patch b/poky/meta/recipes-support/libgcrypt/files/0001-libgcrypt-fix-m4-file-for-oe-core.patch index d41c3de3b..cd8a5993b 100644 --- a/poky/meta/recipes-support/libgcrypt/files/0001-Add-and-use-pkg-config-for-libgcrypt-instead-of-conf.patch +++ b/poky/meta/recipes-support/libgcrypt/files/0001-libgcrypt-fix-m4-file-for-oe-core.patch @@ -1,41 +1,26 @@ -From 72b9e9040d58c15f0302bd8abda28179f04e1c5f Mon Sep 17 00:00:00 2001 -From: Richard Purdie <richard.purdie@linuxfoundation.org> -Date: Wed, 16 Aug 2017 10:43:18 +0800 -Subject: [PATCH 1/4] Add and use pkg-config for libgcrypt instead of -config - scripts. +From bee26d7c4ea0b4a397c289b819b89e78bc325ba0 Mon Sep 17 00:00:00 2001 +From: Trevor Gamblin <trevor.gamblin@windriver.com> +Date: Tue, 29 Oct 2019 14:08:32 -0400 +Subject: [PATCH] libgcrypt: fix m4 file for oe-core -Upstream-Status: Denied [upstream have indicated they don't want a -pkg-config dependency] +Modify libgcrypt pkgconfig specifically for oe-core. Changes +are based on a previous patch from RP, using wiggle to +incorporate the parts that aren't in the upstream pkgconfig +settings. -RP 2014/5/22 +Upstream-Status: Inappropriate [oe-specific] -Rebase to 1.8.0 +Signed-off-by: Trevor Gamblin <trevor.gamblin@windriver.com> -Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> --- - configure.ac | 1 + - src/libgcrypt.m4 | 71 +++-------------------------------------------------- - src/libgcrypt.pc.in | 33 +++++++++++++++++++++++++ - 3 files changed, 38 insertions(+), 67 deletions(-) - create mode 100644 src/libgcrypt.pc.in + src/libgcrypt.m4 | 90 +++--------------------------------------------- + 1 file changed, 4 insertions(+), 86 deletions(-) -diff --git a/configure.ac b/configure.ac -index bbe8104..3d2de73 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -2607,6 +2607,7 @@ random/Makefile - doc/Makefile - src/Makefile - src/gcrypt.h -+src/libgcrypt.pc - src/libgcrypt-config - src/versioninfo.rc - tests/Makefile diff --git a/src/libgcrypt.m4 b/src/libgcrypt.m4 -index c67cfec..4ea5f2c 100644 +index 37dfbea2..3d2e90a8 100644 --- a/src/libgcrypt.m4 +++ b/src/libgcrypt.m4 -@@ -29,30 +29,6 @@ dnl is added to the gpg_config_script_warn variable. +@@ -29,41 +29,6 @@ dnl is added to the gpg_config_script_warn variable. dnl AC_DEFUN([AM_PATH_LIBGCRYPT], [ AC_REQUIRE([AC_CANONICAL_HOST]) @@ -46,8 +31,20 @@ index c67cfec..4ea5f2c 100644 - if test x"${LIBGCRYPT_CONFIG}" = x ; then - if test x"${libgcrypt_config_prefix}" != x ; then - LIBGCRYPT_CONFIG="${libgcrypt_config_prefix}/bin/libgcrypt-config" -- else -- case "${SYSROOT}" in +- fi +- fi +- +- use_gpgrt_config="" +- if test x"${LIBGCRYPT_CONFIG}" = x -a x"$GPGRT_CONFIG" != x -a "$GPGRT_CONFIG" != "no"; then +- if $GPGRT_CONFIG libgcrypt --exists; then +- LIBGCRYPT_CONFIG="$GPGRT_CONFIG libgcrypt" +- AC_MSG_NOTICE([Use gpgrt-config as libgcrypt-config]) +- use_gpgrt_config=yes +- fi +- fi +- if test -z "$use_gpgrt_config"; then +- if test x"${LIBGCRYPT_CONFIG}" = x ; then +- case "${SYSROOT}" in - /*) - if test -x "${SYSROOT}/bin/libgcrypt-config" ; then - LIBGCRYPT_CONFIG="${SYSROOT}/bin/libgcrypt-config" @@ -58,15 +55,14 @@ index c67cfec..4ea5f2c 100644 - *) - AC_MSG_WARN([Ignoring \$SYSROOT as it is not an absolute path.]) - ;; -- esac -- fi +- esac +- fi +- AC_PATH_PROG(LIBGCRYPT_CONFIG, libgcrypt-config, no) - fi -- -- AC_PATH_PROG(LIBGCRYPT_CONFIG, libgcrypt-config, no) + tmp=ifelse([$1], ,1:1.2.0,$1) if echo "$tmp" | grep ':' >/dev/null 2>/dev/null ; then - req_libgcrypt_api=`echo "$tmp" | sed 's/\(.*\):\(.*\)/\1/'` -@@ -62,48 +38,13 @@ AC_DEFUN([AM_PATH_LIBGCRYPT], +@@ -74,56 +39,13 @@ AC_DEFUN([AM_PATH_LIBGCRYPT], min_libgcrypt_version="$tmp" fi @@ -79,7 +75,11 @@ index c67cfec..4ea5f2c 100644 - sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\)/\2/'` - req_micro=`echo $min_libgcrypt_version | \ - sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\)/\3/'` -- libgcrypt_config_version=`$LIBGCRYPT_CONFIG --version` +- if test -z "$use_gpgrt_config"; then +- libgcrypt_config_version=`$LIBGCRYPT_CONFIG --version` +- else +- libgcrypt_config_version=`$LIBGCRYPT_CONFIG --modversion` +- fi - major=`echo $libgcrypt_config_version | \ - sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\).*/\1/'` - minor=`echo $libgcrypt_config_version | \ @@ -113,24 +113,29 @@ index c67cfec..4ea5f2c 100644 # If we have a recent libgcrypt, we should also check that the # API is compatible if test "$req_libgcrypt_api" -gt 0 ; then -- tmp=`$LIBGCRYPT_CONFIG --api-version 2>/dev/null || echo 0` +- if test -z "$use_gpgrt_config"; then +- tmp=`$LIBGCRYPT_CONFIG --api-version 2>/dev/null || echo 0` +- else +- tmp=`$LIBGCRYPT_CONFIG --variable=api_version 2>/dev/null || echo 0` +- fi + tmp=`$PKG_CONFIG --variable=api_version libgcrypt` if test "$tmp" -gt 0 ; then AC_MSG_CHECKING([LIBGCRYPT API version]) if test "$req_libgcrypt_api" -eq "$tmp" ; then -@@ -116,10 +57,8 @@ AC_DEFUN([AM_PATH_LIBGCRYPT], +@@ -136,11 +58,9 @@ AC_DEFUN([AM_PATH_LIBGCRYPT], fi fi if test $ok = yes; then - LIBGCRYPT_CFLAGS=`$LIBGCRYPT_CONFIG --cflags` - LIBGCRYPT_LIBS=`$LIBGCRYPT_CONFIG --libs` ifelse([$2], , :, [$2]) -- libgcrypt_config_host=`$LIBGCRYPT_CONFIG --host 2>/dev/null || echo none` -+ libgcrypt_config_host=`$PKG_CONFIG --variable=host libgcrypt` - if test x"$libgcrypt_config_host" != xnone ; then - if test x"$libgcrypt_config_host" != x"$host" ; then - AC_MSG_WARN([[ -@@ -134,8 +73,6 @@ AC_DEFUN([AM_PATH_LIBGCRYPT], + if test -z "$use_gpgrt_config"; then +- libgcrypt_config_host=`$LIBGCRYPT_CONFIG --host 2>/dev/null || echo none` ++ libgcrypt_config_host=`$PKG_CONFIG --variable=host libgcrypt` + else + libgcrypt_config_host=`$LIBGCRYPT_CONFIG --variable=host 2>/dev/null || echo none` + fi +@@ -158,8 +78,6 @@ AC_DEFUN([AM_PATH_LIBGCRYPT], fi fi else @@ -139,45 +144,6 @@ index c67cfec..4ea5f2c 100644 ifelse([$3], , :, [$3]) fi AC_SUBST(LIBGCRYPT_CFLAGS) -diff --git a/src/libgcrypt.pc.in b/src/libgcrypt.pc.in -new file mode 100644 -index 0000000..2fc8f53 ---- /dev/null -+++ b/src/libgcrypt.pc.in -@@ -0,0 +1,33 @@ -+# Process this file with autoconf to produce a pkg-config metadata file. -+# Copyright (C) 2002, 2003, 2004, 2005, 2006 Free Software Foundation -+# Author: Simon Josefsson -+# -+# This file is free software; as a special exception the author gives -+# unlimited permission to copy and/or distribute it, with or without -+# modifications, as long as this notice is preserved. -+# -+# This file is distributed in the hope that it will be useful, but -+# WITHOUT ANY WARRANTY, to the extent permitted by law; without even the -+# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. -+ -+prefix=@prefix@ -+exec_prefix=@exec_prefix@ -+libdir=@libdir@ -+includedir=@includedir@ -+ -+# API info -+api_version=@LIBGCRYPT_CONFIG_API_VERSION@ -+host=@LIBGCRYPT_CONFIG_HOST@ -+ -+# Misc information. -+symmetric_ciphers=@LIBGCRYPT_CIPHERS@ -+asymmetric_ciphers=@LIBGCRYPT_PUBKEY_CIPHERS@ -+digests=@LIBGCRYPT_DIGESTS@ -+ -+Name: libgcrypt -+Description: GNU crypto library -+URL: http://www.gnupg.org -+Version: @VERSION@ -+Libs: -L${libdir} -lgcrypt -+Libs.private: -L${libdir} -lgpg-error -+Cflags: -I${includedir} -- -1.8.3.1 +2.17.1 diff --git a/poky/meta/recipes-support/libgcrypt/files/0002-AES-move-look-up-tables-to-.data-section-and-unshare.patch b/poky/meta/recipes-support/libgcrypt/files/0002-AES-move-look-up-tables-to-.data-section-and-unshare.patch new file mode 100644 index 000000000..c82c5b5c8 --- /dev/null +++ b/poky/meta/recipes-support/libgcrypt/files/0002-AES-move-look-up-tables-to-.data-section-and-unshare.patch @@ -0,0 +1,332 @@ +From 119348dd9aa52ab229afb5e2d3342d2b76fe81bf Mon Sep 17 00:00:00 2001 +From: Jussi Kivilinna <jussi.kivilinna@iki.fi> +Date: Fri, 31 May 2019 17:18:09 +0300 +Subject: [PATCH 2/3] AES: move look-up tables to .data section and unshare between + processes + +* cipher/rijndael-internal.h (ATTR_ALIGNED_64): New. +* cipher/rijndael-tables.h (encT): Move to 'enc_tables' structure. +(enc_tables): New structure for encryption table with counters before +and after. +(encT): New macro. +(dec_tables): Add counters before and after encryption table; Move +from .rodata to .data section. +(do_encrypt): Change 'encT' to 'enc_tables.T'. +(do_decrypt): Change '&dec_tables' to 'dec_tables.T'. +* cipher/cipher-gcm.c (prefetch_table): Make inline; Handle input +with length not multiple of 256. +(prefetch_enc, prefetch_dec): Modify pre- and post-table counters +to unshare look-up table pages between processes. +-- + +GnuPG-bug-id: 4541 +Signed-off-by: Jussi Kivilinna <jussi.kivilinna@iki.fi> + +Upstream-Status: Backport +[https://github.com/gpg/libgcrypt/commit/daedbbb5541cd8ecda1459d3b843ea4d92788762] + +CVE: CVE-2019-12904 + +Signed-off-by: Yi Zhao <yi.zhao@windriver.com> +--- + cipher/rijndael-internal.h | 4 +- + cipher/rijndael-tables.h | 155 +++++++++++++++++++++++++-------------------- + cipher/rijndael.c | 35 ++++++++-- + 3 files changed, 118 insertions(+), 76 deletions(-) + +diff --git a/cipher/rijndael-internal.h b/cipher/rijndael-internal.h +index 160fb8c..a62d4b7 100644 +--- a/cipher/rijndael-internal.h ++++ b/cipher/rijndael-internal.h +@@ -29,11 +29,13 @@ + #define BLOCKSIZE (128/8) + + +-/* Helper macro to force alignment to 16 bytes. */ ++/* Helper macro to force alignment to 16 or 64 bytes. */ + #ifdef HAVE_GCC_ATTRIBUTE_ALIGNED + # define ATTR_ALIGNED_16 __attribute__ ((aligned (16))) ++# define ATTR_ALIGNED_64 __attribute__ ((aligned (64))) + #else + # define ATTR_ALIGNED_16 ++# define ATTR_ALIGNED_64 + #endif + + +diff --git a/cipher/rijndael-tables.h b/cipher/rijndael-tables.h +index 8359470..b54d959 100644 +--- a/cipher/rijndael-tables.h ++++ b/cipher/rijndael-tables.h +@@ -21,80 +21,98 @@ + /* To keep the actual implementation at a readable size we use this + include file to define the tables. */ + +-static const u32 encT[256] = ++static struct ++{ ++ volatile u32 counter_head; ++ u32 cacheline_align[64 / 4 - 1]; ++ u32 T[256]; ++ volatile u32 counter_tail; ++} enc_tables ATTR_ALIGNED_64 = + { +- 0xa56363c6, 0x847c7cf8, 0x997777ee, 0x8d7b7bf6, +- 0x0df2f2ff, 0xbd6b6bd6, 0xb16f6fde, 0x54c5c591, +- 0x50303060, 0x03010102, 0xa96767ce, 0x7d2b2b56, +- 0x19fefee7, 0x62d7d7b5, 0xe6abab4d, 0x9a7676ec, +- 0x45caca8f, 0x9d82821f, 0x40c9c989, 0x877d7dfa, +- 0x15fafaef, 0xeb5959b2, 0xc947478e, 0x0bf0f0fb, +- 0xecadad41, 0x67d4d4b3, 0xfda2a25f, 0xeaafaf45, +- 0xbf9c9c23, 0xf7a4a453, 0x967272e4, 0x5bc0c09b, +- 0xc2b7b775, 0x1cfdfde1, 0xae93933d, 0x6a26264c, +- 0x5a36366c, 0x413f3f7e, 0x02f7f7f5, 0x4fcccc83, +- 0x5c343468, 0xf4a5a551, 0x34e5e5d1, 0x08f1f1f9, +- 0x937171e2, 0x73d8d8ab, 0x53313162, 0x3f15152a, +- 0x0c040408, 0x52c7c795, 0x65232346, 0x5ec3c39d, +- 0x28181830, 0xa1969637, 0x0f05050a, 0xb59a9a2f, +- 0x0907070e, 0x36121224, 0x9b80801b, 0x3de2e2df, +- 0x26ebebcd, 0x6927274e, 0xcdb2b27f, 0x9f7575ea, +- 0x1b090912, 0x9e83831d, 0x742c2c58, 0x2e1a1a34, +- 0x2d1b1b36, 0xb26e6edc, 0xee5a5ab4, 0xfba0a05b, +- 0xf65252a4, 0x4d3b3b76, 0x61d6d6b7, 0xceb3b37d, +- 0x7b292952, 0x3ee3e3dd, 0x712f2f5e, 0x97848413, +- 0xf55353a6, 0x68d1d1b9, 0x00000000, 0x2cededc1, +- 0x60202040, 0x1ffcfce3, 0xc8b1b179, 0xed5b5bb6, +- 0xbe6a6ad4, 0x46cbcb8d, 0xd9bebe67, 0x4b393972, +- 0xde4a4a94, 0xd44c4c98, 0xe85858b0, 0x4acfcf85, +- 0x6bd0d0bb, 0x2aefefc5, 0xe5aaaa4f, 0x16fbfbed, +- 0xc5434386, 0xd74d4d9a, 0x55333366, 0x94858511, +- 0xcf45458a, 0x10f9f9e9, 0x06020204, 0x817f7ffe, +- 0xf05050a0, 0x443c3c78, 0xba9f9f25, 0xe3a8a84b, +- 0xf35151a2, 0xfea3a35d, 0xc0404080, 0x8a8f8f05, +- 0xad92923f, 0xbc9d9d21, 0x48383870, 0x04f5f5f1, +- 0xdfbcbc63, 0xc1b6b677, 0x75dadaaf, 0x63212142, +- 0x30101020, 0x1affffe5, 0x0ef3f3fd, 0x6dd2d2bf, +- 0x4ccdcd81, 0x140c0c18, 0x35131326, 0x2fececc3, +- 0xe15f5fbe, 0xa2979735, 0xcc444488, 0x3917172e, +- 0x57c4c493, 0xf2a7a755, 0x827e7efc, 0x473d3d7a, +- 0xac6464c8, 0xe75d5dba, 0x2b191932, 0x957373e6, +- 0xa06060c0, 0x98818119, 0xd14f4f9e, 0x7fdcdca3, +- 0x66222244, 0x7e2a2a54, 0xab90903b, 0x8388880b, +- 0xca46468c, 0x29eeeec7, 0xd3b8b86b, 0x3c141428, +- 0x79dedea7, 0xe25e5ebc, 0x1d0b0b16, 0x76dbdbad, +- 0x3be0e0db, 0x56323264, 0x4e3a3a74, 0x1e0a0a14, +- 0xdb494992, 0x0a06060c, 0x6c242448, 0xe45c5cb8, +- 0x5dc2c29f, 0x6ed3d3bd, 0xefacac43, 0xa66262c4, +- 0xa8919139, 0xa4959531, 0x37e4e4d3, 0x8b7979f2, +- 0x32e7e7d5, 0x43c8c88b, 0x5937376e, 0xb76d6dda, +- 0x8c8d8d01, 0x64d5d5b1, 0xd24e4e9c, 0xe0a9a949, +- 0xb46c6cd8, 0xfa5656ac, 0x07f4f4f3, 0x25eaeacf, +- 0xaf6565ca, 0x8e7a7af4, 0xe9aeae47, 0x18080810, +- 0xd5baba6f, 0x887878f0, 0x6f25254a, 0x722e2e5c, +- 0x241c1c38, 0xf1a6a657, 0xc7b4b473, 0x51c6c697, +- 0x23e8e8cb, 0x7cdddda1, 0x9c7474e8, 0x211f1f3e, +- 0xdd4b4b96, 0xdcbdbd61, 0x868b8b0d, 0x858a8a0f, +- 0x907070e0, 0x423e3e7c, 0xc4b5b571, 0xaa6666cc, +- 0xd8484890, 0x05030306, 0x01f6f6f7, 0x120e0e1c, +- 0xa36161c2, 0x5f35356a, 0xf95757ae, 0xd0b9b969, +- 0x91868617, 0x58c1c199, 0x271d1d3a, 0xb99e9e27, +- 0x38e1e1d9, 0x13f8f8eb, 0xb398982b, 0x33111122, +- 0xbb6969d2, 0x70d9d9a9, 0x898e8e07, 0xa7949433, +- 0xb69b9b2d, 0x221e1e3c, 0x92878715, 0x20e9e9c9, +- 0x49cece87, 0xff5555aa, 0x78282850, 0x7adfdfa5, +- 0x8f8c8c03, 0xf8a1a159, 0x80898909, 0x170d0d1a, +- 0xdabfbf65, 0x31e6e6d7, 0xc6424284, 0xb86868d0, +- 0xc3414182, 0xb0999929, 0x772d2d5a, 0x110f0f1e, +- 0xcbb0b07b, 0xfc5454a8, 0xd6bbbb6d, 0x3a16162c ++ 0, ++ { 0, }, ++ { ++ 0xa56363c6, 0x847c7cf8, 0x997777ee, 0x8d7b7bf6, ++ 0x0df2f2ff, 0xbd6b6bd6, 0xb16f6fde, 0x54c5c591, ++ 0x50303060, 0x03010102, 0xa96767ce, 0x7d2b2b56, ++ 0x19fefee7, 0x62d7d7b5, 0xe6abab4d, 0x9a7676ec, ++ 0x45caca8f, 0x9d82821f, 0x40c9c989, 0x877d7dfa, ++ 0x15fafaef, 0xeb5959b2, 0xc947478e, 0x0bf0f0fb, ++ 0xecadad41, 0x67d4d4b3, 0xfda2a25f, 0xeaafaf45, ++ 0xbf9c9c23, 0xf7a4a453, 0x967272e4, 0x5bc0c09b, ++ 0xc2b7b775, 0x1cfdfde1, 0xae93933d, 0x6a26264c, ++ 0x5a36366c, 0x413f3f7e, 0x02f7f7f5, 0x4fcccc83, ++ 0x5c343468, 0xf4a5a551, 0x34e5e5d1, 0x08f1f1f9, ++ 0x937171e2, 0x73d8d8ab, 0x53313162, 0x3f15152a, ++ 0x0c040408, 0x52c7c795, 0x65232346, 0x5ec3c39d, ++ 0x28181830, 0xa1969637, 0x0f05050a, 0xb59a9a2f, ++ 0x0907070e, 0x36121224, 0x9b80801b, 0x3de2e2df, ++ 0x26ebebcd, 0x6927274e, 0xcdb2b27f, 0x9f7575ea, ++ 0x1b090912, 0x9e83831d, 0x742c2c58, 0x2e1a1a34, ++ 0x2d1b1b36, 0xb26e6edc, 0xee5a5ab4, 0xfba0a05b, ++ 0xf65252a4, 0x4d3b3b76, 0x61d6d6b7, 0xceb3b37d, ++ 0x7b292952, 0x3ee3e3dd, 0x712f2f5e, 0x97848413, ++ 0xf55353a6, 0x68d1d1b9, 0x00000000, 0x2cededc1, ++ 0x60202040, 0x1ffcfce3, 0xc8b1b179, 0xed5b5bb6, ++ 0xbe6a6ad4, 0x46cbcb8d, 0xd9bebe67, 0x4b393972, ++ 0xde4a4a94, 0xd44c4c98, 0xe85858b0, 0x4acfcf85, ++ 0x6bd0d0bb, 0x2aefefc5, 0xe5aaaa4f, 0x16fbfbed, ++ 0xc5434386, 0xd74d4d9a, 0x55333366, 0x94858511, ++ 0xcf45458a, 0x10f9f9e9, 0x06020204, 0x817f7ffe, ++ 0xf05050a0, 0x443c3c78, 0xba9f9f25, 0xe3a8a84b, ++ 0xf35151a2, 0xfea3a35d, 0xc0404080, 0x8a8f8f05, ++ 0xad92923f, 0xbc9d9d21, 0x48383870, 0x04f5f5f1, ++ 0xdfbcbc63, 0xc1b6b677, 0x75dadaaf, 0x63212142, ++ 0x30101020, 0x1affffe5, 0x0ef3f3fd, 0x6dd2d2bf, ++ 0x4ccdcd81, 0x140c0c18, 0x35131326, 0x2fececc3, ++ 0xe15f5fbe, 0xa2979735, 0xcc444488, 0x3917172e, ++ 0x57c4c493, 0xf2a7a755, 0x827e7efc, 0x473d3d7a, ++ 0xac6464c8, 0xe75d5dba, 0x2b191932, 0x957373e6, ++ 0xa06060c0, 0x98818119, 0xd14f4f9e, 0x7fdcdca3, ++ 0x66222244, 0x7e2a2a54, 0xab90903b, 0x8388880b, ++ 0xca46468c, 0x29eeeec7, 0xd3b8b86b, 0x3c141428, ++ 0x79dedea7, 0xe25e5ebc, 0x1d0b0b16, 0x76dbdbad, ++ 0x3be0e0db, 0x56323264, 0x4e3a3a74, 0x1e0a0a14, ++ 0xdb494992, 0x0a06060c, 0x6c242448, 0xe45c5cb8, ++ 0x5dc2c29f, 0x6ed3d3bd, 0xefacac43, 0xa66262c4, ++ 0xa8919139, 0xa4959531, 0x37e4e4d3, 0x8b7979f2, ++ 0x32e7e7d5, 0x43c8c88b, 0x5937376e, 0xb76d6dda, ++ 0x8c8d8d01, 0x64d5d5b1, 0xd24e4e9c, 0xe0a9a949, ++ 0xb46c6cd8, 0xfa5656ac, 0x07f4f4f3, 0x25eaeacf, ++ 0xaf6565ca, 0x8e7a7af4, 0xe9aeae47, 0x18080810, ++ 0xd5baba6f, 0x887878f0, 0x6f25254a, 0x722e2e5c, ++ 0x241c1c38, 0xf1a6a657, 0xc7b4b473, 0x51c6c697, ++ 0x23e8e8cb, 0x7cdddda1, 0x9c7474e8, 0x211f1f3e, ++ 0xdd4b4b96, 0xdcbdbd61, 0x868b8b0d, 0x858a8a0f, ++ 0x907070e0, 0x423e3e7c, 0xc4b5b571, 0xaa6666cc, ++ 0xd8484890, 0x05030306, 0x01f6f6f7, 0x120e0e1c, ++ 0xa36161c2, 0x5f35356a, 0xf95757ae, 0xd0b9b969, ++ 0x91868617, 0x58c1c199, 0x271d1d3a, 0xb99e9e27, ++ 0x38e1e1d9, 0x13f8f8eb, 0xb398982b, 0x33111122, ++ 0xbb6969d2, 0x70d9d9a9, 0x898e8e07, 0xa7949433, ++ 0xb69b9b2d, 0x221e1e3c, 0x92878715, 0x20e9e9c9, ++ 0x49cece87, 0xff5555aa, 0x78282850, 0x7adfdfa5, ++ 0x8f8c8c03, 0xf8a1a159, 0x80898909, 0x170d0d1a, ++ 0xdabfbf65, 0x31e6e6d7, 0xc6424284, 0xb86868d0, ++ 0xc3414182, 0xb0999929, 0x772d2d5a, 0x110f0f1e, ++ 0xcbb0b07b, 0xfc5454a8, 0xd6bbbb6d, 0x3a16162c ++ }, ++ 0 + }; + +-static const struct ++#define encT enc_tables.T ++ ++static struct + { ++ volatile u32 counter_head; ++ u32 cacheline_align[64 / 4 - 1]; + u32 T[256]; + byte inv_sbox[256]; +-} dec_tables = ++ volatile u32 counter_tail; ++} dec_tables ATTR_ALIGNED_64 = + { ++ 0, ++ { 0, }, + { + 0x50a7f451, 0x5365417e, 0xc3a4171a, 0x965e273a, + 0xcb6bab3b, 0xf1459d1f, 0xab58faac, 0x9303e34b, +@@ -194,7 +212,8 @@ static const struct + 0xc8,0xeb,0xbb,0x3c,0x83,0x53,0x99,0x61, + 0x17,0x2b,0x04,0x7e,0xba,0x77,0xd6,0x26, + 0xe1,0x69,0x14,0x63,0x55,0x21,0x0c,0x7d +- } ++ }, ++ 0 + }; + + #define decT dec_tables.T +diff --git a/cipher/rijndael.c b/cipher/rijndael.c +index 8637195..d0edab2 100644 +--- a/cipher/rijndael.c ++++ b/cipher/rijndael.c +@@ -227,11 +227,11 @@ static const char *selftest(void); + + + /* Prefetching for encryption/decryption tables. */ +-static void prefetch_table(const volatile byte *tab, size_t len) ++static inline void prefetch_table(const volatile byte *tab, size_t len) + { + size_t i; + +- for (i = 0; i < len; i += 8 * 32) ++ for (i = 0; len - i >= 8 * 32; i += 8 * 32) + { + (void)tab[i + 0 * 32]; + (void)tab[i + 1 * 32]; +@@ -242,17 +242,37 @@ static void prefetch_table(const volatile byte *tab, size_t len) + (void)tab[i + 6 * 32]; + (void)tab[i + 7 * 32]; + } ++ for (; i < len; i += 32) ++ { ++ (void)tab[i]; ++ } + + (void)tab[len - 1]; + } + + static void prefetch_enc(void) + { +- prefetch_table((const void *)encT, sizeof(encT)); ++ /* Modify counters to trigger copy-on-write and unsharing if physical pages ++ * of look-up table are shared between processes. Modifying counters also ++ * causes checksums for pages to change and hint same-page merging algorithm ++ * that these pages are frequently changing. */ ++ enc_tables.counter_head++; ++ enc_tables.counter_tail++; ++ ++ /* Prefetch look-up tables to cache. */ ++ prefetch_table((const void *)&enc_tables, sizeof(enc_tables)); + } + + static void prefetch_dec(void) + { ++ /* Modify counters to trigger copy-on-write and unsharing if physical pages ++ * of look-up table are shared between processes. Modifying counters also ++ * causes checksums for pages to change and hint same-page merging algorithm ++ * that these pages are frequently changing. */ ++ dec_tables.counter_head++; ++ dec_tables.counter_tail++; ++ ++ /* Prefetch look-up tables to cache. */ + prefetch_table((const void *)&dec_tables, sizeof(dec_tables)); + } + +@@ -737,7 +757,7 @@ do_encrypt (const RIJNDAEL_context *ctx, + #ifdef USE_AMD64_ASM + # ifdef HAVE_COMPATIBLE_GCC_AMD64_PLATFORM_AS + return _gcry_aes_amd64_encrypt_block(ctx->keyschenc, bx, ax, ctx->rounds, +- encT); ++ enc_tables.T); + # else + /* Call SystemV ABI function without storing non-volatile XMM registers, + * as target function does not use vector instruction sets. */ +@@ -757,7 +777,8 @@ do_encrypt (const RIJNDAEL_context *ctx, + return ret; + # endif /* HAVE_COMPATIBLE_GCC_AMD64_PLATFORM_AS */ + #elif defined(USE_ARM_ASM) +- return _gcry_aes_arm_encrypt_block(ctx->keyschenc, bx, ax, ctx->rounds, encT); ++ return _gcry_aes_arm_encrypt_block(ctx->keyschenc, bx, ax, ctx->rounds, ++ enc_tables.T); + #else + return do_encrypt_fn (ctx, bx, ax); + #endif /* !USE_ARM_ASM && !USE_AMD64_ASM*/ +@@ -1120,7 +1141,7 @@ do_decrypt (const RIJNDAEL_context *ctx, unsigned char *bx, + #ifdef USE_AMD64_ASM + # ifdef HAVE_COMPATIBLE_GCC_AMD64_PLATFORM_AS + return _gcry_aes_amd64_decrypt_block(ctx->keyschdec, bx, ax, ctx->rounds, +- &dec_tables); ++ dec_tables.T); + # else + /* Call SystemV ABI function without storing non-volatile XMM registers, + * as target function does not use vector instruction sets. */ +@@ -1141,7 +1162,7 @@ do_decrypt (const RIJNDAEL_context *ctx, unsigned char *bx, + # endif /* HAVE_COMPATIBLE_GCC_AMD64_PLATFORM_AS */ + #elif defined(USE_ARM_ASM) + return _gcry_aes_arm_decrypt_block(ctx->keyschdec, bx, ax, ctx->rounds, +- &dec_tables); ++ dec_tables.T); + #else + return do_decrypt_fn (ctx, bx, ax); + #endif /*!USE_ARM_ASM && !USE_AMD64_ASM*/ +-- +2.7.4 + diff --git a/poky/meta/recipes-support/libgcrypt/files/0003-GCM-move-look-up-table-to-.data-section-and-unshare-.patch b/poky/meta/recipes-support/libgcrypt/files/0003-GCM-move-look-up-table-to-.data-section-and-unshare-.patch new file mode 100644 index 000000000..b580b7b13 --- /dev/null +++ b/poky/meta/recipes-support/libgcrypt/files/0003-GCM-move-look-up-table-to-.data-section-and-unshare-.patch @@ -0,0 +1,178 @@ +From a4c561aab1014c3630bc88faf6f5246fee16b020 Mon Sep 17 00:00:00 2001 +From: Jussi Kivilinna <jussi.kivilinna@iki.fi> +Date: Fri, 31 May 2019 17:27:25 +0300 +Subject: [PATCH 3/3] GCM: move look-up table to .data section and unshare + between processes + +* cipher/cipher-gcm.c (ATTR_ALIGNED_64): New. +(gcmR): Move to 'gcm_table' structure. +(gcm_table): New structure for look-up table with counters before and +after. +(gcmR): New macro. +(prefetch_table): Handle input with length not multiple of 256. +(do_prefetch_tables): Modify pre- and post-table counters to unshare +look-up table pages between processes. +-- + +GnuPG-bug-id: 4541 +Signed-off-by: Jussi Kivilinna <jussi.kivilinna@iki.fi> + +Upstream-Status: Backport +[https://github.com/gpg/libgcrypt/commit/a4c561aab1014c3630bc88faf6f5246fee16b020] + +CVE: CVE-2019-12904 + +Signed-off-by: Yi Zhao <yi.zhao@windriver.com> +--- + cipher/cipher-gcm.c | 106 ++++++++++++++++++++++++++++++++++------------------ + 1 file changed, 70 insertions(+), 36 deletions(-) + +diff --git a/cipher/cipher-gcm.c b/cipher/cipher-gcm.c +index 11f119a..194e2ec 100644 +--- a/cipher/cipher-gcm.c ++++ b/cipher/cipher-gcm.c +@@ -30,6 +30,14 @@ + #include "./cipher-internal.h" + + ++/* Helper macro to force alignment to 16 or 64 bytes. */ ++#ifdef HAVE_GCC_ATTRIBUTE_ALIGNED ++# define ATTR_ALIGNED_64 __attribute__ ((aligned (64))) ++#else ++# define ATTR_ALIGNED_64 ++#endif ++ ++ + #ifdef GCM_USE_INTEL_PCLMUL + extern void _gcry_ghash_setup_intel_pclmul (gcry_cipher_hd_t c); + +@@ -83,40 +91,54 @@ ghash_armv7_neon (gcry_cipher_hd_t c, byte *result, const byte *buf, + + + #ifdef GCM_USE_TABLES +-static const u16 gcmR[256] = { +- 0x0000, 0x01c2, 0x0384, 0x0246, 0x0708, 0x06ca, 0x048c, 0x054e, +- 0x0e10, 0x0fd2, 0x0d94, 0x0c56, 0x0918, 0x08da, 0x0a9c, 0x0b5e, +- 0x1c20, 0x1de2, 0x1fa4, 0x1e66, 0x1b28, 0x1aea, 0x18ac, 0x196e, +- 0x1230, 0x13f2, 0x11b4, 0x1076, 0x1538, 0x14fa, 0x16bc, 0x177e, +- 0x3840, 0x3982, 0x3bc4, 0x3a06, 0x3f48, 0x3e8a, 0x3ccc, 0x3d0e, +- 0x3650, 0x3792, 0x35d4, 0x3416, 0x3158, 0x309a, 0x32dc, 0x331e, +- 0x2460, 0x25a2, 0x27e4, 0x2626, 0x2368, 0x22aa, 0x20ec, 0x212e, +- 0x2a70, 0x2bb2, 0x29f4, 0x2836, 0x2d78, 0x2cba, 0x2efc, 0x2f3e, +- 0x7080, 0x7142, 0x7304, 0x72c6, 0x7788, 0x764a, 0x740c, 0x75ce, +- 0x7e90, 0x7f52, 0x7d14, 0x7cd6, 0x7998, 0x785a, 0x7a1c, 0x7bde, +- 0x6ca0, 0x6d62, 0x6f24, 0x6ee6, 0x6ba8, 0x6a6a, 0x682c, 0x69ee, +- 0x62b0, 0x6372, 0x6134, 0x60f6, 0x65b8, 0x647a, 0x663c, 0x67fe, +- 0x48c0, 0x4902, 0x4b44, 0x4a86, 0x4fc8, 0x4e0a, 0x4c4c, 0x4d8e, +- 0x46d0, 0x4712, 0x4554, 0x4496, 0x41d8, 0x401a, 0x425c, 0x439e, +- 0x54e0, 0x5522, 0x5764, 0x56a6, 0x53e8, 0x522a, 0x506c, 0x51ae, +- 0x5af0, 0x5b32, 0x5974, 0x58b6, 0x5df8, 0x5c3a, 0x5e7c, 0x5fbe, +- 0xe100, 0xe0c2, 0xe284, 0xe346, 0xe608, 0xe7ca, 0xe58c, 0xe44e, +- 0xef10, 0xeed2, 0xec94, 0xed56, 0xe818, 0xe9da, 0xeb9c, 0xea5e, +- 0xfd20, 0xfce2, 0xfea4, 0xff66, 0xfa28, 0xfbea, 0xf9ac, 0xf86e, +- 0xf330, 0xf2f2, 0xf0b4, 0xf176, 0xf438, 0xf5fa, 0xf7bc, 0xf67e, +- 0xd940, 0xd882, 0xdac4, 0xdb06, 0xde48, 0xdf8a, 0xddcc, 0xdc0e, +- 0xd750, 0xd692, 0xd4d4, 0xd516, 0xd058, 0xd19a, 0xd3dc, 0xd21e, +- 0xc560, 0xc4a2, 0xc6e4, 0xc726, 0xc268, 0xc3aa, 0xc1ec, 0xc02e, +- 0xcb70, 0xcab2, 0xc8f4, 0xc936, 0xcc78, 0xcdba, 0xcffc, 0xce3e, +- 0x9180, 0x9042, 0x9204, 0x93c6, 0x9688, 0x974a, 0x950c, 0x94ce, +- 0x9f90, 0x9e52, 0x9c14, 0x9dd6, 0x9898, 0x995a, 0x9b1c, 0x9ade, +- 0x8da0, 0x8c62, 0x8e24, 0x8fe6, 0x8aa8, 0x8b6a, 0x892c, 0x88ee, +- 0x83b0, 0x8272, 0x8034, 0x81f6, 0x84b8, 0x857a, 0x873c, 0x86fe, +- 0xa9c0, 0xa802, 0xaa44, 0xab86, 0xaec8, 0xaf0a, 0xad4c, 0xac8e, +- 0xa7d0, 0xa612, 0xa454, 0xa596, 0xa0d8, 0xa11a, 0xa35c, 0xa29e, +- 0xb5e0, 0xb422, 0xb664, 0xb7a6, 0xb2e8, 0xb32a, 0xb16c, 0xb0ae, +- 0xbbf0, 0xba32, 0xb874, 0xb9b6, 0xbcf8, 0xbd3a, 0xbf7c, 0xbebe, +-}; ++static struct ++{ ++ volatile u32 counter_head; ++ u32 cacheline_align[64 / 4 - 1]; ++ u16 R[256]; ++ volatile u32 counter_tail; ++} gcm_table ATTR_ALIGNED_64 = ++ { ++ 0, ++ { 0, }, ++ { ++ 0x0000, 0x01c2, 0x0384, 0x0246, 0x0708, 0x06ca, 0x048c, 0x054e, ++ 0x0e10, 0x0fd2, 0x0d94, 0x0c56, 0x0918, 0x08da, 0x0a9c, 0x0b5e, ++ 0x1c20, 0x1de2, 0x1fa4, 0x1e66, 0x1b28, 0x1aea, 0x18ac, 0x196e, ++ 0x1230, 0x13f2, 0x11b4, 0x1076, 0x1538, 0x14fa, 0x16bc, 0x177e, ++ 0x3840, 0x3982, 0x3bc4, 0x3a06, 0x3f48, 0x3e8a, 0x3ccc, 0x3d0e, ++ 0x3650, 0x3792, 0x35d4, 0x3416, 0x3158, 0x309a, 0x32dc, 0x331e, ++ 0x2460, 0x25a2, 0x27e4, 0x2626, 0x2368, 0x22aa, 0x20ec, 0x212e, ++ 0x2a70, 0x2bb2, 0x29f4, 0x2836, 0x2d78, 0x2cba, 0x2efc, 0x2f3e, ++ 0x7080, 0x7142, 0x7304, 0x72c6, 0x7788, 0x764a, 0x740c, 0x75ce, ++ 0x7e90, 0x7f52, 0x7d14, 0x7cd6, 0x7998, 0x785a, 0x7a1c, 0x7bde, ++ 0x6ca0, 0x6d62, 0x6f24, 0x6ee6, 0x6ba8, 0x6a6a, 0x682c, 0x69ee, ++ 0x62b0, 0x6372, 0x6134, 0x60f6, 0x65b8, 0x647a, 0x663c, 0x67fe, ++ 0x48c0, 0x4902, 0x4b44, 0x4a86, 0x4fc8, 0x4e0a, 0x4c4c, 0x4d8e, ++ 0x46d0, 0x4712, 0x4554, 0x4496, 0x41d8, 0x401a, 0x425c, 0x439e, ++ 0x54e0, 0x5522, 0x5764, 0x56a6, 0x53e8, 0x522a, 0x506c, 0x51ae, ++ 0x5af0, 0x5b32, 0x5974, 0x58b6, 0x5df8, 0x5c3a, 0x5e7c, 0x5fbe, ++ 0xe100, 0xe0c2, 0xe284, 0xe346, 0xe608, 0xe7ca, 0xe58c, 0xe44e, ++ 0xef10, 0xeed2, 0xec94, 0xed56, 0xe818, 0xe9da, 0xeb9c, 0xea5e, ++ 0xfd20, 0xfce2, 0xfea4, 0xff66, 0xfa28, 0xfbea, 0xf9ac, 0xf86e, ++ 0xf330, 0xf2f2, 0xf0b4, 0xf176, 0xf438, 0xf5fa, 0xf7bc, 0xf67e, ++ 0xd940, 0xd882, 0xdac4, 0xdb06, 0xde48, 0xdf8a, 0xddcc, 0xdc0e, ++ 0xd750, 0xd692, 0xd4d4, 0xd516, 0xd058, 0xd19a, 0xd3dc, 0xd21e, ++ 0xc560, 0xc4a2, 0xc6e4, 0xc726, 0xc268, 0xc3aa, 0xc1ec, 0xc02e, ++ 0xcb70, 0xcab2, 0xc8f4, 0xc936, 0xcc78, 0xcdba, 0xcffc, 0xce3e, ++ 0x9180, 0x9042, 0x9204, 0x93c6, 0x9688, 0x974a, 0x950c, 0x94ce, ++ 0x9f90, 0x9e52, 0x9c14, 0x9dd6, 0x9898, 0x995a, 0x9b1c, 0x9ade, ++ 0x8da0, 0x8c62, 0x8e24, 0x8fe6, 0x8aa8, 0x8b6a, 0x892c, 0x88ee, ++ 0x83b0, 0x8272, 0x8034, 0x81f6, 0x84b8, 0x857a, 0x873c, 0x86fe, ++ 0xa9c0, 0xa802, 0xaa44, 0xab86, 0xaec8, 0xaf0a, 0xad4c, 0xac8e, ++ 0xa7d0, 0xa612, 0xa454, 0xa596, 0xa0d8, 0xa11a, 0xa35c, 0xa29e, ++ 0xb5e0, 0xb422, 0xb664, 0xb7a6, 0xb2e8, 0xb32a, 0xb16c, 0xb0ae, ++ 0xbbf0, 0xba32, 0xb874, 0xb9b6, 0xbcf8, 0xbd3a, 0xbf7c, 0xbebe, ++ }, ++ 0 ++ }; ++ ++#define gcmR gcm_table.R + + static inline + void prefetch_table(const void *tab, size_t len) +@@ -124,7 +146,7 @@ void prefetch_table(const void *tab, size_t len) + const volatile byte *vtab = tab; + size_t i; + +- for (i = 0; i < len; i += 8 * 32) ++ for (i = 0; len - i >= 8 * 32; i += 8 * 32) + { + (void)vtab[i + 0 * 32]; + (void)vtab[i + 1 * 32]; +@@ -135,6 +157,10 @@ void prefetch_table(const void *tab, size_t len) + (void)vtab[i + 6 * 32]; + (void)vtab[i + 7 * 32]; + } ++ for (; i < len; i += 32) ++ { ++ (void)vtab[i]; ++ } + + (void)vtab[len - 1]; + } +@@ -142,8 +168,16 @@ void prefetch_table(const void *tab, size_t len) + static inline void + do_prefetch_tables (const void *gcmM, size_t gcmM_size) + { ++ /* Modify counters to trigger copy-on-write and unsharing if physical pages ++ * of look-up table are shared between processes. Modifying counters also ++ * causes checksums for pages to change and hint same-page merging algorithm ++ * that these pages are frequently changing. */ ++ gcm_table.counter_head++; ++ gcm_table.counter_tail++; ++ ++ /* Prefetch look-up tables to cache. */ + prefetch_table(gcmM, gcmM_size); +- prefetch_table(gcmR, sizeof(gcmR)); ++ prefetch_table(&gcm_table, sizeof(gcm_table)); + } + + #ifdef GCM_TABLES_USE_U64 +-- +2.7.4 + diff --git a/poky/meta/recipes-support/libgcrypt/libgcrypt_1.8.4.bb b/poky/meta/recipes-support/libgcrypt/libgcrypt_1.8.5.bb index fda68a293..04785574f 100644 --- a/poky/meta/recipes-support/libgcrypt/libgcrypt_1.8.4.bb +++ b/poky/meta/recipes-support/libgcrypt/libgcrypt_1.8.5.bb @@ -17,13 +17,16 @@ DEPENDS = "libgpg-error" UPSTREAM_CHECK_URI = "https://gnupg.org/download/index.html" SRC_URI = "${GNUPG_MIRROR}/libgcrypt/libgcrypt-${PV}.tar.bz2 \ - file://0001-Add-and-use-pkg-config-for-libgcrypt-instead-of-conf.patch \ + file://0001-libgcrypt-fix-m4-file-for-oe-core.patch \ file://0003-tests-bench-slope.c-workaround-ICE-failure-on-mips-w.patch \ file://0002-libgcrypt-fix-building-error-with-O2-in-sysroot-path.patch \ file://0004-tests-Makefile.am-fix-undefined-reference-to-pthread.patch \ + file://0001-Prefetch-GCM-look-up-tables.patch \ + file://0002-AES-move-look-up-tables-to-.data-section-and-unshare.patch \ + file://0003-GCM-move-look-up-table-to-.data-section-and-unshare-.patch \ " -SRC_URI[md5sum] = "fbfdaebbbc6d7e5fbbf6ffdb3e139573" -SRC_URI[sha256sum] = "f638143a0672628fde0cad745e9b14deb85dffb175709cacc1f4fe24b93f2227" +SRC_URI[md5sum] = "348cc4601ca34307fc6cd6c945467743" +SRC_URI[sha256sum] = "3b4a2a94cb637eff5bdebbcaf46f4d95c4f25206f459809339cdada0eb577ac3" BINCONFIG = "${bindir}/libgcrypt-config" diff --git a/poky/meta/recipes-support/libical/libical/0001-Use-our-hand-build-native-src-generator.patch b/poky/meta/recipes-support/libical/libical/0001-Use-our-hand-build-native-src-generator.patch new file mode 100644 index 000000000..b7b757d74 --- /dev/null +++ b/poky/meta/recipes-support/libical/libical/0001-Use-our-hand-build-native-src-generator.patch @@ -0,0 +1,33 @@ +From e33bc310238bba1690f2c71ad333e10b9e422ea9 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Andreas=20M=C3=BCller?= <schnitzeltony@gmail.com> +Date: Sat, 19 Oct 2019 14:23:06 +0200 +Subject: [PATCH] Use our hand-build native src-generator +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Upstream-Status: Inappropriate [oe-core specific] + +Signed-off-by: Andreas Müller <schnitzeltony@gmail.com> +--- + src/libical-glib/CMakeLists.txt | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/src/libical-glib/CMakeLists.txt b/src/libical-glib/CMakeLists.txt +index f3704e6..ce9db16 100644 +--- a/src/libical-glib/CMakeLists.txt ++++ b/src/libical-glib/CMakeLists.txt +@@ -63,8 +63,8 @@ endforeach() + + add_custom_command ( + OUTPUT ${LIBICAL_GLIB_SOURCES} ${CMAKE_CURRENT_BINARY_DIR}/libical-glib-private.h ${CMAKE_CURRENT_BINARY_DIR}/i-cal-forward-declarations.h +- COMMAND ${EXECUTABLE_OUTPUT_PATH}/src-generator "${CMAKE_CURRENT_SOURCE_DIR}/tools" "${CMAKE_CURRENT_SOURCE_DIR}/api" +- DEPENDS ${EXECUTABLE_OUTPUT_PATH}/src-generator ${xml_files} ++ COMMAND ${CMAKE_BINARY_DIR}/src-generator "${CMAKE_CURRENT_SOURCE_DIR}/tools" "${CMAKE_CURRENT_SOURCE_DIR}/api" ++ DEPENDS ${CMAKE_BINARY_DIR}/src-generator ${xml_files} + ) + + configure_file( +-- +2.21.0 + diff --git a/poky/meta/recipes-support/libical/libical_3.0.6.bb b/poky/meta/recipes-support/libical/libical_3.0.6.bb index 032f3655e..f9be898a1 100644 --- a/poky/meta/recipes-support/libical/libical_3.0.6.bb +++ b/poky/meta/recipes-support/libical/libical_3.0.6.bb @@ -7,27 +7,35 @@ LIC_FILES_CHKSUM = "file://LICENSE;md5=1910a2a76ddf6a9ba369182494170d87 \ file://LICENSE.MPL2.txt;md5=9741c346eef56131163e13b9db1241b3" SECTION = "libs" -SRC_URI = "https://github.com/${BPN}/${BPN}/releases/download/v${PV}/${BP}.tar.gz" - +SRC_URI = " \ + https://github.com/${BPN}/${BPN}/releases/download/v${PV}/${BP}.tar.gz \ + file://0001-Use-our-hand-build-native-src-generator.patch \ +" SRC_URI[md5sum] = "463a59244c6767b8e67b29379405e297" SRC_URI[sha256sum] = "5c8a21c2b732ece4a33e5c862970b4f35a8548bbcda50de5695f6fc211ac4d97" UPSTREAM_CHECK_URI = "https://github.com/libical/libical/releases" inherit cmake pkgconfig -PACKAGECONFIG ??= "icu" +do_compile_prepend() { + # As long as https://github.com/libical/libical/issues/394 is open build native src-generator manually + NATIVE_CFLAGS="${BUILD_CFLAGS} `pkg-config-native --cflags glib-2.0` `pkg-config-native --cflags libxml-2.0`" + NATIVE_LDFLAGS="${BUILD_LDFLAGS} `pkg-config-native --libs glib-2.0` `pkg-config-native --libs libxml-2.0`" + ${BUILD_CC} $NATIVE_CFLAGS ${S}/src/libical-glib/tools/generator.c ${S}/src/libical-glib/tools/xml-parser.c -o ${B}/src-generator $NATIVE_LDFLAGS +} + +PACKAGECONFIG ??= "icu glib" PACKAGECONFIG[bdb] = ",-DCMAKE_DISABLE_FIND_PACKAGE_BDB=True,db" +PACKAGECONFIG[glib] = "-DICAL_GLIB=True,-DICAL_GLIB=False,glib-2.0-native libxml2-native glib-2.0 libxml2" # ICU is used for RSCALE (RFC7529) support PACKAGECONFIG[icu] = ",-DCMAKE_DISABLE_FIND_PACKAGE_ICU=True,icu" # No need to use perl-native, the host perl is sufficient. EXTRA_OECMAKE += "-DPERL_EXECUTABLE=${HOSTTOOLS_DIR}/perl" +# doc build fails with linker error (??) for libical-glib so disable it +EXTRA_OECMAKE += "-DICAL_BUILD_DOCS=false" -# The glib library can't be cross-compiled, disable for now. -# https://github.com/libical/libical/issues/394 -EXTRA_OECMAKE += "-DICAL_GLIB=false" - -do_install_append_class-target () { +do_install_append () { # Remove build host references sed -i \ -e 's,${STAGING_LIBDIR},${libdir},g' \ diff --git a/poky/meta/recipes-support/libksba/libksba_1.3.5.bb b/poky/meta/recipes-support/libksba/libksba_1.3.5.bb index a7ea53fed..336d7f817 100644 --- a/poky/meta/recipes-support/libksba/libksba_1.3.5.bb +++ b/poky/meta/recipes-support/libksba/libksba_1.3.5.bb @@ -1,6 +1,8 @@ SUMMARY = "Easy API to create and parse X.509 and CMS related objects" HOMEPAGE = "http://www.gnupg.org/related_software/libksba/" -LICENSE = "GPLv2+ | LGPLv3+ | GPLv3+" +LICENSE = "GPLv3+ & (GPLv2+ | LGPLv3+)" +LICENSE_${PN} = "GPLv2+ | LGPLv3+" +LICENSE_${PN}-doc = "GPLv3+" LIC_FILES_CHKSUM = "file://COPYING;md5=fd541d83f75d038c4e0617b672ed8bda \ file://COPYING.GPLv2;md5=b234ee4d69f5fce4486a80fdaf4a4263 \ file://COPYING.GPLv3;md5=2f31b266d3440dd7ee50f92cf67d8e6c \ @@ -25,4 +27,4 @@ do_configure_prepend () { rm -f ${S}/m4/gpg-error.m4 } -BBCLASSEXTEND = "native" +BBCLASSEXTEND = "native nativesdk" diff --git a/poky/meta/recipes-support/libsoup/libsoup-2.4/0001-Do-not-enforce-no-introspection-when-cross-building.patch b/poky/meta/recipes-support/libsoup/libsoup-2.4/0001-Do-not-enforce-no-introspection-when-cross-building.patch index cd6de853e..d534457e7 100644 --- a/poky/meta/recipes-support/libsoup/libsoup-2.4/0001-Do-not-enforce-no-introspection-when-cross-building.patch +++ b/poky/meta/recipes-support/libsoup/libsoup-2.4/0001-Do-not-enforce-no-introspection-when-cross-building.patch @@ -3,7 +3,7 @@ From: Alexander Kanavin <alex.kanavin@gmail.com> Date: Fri, 15 Feb 2019 14:21:06 +0100 Subject: [PATCH] Do not enforce no-introspection when cross-building -Upstream-Status: Pending +Upstream-Status: Backport [https://gitlab.gnome.org/GNOME/libsoup/commit/7ef5ec60c33e254bcd915936bea3f04ba0fe2273] Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> Signed-off-by: Alistair Francis <alistair@alistair23.me> --- diff --git a/poky/meta/recipes-support/libsoup/libsoup-2.4_2.66.2.bb b/poky/meta/recipes-support/libsoup/libsoup-2.4_2.66.4.bb index 357f2fd3d..7f5f910d3 100644 --- a/poky/meta/recipes-support/libsoup/libsoup-2.4_2.66.2.bb +++ b/poky/meta/recipes-support/libsoup/libsoup-2.4_2.66.4.bb @@ -12,8 +12,10 @@ SHRT_VER = "${@d.getVar('PV').split('.')[0]}.${@d.getVar('PV').split('.')[1]}" SRC_URI = "${GNOME_MIRROR}/libsoup/${SHRT_VER}/libsoup-${PV}.tar.xz \ file://0001-Do-not-enforce-no-introspection-when-cross-building.patch \ " -SRC_URI[md5sum] = "66c2ae89d6031b01337d78a2c57c75d5" -SRC_URI[sha256sum] = "bd2ea602eba642509672812f3c99b77cbec2f3de02ba1cc8cb7206bf7de0ae2a" +SRC_URI[md5sum] = "42016d80ecae4cf8eb416631049a273a" +SRC_URI[sha256sum] = "8308984f1eee1c4f8c113a9c1763b2b22d981bd811b0cc82a9f3f1aa63228779" + +CVE_PRODUCT = "libsoup" S = "${WORKDIR}/libsoup-${PV}" @@ -26,7 +28,7 @@ PACKAGECONFIG[gssapi] = "-Dgssapi=true,-Dgssapi=false,krb5" EXTRA_OEMESON_append = " -Dvapi=false" -GTKDOC_MESON_OPTION = "doc" +GTKDOC_MESON_OPTION = "gtk_doc" # When built without gnome support, libsoup-2.4 will contain only one shared lib # and will therefore become subject to renaming by debian.bbclass. Prevent diff --git a/poky/meta/recipes-support/libxslt/files/0001-Fix-security-framework-bypass.patch b/poky/meta/recipes-support/libxslt/files/0001-Fix-security-framework-bypass.patch deleted file mode 100644 index 89b647ddb..000000000 --- a/poky/meta/recipes-support/libxslt/files/0001-Fix-security-framework-bypass.patch +++ /dev/null @@ -1,124 +0,0 @@ -From e03553605b45c88f0b4b2980adfbbb8f6fca2fd6 Mon Sep 17 00:00:00 2001 -From: Nick Wellnhofer <wellnhofer@aevum.de> -Date: Sun, 24 Mar 2019 09:51:39 +0100 -Subject: Fix security framework bypass - -xsltCheckRead and xsltCheckWrite return -1 in case of error but callers -don't check for this condition and allow access. With a specially -crafted URL, xsltCheckRead could be tricked into returning an error -because of a supposedly invalid URL that would still be loaded -succesfully later on. - -Fixes #12. - -Thanks to Felix Wilhelm for the report. - -Signed-off-by: Adrian Bunk <bunk@stusta.de> -Upstream-Status: Backport -CVE: CVE-2019-11068 ---- - libxslt/documents.c | 18 ++++++++++-------- - libxslt/imports.c | 9 +++++---- - libxslt/transform.c | 9 +++++---- - libxslt/xslt.c | 9 +++++---- - 4 files changed, 25 insertions(+), 20 deletions(-) - -diff --git a/libxslt/documents.c b/libxslt/documents.c -index 3f3a7312..4aad11bb 100644 ---- a/libxslt/documents.c -+++ b/libxslt/documents.c -@@ -296,10 +296,11 @@ xsltLoadDocument(xsltTransformContextPtr ctxt, const xmlChar *URI) { - int res; - - res = xsltCheckRead(ctxt->sec, ctxt, URI); -- if (res == 0) { -- xsltTransformError(ctxt, NULL, NULL, -- "xsltLoadDocument: read rights for %s denied\n", -- URI); -+ if (res <= 0) { -+ if (res == 0) -+ xsltTransformError(ctxt, NULL, NULL, -+ "xsltLoadDocument: read rights for %s denied\n", -+ URI); - return(NULL); - } - } -@@ -372,10 +373,11 @@ xsltLoadStyleDocument(xsltStylesheetPtr style, const xmlChar *URI) { - int res; - - res = xsltCheckRead(sec, NULL, URI); -- if (res == 0) { -- xsltTransformError(NULL, NULL, NULL, -- "xsltLoadStyleDocument: read rights for %s denied\n", -- URI); -+ if (res <= 0) { -+ if (res == 0) -+ xsltTransformError(NULL, NULL, NULL, -+ "xsltLoadStyleDocument: read rights for %s denied\n", -+ URI); - return(NULL); - } - } -diff --git a/libxslt/imports.c b/libxslt/imports.c -index 874870cc..3783b247 100644 ---- a/libxslt/imports.c -+++ b/libxslt/imports.c -@@ -130,10 +130,11 @@ xsltParseStylesheetImport(xsltStylesheetPtr style, xmlNodePtr cur) { - int secres; - - secres = xsltCheckRead(sec, NULL, URI); -- if (secres == 0) { -- xsltTransformError(NULL, NULL, NULL, -- "xsl:import: read rights for %s denied\n", -- URI); -+ if (secres <= 0) { -+ if (secres == 0) -+ xsltTransformError(NULL, NULL, NULL, -+ "xsl:import: read rights for %s denied\n", -+ URI); - goto error; - } - } -diff --git a/libxslt/transform.c b/libxslt/transform.c -index 13793914..0636dbd0 100644 ---- a/libxslt/transform.c -+++ b/libxslt/transform.c -@@ -3493,10 +3493,11 @@ xsltDocumentElem(xsltTransformContextPtr ctxt, xmlNodePtr node, - */ - if (ctxt->sec != NULL) { - ret = xsltCheckWrite(ctxt->sec, ctxt, filename); -- if (ret == 0) { -- xsltTransformError(ctxt, NULL, inst, -- "xsltDocumentElem: write rights for %s denied\n", -- filename); -+ if (ret <= 0) { -+ if (ret == 0) -+ xsltTransformError(ctxt, NULL, inst, -+ "xsltDocumentElem: write rights for %s denied\n", -+ filename); - xmlFree(URL); - xmlFree(filename); - return; -diff --git a/libxslt/xslt.c b/libxslt/xslt.c -index 780a5ad7..a234eb79 100644 ---- a/libxslt/xslt.c -+++ b/libxslt/xslt.c -@@ -6763,10 +6763,11 @@ xsltParseStylesheetFile(const xmlChar* filename) { - int res; - - res = xsltCheckRead(sec, NULL, filename); -- if (res == 0) { -- xsltTransformError(NULL, NULL, NULL, -- "xsltParseStylesheetFile: read rights for %s denied\n", -- filename); -+ if (res <= 0) { -+ if (res == 0) -+ xsltTransformError(NULL, NULL, NULL, -+ "xsltParseStylesheetFile: read rights for %s denied\n", -+ filename); - return(NULL); - } - } --- -2.20.1 - diff --git a/poky/meta/recipes-support/libxslt/files/CVE-2019-13117.patch b/poky/meta/recipes-support/libxslt/files/CVE-2019-13117.patch deleted file mode 100644 index ef3f2709f..000000000 --- a/poky/meta/recipes-support/libxslt/files/CVE-2019-13117.patch +++ /dev/null @@ -1,33 +0,0 @@ -From c5eb6cf3aba0af048596106ed839b4ae17ecbcb1 Mon Sep 17 00:00:00 2001 -From: Nick Wellnhofer <wellnhofer@aevum.de> -Date: Sat, 27 Apr 2019 11:19:48 +0200 -Subject: [PATCH] Fix uninitialized read of xsl:number token - -Found by OSS-Fuzz. - -CVE: CVE-2019-13117 -Upstream-Status: Backport [https://gitlab.gnome.org/GNOME/libxslt/commit/c5eb6cf3aba0af048596106ed839b4ae17ecbcb1] -Signed-off-by: Anuj Mittal <anuj.mittal@intel.com> ---- - libxslt/numbers.c | 5 ++++- - 1 file changed, 4 insertions(+), 1 deletion(-) - -diff --git a/libxslt/numbers.c b/libxslt/numbers.c -index 89e1f668..75c31eba 100644 ---- a/libxslt/numbers.c -+++ b/libxslt/numbers.c -@@ -382,7 +382,10 @@ xsltNumberFormatTokenize(const xmlChar *format, - tokens->tokens[tokens->nTokens].token = val - 1; - ix += len; - val = xmlStringCurrentChar(NULL, format+ix, &len); -- } -+ } else { -+ tokens->tokens[tokens->nTokens].token = (xmlChar)'0'; -+ tokens->tokens[tokens->nTokens].width = 1; -+ } - } else if ( (val == (xmlChar)'A') || - (val == (xmlChar)'a') || - (val == (xmlChar)'I') || --- -2.21.0 - diff --git a/poky/meta/recipes-support/libxslt/files/CVE-2019-13118.patch b/poky/meta/recipes-support/libxslt/files/CVE-2019-13118.patch deleted file mode 100644 index 595e6c2f3..000000000 --- a/poky/meta/recipes-support/libxslt/files/CVE-2019-13118.patch +++ /dev/null @@ -1,76 +0,0 @@ -From 6ce8de69330783977dd14f6569419489875fb71b Mon Sep 17 00:00:00 2001 -From: Nick Wellnhofer <wellnhofer@aevum.de> -Date: Mon, 3 Jun 2019 13:14:45 +0200 -Subject: [PATCH] Fix uninitialized read with UTF-8 grouping chars - -The character type in xsltFormatNumberConversion was too narrow and -an invalid character/length combination could be passed to -xsltNumberFormatDecimal, resulting in an uninitialized read. - -Found by OSS-Fuzz. - -CVE: CVE-2019-13118 -Upstream-Status: Backport [https://gitlab.gnome.org/GNOME/libxslt/commit/6ce8de69330783977dd14f6569419489875fb71b] -Signed-off-by: Anuj Mittal <anuj.mittal@intel.com> - ---- - libxslt/numbers.c | 5 +++-- - tests/docs/bug-222.xml | 1 + - tests/general/bug-222.out | 2 ++ - tests/general/bug-222.xsl | 6 ++++++ - 4 files changed, 12 insertions(+), 2 deletions(-) - create mode 100644 tests/docs/bug-222.xml - create mode 100644 tests/general/bug-222.out - create mode 100644 tests/general/bug-222.xsl - -diff --git a/libxslt/numbers.c b/libxslt/numbers.c -index f1ed8846..20b99d5a 100644 ---- a/libxslt/numbers.c -+++ b/libxslt/numbers.c -@@ -1298,13 +1298,14 @@ OUTPUT_NUMBER: - number = floor((scale * number + 0.5)) / scale; - if ((self->grouping != NULL) && - (self->grouping[0] != 0)) { -+ int gchar; - - len = xmlStrlen(self->grouping); -- pchar = xsltGetUTF8Char(self->grouping, &len); -+ gchar = xsltGetUTF8Char(self->grouping, &len); - xsltNumberFormatDecimal(buffer, floor(number), self->zeroDigit[0], - format_info.integer_digits, - format_info.group, -- pchar, len); -+ gchar, len); - } else - xsltNumberFormatDecimal(buffer, floor(number), self->zeroDigit[0], - format_info.integer_digits, -diff --git a/tests/docs/bug-222.xml b/tests/docs/bug-222.xml -new file mode 100644 -index 00000000..69d62f2c ---- /dev/null -+++ b/tests/docs/bug-222.xml -@@ -0,0 +1 @@ -+<doc/> -diff --git a/tests/general/bug-222.out b/tests/general/bug-222.out -new file mode 100644 -index 00000000..e3139698 ---- /dev/null -+++ b/tests/general/bug-222.out -@@ -0,0 +1,2 @@ -+<?xml version="1.0"?> -+1⠢0 -diff --git a/tests/general/bug-222.xsl b/tests/general/bug-222.xsl -new file mode 100644 -index 00000000..e32dc473 ---- /dev/null -+++ b/tests/general/bug-222.xsl -@@ -0,0 +1,6 @@ -+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"> -+ <xsl:decimal-format name="f" grouping-separator="⠢"/> -+ <xsl:template match="/"> -+ <xsl:value-of select="format-number(10,'#⠢0','f')"/> -+ </xsl:template> -+</xsl:stylesheet> --- -2.21.0 - diff --git a/poky/meta/recipes-support/libxslt/libxslt_1.1.33.bb b/poky/meta/recipes-support/libxslt/libxslt_1.1.34.bb index abc00a09e..ad37b5a44 100644 --- a/poky/meta/recipes-support/libxslt/libxslt_1.1.33.bb +++ b/poky/meta/recipes-support/libxslt/libxslt_1.1.34.bb @@ -9,13 +9,10 @@ SECTION = "libs" DEPENDS = "libxml2" SRC_URI = "http://xmlsoft.org/sources/libxslt-${PV}.tar.gz \ - file://0001-Fix-security-framework-bypass.patch \ - file://CVE-2019-13117.patch \ - file://CVE-2019-13118.patch \ -" + " -SRC_URI[md5sum] = "b3bd254a03e46d58f8ad1e4559cd2c2f" -SRC_URI[sha256sum] = "8e36605144409df979cab43d835002f63988f3dc94d5d3537c12796db90e38c8" +SRC_URI[md5sum] = "db8765c8d076f1b6caafd9f2542a304a" +SRC_URI[sha256sum] = "98b1bd46d6792925ad2dfe9a87452ea2adebf69dcb9919ffd55bf926a7f93f7f" UPSTREAM_CHECK_REGEX = "libxslt-(?P<pver>\d+(\.\d+)+)\.tar" diff --git a/poky/meta/recipes-support/lz4/lz4_1.9.2.bb b/poky/meta/recipes-support/lz4/lz4_1.9.2.bb index f0a8416a9..ed4452c82 100644 --- a/poky/meta/recipes-support/lz4/lz4_1.9.2.bb +++ b/poky/meta/recipes-support/lz4/lz4_1.9.2.bb @@ -18,6 +18,9 @@ UPSTREAM_CHECK_GITTAGREGEX = "v(?P<pver>.*)" S = "${WORKDIR}/git" +# Fixed in r118, which is larger than the current version. +CVE_CHECK_WHITELIST += "CVE-2014-4715" + EXTRA_OEMAKE = "PREFIX=${prefix} CC='${CC}' DESTDIR=${D} LIBDIR=${libdir} INCLUDEDIR=${includedir}" do_install() { diff --git a/poky/meta/recipes-support/npth/npth_1.6.bb b/poky/meta/recipes-support/npth/npth_1.6.bb index 8310efb10..233e0dc4a 100644 --- a/poky/meta/recipes-support/npth/npth_1.6.bb +++ b/poky/meta/recipes-support/npth/npth_1.6.bb @@ -24,4 +24,4 @@ do_install_append() { oe_multilib_header npth.h } -BBCLASSEXTEND = "native" +BBCLASSEXTEND = "native nativesdk" diff --git a/poky/meta/recipes-support/nspr/nspr/0004-Add-ARC-support.patch b/poky/meta/recipes-support/nspr/nspr/0004-Add-ARC-support.patch deleted file mode 100644 index 9d686017d..000000000 --- a/poky/meta/recipes-support/nspr/nspr/0004-Add-ARC-support.patch +++ /dev/null @@ -1,88 +0,0 @@ -From 6cb5b0be8837222a1e01745f2cf57cd0e593186d Mon Sep 17 00:00:00 2001 -From: Antoine Tenart <antoine.tenart@free-electrons.com> -Date: Mon, 23 Oct 2017 10:28:20 +0200 -Subject: [PATCH] Add ARC support - -[Alexey: Rebased on top of other patches like RiscV, NIOS2 etc]. - -Signed-off-by: Antoine Tenart <antoine.tenart@bootlin.com> -Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com> - -Upstream-Status: Submitted [ https://bugzilla.mozilla.org/show_bug.cgi?id=1492378 ] ---- - pr/include/md/_linux.cfg | 45 ++++++++++++++++++++++++++++++++++++++++ - pr/include/md/_linux.h | 2 ++ - 2 files changed, 47 insertions(+) - -diff --git a/pr/include/md/_linux.cfg b/pr/include/md/_linux.cfg -index fec8525378dc..5f4fa0eac783 100644 ---- a/pr/include/md/_linux.cfg -+++ b/pr/include/md/_linux.cfg -@@ -1157,6 +1157,51 @@ - #define PR_BYTES_PER_WORD_LOG2 3 - #define PR_BYTES_PER_DWORD_LOG2 3 - -+#elif defined(__arc__) -+ -+#define IS_LITTLE_ENDIAN 1 -+#undef IS_BIG_ENDIAN -+ -+#define PR_BYTES_PER_BYTE 1 -+#define PR_BYTES_PER_SHORT 2 -+#define PR_BYTES_PER_INT 4 -+#define PR_BYTES_PER_INT64 8 -+#define PR_BYTES_PER_LONG 4 -+#define PR_BYTES_PER_FLOAT 4 -+#define PR_BYTES_PER_DOUBLE 8 -+#define PR_BYTES_PER_WORD 4 -+#define PR_BYTES_PER_DWORD 8 -+ -+#define PR_BITS_PER_BYTE 8 -+#define PR_BITS_PER_SHORT 16 -+#define PR_BITS_PER_INT 32 -+#define PR_BITS_PER_INT64 64 -+#define PR_BITS_PER_LONG 32 -+#define PR_BITS_PER_FLOAT 32 -+#define PR_BITS_PER_DOUBLE 64 -+#define PR_BITS_PER_WORD 32 -+ -+#define PR_BITS_PER_BYTE_LOG2 3 -+#define PR_BITS_PER_SHORT_LOG2 4 -+#define PR_BITS_PER_INT_LOG2 5 -+#define PR_BITS_PER_INT64_LOG2 6 -+#define PR_BITS_PER_LONG_LOG2 5 -+#define PR_BITS_PER_FLOAT_LOG2 5 -+#define PR_BITS_PER_DOUBLE_LOG2 6 -+#define PR_BITS_PER_WORD_LOG2 5 -+ -+#define PR_ALIGN_OF_SHORT 2 -+#define PR_ALIGN_OF_INT 4 -+#define PR_ALIGN_OF_LONG 4 -+#define PR_ALIGN_OF_INT64 4 -+#define PR_ALIGN_OF_FLOAT 4 -+#define PR_ALIGN_OF_DOUBLE 4 -+#define PR_ALIGN_OF_POINTER 4 -+#define PR_ALIGN_OF_WORD 4 -+ -+#define PR_BYTES_PER_WORD_LOG2 2 -+#define PR_BYTES_PER_DWORD_LOG2 3 -+ - #else - - #error "Unknown CPU architecture" -diff --git a/pr/include/md/_linux.h b/pr/include/md/_linux.h -index 8e04fad479a1..628b1217e9c8 100644 ---- a/pr/include/md/_linux.h -+++ b/pr/include/md/_linux.h -@@ -63,6 +63,8 @@ - #define _PR_SI_ARCHITECTURE "riscv32" - #elif defined(__riscv) && (__riscv_xlen == 64) - #define _PR_SI_ARCHITECTURE "riscv64" -+#elif defined(__arc__) -+#define _PR_SI_ARCHITECTURE "arc" - #else - #error "Unknown CPU architecture" - #endif --- -2.17.1 - diff --git a/poky/meta/recipes-support/nspr/nspr_4.21.bb b/poky/meta/recipes-support/nspr/nspr_4.23.bb index 25563e50f..8e2761c20 100644 --- a/poky/meta/recipes-support/nspr/nspr_4.21.bb +++ b/poky/meta/recipes-support/nspr/nspr_4.23.bb @@ -11,7 +11,6 @@ SRC_URI = "http://ftp.mozilla.org/pub/nspr/releases/v${PV}/src/nspr-${PV}.tar.gz file://remove-srcdir-from-configure-in.patch \ file://0002-Add-nios2-support.patch \ file://0001-md-Fix-build-with-musl.patch \ - file://0004-Add-ARC-support.patch \ file://Makefile.in-remove-_BUILD_STRING-and-_BUILD_TIME.patch \ file://nspr.pc.in \ " @@ -24,8 +23,8 @@ CACHED_CONFIGUREVARS_append_libc-musl = " CFLAGS='${CFLAGS} -D_PR_POLL_AVAILABLE UPSTREAM_CHECK_URI = "http://ftp.mozilla.org/pub/nspr/releases/" UPSTREAM_CHECK_REGEX = "v(?P<pver>\d+(\.\d+)+)/" -SRC_URI[md5sum] = "b865586f19912a50acc3755d8a45dbaa" -SRC_URI[sha256sum] = "15ea32c7b100217b6e3193bc03e77f485d9bf7504051443ba9ce86d1c17c6b5a" +SRC_URI[md5sum] = "90af0450423b0588f0eba6255c07ab79" +SRC_URI[sha256sum] = "4b9d821037faf5723da901515ed9cac8b23ef1ea3729022259777393453477a4" CVE_PRODUCT = "netscape_portable_runtime" diff --git a/poky/meta/recipes-support/nss-myhostname/nss-myhostname_0.3.bb b/poky/meta/recipes-support/nss-myhostname/nss-myhostname_0.3.bb index 244d9e204..074f71320 100644 --- a/poky/meta/recipes-support/nss-myhostname/nss-myhostname_0.3.bb +++ b/poky/meta/recipes-support/nss-myhostname/nss-myhostname_0.3.bb @@ -12,7 +12,7 @@ SRC_URI = "http://0pointer.de/lennart/projects/nss-myhostname/nss-myhostname-${P SRC_URI[md5sum] = "d4ab9ac36c053ab8fb836db1cbd4a48f" SRC_URI[sha256sum] = "2ba744ea8d578d1c57c85884e94a3042ee17843a5294434d3a7f6c4d67e7caf2" -inherit autotools distro_features_check +inherit autotools features_check COMPATIBLE_HOST_libc-musl = 'null' diff --git a/poky/meta/recipes-support/pinentry/pinentry_1.1.0.bb b/poky/meta/recipes-support/pinentry/pinentry_1.1.0.bb index fb529d25d..8c500dcad 100644 --- a/poky/meta/recipes-support/pinentry/pinentry_1.1.0.bb +++ b/poky/meta/recipes-support/pinentry/pinentry_1.1.0.bb @@ -35,4 +35,4 @@ EXTRA_OECONF = " \ --disable-rpath \ " -BBCLASSEXTEND = "native" +BBCLASSEXTEND = "native nativesdk" diff --git a/poky/meta/recipes-support/rng-tools/rng-tools_6.7.bb b/poky/meta/recipes-support/rng-tools/rng-tools_6.8.bb index b4e453f67..83a48a4ec 100644 --- a/poky/meta/recipes-support/rng-tools/rng-tools_6.7.bb +++ b/poky/meta/recipes-support/rng-tools/rng-tools_6.8.bb @@ -14,7 +14,7 @@ SRC_URI = "\ file://default \ file://rngd.service \ " -SRCREV = "9fc873c5af0e392632e6b736938b811f7ca97251" +SRCREV = "eb5e34c7fb05594760f99d863fbe0401fe297b93" S = "${WORKDIR}/git" diff --git a/poky/meta/recipes-support/sqlite/sqlite3.inc b/poky/meta/recipes-support/sqlite/sqlite3.inc index 4af1e09e8..07614bdb3 100644 --- a/poky/meta/recipes-support/sqlite/sqlite3.inc +++ b/poky/meta/recipes-support/sqlite/sqlite3.inc @@ -44,8 +44,6 @@ EXTRA_OECONF = " \ --disable-static-shell \ " -CFLAGS_append = " -fPIC" - # pread() is in POSIX.1-2001 so any reasonable system must surely support it CFLAGS_append = " -DUSE_PREAD" diff --git a/poky/meta/recipes-support/sqlite/sqlite3_3.30.0.bb b/poky/meta/recipes-support/sqlite/sqlite3_3.30.1.bb index feeee8af0..f18eeb19e 100644 --- a/poky/meta/recipes-support/sqlite/sqlite3_3.30.0.bb +++ b/poky/meta/recipes-support/sqlite/sqlite3_3.30.1.bb @@ -4,5 +4,5 @@ LICENSE = "PD" LIC_FILES_CHKSUM = "file://sqlite3.h;endline=11;md5=786d3dc581eff03f4fd9e4a77ed00c66" SRC_URI = "http://www.sqlite.org/2019/sqlite-autoconf-${SQLITE_PV}.tar.gz" -SRC_URI[md5sum] = "84230638d5b80b61843e43b5efcb9e53" -SRC_URI[sha256sum] = "e0a8cf4c7a87455e55e10413d16f358ca121ccec687fe1301eac95e2d340fc58" +SRC_URI[md5sum] = "51252dc6bc9094ba11ab151ba650ff3c" +SRC_URI[sha256sum] = "8c5a50db089bd2a1b08dbc5b00d2027602ca7ff238ba7658fabca454d4298e60" diff --git a/poky/meta/recipes-support/vte/vte/0001-Add-m4-vapigen.m4.patch b/poky/meta/recipes-support/vte/vte/0001-Add-m4-vapigen.m4.patch deleted file mode 100644 index 1c5630ed9..000000000 --- a/poky/meta/recipes-support/vte/vte/0001-Add-m4-vapigen.m4.patch +++ /dev/null @@ -1,119 +0,0 @@ -From 08ca1c48b25c332b75bba2a6b5d757da006e955b Mon Sep 17 00:00:00 2001 -From: Jussi Kukkonen <jussi.kukkonen@intel.com> -Date: Fri, 7 Oct 2016 16:27:57 +0300 -Subject: [PATCH] Add m4/vapigen.m4 - -Building without vala will fail if we don't have a vapigen.m4. - -Upstream-Status: Pending -Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com> ---- - m4/vapigen.m4 | 96 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ - 1 file changed, 96 insertions(+) - create mode 100644 m4/vapigen.m4 - -diff --git a/m4/vapigen.m4 b/m4/vapigen.m4 -new file mode 100644 -index 0000000..f2df12f ---- /dev/null -+++ b/m4/vapigen.m4 -@@ -0,0 +1,96 @@ -+dnl vapigen.m4 -+dnl -+dnl Copyright 2012 Evan Nemerson -+dnl -+dnl This library is free software; you can redistribute it and/or -+dnl modify it under the terms of the GNU Lesser General Public -+dnl License as published by the Free Software Foundation; either -+dnl version 2.1 of the License, or (at your option) any later version. -+dnl -+dnl This library is distributed in the hope that it will be useful, -+dnl but WITHOUT ANY WARRANTY; without even the implied warranty of -+dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -+dnl Lesser General Public License for more details. -+dnl -+dnl You should have received a copy of the GNU Lesser General Public -+dnl License along with this library; if not, write to the Free Software -+dnl Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -+ -+# VAPIGEN_CHECK([VERSION], [API_VERSION], [FOUND-INTROSPECTION], [DEFAULT]) -+# -------------------------------------- -+# Check vapigen existence and version -+# -+# See http://live.gnome.org/Vala/UpstreamGuide for detailed documentation -+AC_DEFUN([VAPIGEN_CHECK], -+[ -+ AC_BEFORE([GOBJECT_INTROSPECTION_CHECK],[$0]) -+ AC_BEFORE([GOBJECT_INTROSPECTION_REQUIRE],[$0]) -+ -+ AC_ARG_ENABLE([vala], -+ [AS_HELP_STRING([--enable-vala[=@<:@no/auto/yes@:>@]],[build Vala bindings @<:@default=]ifelse($4,,auto,$4)[@:>@])],,[ -+ AS_IF([test "x$4" = "x"], [ -+ enable_vala=auto -+ ], [ -+ enable_vala=$4 -+ ]) -+ ]) -+ -+ AS_CASE([$enable_vala], [no], [enable_vala=no], -+ [yes], [ -+ AS_IF([test "x$3" != "xyes" -a "x$found_introspection" != "xyes"], [ -+ AC_MSG_ERROR([Vala bindings require GObject Introspection]) -+ ]) -+ ], [auto], [ -+ AS_IF([test "x$3" != "xyes" -a "x$found_introspection" != "xyes"], [ -+ enable_vala=no -+ ]) -+ ], [ -+ AC_MSG_ERROR([Invalid argument passed to --enable-vala, should be one of @<:@no/auto/yes@:>@]) -+ ]) -+ -+ AS_IF([test "x$2" = "x"], [ -+ vapigen_pkg_name=vapigen -+ ], [ -+ vapigen_pkg_name=vapigen-$2 -+ ]) -+ AS_IF([test "x$1" = "x"], [ -+ vapigen_pkg="$vapigen_pkg_name" -+ ], [ -+ vapigen_pkg="$vapigen_pkg_name >= $1" -+ ]) -+ -+ PKG_PROG_PKG_CONFIG -+ -+ PKG_CHECK_EXISTS([$vapigen_pkg], [ -+ AS_IF([test "$enable_vala" = "auto"], [ -+ enable_vala=yes -+ ]) -+ ], [ -+ AS_CASE([$enable_vala], [yes], [ -+ AC_MSG_ERROR([$vapigen_pkg not found]) -+ ], [auto], [ -+ enable_vala=no -+ ]) -+ ]) -+ -+ AC_MSG_CHECKING([for vala]) -+ -+ AS_CASE([$enable_vala], -+ [yes], [ -+ VAPIGEN=`$PKG_CONFIG --variable=vapigen vapigen` -+ VAPIGEN_MAKEFILE=`$PKG_CONFIG --variable=datadir vapigen`/vala/Makefile.vapigen -+ AS_IF([test "x$2" = "x"], [ -+ VAPIGEN_VAPIDIR=`$PKG_CONFIG --variable=vapidir vapigen` -+ ], [ -+ VAPIGEN_VAPIDIR=`$PKG_CONFIG --variable=vapidir_versioned vapigen` -+ ]) -+ ]) -+ -+ AC_MSG_RESULT([$enable_vala]) -+ -+ AC_SUBST([VAPIGEN]) -+ AC_SUBST([VAPIGEN_VAPIDIR]) -+ AC_SUBST([VAPIGEN_MAKEFILE]) -+ -+ AM_CONDITIONAL(ENABLE_VAPIGEN, test "x$enable_vala" = "xyes") -+]) --- -2.1.4 - diff --git a/poky/meta/recipes-support/vte/vte/0001-Don-t-enable-stack-protection-by-default.patch b/poky/meta/recipes-support/vte/vte/0001-Don-t-enable-stack-protection-by-default.patch deleted file mode 100644 index fcfc55975..000000000 --- a/poky/meta/recipes-support/vte/vte/0001-Don-t-enable-stack-protection-by-default.patch +++ /dev/null @@ -1,29 +0,0 @@ -From b0a579d83e355545b64742c997fe8b1d58bf4207 Mon Sep 17 00:00:00 2001 -From: Jussi Kukkonen <jussi.kukkonen@intel.com> -Date: Mon, 13 Jun 2016 11:05:00 +0300 -Subject: [PATCH] Don't enable stack-protection by default - -These are set by security_flags.inc. - -Upstream-Status: Inappropriate [configuration] -Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com> ---- - configure.ac | 2 -- - 1 file changed, 2 deletions(-) - -diff --git a/configure.ac b/configure.ac -index 068d072..d580f84 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -138,8 +138,6 @@ m4_define([compiler_flags_common],[ dnl - -fno-common dnl - -fdiagnostics-show-option dnl - -fno-strict-aliasing dnl -- -fstack-protector dnl -- -fstack-protector-strong dnl - -fno-semantic-interposition dnl - -Wno-deprecated-declarations dnl - ]) --- -2.1.4 - diff --git a/poky/meta/recipes-support/vte/vte/0001-Add-W_EXITCODE-macro-for-non-glibc-systems.patch b/poky/meta/recipes-support/vte/vte/0002-Add-W_EXITCODE-macro-for-non-glibc-systems.patch index 0ffd92b4b..0ffd92b4b 100644 --- a/poky/meta/recipes-support/vte/vte/0001-Add-W_EXITCODE-macro-for-non-glibc-systems.patch +++ b/poky/meta/recipes-support/vte/vte/0002-Add-W_EXITCODE-macro-for-non-glibc-systems.patch diff --git a/poky/meta/recipes-support/vte/vte_0.56.3.bb b/poky/meta/recipes-support/vte/vte_0.58.2.bb index 0deee175d..0ed382a5f 100644 --- a/poky/meta/recipes-support/vte/vte_0.56.3.bb +++ b/poky/meta/recipes-support/vte/vte_0.58.2.bb @@ -9,18 +9,19 @@ LIC_FILES_CHKSUM = " \ file://COPYING.LGPL3;md5=b52f2d57d10c4f7ee67a7eb9615d5d24 \ " -DEPENDS = "glib-2.0 gtk+3 libpcre2 intltool-native libxml2-native gperf-native" +DEPENDS = "glib-2.0 gtk+3 libpcre2 libxml2-native gperf-native" -inherit gnomebase gtk-doc distro_features_check upstream-version-is-even gobject-introspection +GNOMEBASEBUILDCLASS = "meson" +GIR_MESON_OPTION = 'gir' + +inherit gnomebase gtk-doc features_check upstream-version-is-even gobject-introspection # vapigen.m4 is required when vala is not present (but the one from vala should be used normally) -SRC_URI += "file://0001-Don-t-enable-stack-protection-by-default.patch \ - ${@bb.utils.contains('PACKAGECONFIG', 'vala', '', 'file://0001-Add-m4-vapigen.m4.patch', d) } \ - file://0001-app.cc-use-old-school-asignment-to-avoid-gcc-4.8-err.patch \ - file://0001-Add-W_EXITCODE-macro-for-non-glibc-systems.patch \ +SRC_URI += "file://0001-app.cc-use-old-school-asignment-to-avoid-gcc-4.8-err.patch \ + file://0002-Add-W_EXITCODE-macro-for-non-glibc-systems.patch \ " -SRC_URI[archive.md5sum] = "adf341807861a5dad9f98e5c701c0769" -SRC_URI[archive.sha256sum] = "17a1d4bc8848f1d2acfa4c20aaa24b9bac49f057b8909c56d3dafec2e2332648" +SRC_URI[archive.md5sum] = "dadbf2c1d9864d3ea185738f97ab63af" +SRC_URI[archive.sha256sum] = "33c966d2b1f2c3b0f9416dbca883fd746159b5bd040350e3b78f8104b2a42bc0" ANY_OF_DISTRO_FEATURES = "${GTK3DISTROFEATURES}" @@ -41,15 +42,13 @@ do_compile_prepend() { FILES_${PN}-dev += "${datadir}/vala/vapi/*" PACKAGECONFIG ??= "gnutls" -PACKAGECONFIG[vala] = "--enable-vala,--disable-vala,vala-native vala" -PACKAGECONFIG[gnutls] = "--with-gnutls,--without-gnutls,gnutls" +PACKAGECONFIG[vala] = "-Dvapi=true,-Dvapi=false,vala-native vala" +PACKAGECONFIG[gnutls] = "-Dgnutls=true,-Dgnutls=false,gnutls" +# vala requires gir +PACKAGECONFIG_remove_class-native = "vala" CFLAGS += "-D_GNU_SOURCE" -# libtool adds "-nostdlib" when g++ is used. This breaks PIE builds. -# Use libtool-cross (which has a hack to prevent that) instead. -EXTRA_OEMAKE_class-target = "LIBTOOL=${STAGING_BINDIR_CROSS}/${HOST_SYS}-libtool" - PACKAGES =+ "libvte ${PN}-prompt" FILES_libvte = "${libdir}/*.so.* ${libdir}/girepository-1.0/*" FILES_${PN}-prompt = "${sysconfdir}/profile.d" diff --git a/poky/scripts/lib/devtool/deploy.py b/poky/scripts/lib/devtool/deploy.py index d1ce2309f..6a997735f 100644 --- a/poky/scripts/lib/devtool/deploy.py +++ b/poky/scripts/lib/devtool/deploy.py @@ -212,6 +212,9 @@ def deploy(args, config, basepath, workspace): scp_port = "-P %s" % args.port ssh_port = "-p %s" % args.port + if args.key: + extraoptions += ' -i %s' % args.key + # In order to delete previously deployed files and have the manifest file on # the target, we write out a shell script and then copy it to the target # so we can then run it (piping tar output to it). @@ -326,6 +329,8 @@ def register_commands(subparsers, context): parser_deploy.add_argument('--no-check-space', help='Do not check for available space before deploying', action='store_true') parser_deploy.add_argument('-e', '--ssh-exec', help='Executable to use in place of ssh') parser_deploy.add_argument('-P', '--port', help='Specify port to use for connection to the target') + parser_deploy.add_argument('-I', '--key', + help='Specifiy ssh private key for connection to the target') strip_opts = parser_deploy.add_mutually_exclusive_group(required=False) strip_opts.add_argument('-S', '--strip', @@ -349,4 +354,7 @@ def register_commands(subparsers, context): parser_undeploy.add_argument('-n', '--dry-run', help='List files to be undeployed only', action='store_true') parser_undeploy.add_argument('-e', '--ssh-exec', help='Executable to use in place of ssh') parser_undeploy.add_argument('-P', '--port', help='Specify port to use for connection to the target') + parser_undeploy.add_argument('-I', '--key', + help='Specifiy ssh private key for connection to the target') + parser_undeploy.set_defaults(func=undeploy) diff --git a/poky/scripts/lib/devtool/standard.py b/poky/scripts/lib/devtool/standard.py index 1646971a9..1c0cd8ab5 100644 --- a/poky/scripts/lib/devtool/standard.py +++ b/poky/scripts/lib/devtool/standard.py @@ -1852,7 +1852,7 @@ def status(args, config, basepath, workspace): return 0 -def _reset(recipes, no_clean, config, basepath, workspace): +def _reset(recipes, no_clean, remove_work, config, basepath, workspace): """Reset one or more recipes""" import oe.path @@ -1930,10 +1930,15 @@ def _reset(recipes, no_clean, config, basepath, workspace): srctreebase = workspace[pn]['srctreebase'] if os.path.isdir(srctreebase): if os.listdir(srctreebase): - # We don't want to risk wiping out any work in progress - logger.info('Leaving source tree %s as-is; if you no ' - 'longer need it then please delete it manually' - % srctreebase) + if remove_work: + logger.info('-r argument used on %s, removing source tree.' + ' You will lose any unsaved work' %pn) + shutil.rmtree(srctreebase) + else: + # We don't want to risk wiping out any work in progress + logger.info('Leaving source tree %s as-is; if you no ' + 'longer need it then please delete it manually' + % srctreebase) else: # This is unlikely, but if it's empty we can just remove it os.rmdir(srctreebase) @@ -1943,6 +1948,10 @@ def _reset(recipes, no_clean, config, basepath, workspace): def reset(args, config, basepath, workspace): """Entry point for the devtool 'reset' subcommand""" import bb + import shutil + + recipes = "" + if args.recipename: if args.all: raise DevtoolError("Recipe cannot be specified if -a/--all is used") @@ -1957,7 +1966,7 @@ def reset(args, config, basepath, workspace): else: recipes = args.recipename - _reset(recipes, args.no_clean, config, basepath, workspace) + _reset(recipes, args.no_clean, args.remove_work, config, basepath, workspace) return 0 @@ -2009,9 +2018,10 @@ def finish(args, config, basepath, workspace): raise DevtoolError('Source tree is not clean:\n\n%s\nEnsure you have committed your changes or use -f/--force if you are sure there\'s nothing that needs to be committed' % dirty) no_clean = args.no_clean + remove_work=args.remove_work tinfoil = setup_tinfoil(basepath=basepath, tracking=True) try: - rd = parse_recipe(config, tinfoil, args.recipename, True, False) + rd = parse_recipe(config, tinfoil, args.recipename, True) if not rd: return 1 @@ -2160,7 +2170,7 @@ def finish(args, config, basepath, workspace): if args.dry_run: logger.info('Resetting recipe (dry-run)') else: - _reset([args.recipename], no_clean=no_clean, config=config, basepath=basepath, workspace=workspace) + _reset([args.recipename], no_clean=no_clean, remove_work=remove_work, config=config, basepath=basepath, workspace=workspace) return 0 @@ -2272,6 +2282,7 @@ def register_commands(subparsers, context): parser_reset.add_argument('recipename', nargs='*', help='Recipe to reset') parser_reset.add_argument('--all', '-a', action="store_true", help='Reset all recipes (clear workspace)') parser_reset.add_argument('--no-clean', '-n', action="store_true", help='Don\'t clean the sysroot to remove recipe output') + parser_reset.add_argument('--remove-work', '-r', action="store_true", help='Clean the sources directory along with append') parser_reset.set_defaults(func=reset) parser_finish = subparsers.add_parser('finish', help='Finish working on a recipe in your workspace', @@ -2282,6 +2293,7 @@ def register_commands(subparsers, context): parser_finish.add_argument('--mode', '-m', choices=['patch', 'srcrev', 'auto'], default='auto', help='Update mode (where %(metavar)s is %(choices)s; default is %(default)s)', metavar='MODE') parser_finish.add_argument('--initial-rev', help='Override starting revision for patches') parser_finish.add_argument('--force', '-f', action="store_true", help='Force continuing even if there are uncommitted changes in the source tree repository') + parser_finish.add_argument('--remove-work', '-r', action="store_true", help='Clean the sources directory under workspace') parser_finish.add_argument('--no-clean', '-n', action="store_true", help='Don\'t clean the sysroot to remove recipe output') parser_finish.add_argument('--no-overrides', '-O', action="store_true", help='Do not handle other override branches (if they exist)') parser_finish.add_argument('--dry-run', '-N', action="store_true", help='Dry-run (just report changes instead of writing them)') diff --git a/poky/scripts/lib/devtool/upgrade.py b/poky/scripts/lib/devtool/upgrade.py index 18c5b66a2..cb6dce378 100644 --- a/poky/scripts/lib/devtool/upgrade.py +++ b/poky/scripts/lib/devtool/upgrade.py @@ -32,7 +32,7 @@ def _run(cmd, cwd=''): def _get_srctree(tmpdir): srctree = tmpdir - dirs = os.listdir(tmpdir) + dirs = scriptutils.filter_src_subdirs(tmpdir) if len(dirs) == 1: srctree = os.path.join(tmpdir, dirs[0]) return srctree @@ -281,7 +281,8 @@ def _extract_new_source(newpv, srctree, no_patch, srcrev, srcbranch, branch, kee logger.info('Preserving temporary directory %s' % tmpsrctree) else: shutil.rmtree(tmpsrctree) - shutil.rmtree(tmpdir) + if tmpdir != tmpsrctree: + shutil.rmtree(tmpdir) return (rev, md5, sha256, srcbranch, srcsubdir_rel) diff --git a/poky/scripts/lib/recipetool/create.py b/poky/scripts/lib/recipetool/create.py index 1fb6b5553..4c4bbadb4 100644 --- a/poky/scripts/lib/recipetool/create.py +++ b/poky/scripts/lib/recipetool/create.py @@ -495,9 +495,7 @@ def create_recipe(args): if ftmpdir and args.keep_temp: logger.info('Fetch temp directory is %s' % ftmpdir) - dirlist = os.listdir(srctree) - filterout = ['git.indirectionsymlink'] - dirlist = [x for x in dirlist if x not in filterout] + dirlist = scriptutils.filter_src_subdirs(srctree) logger.debug('Directory listing (excluding filtered out):\n %s' % '\n '.join(dirlist)) if len(dirlist) == 1: singleitem = os.path.join(srctree, dirlist[0]) diff --git a/poky/scripts/lib/resulttool/report.py b/poky/scripts/lib/resulttool/report.py index 883b52517..692dd7a85 100644 --- a/poky/scripts/lib/resulttool/report.py +++ b/poky/scripts/lib/resulttool/report.py @@ -186,6 +186,10 @@ class ResultsTextReport(object): havefailed = True if line['machine'] not in machines: machines.append(line['machine']) + reporttotalvalues = {} + for k in cols: + reporttotalvalues[k] = '%s' % sum([line[k] for line in test_count_reports]) + reporttotalvalues['count'] = '%s' % len(test_count_reports) for (machine, report) in self.ptests.items(): for ptest in self.ptests[machine]: if len(ptest) > maxlen['ptest']: @@ -199,6 +203,7 @@ class ResultsTextReport(object): if len(ltpposixtest) > maxlen['ltpposixtest']: maxlen['ltpposixtest'] = len(ltpposixtest) output = template.render(reportvalues=reportvalues, + reporttotalvalues=reporttotalvalues, havefailed=havefailed, machines=machines, ptests=self.ptests, @@ -207,8 +212,11 @@ class ResultsTextReport(object): maxlen=maxlen) print(output) - def view_test_report(self, logger, source_dir, branch, commit, tag): + def view_test_report(self, logger, source_dir, branch, commit, tag, use_regression_map, raw_test): test_count_reports = [] + configmap = resultutils.store_map + if use_regression_map: + configmap = resultutils.regression_map if commit: if tag: logger.warning("Ignoring --tag as --commit was specified") @@ -216,12 +224,23 @@ class ResultsTextReport(object): repo = GitRepo(source_dir) revs = gitarchive.get_test_revs(logger, repo, tag_name, branch=branch) rev_index = gitarchive.rev_find(revs, 'commit', commit) - testresults = resultutils.git_get_result(repo, revs[rev_index][2]) + testresults = resultutils.git_get_result(repo, revs[rev_index][2], configmap=configmap) elif tag: repo = GitRepo(source_dir) - testresults = resultutils.git_get_result(repo, [tag]) + testresults = resultutils.git_get_result(repo, [tag], configmap=configmap) else: - testresults = resultutils.load_resultsdata(source_dir) + testresults = resultutils.load_resultsdata(source_dir, configmap=configmap) + if raw_test: + raw_results = {} + for testsuite in testresults: + result = testresults[testsuite].get(raw_test, {}) + if result: + raw_results[testsuite] = result + if raw_results: + print(json.dumps(raw_results, sort_keys=True, indent=4)) + else: + print('Could not find raw test result for %s' % raw_test) + return 0 for testsuite in testresults: for resultid in testresults[testsuite]: skip = False @@ -248,7 +267,8 @@ class ResultsTextReport(object): def report(args, logger): report = ResultsTextReport() - report.view_test_report(logger, args.source_dir, args.branch, args.commit, args.tag) + report.view_test_report(logger, args.source_dir, args.branch, args.commit, args.tag, args.use_regression_map, + args.raw_test_only) return 0 def register_commands(subparsers): @@ -263,3 +283,8 @@ def register_commands(subparsers): parser_build.add_argument('--commit', help="Revision to report") parser_build.add_argument('-t', '--tag', default='', help='source_dir is a git repository, report on the tag specified from that repository') + parser_build.add_argument('-m', '--use_regression_map', action='store_true', + help='instead of the default "store_map", use the "regression_map" for report') + parser_build.add_argument('-r', '--raw_test_only', default='', + help='output raw test result only for the user provided test result id') + diff --git a/poky/scripts/lib/resulttool/resultutils.py b/poky/scripts/lib/resulttool/resultutils.py index 7cb85a6aa..f0ae8ec1c 100644 --- a/poky/scripts/lib/resulttool/resultutils.py +++ b/poky/scripts/lib/resulttool/resultutils.py @@ -177,7 +177,7 @@ def save_resultsdata(results, destdir, fn="testresults.json", ptestjson=False, p with open(dst.replace(fn, "ptest-%s.log" % i), "w+") as f: f.write(sectionlog) -def git_get_result(repo, tags): +def git_get_result(repo, tags, configmap=store_map): git_objs = [] for tag in tags: files = repo.run_cmd(['ls-tree', "--name-only", "-r", tag]).splitlines() @@ -200,7 +200,7 @@ def git_get_result(repo, tags): # Optimize by reading all data with one git command results = {} for obj in parse_json_stream(repo.run_cmd(['show'] + git_objs + ['--'])): - append_resultsdata(results, obj) + append_resultsdata(results, obj, configmap=configmap) return results diff --git a/poky/scripts/lib/resulttool/store.py b/poky/scripts/lib/resulttool/store.py index 79c83dd8b..e0951f0a8 100644 --- a/poky/scripts/lib/resulttool/store.py +++ b/poky/scripts/lib/resulttool/store.py @@ -24,6 +24,8 @@ def store(args, logger): configvars = resultutils.extra_configvars.copy() if args.executed_by: configvars['EXECUTED_BY'] = args.executed_by + if args.extra_test_env: + configvars['EXTRA_TEST_ENV'] = args.extra_test_env results = {} logger.info('Reading files from %s' % args.source) if resultutils.is_url(args.source) or os.path.isfile(args.source): @@ -98,4 +100,5 @@ def register_commands(subparsers): help='don\'t error if no results to store are found') parser_build.add_argument('-x', '--executed-by', default='', help='add executed-by configuration to each result file') - + parser_build.add_argument('-t', '--extra-test-env', default='', + help='add extra test environment data to each result file configuration') diff --git a/poky/scripts/lib/resulttool/template/test_report_full_text.txt b/poky/scripts/lib/resulttool/template/test_report_full_text.txt index 17c99cb4e..2efba2ef6 100644 --- a/poky/scripts/lib/resulttool/template/test_report_full_text.txt +++ b/poky/scripts/lib/resulttool/template/test_report_full_text.txt @@ -8,7 +8,8 @@ Test Result Status Summary (Counts/Percentages sorted by testseries, ID) {{ report.testseries.ljust(maxlen['testseries']) }} | {{ report.result_id.ljust(maxlen['result_id']) }} | {{ (report.passed|string).ljust(maxlen['passed']) }} | {{ (report.failed|string).ljust(maxlen['failed']) }} | {{ (report.skipped|string).ljust(maxlen['skipped']) }} {% endfor %} -------------------------------------------------------------------------------------------------------------- - +{{ 'Total'.ljust(maxlen['testseries']) }} | {{ reporttotalvalues['count'].ljust(maxlen['result_id']) }} | {{ reporttotalvalues['passed'].ljust(maxlen['passed']) }} | {{ reporttotalvalues['failed'].ljust(maxlen['failed']) }} | {{ reporttotalvalues['skipped'].ljust(maxlen['skipped']) }} +-------------------------------------------------------------------------------------------------------------- {% for machine in machines %} {% if ptests[machine] %} diff --git a/poky/scripts/lib/scriptutils.py b/poky/scripts/lib/scriptutils.py index c573dc7f6..45bdaf5f4 100644 --- a/poky/scripts/lib/scriptutils.py +++ b/poky/scripts/lib/scriptutils.py @@ -268,3 +268,13 @@ def is_src_url(param): elif param.startswith('git@') or ('@' in param and param.endswith('.git')): return True return False + +def filter_src_subdirs(pth): + """ + Filter out subdirectories of initial unpacked source trees that we do not care about. + Used by devtool and recipetool. + """ + dirlist = os.listdir(pth) + filterout = ['git.indirectionsymlink', 'source-date-epoch'] + dirlist = [x for x in dirlist if x not in filterout] + return dirlist diff --git a/poky/scripts/lib/wic/engine.py b/poky/scripts/lib/wic/engine.py index 61939ad19..7e6620747 100644 --- a/poky/scripts/lib/wic/engine.py +++ b/poky/scripts/lib/wic/engine.py @@ -19,6 +19,7 @@ import os import tempfile import json import subprocess +import re from collections import namedtuple, OrderedDict from distutils.spawn import find_executable @@ -335,25 +336,52 @@ class Disk: exec_cmd(cmd, as_shell=True) self._put_part_image(pnum) - def remove(self, pnum, path): + def remove_ext(self, pnum, path, recursive): + """ + Remove files/dirs and their contents from the partition. + This only applies to ext* partition. + """ + abs_path = re.sub('\/\/+', '/', path) + cmd = "{} {} -wR 'rm \"{}\"'".format(self.debugfs, + self._get_part_image(pnum), + abs_path) + out = exec_cmd(cmd , as_shell=True) + for line in out.splitlines(): + if line.startswith("rm:"): + if "file is a directory" in line: + if recursive: + # loop through content and delete them one by one if + # flaged with -r + subdirs = iter(self.dir(pnum, abs_path).splitlines()) + next(subdirs) + for subdir in subdirs: + dir = subdir.split(':')[1].split(" ", 1)[1] + if not dir == "." and not dir == "..": + self.remove_ext(pnum, "%s/%s" % (abs_path, dir), recursive) + + rmdir_out = exec_cmd("{} {} -wR 'rmdir \"{}\"'".format(self.debugfs, + self._get_part_image(pnum), + abs_path.rstrip('/')) + , as_shell=True) + + for rmdir_line in rmdir_out.splitlines(): + if "directory not empty" in rmdir_line: + raise WicError("Could not complete operation: \n%s \n" + "use -r to remove non-empty directory" % rmdir_line) + if rmdir_line.startswith("rmdir:"): + raise WicError("Could not complete operation: \n%s " + "\n%s" % (str(line), rmdir_line)) + + else: + raise WicError("Could not complete operation: \n%s " + "\nUnable to remove %s" % (str(line), abs_path)) + + def remove(self, pnum, path, recursive): """Remove files/dirs from the partition.""" partimg = self._get_part_image(pnum) if self.partitions[pnum].fstype.startswith('ext'): - cmd = "{} {} -wR 'rm {}'".format(self.debugfs, - self._get_part_image(pnum), - path) - out = exec_cmd(cmd , as_shell=True) - for line in out.splitlines(): - if line.startswith("rm:"): - if "file is a directory" in line: - # Try rmdir to see if this is an empty directory. This won't delete - # any non empty directory so let user know about any error that this might - # generate. - print(exec_cmd("{} {} -wR 'rmdir {}'".format(self.debugfs, - self._get_part_image(pnum), - path), as_shell=True)) - else: - raise WicError("Could not complete operation: wic %s" % str(line)) + self.remove_ext(pnum, path, recursive) + else: # fat cmd = "{} -i {} ::{}".format(self.mdel, partimg, path) try: @@ -535,13 +563,13 @@ def wic_rm(args, native_sysroot): partitioned image. """ disk = Disk(args.path.image, native_sysroot) - disk.remove(args.path.part, args.path.path) + disk.remove(args.path.part, args.path.path, args.recursive_delete) def wic_write(args, native_sysroot): """ Write image to a target device. """ - disk = Disk(args.image, native_sysroot, ('fat', 'ext', 'swap')) + disk = Disk(args.image, native_sysroot, ('fat', 'ext', 'linux-swap')) disk.write(args.target, args.expand) def find_canned(scripts_path, file_name): diff --git a/poky/scripts/lib/wic/help.py b/poky/scripts/lib/wic/help.py index 3a40fc0ea..812ebe3ec 100644 --- a/poky/scripts/lib/wic/help.py +++ b/poky/scripts/lib/wic/help.py @@ -422,6 +422,7 @@ NAME SYNOPSIS wic rm <src> <image>:<partition><path> wic rm <src> <image>:<partition><path> --native-sysroot <path> + wic rm -r <image>:<partition><path> DESCRIPTION This command removes files or directories from the vfat or ext* partition of the @@ -456,6 +457,9 @@ DESCRIPTION The -n option is used to specify the path to the native sysroot containing the tools(parted and mtools) to use. + + The -r option is used to remove directories and their contents + recursively,this only applies to ext* partition. """ wic_write_usage = """ @@ -478,7 +482,7 @@ NAME SYNOPSIS wic write <image> <target> wic write <image> <target> --expand auto - wic write <image> <target> --expand 1:100M-2:300M + wic write <image> <target> --expand 1:100M,2:300M wic write <image> <target> --native-sysroot <path> DESCRIPTION @@ -489,7 +493,7 @@ DESCRIPTION The --expand option is used to resize image partitions. --expand auto expands partitions to occupy all free space available on the target device. It's also possible to specify expansion rules in a format - <partition>:<size>[-<partition>:<size>...] for one or more partitions. + <partition>:<size>[,<partition>:<size>...] for one or more partitions. Specifying size 0 will keep partition unmodified. Note: Resizing boot partition can result in non-bootable image for non-EFI images. It is recommended to use size 0 for boot partition to keep image bootable. @@ -1046,3 +1050,59 @@ NAME DESCRIPTION Specify a help topic to display it. Topics are shown above. """ + + +wic_help = """ +Creates a customized OpenEmbedded image. + +Usage: wic [--version] + wic help [COMMAND or TOPIC] + wic COMMAND [ARGS] + + usage 1: Returns the current version of Wic + usage 2: Returns detailed help for a COMMAND or TOPIC + usage 3: Executes COMMAND + + +COMMAND: + + list - List available canned images and source plugins + ls - List contents of partitioned image or partition + rm - Remove files or directories from the vfat or ext* partitions + help - Show help for a wic COMMAND or TOPIC + write - Write an image to a device + cp - Copy files and directories to the vfat or ext* partitions + create - Create a new OpenEmbedded image + + +TOPIC: + overview - Presents an overall overview of Wic + plugins - Presents an overview and API for Wic plugins + kickstart - Presents a Wic kicstart file reference + + +Examples: + + $ wic --version + + Returns the current version of Wic + + + $ wic help cp + + Returns the SYNOPSIS and DESCRIPTION for the Wic "cp" command. + + + $ wic list images + + Returns the list of canned images (i.e. *.wks files located in + the /scripts/lib/wic/canned-wks directory. + + + $ wic create mkefidisk -e core-image-minimal + + Creates an EFI disk image from artifacts used in a previous + core-image-minimal build in standard BitBake locations + (e.g. Cooked Mode). + +""" diff --git a/poky/scripts/lib/wic/plugins/source/isoimage-isohybrid.py b/poky/scripts/lib/wic/plugins/source/isoimage-isohybrid.py index 24299c1ec..11326a274 100644 --- a/poky/scripts/lib/wic/plugins/source/isoimage-isohybrid.py +++ b/poky/scripts/lib/wic/plugins/source/isoimage-isohybrid.py @@ -336,19 +336,23 @@ class IsoImagePlugin(SourcePlugin): (img_iso_dir, isodir) exec_cmd(install_cmd) else: + # Default to 100 blocks of extra space for file system overhead + esp_extra_blocks = int(source_params.get('esp_extra_blocks', '100')) + du_cmd = "du -bks %s/EFI" % isodir out = exec_cmd(du_cmd) blocks = int(out.split()[0]) - # Add some extra space for file system overhead - blocks += 100 + blocks += esp_extra_blocks logger.debug("Added 100 extra blocks to %s to get to %d " "total blocks", part.mountpoint, blocks) # dosfs image for EFI boot bootimg = "%s/efi.img" % isodir - dosfs_cmd = 'mkfs.vfat -n "EFIimg" -S 512 -C %s %d' \ - % (bootimg, blocks) + esp_label = source_params.get('esp_label', 'EFIimg') + + dosfs_cmd = 'mkfs.vfat -n \'%s\' -S 512 -C %s %d' \ + % (esp_label, bootimg, blocks) exec_native_cmd(dosfs_cmd, native_sysroot) mmd_cmd = "mmd -i %s ::/EFI" % bootimg diff --git a/poky/scripts/lib/wic/plugins/source/rawcopy.py b/poky/scripts/lib/wic/plugins/source/rawcopy.py index df86d6729..82970ce51 100644 --- a/poky/scripts/lib/wic/plugins/source/rawcopy.py +++ b/poky/scripts/lib/wic/plugins/source/rawcopy.py @@ -59,6 +59,9 @@ class RawCopyPlugin(SourcePlugin): src = os.path.join(kernel_dir, source_params['file']) dst = os.path.join(cr_workdir, "%s.%s" % (source_params['file'], part.lineno)) + if not os.path.exists(os.path.dirname(dst)): + os.makedirs(os.path.dirname(dst)) + if 'skip' in source_params: sparse_copy(src, dst, skip=int(source_params['skip'])) else: diff --git a/poky/scripts/native-intercept/chgrp b/poky/scripts/native-intercept/chgrp new file mode 100755 index 000000000..399c979f9 --- /dev/null +++ b/poky/scripts/native-intercept/chgrp @@ -0,0 +1,5 @@ +#! /bin/sh +# +# SPDX-License-Identifier: GPL-2.0-only +# +echo "Intercept $0: $@ -- do nothing" diff --git a/poky/scripts/oe-pkgdata-util b/poky/scripts/oe-pkgdata-util index 9cc78d110..93220e361 100755 --- a/poky/scripts/oe-pkgdata-util +++ b/poky/scripts/oe-pkgdata-util @@ -389,21 +389,16 @@ def list_pkgs(args): return False return True + pkglist = [] if args.recipe: packages = get_recipe_pkgs(args.pkgdata_dir, args.recipe, args.unpackaged) if args.runtime: - pkglist = [] runtime_pkgs = lookup_pkglist(packages, args.pkgdata_dir, False) for rtpkgs in runtime_pkgs.values(): pkglist.extend(rtpkgs) else: pkglist = packages - - for pkg in pkglist: - if matchpkg(pkg): - found = True - print("%s" % pkg) else: if args.runtime: searchdir = 'runtime-reverse' @@ -414,9 +409,13 @@ def list_pkgs(args): for fn in files: if fn.endswith('.packaged'): continue - if matchpkg(fn): - found = True - print("%s" % fn) + pkglist.append(fn) + + for pkg in sorted(pkglist): + if matchpkg(pkg): + found = True + print("%s" % pkg) + if not found: if args.pkgspec: logger.error("Unable to find any package matching %s" % args.pkgspec) diff --git a/poky/scripts/runqemu b/poky/scripts/runqemu index a05facd0d..5c56c3fe6 100755 --- a/poky/scripts/runqemu +++ b/poky/scripts/runqemu @@ -67,9 +67,9 @@ of the following environment variables (in any order): nographic - disable video console sdl - choose the SDL UI frontend gtk - choose the Gtk UI frontend - gl - enable virgl-based GL acceleration (also needs gtk option) - gl-es - enable virgl-based GL acceleration, using OpenGL ES (also needs gtk option) - egl-headless - enable headless EGL output; use vnc or spice to see it + gl - enable virgl-based GL acceleration (also needs gtk or sdl options) + gl-es - enable virgl-based GL acceleration, using OpenGL ES (also needs gtk or sdl options) + egl-headless - enable headless EGL output; use vnc (via publicvnc option) or spice to see it serial - enable a serial console on /dev/ttyS0 serialstdio - enable a serial console on the console (regardless of graphics mode) slirp - enable user networking, no root privileges is required @@ -437,7 +437,12 @@ class BaseConfig(object): self.qemu_opt_script += ' -nographic' self.kernel_cmdline_script += ' console=ttyS0' elif arg == 'sdl': - self.qemu_opt_script += ' -display sdl' + if 'gl' in sys.argv[1:]: + self.qemu_opt_script += ' -vga virtio -display sdl,gl=on' + elif 'gl-es' in sys.argv[1:]: + self.qemu_opt_script += ' -vga virtio -display sdl,gl=es' + else: + self.qemu_opt_script += ' -display sdl' elif arg == 'gtk': if 'gl' in sys.argv[1:]: self.qemu_opt_script += ' -vga virtio -display gtk,gl=on' diff --git a/poky/scripts/wic b/poky/scripts/wic index 1d89fb2ed..ea614100c 100755 --- a/poky/scripts/wic +++ b/poky/scripts/wic @@ -403,6 +403,9 @@ def wic_init_parser_rm(subparser): help="path: <image>:<vfat partition><path>") subparser.add_argument("-n", "--native-sysroot", help="path to the native sysroot containing the tools") + subparser.add_argument("-r", dest="recursive_delete", action="store_true", default=False, + help="remove directories and their contents recursively, " + " this only applies to ext* partition") def expandtype(rules): """ @@ -495,14 +498,18 @@ def init_parser(parser): subparser = subparsers.add_parser(subcmd, help=subcommands[subcmd][2]) subcommands[subcmd][3](subparser) +class WicArgumentParser(argparse.ArgumentParser): + def format_help(self): + return hlp.wic_help def main(argv): - parser = argparse.ArgumentParser( + parser = WicArgumentParser( description="wic version %s" % __version__) init_parser(parser) args = parser.parse_args(argv) + if args.debug: logger.setLevel(logging.DEBUG) @@ -510,8 +517,6 @@ def main(argv): if args.command == "help": if args.help_topic is None: parser.print_help() - print() - print("Please specify a help topic") elif args.help_topic in helptopics: hlpt = helptopics[args.help_topic] hlpt[0](hlpt[1], hlpt[2]) |