mirror of
https://git.yoctoproject.org/poky
synced 2026-09-12 15:49:36 +02:00
Compare commits
15 Commits
gatesgarth
...
gatesgarth
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
13143ea85a | ||
|
|
686e2a9f47 | ||
|
|
bc71ec0f1d | ||
|
|
264a1c06d4 | ||
|
|
b0a2adf311 | ||
|
|
2a05cec305 | ||
|
|
cfe478f8d3 | ||
|
|
976f69ff1b | ||
|
|
0f6ea144a7 | ||
|
|
cec9cfb059 | ||
|
|
9c1e94752e | ||
|
|
779ca22928 | ||
|
|
f2d2136dbb | ||
|
|
7d3fb188bf | ||
|
|
6a751048e5 |
@@ -28,7 +28,7 @@ logger = logging.getLogger("BitBake.Data")
|
|||||||
|
|
||||||
__setvar_keyword__ = ["_append", "_prepend", "_remove"]
|
__setvar_keyword__ = ["_append", "_prepend", "_remove"]
|
||||||
__setvar_regexp__ = re.compile(r'(?P<base>.*?)(?P<keyword>_append|_prepend|_remove)(_(?P<add>[^A-Z]*))?$')
|
__setvar_regexp__ = re.compile(r'(?P<base>.*?)(?P<keyword>_append|_prepend|_remove)(_(?P<add>[^A-Z]*))?$')
|
||||||
__expand_var_regexp__ = re.compile(r"\${[a-zA-Z0-9\-_+./~]+?}")
|
__expand_var_regexp__ = re.compile(r"\${[a-zA-Z0-9\-_+./~:]+?}")
|
||||||
__expand_python_regexp__ = re.compile(r"\${@.+?}")
|
__expand_python_regexp__ = re.compile(r"\${@.+?}")
|
||||||
__whitespace_split__ = re.compile(r'(\s)')
|
__whitespace_split__ = re.compile(r'(\s)')
|
||||||
__override_regexp__ = re.compile(r'[a-z0-9]+')
|
__override_regexp__ = re.compile(r'[a-z0-9]+')
|
||||||
@@ -481,6 +481,7 @@ class DataSmart(MutableMapping):
|
|||||||
|
|
||||||
def setVar(self, var, value, **loginfo):
|
def setVar(self, var, value, **loginfo):
|
||||||
#print("var=" + str(var) + " val=" + str(value))
|
#print("var=" + str(var) + " val=" + str(value))
|
||||||
|
var = var.replace(":", "_")
|
||||||
self.expand_cache = {}
|
self.expand_cache = {}
|
||||||
parsing=False
|
parsing=False
|
||||||
if 'parsing' in loginfo:
|
if 'parsing' in loginfo:
|
||||||
@@ -589,6 +590,8 @@ class DataSmart(MutableMapping):
|
|||||||
"""
|
"""
|
||||||
Rename the variable key to newkey
|
Rename the variable key to newkey
|
||||||
"""
|
"""
|
||||||
|
key = key.replace(":", "_")
|
||||||
|
newkey = newkey.replace(":", "_")
|
||||||
if key == newkey:
|
if key == newkey:
|
||||||
bb.warn("Calling renameVar with equivalent keys (%s) is invalid" % key)
|
bb.warn("Calling renameVar with equivalent keys (%s) is invalid" % key)
|
||||||
return
|
return
|
||||||
@@ -637,6 +640,7 @@ class DataSmart(MutableMapping):
|
|||||||
self.setVar(var + "_prepend", value, ignore=True, parsing=True)
|
self.setVar(var + "_prepend", value, ignore=True, parsing=True)
|
||||||
|
|
||||||
def delVar(self, var, **loginfo):
|
def delVar(self, var, **loginfo):
|
||||||
|
var = var.replace(":", "_")
|
||||||
self.expand_cache = {}
|
self.expand_cache = {}
|
||||||
|
|
||||||
loginfo['detail'] = ""
|
loginfo['detail'] = ""
|
||||||
@@ -664,6 +668,7 @@ class DataSmart(MutableMapping):
|
|||||||
override = None
|
override = None
|
||||||
|
|
||||||
def setVarFlag(self, var, flag, value, **loginfo):
|
def setVarFlag(self, var, flag, value, **loginfo):
|
||||||
|
var = var.replace(":", "_")
|
||||||
self.expand_cache = {}
|
self.expand_cache = {}
|
||||||
|
|
||||||
if 'op' not in loginfo:
|
if 'op' not in loginfo:
|
||||||
@@ -687,6 +692,7 @@ class DataSmart(MutableMapping):
|
|||||||
self.dict["__exportlist"]["_content"].add(var)
|
self.dict["__exportlist"]["_content"].add(var)
|
||||||
|
|
||||||
def getVarFlag(self, var, flag, expand=True, noweakdefault=False, parsing=False, retparser=False):
|
def getVarFlag(self, var, flag, expand=True, noweakdefault=False, parsing=False, retparser=False):
|
||||||
|
var = var.replace(":", "_")
|
||||||
if flag == "_content":
|
if flag == "_content":
|
||||||
cachename = var
|
cachename = var
|
||||||
else:
|
else:
|
||||||
@@ -814,6 +820,7 @@ class DataSmart(MutableMapping):
|
|||||||
return value
|
return value
|
||||||
|
|
||||||
def delVarFlag(self, var, flag, **loginfo):
|
def delVarFlag(self, var, flag, **loginfo):
|
||||||
|
var = var.replace(":", "_")
|
||||||
self.expand_cache = {}
|
self.expand_cache = {}
|
||||||
|
|
||||||
local_var, _ = self._findVar(var)
|
local_var, _ = self._findVar(var)
|
||||||
@@ -831,6 +838,7 @@ class DataSmart(MutableMapping):
|
|||||||
del self.dict[var][flag]
|
del self.dict[var][flag]
|
||||||
|
|
||||||
def appendVarFlag(self, var, flag, value, **loginfo):
|
def appendVarFlag(self, var, flag, value, **loginfo):
|
||||||
|
var = var.replace(":", "_")
|
||||||
loginfo['op'] = 'append'
|
loginfo['op'] = 'append'
|
||||||
loginfo['flag'] = flag
|
loginfo['flag'] = flag
|
||||||
self.varhistory.record(**loginfo)
|
self.varhistory.record(**loginfo)
|
||||||
@@ -838,6 +846,7 @@ class DataSmart(MutableMapping):
|
|||||||
self.setVarFlag(var, flag, newvalue, ignore=True)
|
self.setVarFlag(var, flag, newvalue, ignore=True)
|
||||||
|
|
||||||
def prependVarFlag(self, var, flag, value, **loginfo):
|
def prependVarFlag(self, var, flag, value, **loginfo):
|
||||||
|
var = var.replace(":", "_")
|
||||||
loginfo['op'] = 'prepend'
|
loginfo['op'] = 'prepend'
|
||||||
loginfo['flag'] = flag
|
loginfo['flag'] = flag
|
||||||
self.varhistory.record(**loginfo)
|
self.varhistory.record(**loginfo)
|
||||||
@@ -845,6 +854,7 @@ class DataSmart(MutableMapping):
|
|||||||
self.setVarFlag(var, flag, newvalue, ignore=True)
|
self.setVarFlag(var, flag, newvalue, ignore=True)
|
||||||
|
|
||||||
def setVarFlags(self, var, flags, **loginfo):
|
def setVarFlags(self, var, flags, **loginfo):
|
||||||
|
var = var.replace(":", "_")
|
||||||
self.expand_cache = {}
|
self.expand_cache = {}
|
||||||
infer_caller_details(loginfo)
|
infer_caller_details(loginfo)
|
||||||
if not var in self.dict:
|
if not var in self.dict:
|
||||||
@@ -859,6 +869,7 @@ class DataSmart(MutableMapping):
|
|||||||
self.dict[var][i] = flags[i]
|
self.dict[var][i] = flags[i]
|
||||||
|
|
||||||
def getVarFlags(self, var, expand = False, internalflags=False):
|
def getVarFlags(self, var, expand = False, internalflags=False):
|
||||||
|
var = var.replace(":", "_")
|
||||||
local_var, _ = self._findVar(var)
|
local_var, _ = self._findVar(var)
|
||||||
flags = {}
|
flags = {}
|
||||||
|
|
||||||
@@ -875,6 +886,7 @@ class DataSmart(MutableMapping):
|
|||||||
|
|
||||||
|
|
||||||
def delVarFlags(self, var, **loginfo):
|
def delVarFlags(self, var, **loginfo):
|
||||||
|
var = var.replace(":", "_")
|
||||||
self.expand_cache = {}
|
self.expand_cache = {}
|
||||||
if not var in self.dict:
|
if not var in self.dict:
|
||||||
self._makeShadowCopy(var)
|
self._makeShadowCopy(var)
|
||||||
|
|||||||
@@ -141,6 +141,10 @@ class Git(FetchMethod):
|
|||||||
ud.proto = 'file'
|
ud.proto = 'file'
|
||||||
else:
|
else:
|
||||||
ud.proto = "git"
|
ud.proto = "git"
|
||||||
|
if ud.host == "github.com" and ud.proto == "git":
|
||||||
|
# github stopped supporting git protocol
|
||||||
|
# https://github.blog/2021-09-01-improving-git-protocol-security-github/#no-more-unauthenticated-git
|
||||||
|
ud.proto = "https"
|
||||||
|
|
||||||
if not ud.proto in ('git', 'file', 'ssh', 'http', 'https', 'rsync'):
|
if not ud.proto in ('git', 'file', 'ssh', 'http', 'https', 'rsync'):
|
||||||
raise bb.fetch2.ParameterError("Invalid protocol type", ud.url)
|
raise bb.fetch2.ParameterError("Invalid protocol type", ud.url)
|
||||||
|
|||||||
@@ -316,7 +316,7 @@ class Wget(FetchMethod):
|
|||||||
except (TypeError, ImportError, IOError, netrc.NetrcParseError):
|
except (TypeError, ImportError, IOError, netrc.NetrcParseError):
|
||||||
pass
|
pass
|
||||||
|
|
||||||
with opener.open(r) as response:
|
with opener.open(r, timeout=30) as response:
|
||||||
pass
|
pass
|
||||||
except urllib.error.URLError as e:
|
except urllib.error.URLError as e:
|
||||||
if try_again:
|
if try_again:
|
||||||
|
|||||||
@@ -97,6 +97,7 @@ class DataNode(AstNode):
|
|||||||
def eval(self, data):
|
def eval(self, data):
|
||||||
groupd = self.groupd
|
groupd = self.groupd
|
||||||
key = groupd["var"]
|
key = groupd["var"]
|
||||||
|
key = key.replace(":", "_")
|
||||||
loginfo = {
|
loginfo = {
|
||||||
'variable': key,
|
'variable': key,
|
||||||
'file': self.filename,
|
'file': self.filename,
|
||||||
@@ -207,6 +208,7 @@ class ExportFuncsNode(AstNode):
|
|||||||
def eval(self, data):
|
def eval(self, data):
|
||||||
|
|
||||||
for func in self.n:
|
for func in self.n:
|
||||||
|
func = func.replace(":", "_")
|
||||||
calledfunc = self.classname + "_" + func
|
calledfunc = self.classname + "_" + func
|
||||||
|
|
||||||
if data.getVar(func, False) and not data.getVarFlag(func, 'export_func', False):
|
if data.getVar(func, False) and not data.getVarFlag(func, 'export_func', False):
|
||||||
|
|||||||
@@ -22,7 +22,7 @@ from .ConfHandler import include, init
|
|||||||
# For compatibility
|
# For compatibility
|
||||||
bb.deprecate_import(__name__, "bb.parse", ["vars_from_file"])
|
bb.deprecate_import(__name__, "bb.parse", ["vars_from_file"])
|
||||||
|
|
||||||
__func_start_regexp__ = re.compile(r"(((?P<py>python)|(?P<fr>fakeroot))\s*)*(?P<func>[\w\.\-\+\{\}\$]+)?\s*\(\s*\)\s*{$" )
|
__func_start_regexp__ = re.compile(r"(((?P<py>python(?=(\s|\()))|(?P<fr>fakeroot(?=\s)))\s*)*(?P<func>[\w\.\-\+\{\}\$:]+)?\s*\(\s*\)\s*{$" )
|
||||||
__inherit_regexp__ = re.compile(r"inherit\s+(.+)" )
|
__inherit_regexp__ = re.compile(r"inherit\s+(.+)" )
|
||||||
__export_func_regexp__ = re.compile(r"EXPORT_FUNCTIONS\s+(.+)" )
|
__export_func_regexp__ = re.compile(r"EXPORT_FUNCTIONS\s+(.+)" )
|
||||||
__addtask_regexp__ = re.compile(r"addtask\s+(?P<func>\w+)\s*((before\s*(?P<before>((.*(?=after))|(.*))))|(after\s*(?P<after>((.*(?=before))|(.*)))))*")
|
__addtask_regexp__ = re.compile(r"addtask\s+(?P<func>\w+)\s*((before\s*(?P<before>((.*(?=after))|(.*))))|(after\s*(?P<after>((.*(?=before))|(.*)))))*")
|
||||||
|
|||||||
@@ -20,7 +20,7 @@ from bb.parse import ParseError, resolve_file, ast, logger, handle
|
|||||||
__config_regexp__ = re.compile( r"""
|
__config_regexp__ = re.compile( r"""
|
||||||
^
|
^
|
||||||
(?P<exp>export\s+)?
|
(?P<exp>export\s+)?
|
||||||
(?P<var>[a-zA-Z0-9\-_+.${}/~]+?)
|
(?P<var>[a-zA-Z0-9\-_+.${}/~:]+?)
|
||||||
(\[(?P<flag>[a-zA-Z0-9\-_+.]+)\])?
|
(\[(?P<flag>[a-zA-Z0-9\-_+.]+)\])?
|
||||||
|
|
||||||
\s* (
|
\s* (
|
||||||
|
|||||||
@@ -151,7 +151,7 @@ def findPreferredProvider(pn, cfgData, dataCache, pkg_pn = None, item = None):
|
|||||||
if item:
|
if item:
|
||||||
itemstr = " (for item %s)" % item
|
itemstr = " (for item %s)" % item
|
||||||
if preferred_file is None:
|
if preferred_file is None:
|
||||||
logger.info("preferred version %s of %s not available%s", pv_str, pn, itemstr)
|
logger.warning("preferred version %s of %s not available%s", pv_str, pn, itemstr)
|
||||||
available_vers = []
|
available_vers = []
|
||||||
for file_set in pkg_pn:
|
for file_set in pkg_pn:
|
||||||
for f in file_set:
|
for f in file_set:
|
||||||
@@ -163,7 +163,7 @@ def findPreferredProvider(pn, cfgData, dataCache, pkg_pn = None, item = None):
|
|||||||
available_vers.append(ver_str)
|
available_vers.append(ver_str)
|
||||||
if available_vers:
|
if available_vers:
|
||||||
available_vers.sort()
|
available_vers.sort()
|
||||||
logger.info("versions of %s available: %s", pn, ' '.join(available_vers))
|
logger.warning("versions of %s available: %s", pn, ' '.join(available_vers))
|
||||||
else:
|
else:
|
||||||
logger.debug(1, "selecting %s as PREFERRED_VERSION %s of package %s%s", preferred_file, pv_str, pn, itemstr)
|
logger.debug(1, "selecting %s as PREFERRED_VERSION %s of package %s%s", preferred_file, pv_str, pn, itemstr)
|
||||||
|
|
||||||
|
|||||||
@@ -111,9 +111,9 @@ ${D}${libdir}/pkgconfig/*.pc
|
|||||||
self.assertExecs(set(["sed"]))
|
self.assertExecs(set(["sed"]))
|
||||||
|
|
||||||
def test_parameter_expansion_modifiers(self):
|
def test_parameter_expansion_modifiers(self):
|
||||||
# - and + are also valid modifiers for parameter expansion, but are
|
# -,+ and : are also valid modifiers for parameter expansion, but are
|
||||||
# valid characters in bitbake variable names, so are not included here
|
# valid characters in bitbake variable names, so are not included here
|
||||||
for i in ('=', ':-', ':=', '?', ':?', ':+', '#', '%', '##', '%%'):
|
for i in ('=', '?', '#', '%', '##', '%%'):
|
||||||
name = "foo%sbar" % i
|
name = "foo%sbar" % i
|
||||||
self.parseExpression("${%s}" % name)
|
self.parseExpression("${%s}" % name)
|
||||||
self.assertNotIn(name, self.references)
|
self.assertNotIn(name, self.references)
|
||||||
|
|||||||
@@ -939,7 +939,7 @@ class FetcherNetworkTest(FetcherTest):
|
|||||||
|
|
||||||
@skipIfNoNetwork()
|
@skipIfNoNetwork()
|
||||||
def test_git_submodule_CLI11(self):
|
def test_git_submodule_CLI11(self):
|
||||||
url = "gitsm://github.com/CLIUtils/CLI11;protocol=git;rev=bd4dc911847d0cde7a6b41dfa626a85aab213baf"
|
url = "gitsm://github.com/CLIUtils/CLI11;protocol=git;rev=bd4dc911847d0cde7a6b41dfa626a85aab213baf;branch=main"
|
||||||
fetcher = bb.fetch.Fetch([url], self.d)
|
fetcher = bb.fetch.Fetch([url], self.d)
|
||||||
fetcher.download()
|
fetcher.download()
|
||||||
# Previous cwd has been deleted
|
# Previous cwd has been deleted
|
||||||
@@ -954,12 +954,12 @@ class FetcherNetworkTest(FetcherTest):
|
|||||||
@skipIfNoNetwork()
|
@skipIfNoNetwork()
|
||||||
def test_git_submodule_update_CLI11(self):
|
def test_git_submodule_update_CLI11(self):
|
||||||
""" Prevent regression on update detection not finding missing submodule, or modules without needed commits """
|
""" Prevent regression on update detection not finding missing submodule, or modules without needed commits """
|
||||||
url = "gitsm://github.com/CLIUtils/CLI11;protocol=git;rev=cf6a99fa69aaefe477cc52e3ef4a7d2d7fa40714"
|
url = "gitsm://github.com/CLIUtils/CLI11;protocol=git;rev=cf6a99fa69aaefe477cc52e3ef4a7d2d7fa40714;branch=main"
|
||||||
fetcher = bb.fetch.Fetch([url], self.d)
|
fetcher = bb.fetch.Fetch([url], self.d)
|
||||||
fetcher.download()
|
fetcher.download()
|
||||||
|
|
||||||
# CLI11 that pulls in a newer nlohmann-json
|
# CLI11 that pulls in a newer nlohmann-json
|
||||||
url = "gitsm://github.com/CLIUtils/CLI11;protocol=git;rev=49ac989a9527ee9bb496de9ded7b4872c2e0e5ca"
|
url = "gitsm://github.com/CLIUtils/CLI11;protocol=git;rev=49ac989a9527ee9bb496de9ded7b4872c2e0e5ca;branch=main"
|
||||||
fetcher = bb.fetch.Fetch([url], self.d)
|
fetcher = bb.fetch.Fetch([url], self.d)
|
||||||
fetcher.download()
|
fetcher.download()
|
||||||
# Previous cwd has been deleted
|
# Previous cwd has been deleted
|
||||||
@@ -993,7 +993,7 @@ class FetcherNetworkTest(FetcherTest):
|
|||||||
""" Prevent regression on deeply nested submodules not being checked out properly, even though they were fetched. """
|
""" Prevent regression on deeply nested submodules not being checked out properly, even though they were fetched. """
|
||||||
|
|
||||||
# This repository also has submodules where the module (name), path and url do not align
|
# This repository also has submodules where the module (name), path and url do not align
|
||||||
url = "gitsm://github.com/azure/iotedge.git;protocol=git;rev=d76e0316c6f324345d77c48a83ce836d09392699"
|
url = "gitsm://github.com/azure/iotedge.git;protocol=git;rev=d76e0316c6f324345d77c48a83ce836d09392699;branch=main"
|
||||||
fetcher = bb.fetch.Fetch([url], self.d)
|
fetcher = bb.fetch.Fetch([url], self.d)
|
||||||
fetcher.download()
|
fetcher.download()
|
||||||
# Previous cwd has been deleted
|
# Previous cwd has been deleted
|
||||||
@@ -1180,7 +1180,7 @@ class FetchLatestVersionTest(FetcherTest):
|
|||||||
("presentproto", "git://git.yoctoproject.org/bbfetchtests-presentproto", "24f3a56e541b0a9e6c6ee76081f441221a120ef9", "")
|
("presentproto", "git://git.yoctoproject.org/bbfetchtests-presentproto", "24f3a56e541b0a9e6c6ee76081f441221a120ef9", "")
|
||||||
: "1.0",
|
: "1.0",
|
||||||
# version pattern "pkg_name-vX.Y.Z"
|
# version pattern "pkg_name-vX.Y.Z"
|
||||||
("dtc", "git://git.qemu.org/dtc.git", "65cc4d2748a2c2e6f27f1cf39e07a5dbabd80ebf", "")
|
("dtc", "git://git.yoctoproject.org/bbfetchtests-dtc.git", "65cc4d2748a2c2e6f27f1cf39e07a5dbabd80ebf", "")
|
||||||
: "1.4.0",
|
: "1.4.0",
|
||||||
# combination version pattern
|
# combination version pattern
|
||||||
("sysprof", "git://gitlab.gnome.org/GNOME/sysprof.git;protocol=https", "cd44ee6644c3641507fb53b8a2a69137f2971219", "")
|
("sysprof", "git://gitlab.gnome.org/GNOME/sysprof.git;protocol=https", "cd44ee6644c3641507fb53b8a2a69137f2971219", "")
|
||||||
|
|||||||
@@ -15,8 +15,27 @@
|
|||||||
import os
|
import os
|
||||||
import sys
|
import sys
|
||||||
import datetime
|
import datetime
|
||||||
|
try:
|
||||||
|
import yaml
|
||||||
|
except ImportError:
|
||||||
|
sys.stderr.write("The Yocto Project Sphinx documentation requires PyYAML.\
|
||||||
|
\nPlease make sure to install pyyaml python package.\n")
|
||||||
|
sys.exit(1)
|
||||||
|
|
||||||
current_version = "3.2.4"
|
# current_version = "dev"
|
||||||
|
# bitbake_version = "" # Leave empty for development branch
|
||||||
|
# Obtain versions from poky.yaml instead
|
||||||
|
with open("poky.yaml") as data:
|
||||||
|
buff = data.read()
|
||||||
|
subst_vars = yaml.safe_load(buff)
|
||||||
|
if "DOCCONF_VERSION" not in subst_vars:
|
||||||
|
sys.stderr.write("Please set DOCCONF_VERSION in poky.yaml")
|
||||||
|
sys.exit(1)
|
||||||
|
current_version = subst_vars["DOCCONF_VERSION"]
|
||||||
|
if "BITBAKE_SERIES" not in subst_vars:
|
||||||
|
sys.stderr.write("Please set BITBAKE_SERIES in poky.yaml")
|
||||||
|
sys.exit(1)
|
||||||
|
bitbake_version = subst_vars["BITBAKE_SERIES"]
|
||||||
|
|
||||||
# String used in sidebar
|
# String used in sidebar
|
||||||
version = 'Version: ' + current_version
|
version = 'Version: ' + current_version
|
||||||
|
|||||||
@@ -5,6 +5,8 @@ DISTRO_NAME_NO_CAP_MINUS_ONE : "dunfell"
|
|||||||
YOCTO_DOC_VERSION : "3.2.4"
|
YOCTO_DOC_VERSION : "3.2.4"
|
||||||
YOCTO_DOC_VERSION_MINUS_ONE : "3.1.7"
|
YOCTO_DOC_VERSION_MINUS_ONE : "3.1.7"
|
||||||
DISTRO_REL_TAG : "yocto-3.2.4"
|
DISTRO_REL_TAG : "yocto-3.2.4"
|
||||||
|
DOCCONF_VERSION : "3.2.4"
|
||||||
|
BITBAKE_SERIES : "1.48"
|
||||||
POKYVERSION : "24.0.4"
|
POKYVERSION : "24.0.4"
|
||||||
YOCTO_POKY : "poky-&DISTRO_NAME_NO_CAP;-&POKYVERSION;"
|
YOCTO_POKY : "poky-&DISTRO_NAME_NO_CAP;-&POKYVERSION;"
|
||||||
YOCTO_DL_URL : "https://downloads.yoctoproject.org"
|
YOCTO_DL_URL : "https://downloads.yoctoproject.org"
|
||||||
|
|||||||
@@ -1,8 +1,11 @@
|
|||||||
# Support for device tree generation
|
# Support for device tree generation
|
||||||
PACKAGES_append = " \
|
python () {
|
||||||
${KERNEL_PACKAGE_NAME}-devicetree \
|
if not bb.data.inherits_class('nopackages', d):
|
||||||
${@[d.getVar('KERNEL_PACKAGE_NAME') + '-image-zimage-bundle', ''][d.getVar('KERNEL_DEVICETREE_BUNDLE') != '1']} \
|
d.appendVar("PACKAGES", " ${KERNEL_PACKAGE_NAME}-devicetree")
|
||||||
"
|
if d.getVar('KERNEL_DEVICETREE_BUNDLE') == '1':
|
||||||
|
d.appendVar("PACKAGES", " ${KERNEL_PACKAGE_NAME}-image-zimage-bundle")
|
||||||
|
}
|
||||||
|
|
||||||
FILES_${KERNEL_PACKAGE_NAME}-devicetree = "/${KERNEL_IMAGEDEST}/*.dtb /${KERNEL_IMAGEDEST}/*.dtbo"
|
FILES_${KERNEL_PACKAGE_NAME}-devicetree = "/${KERNEL_IMAGEDEST}/*.dtb /${KERNEL_IMAGEDEST}/*.dtbo"
|
||||||
FILES_${KERNEL_PACKAGE_NAME}-image-zimage-bundle = "/${KERNEL_IMAGEDEST}/zImage-*.dtb.bin"
|
FILES_${KERNEL_PACKAGE_NAME}-image-zimage-bundle = "/${KERNEL_IMAGEDEST}/zImage-*.dtb.bin"
|
||||||
|
|
||||||
|
|||||||
@@ -90,6 +90,8 @@ python __anonymous () {
|
|||||||
imagedest = d.getVar('KERNEL_IMAGEDEST')
|
imagedest = d.getVar('KERNEL_IMAGEDEST')
|
||||||
|
|
||||||
for type in types.split():
|
for type in types.split():
|
||||||
|
if bb.data.inherits_class('nopackages', d):
|
||||||
|
continue
|
||||||
typelower = type.lower()
|
typelower = type.lower()
|
||||||
d.appendVar('PACKAGES', ' %s-image-%s' % (kname, typelower))
|
d.appendVar('PACKAGES', ' %s-image-%s' % (kname, typelower))
|
||||||
d.setVar('FILES_' + kname + '-image-' + typelower, '/' + imagedest + '/' + type + '-${KERNEL_VERSION_NAME}' + ' /' + imagedest + '/' + type)
|
d.setVar('FILES_' + kname + '-image-' + typelower, '/' + imagedest + '/' + type + '-${KERNEL_VERSION_NAME}' + ' /' + imagedest + '/' + type)
|
||||||
|
|||||||
@@ -189,7 +189,7 @@ class PackageManager(object, metaclass=ABCMeta):
|
|||||||
bb.utils.remove(self.intercepts_dir, True)
|
bb.utils.remove(self.intercepts_dir, True)
|
||||||
bb.utils.mkdirhier(self.intercepts_dir)
|
bb.utils.mkdirhier(self.intercepts_dir)
|
||||||
for intercept in postinst_intercepts:
|
for intercept in postinst_intercepts:
|
||||||
bb.utils.copyfile(intercept, os.path.join(self.intercepts_dir, os.path.basename(intercept)))
|
shutil.copy(intercept, os.path.join(self.intercepts_dir, os.path.basename(intercept)))
|
||||||
|
|
||||||
@abstractmethod
|
@abstractmethod
|
||||||
def _handle_intercept_failure(self, failed_script):
|
def _handle_intercept_failure(self, failed_script):
|
||||||
|
|||||||
133
meta/recipes-extended/tar/tar/CVE-2021-20193.patch
Normal file
133
meta/recipes-extended/tar/tar/CVE-2021-20193.patch
Normal file
@@ -0,0 +1,133 @@
|
|||||||
|
From d9d4435692150fa8ff68e1b1a473d187cc3fd777 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Sergey Poznyakoff <gray@gnu.org>
|
||||||
|
Date: Sun, 17 Jan 2021 20:41:11 +0200
|
||||||
|
Subject: Fix memory leak in read_header
|
||||||
|
|
||||||
|
Bug reported in https://savannah.gnu.org/bugs/?59897
|
||||||
|
|
||||||
|
* src/list.c (read_header): Don't return directly from the loop.
|
||||||
|
Instead set the status and break. Return the status. Free
|
||||||
|
next_long_name and next_long_link before returning.
|
||||||
|
|
||||||
|
CVE: CVE-2021-20193
|
||||||
|
Upstream-Status: Backport
|
||||||
|
[https://git.savannah.gnu.org/cgit/tar.git/patch/?id=d9d4435692150fa8ff68e1b1a473d187cc3fd777]
|
||||||
|
Signed-off-by: Anatol Belski <anbelski@linux.microsoft.com>
|
||||||
|
|
||||||
|
---
|
||||||
|
src/list.c | 40 ++++++++++++++++++++++++++++------------
|
||||||
|
1 file changed, 28 insertions(+), 12 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/src/list.c b/src/list.c
|
||||||
|
index e40a5c8..d7ef441 100644
|
||||||
|
--- a/src/list.c
|
||||||
|
+++ b/src/list.c
|
||||||
|
@@ -408,26 +408,27 @@ read_header (union block **return_block, struct tar_stat_info *info,
|
||||||
|
enum read_header_mode mode)
|
||||||
|
{
|
||||||
|
union block *header;
|
||||||
|
- union block *header_copy;
|
||||||
|
char *bp;
|
||||||
|
union block *data_block;
|
||||||
|
size_t size, written;
|
||||||
|
- union block *next_long_name = 0;
|
||||||
|
- union block *next_long_link = 0;
|
||||||
|
+ union block *next_long_name = NULL;
|
||||||
|
+ union block *next_long_link = NULL;
|
||||||
|
size_t next_long_name_blocks = 0;
|
||||||
|
size_t next_long_link_blocks = 0;
|
||||||
|
-
|
||||||
|
+ enum read_header status = HEADER_SUCCESS;
|
||||||
|
+
|
||||||
|
while (1)
|
||||||
|
{
|
||||||
|
- enum read_header status;
|
||||||
|
-
|
||||||
|
header = find_next_block ();
|
||||||
|
*return_block = header;
|
||||||
|
if (!header)
|
||||||
|
- return HEADER_END_OF_FILE;
|
||||||
|
+ {
|
||||||
|
+ status = HEADER_END_OF_FILE;
|
||||||
|
+ break;
|
||||||
|
+ }
|
||||||
|
|
||||||
|
if ((status = tar_checksum (header, false)) != HEADER_SUCCESS)
|
||||||
|
- return status;
|
||||||
|
+ break;
|
||||||
|
|
||||||
|
/* Good block. Decode file size and return. */
|
||||||
|
|
||||||
|
@@ -437,7 +438,10 @@ read_header (union block **return_block, struct tar_stat_info *info,
|
||||||
|
{
|
||||||
|
info->stat.st_size = OFF_FROM_HEADER (header->header.size);
|
||||||
|
if (info->stat.st_size < 0)
|
||||||
|
- return HEADER_FAILURE;
|
||||||
|
+ {
|
||||||
|
+ status = HEADER_FAILURE;
|
||||||
|
+ break;
|
||||||
|
+ }
|
||||||
|
}
|
||||||
|
|
||||||
|
if (header->header.typeflag == GNUTYPE_LONGNAME
|
||||||
|
@@ -447,10 +451,14 @@ read_header (union block **return_block, struct tar_stat_info *info,
|
||||||
|
|| header->header.typeflag == SOLARIS_XHDTYPE)
|
||||||
|
{
|
||||||
|
if (mode == read_header_x_raw)
|
||||||
|
- return HEADER_SUCCESS_EXTENDED;
|
||||||
|
+ {
|
||||||
|
+ status = HEADER_SUCCESS_EXTENDED;
|
||||||
|
+ break;
|
||||||
|
+ }
|
||||||
|
else if (header->header.typeflag == GNUTYPE_LONGNAME
|
||||||
|
|| header->header.typeflag == GNUTYPE_LONGLINK)
|
||||||
|
{
|
||||||
|
+ union block *header_copy;
|
||||||
|
size_t name_size = info->stat.st_size;
|
||||||
|
size_t n = name_size % BLOCKSIZE;
|
||||||
|
size = name_size + BLOCKSIZE;
|
||||||
|
@@ -517,7 +525,10 @@ read_header (union block **return_block, struct tar_stat_info *info,
|
||||||
|
xheader_decode_global (&xhdr);
|
||||||
|
xheader_destroy (&xhdr);
|
||||||
|
if (mode == read_header_x_global)
|
||||||
|
- return HEADER_SUCCESS_EXTENDED;
|
||||||
|
+ {
|
||||||
|
+ status = HEADER_SUCCESS_EXTENDED;
|
||||||
|
+ break;
|
||||||
|
+ }
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Loop! */
|
||||||
|
@@ -536,6 +547,7 @@ read_header (union block **return_block, struct tar_stat_info *info,
|
||||||
|
name = next_long_name->buffer + BLOCKSIZE;
|
||||||
|
recent_long_name = next_long_name;
|
||||||
|
recent_long_name_blocks = next_long_name_blocks;
|
||||||
|
+ next_long_name = NULL;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
@@ -567,6 +579,7 @@ read_header (union block **return_block, struct tar_stat_info *info,
|
||||||
|
name = next_long_link->buffer + BLOCKSIZE;
|
||||||
|
recent_long_link = next_long_link;
|
||||||
|
recent_long_link_blocks = next_long_link_blocks;
|
||||||
|
+ next_long_link = NULL;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
@@ -578,9 +591,12 @@ read_header (union block **return_block, struct tar_stat_info *info,
|
||||||
|
}
|
||||||
|
assign_string (&info->link_name, name);
|
||||||
|
|
||||||
|
- return HEADER_SUCCESS;
|
||||||
|
+ break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
+ free (next_long_name);
|
||||||
|
+ free (next_long_link);
|
||||||
|
+ return status;
|
||||||
|
}
|
||||||
|
|
||||||
|
#define ISOCTAL(c) ((c)>='0'&&(c)<='7')
|
||||||
|
--
|
||||||
|
cgit v1.2.1
|
||||||
|
|
||||||
@@ -8,6 +8,7 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504"
|
|||||||
|
|
||||||
SRC_URI = "${GNU_MIRROR}/tar/tar-${PV}.tar.bz2 \
|
SRC_URI = "${GNU_MIRROR}/tar/tar-${PV}.tar.bz2 \
|
||||||
file://musl_dirent.patch \
|
file://musl_dirent.patch \
|
||||||
|
file://CVE-2021-20193.patch \
|
||||||
"
|
"
|
||||||
|
|
||||||
SRC_URI[md5sum] = "17917356fff5cb4bd3cd5a6c3e727b05"
|
SRC_URI[md5sum] = "17917356fff5cb4bd3cd5a6c3e727b05"
|
||||||
|
|||||||
Reference in New Issue
Block a user